
0
Answered
Running OpenICE on Ubuntu 14.04
Hi all,
We are having trouble getting OpenICE to work on Ubuntu 14.04. We haven't had this problem on our Windows/MAC machines, where we have been able to communicate with multiple devices already.
In particular, I am testing with Nellcore N595, which is just sending data on the serial port. I am able to see the data come in if I just print the stream using minicom (a small tool for printing data coming in on a serial port). But if I try to use OpenICE, I get a PortInUseException on line 198 of the PureJavaCommSerialProvider file. Do you guys know why that might be happening? Do I have to include some other jar files that I am missing?
BTW, I am pretty sure the port is not used by anything else. I have tested with both my usb ports, and I get the same error.
Thanks,
Rado
We are having trouble getting OpenICE to work on Ubuntu 14.04. We haven't had this problem on our Windows/MAC machines, where we have been able to communicate with multiple devices already.
In particular, I am testing with Nellcore N595, which is just sending data on the serial port. I am able to see the data come in if I just print the stream using minicom (a small tool for printing data coming in on a serial port). But if I try to use OpenICE, I get a PortInUseException on line 198 of the PureJavaCommSerialProvider file. Do you guys know why that might be happening? Do I have to include some other jar files that I am missing?
BTW, I am pretty sure the port is not used by anything else. I have tested with both my usb ports, and I get the same error.
Thanks,
Rado
Customer support service by UserEcho
We're currently using ubuntu 14.04.2 on the beagle bones in our lab successfully. Are you running on x86/x64 or ARM? With a UI or on the console?
Is there any message included with the Exception? A number of non-normal returns from the operating system "open" call will be thrown by PureJavaComm as a PortInUseException.
Some ideas that might help based on experiences in our lab:
- PureJavaComm expects ports to be specified without the "/dev/" portion. So if you are specifying an address on the command line do not include the "/dev/" portion ... for example /dev/ttyO0 would be specified simply as ttyO0
- we buy beaglebone RS-232 capes that are configured to route to the first UART which becomes /dev/ttyO0 in the OS, which, by default, in our ubuntu build has a console running on it. To disable the "serial" upstart service that provides the console we create a file called /etc/init/serial.override with the contents "manual". This overrides the service and configures it to not start on boot.
- When the OS creates the port it gives ownership to root in the dialout group. We usually place the user that runs the OpenICE software into the dialout group for this reason. Although if you're able to receive data via minicom this sounds unlikely.
Hopefully with a little more info we can help you out. We definitely try to keep up at least with the LTS releases in the lab.Thanks
Jeff Plourde
Thanks for the quick response! I am running Ubuntu 14.04 on my x64 laptop. I ran OpenICE with the UI, and I selected /ttyUSB0 (I connected with a DB9-usb cable that I use on my Windows machine as well).
There is no message included, as the exception is caught in the code. I had to print the exception to see what it is but it only says PortInUseException. Perhaps I should also print the stack trace (didn't think of that before).
Let me know if you need any other information to debug this.
Thanks,
Rado
purejavacomm.PortInUseException
at purejavacomm.PureJavaSerialPort.<init>(PureJavaSerialPort.java:1093)
at purejavacomm.CommPortIdentifier.open(CommPortIdentifier.java:159)
at org.mdpnp.data.serial.PureJavaCommSerialProvider.connect(PureJavaCommSerialProvider.java:198)
at org.mdpnp.devices.serial.AbstractSerialDevice$SerialDevice.run(AbstractSerialDevice.java:285)
at java.lang.Thread.run(Thread.java:745)
sudo usermod -a -G dialout username
I wonder if this is a purejavacomm bug that they haven't fixed for Ubuntu 14 yet. Have you guys tested this on a laptop running ubuntu?
Great to hear that adding the user to the dialout group worked! :) This is not a bug but rather the intended functionality of Ubuntu. We've tried to socialize information like this about common failure modes to others through tutorials and this forum. Hopefully this post will save somebody some time in the future.
Thanks,
Jeff