Serial port over USB in Linux changes unexpectedly

I have a problem with a custom electronic device communicating with a workstation via RS232 on USB interface. As soon the device is connected, it receive, says, the address /dev/ttyUSB0, after some (random ) time of sending receive commands, the device appear to hang. By looking at the device events ( dmesg ), we found the following error:

ftdi_sio ttyUSB0: failed to get modem status: -32 ... USB disconnect, device number 29 [66208.321174] ftdi_sio ttyUSB0: FTDI USB Serial Device converter now disconnected from ttyUSB0 [66208.497613] usb 1-1.5: new full-speed USB device number 30 using ehci-pci [66208.589052] usb 1-1.5: New USB device found, idVendor=0403, idProduct=6001 [66208.589055] usb 1-1.5: New USB device strings: Mfr=1, Product=2, SerialNumber=3

So apparently the system notices a device disconnection/reconnection, thus, the device is mounted to another port, ie /dev/ttyUSB1, causing further communication failure. Creating a test bed changes the behavior: error seems to appear less frequently, while using a complete application the error appears recurrently. Application uses jSSC-2.8.0 to communicate with the serial port. The whole application is written in java 8, and uses the Restle library to issue some REST requests to some web services. What can cause these strange behavior?

ADDED as per @DarkFalcon comment below, test bed polls the device usually faster than the real app: this could possibly explain why test perfors better than the other.

-------------Problems Reply------------

This error is printed by driver due to broken pipe. See ftdi_get_modem_status() in driver file drivers/usb/serial/ftdi_sio.c.

You may try other libraries like 'serial communication manager', purejavacom etc. And see if problem persist. I feel, first identify who is actually creating problem; your app, serial library or driver. Then accordingly move forward. Driver has been tested and probably either library or app might have something we need to rectify.

Category:java Views:5 Time:2018-06-09

Related post

  • where can I find a driver for serial port to usb adaperter scs-ptc-usb for windows 7? 2014-09-24

    had a computer with XP and made the mistake of upgrading to windows 7, now the serial port to usb adapter will not run with the new computer. [email protected]#$ manufactures why did they change when the serial port is more secure in a marine enviroment.? Now the p

  • Serial port or USB port using D? 2011-07-17

    I'm new using the D programming language and I was wondering if D can make use of the Serial port or usb port? --------------Solutions------------- That would presumably involve system calls of some kind, which would be in C, but you can call C funct

  • How to retrieve data from an i2c device over usb in linux 2009-10-13

    I have a temperature sensor, which is connected using an USB-I2C adapter ( I attached this device to my linux computer (suse10). I typed dmesg and saw usb 3-3: new full speed USB device usin

  • Access Serial Port VIA USB 2010-09-08

    I want to access a scale hooked up via a RS232 Serial Port. The machine I'm writing the C# code on does not have a serial port, so I was going to use a USB to Serial Port dongle. Will anything need to be changed with my code? --------------Solutions-

  • AsycnSocket not connecting to TCP serial port over wifi 2011-10-18

    I have an iPhone app that I run on the simulator. XCode ver 3.2.6/4.3. I am trying to communicate with a radio on a serial port of a PC over wifi, both on the same server... I've tried NSStream and GCDAsyncSocket (just to make sure). The radio has it

  • Serial Port over the Web 2011-11-18

    I am starting to program in C# and build applications over the web. I have a board with a PIC microcontroller that I made that communicates with the PC via USB-Serial converter (FT232). Now I want to do this: I want to create a website on another com

  • Android serial port over WiFi 2011-12-07

    I'm trying to implement a car controlled by HTC Desize Z. I have a car which is being controlled by serial port, the data flows into serial port through this. But how do I connect to the board through WiFi? I know the RxTx library, it's even been por

  • How to get data from serial port to usb on android application? 2012-03-27

    I'm new in android.I have android tablet,usb to serial port cable and gprs device. The gprs device will be connected using the serial port. So now, how can i get data from gprs device to android app using usb to serial port cable. Please let me know.

  • Using SOCAT for serial communication to USB on Linux 2013-12-18

    I'd like a little clarification on what socat does to the serial communication, because for some reason I can only get the communication to my Arduino to work when using socat. This is the command I use to set up socat: socat -d -v -x PTY,link=/tmp/s

  • In Android, how is it possible to make serial ports (ttyS0, ttyS1) r/w for everyone? 2011-08-29

    I've developed an app that listens to the serial ports and I've been using "chmod 666 /dev/ttyS0" for read/write access to the serial port - however - this method relies on "su" and is only temporary. What needs to be done to gain read/write access t

  • Send file over serial port with Linux and C 2009-08-22

    I'm developing an application that reads data from a serial port and sends it over a TCP connection, and vice versa. Unfortunately, while reading data from serial port, it never stops. It does not detect EOF mark, nor EOL or some other special charac

  • Virtual Serial Port for Linux 2008-09-09

    I need to test a serial port application on Linux, however, my test machine only has one serial port. Is there a way to add a virtual serial port to Linux and test my application by emulating a device through a shell or script? Note: I cannot remap t

  • Linux Serial Port Communications Timeouts - VirtualBox passthrough 2010-02-11

    I am using Virtual Box USB passthrough features to attach a serial port to Ubuntu (/dev/ttyUSB0). This port is used to communicate with a 3dm-gx2 IMU. The same port works with the vendor supplied Windows code where they set specifically send/receive

  • serial port communication in linux OS 2011-10-20

    Can anyone tell me whats the best and efficient way to communicate to a serial port connected devices in linux operating system.I am trying to send messages to eftpos machine using serial port in my java program. Any suggestion and advice would be gr

  • Linux DD passing data to serial port ttyS0 2012-08-20

    Hi i want to pass a data from my char device driver to serial port ttyS0.. I have created a simple char driver module which reads and write and it's my first tym doing it.. i am using debian guest os... e.g. echo "hello" > /dev/mydev now when /dev

  • Serial Port Redirection or Splitting 2009-08-27

    I am looking for a book and or a code sample of how to do serial port redirection or port splitting. I write a lot of com port applications and want to write a monitor application that will allow me to watch the serial port between the application an

  • Serial ports on Windows or Ubuntu VBox to talk to Arduino from Python 2011-03-03

    I have an Arduino microcontroller listening on COM3. Using the arduino IDE and the Serial monitor works fine to send and receive data. I would like to send and receive data from Python, but it's not immediately obvious how to do so. (I'd also be fine

  • Create a virtual serial port for widcomm stack under 32feet 2010-04-26

    Currently I am doing a project involves a bluetooth communication setup between a PDA and a small embedded device. This small embedded device can only be communicated with a virtual serial port over a bluetooth link. The PDA is the ipaq running with

  • Get two Linux (virtual) boxes talking over a serial port 2008-09-16

    What is the best way to setup one Linux box to listen on its serial port for incoming connections? I've done a lot of googling but I can't find the right combination of commands to actually get them to talk! My main objective is to provide a serial i

  • How to find which device is attached to a USB-serial port in Linux using C? 2010-11-16

    We are making a device and it has 8 serial ports. It runs on the Monta Vista Pro5 kernel. And we are working in C. Suppose: A device gets attached to ttyUSB0, ttyUSB1 and ttyUSB2. The next device gets connected to ttyUSB3 and another to ttyUSB4. How

  • how to detect a buffer over run on serial port in linux using c++ 2010-07-01

    I have a big problem. At present I am accessing a serial port via the following hooks: fd = open( "/dev/ttyS1", O_RDWR | O_NOCTTY ) then I read from it using the following chunk of code i = select( fd + 1, &rfds, NULL, NULL, &tv ) ... iLen =

  • Converting serial port data to TCP/IP in a linux environment 2009-01-27

    I need to get data from the serial port of a Linux system and convert it to TCP/IP to send to a server. Is this difficult to do? I have some basic programming experience but not much experience with Linux. Are there any open source applications that

  • Correct initialization sequence for Linux serial port 2010-06-05

    I wrote an application that must use serial ports on Linux, especially ttyUSB ones. Reading and writing operations are performed with standard select()/read() loop and write(), and there is probably nothing wrong in them, but initialization code (or

  • Specifying non-standard baud rate for FTDI virtual serial port under Linux 2010-07-07

    I have a USB device I'm trying to communicate with over a virtual serial port provided by the ftdi_sio kernel module. However, I'm having some trouble setting the baud rate of the port to 14400: termios.h doesn't specify a constant for 14400, so I ca

  • Why does my computer keep pausing when I run a progam using the USB-serial ports? 2011-04-19

    I've written a program that uses three serial ports (two serial ports are on one USB -> serial connector, the other serial port is on its own USB -> serial connector). When I'm running the program, every 5 seconds or so, my computer stops respo

Copyright (C), All Rights Reserved.

processed in 0.152 (s). 11 q(s)