» One thread hinders the other in initializing serial port
One thread hinders the other in initializing serial port
|June 4, 2014
Posted by forumadmin
I’ve been struggling for this problem for a long time. I have two peripheral devices A and B that communicate with the software with USB serial ports. B has its own .jar file for finding and connecting the correct serial port. A uses my code to connect to the port.
Problem is that B s’ library loops over every serial port and tries to connect to device B. If no success on
/dev/ttyUSB0 it moves to
/dev/ttyUSB1 and etc. It finds the device B and connects to it. When I run my code to connect to device A on port
/dev/ttyUSB0, the initialization code hangs on the midway.
I’ve made several experiments. To make a long story short, if B s’ initialization process touches A s’ port, A can no longer be connected to pc. I’m using Ubuntu 12.04.
Is there a way to prevent same process from trying to connect twice to the same serial port? Or do you know another solution?
More Related Questions
- Serial port emulator or simulator I am running Ubuntu 12.04.2 LTS on a PC with no serial ports. I have a Qt application that needs to connect to a serial device. I have written a simulator for this device as well.
I need […]
- Connecting to MSP430 via /dev/ttyACM0 I'd like some suggestions about how to fix garbled serial output from a device connected on /dev/ttyACM0. Lately I've been working on a development project making use of TI's MSP430 […]
- Set up a Serial-to-Ethernet Converter With a Virtual Serial Port I have a '3one data' brand serial-to ethernet converter, that plugs into a serial device at one end, and allows bidirectional communications with the device over an ethernet connection, […]
- Ubuntu 14 + Psion NEO device this is what my /var/log/syslog tells me when connecting a Psion Neo device using USB:
(actually I'm connecting the Psion Neo Cradle PX3001 holding the device)
Apr 23 14:46:01 ENVY […]
- linux serial port configuration I need to connect an Intel Series Panel PC to two DB9 serial connectors. There are 4 COMs and 4 USB ports, ttyS1 is dedicated to Elo TouchScreen serial port,(manually installed, it is […]
- 3rd and 4th serial port not configured on startup Ubuntu 12.04.2 LTS 3.2.0-39-generic-pae
Hi there, the PC I'm working on has 4 serial ports.
ttyS0 and ttyS1 function properly straight from startup,
ttyS2 and ttyS3 do not.
here is the […]
- Why Ubuntu 11.04 under 64b is not able to identify sunspots on serial port? I am running SunSpot sdk under ubuntu 11.04,64bit.I have connected my sunspot basestation and after running ant info for my spot it is not possible to be identified. I am getting the […]
- How to configure X – or make it recognize serial mouse? Installation of 14.04 went OK with a USB mouse, but after that I attached a serial mouse to the single COM port of my rig and Ubuntu did not recognize it.
Being a newbie in Linux I […]
- How to Enable Port Persist for a USB to Serial com port I am followed this guide (http://www.zedboard.org/sites/default/files/documentations/GS-AES-Z7EV-7Z020-G-V7.pdf) for working with a SoC board in windows. I would like to switch to working […]
- Setting up a virtual COM port Finally my Dell xps 13 has arrived. I was aware of this shortcoming when I bought it, however, now I wish to resolve it.
My question. In ubuntu 12.04 can I establish a VCP so that I'm […]