FOR TIPS, gUIDES & TUTORIALS

subscribe to our Youtube

GO TO YOUTUBE

14455 questions

17168 answers

28195 comments

0 members

We are migrating to our new platform at https://community.teltonika.lt. Moving forward, you can continue discussions on this new platform. This current platform will be temporarily maintained for reference purposes.
0 votes
1,842 views 1 comments
by

Hello,

I'm trying to communicate with an external device that has an USB to Serial converter (using an FTDI driver). The device is recognized as /dev/ttyUSB0 when I plug it in the USB port of the RUT955. I've set the protocol configuration in the USB Tools --> USB to Serial page as the image below (300 baud, 7bits, even parity, 1 stop bit), and I'm able to connect to the selected port (8888) using telnet, but there is no data flowing on it.

In order to receive data from the external device, I need to send a "request string" to it and wait for its reply. However, when I send it on the telnet console, there is no reply.

I was, however, able to get something out of it by following this procedure:

  1. Connecting to the telnet port 8888
  2. Opening an ssh connection to the RUT955 as root
  3. Running minicom from the RUT955 ssh terminal with the same configuration as the image above (minicom package was previously installed in RUT955 using opkg). 
  4. Going to the telnel console and sending the "request string"
  5. The external device replies. The reply is partially split (in a random way) between the telnet and minicom consoles (sequences of 4 to 10 characters show up in the telnet console, and then another 4 to 10 characters in the minicom console, and then some more in the telnet, and so on)

Other notes:

  • If I issue the "request string" from the minicom console, there is no reply from the external device.
  • The reply in unusable, as the data is randomly split between the two opened channels that are accessing the Serial port. 
  • Other serial consoles such as sc (instead of minicom) have the same data split results.
  • RUT955 firmware version is RUT9XX_R_00.05.00.5. Kernel 3.18.44
  • The external device works properly when connected to a laptop with a serial client
  • If at any point I close the minicom connection, the telnet 

In short:

  • Transmitting data from RUT955 to the external device is only possible by telnet, while a serial console is running in parallel on an ssh terminal
  • When receiving data from the external device to RUT955 through telnet (when no serial console is running), the data is correctly received
  • When receiving data from the external device to RUT955 (while a serial console is running), the data is split randomly between telnet and serial console 

Would it be possible to properly communicate with the external device? (ideally using the USB over IP connection, but over a serial client like minicom would work as well)

by
You cannot have two processes listening to the same serial port at the same time, because the data will be split as each process consumes data from the port.

1 Answer

0 votes
by anonymous
Hi,

Have you tried to use other serial communication clients, like Hercules? Since I tested serial communication via USB-to-Serial data was sent and received with both devices. However, when data was received the extra spaces to it was added, maybe this cause issue with data sending and receiving from serial device.