I have 3 xbee receiver devices connected to Ubuntu on port ttyUSB0, ttyUSB1, ttyUSB2. Out of these 3, device on ttyUSB2 stops working after every 2-3days. When I open xctu, it shows below error:
Could not find device on port /dev/ttyUSB2. Error initializing xbee device parameters. Connection timeout. Could not read device information.
When I type ls /dev or lsusb, I can see all 3 devices connected and all the 3 serial ports but the device on /dev/ttyUSB2 doesnt respond. When I unplug it and plug it back, it starts operating normally. But again after 2-3 days, it stops responding.
Can anyone please suggest what could be the issue.
I had the same problem. Turned out another program (Cura / Creality Slicer, in my case) was intermittendly checking the serial ports for connected devices, which (I assume) interrupted serial communication for XCTU.
Closing the other program solved the issue.
Related
I have a device with a RS-232 DB9 port connected to my Raspberry Pi over a USB-to-serial cable.
Initially, I am able to communicate with the device without issue using pyserial.
However, after some variable length of time, I can no longer receive messages from the device.
If I close the serial port and attempt to open a new one, using the same code I normally use:
import serial
ser = serial.Serial(
serial_path,
9600,
bytesize=serial.EIGHTBITS,
parity=serial.PARITY_NONE,
stopbits=serial.STOPBITS_ONE
)
I get:
File "/opt/venv/lib/python3.8/site-packages/serial/serialposix.py", line 713, in _update_dtr_state
fcntl.ioctl(self.fd, TIOCMBIS, TIOCM_DTR_str)
OSError: [Errno 5] Input/output error
I have no way to get around this error and re-establish communication with the device unless I physically unplug and replug the USB port.
In case it's relevant, the RS-232 device is connected to my RaspBerry Pi via an intermediate USB Hub and a USB extension cable.
I also tried setting rtscts=True and dsrdtr=True when creating the pyserial object. The IOError no longer occurs; however the serial device remains uncommunicative.
What might be the underlying issue here? Any guidance would be appreciated. Is there any way to detect the issue and reset the serial port via the shell, without requiring physical intervention?
recently I started using my arduino again, but it can no longer run sketches or anything. All I get is this error:
processing.app.debug.RunnerException at cc.arduino.packages.uploaders.SerialUploader.uploadUsingPreferences(SerialUploader.java:152)
at cc.arduino.UploaderUtils.upload(UploaderUtils.java:77)
at processing.app.SketchController.upload(SketchController.java:732)
at processing.app.SketchController.exportApplet(SketchController.java:703)
at processing.app.Editor$UploadHandler.run(Editor.java:2047)
at java.lang.Thread.run(Thread.java:748)
Caused by: processing.app.SerialException: Error touching serial port 'COM4'.
at processing.app.Serial.touchForCDCReset(Serial.java:107)
at cc.arduino.packages.uploaders.SerialUploader.uploadUsingPreferences(SerialUploader.java:136)
... 5 more
Caused by: jssc.SerialPortException: Port name - COM4; Method name - openPort(); Exception type - Port busy.
at jssc.SerialPort.openPort(SerialPort.java:164)
at processing.app.Serial.touchForCDCReset(Serial.java:101)
... 6 more
I tried restarting pc, using different port, stopping other devices in device manager from using the port, reinstalling the IDE, and more.
nothing works.
It cant even run blink without throwing this error.
I am using windows 10 pc, Arduino MKR WIFI 1010 , with a usb 3.0 cable, the Arduino used to work too.
none of the other answers on the internet has worked for me.
could this be a problem? ->
EDIT: I figured out what was wrong. the cable I was connecting to my arduino and computer was ONLY a charging cable, it had no ability to send serial data across to the arduino
this can happen if you have other stuff connected to your arduino that sends or receives data, like a bluetooth module.
Try disconnecting everything from the board and resetting the board, then connect the usb to your arduino
The issue was I was using the wrong type of cable for connecting my arduino to computer
I've been trying to test a FT201XQ USB-I2C breakout board: UMFT201XB-01, so I can connect it to a master device such as an Arduino and sniff what that device is sending through I2C.
To see the output of the slave device I have successfully configured a Virtual COM PORT by installing the D2XX drivers provided by ftdchip.com. I can open the serial port through puTTY and everything seems fine in that regard.
Then, i've loaded the "master_writer" example on my Arduino, which sends 1 byte at a time to an address (0x22 is specified in the UM201XB-01 datasheet as the default address).
Nothing seems to happen in the COM port that i've earlier opened. Do I need to configure/program the FTDI device in some way? In that case, how can I do it, in a general way?
UMFT201XB-01 board http://www.ftdichip.com/Support/Documents/DataSheets/Modules/DS_UMFT201_220_230XB.pdf
Thank you in advance, and sorry if this is a "noob" question : P
I've installed the Arduino virtual USB serial port driver, it's appeared as COM4 on my device manager. I double checked by listing all available serial ports in powershell
> [System.IO.Ports.SerialPort]::getportnames()
COM1
COM4
However, when I try to do an echo to the serial port, it says it does not exist
> echo helloworld > COM4
The system cannot find the file specified.
I am trying to upload some firmware in to my arduino, but I kept getting denied by the port. Trying a different USB gives me the same result. I wrote a small program to test the serial port and I get the error:
The serial port "COM4" does not exist.
The device name of a serial port on Windows is \\.\COMn where n is the port number. A device driver can emulate the DOS device name, like "COM4" if it chooses to do so, very simple to do in the device driver code. But that's an increasingly rare thing to do, especially for port numbers larger than 2 and extra especially for port numbers larger than 4. So seeing your echo command fail is not unusual.
A serial port cannot be shared, it can only be opened once by a process and everybody else that tries to open it will get the fail-whale ERROR_ACCESS_DENIED error code. Necessarily so, serial ports sit at the very bottom layer of the OSI model, there is no protocol that arbitrates access to the port. Or to put it another way, the operating system has no guidance on who should get the data that the port receives. There can be only one candidate, the process that opened the port first. So the error message you got is not unusual, you have to make sure that nobody else is using the port. Including the Arduino serial port monitor.
I'm using Python 2.7, pySerial under windows 7.
I have 8 devices, they are connected to my PC via Virtual COM port (Silicon Labs CP210x USB to UART Bridge), I'm testing them With multiprocessing all 8 COM ports are open and each time i'm sending command to one unit only, there is no MultiThreading.
The problem is that after X time (it could be 10 minutes or 5 hours), the output Queue of the serial ports fails to send me responses. it's not a specific port each time it's a different port (it can be several ports)
It's importent to say, the device gets my command and do it. the fail is to get the response, The device i'm testing is OK for sure.
I am sniffing the port with Serial monitor, all the commands send OK and the device makes them, only it doesn't respond.
Any idea's ?
There could be n number of reasons:
Buffers might be full
Com Port is not working or might be
And finally the device is malfunctioning..
Check out these things might be it will help you.