Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse SmartHome » Problem to open a serial com port for binding
Problem to open a serial com port for binding [message #1736700] Fri, 01 July 2016 09:01 Go to next message
Paolo Marini is currently offline Paolo MariniFriend
Messages: 2
Registered: June 2016
Junior Member
Hi all,

i'm implementing a binding in openHab, to implement the connectivity with a domotic system. Now, i created an OSGi project model that search all the available port using the library
- com.fazecast.jSerialComm.SerialPort

The code used for the discovery is the following:

public boolean Open() {
SerialPort comPorts[] = SerialPort.getCommPorts();
for (SerialPort comPort : comPorts) {
return true;

Now, if i use this code in my binding, when i call the open method Open(),
the system seem to stay blocked in Open() methond.
I tryed the same code in an easy java project ans everithing seem work fine.

Some Idea?
Re: Problem to open a serial com port for binding [message #1736801 is a reply to message #1736700] Fri, 01 July 2016 20:29 Go to previous message
Kai Kreuzer is currently offline Kai KreuzerFriend
Messages: 661
Registered: December 2011
Senior Member
> Some Idea?

Not really. Maybe the lib has issues to run on OSGi due to native calls, classloader hacks, etc. Have you tried to ask at jSerialComm for help?

Just for the reference, very similar code works well on OSGi (also ESH) with RXTX (through nrjavaserial), see e.g.
Previous Topic:Problem with Discovery Service
Next Topic:ItemRegistery(org.eclipse.smarthome.core.items.ItemRegistry) is empty when channel is linked?
Goto Forum:

Current Time: Tue Nov 13 18:22:14 GMT 2018

Powered by FUDForum. Page generated in 0.02061 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top