Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [kura-dev] ConnectionFactory service interface never found

Hi David,
I am sorry about the delay answering your reply.

We have tested the snapshot that you linked for us on both platforms, and have found out the following:
1: The reasons for the problems on the emulator were that org.eclipse.kura.core.comm was not included per default in the downloadable workspace. The connection factory worked immediately after manually loading this package.
2:  The problems finding the TTY device on the Raspberry were solved by the SNAPSHOT 1.1.0. 
We have had considerable problems trying to find a RS485 shield for the Raspberry that really works,  We have now found one that seems to work ok, but it has an extra driver with the name /dev/ttyRPC0. We have temporarily renamed the device to /dev/ttyUSB0 to allow it to be addressed by the connectionFactory, but it would be good if the original name could be supported.

Thanks for your help and also for an excellent product.
regards
John Read

On 07.10.2014, at 23:28, Woodard, David <David.Woodard@xxxxxxxxxxxx> wrote:

Hi Kevin,

There was indeed a bug in the serial native library that was preventing /dev/ttyAMA0 from being available within Kura. I committed the changes to the develop branch if you are building from source code. If you need the user workspace or the RPi Debian package, you can use these links [1][2] for a snapshot build. These downloads will include the web based user interface.

Regarding the emulator, I am not seeing any issues there. My usb-serial connector mounts as “/dev/tty.usbserial”, but ttyUSB0 should be available. A couple of things to check:

1. Make sure your project is included in the run configuration. Right click on Kura_Emulator_OSX.launch and select “Run As -> Run Configurations…”. Make sure your bundle has a check mark beside it.
2. In the Eclipse console, issue the command “ss”. Check if all the bundles are in the “Active” state (not including the logger bundles).
3. In the Eclipse console, issue the command “ls”. Check if any services are un-resolved. If your application started correctly, you should see the “org.eclipse.kura.core.comm.CommConnectionFactory” service running.
4. Try starting the “org.eclipse.kura.example.serial.publisher” bundle. To use this bundle you must first be connected to a Broker. If you are not using an MQTT broker, you can use the test broker provided by Eclipse [3]. 


Thanks,
—Dave

On Oct 7, 2014, at 9:05 AM, Kevin Read <kevin.read@xxxxxxxxxxxxxxxxxx> wrote:

David,

sorry for taking so long to get back to you.

This happened while running in the emulator and in kura 1.0.0 (stable) running on a Raspi. The emulator on OSX had ttyUSB0 as port, and the Pi ttyAMA0. Whereas the emulator had no exceptions at all (the service just never got started) on the Pi it gets started but throws an exception:

java.io.IOException: javax.comm.NoSuchPortException
at org.eclipse.kura.core.comm.CommConnectionFactory.createConnection(CommConnectionFactory.java:62

Hope this helps.

All the best,
Kevin

On 05 Oct 2014, at 07:23, Woodard, David <David.Woodard@xxxxxxxxxxxx> wrote:

Hi John,

Can you search both the /var/log/kura.log and /var/log/kura-console.log files for errors? In particular look for “No such port” errors. If you don’t see any errors, can you provide some information about your system, specifically the mount point for the serial port (ex: /dev/ttyS0)? We did have to change the serial native library for Kura and it is not quite as dynamic and finding serial ports.

Thanks,
—Dave


On Oct 4, 2014, at 9:28 AM, John Read <john.read@xxxxxxxxxxxxxxxxxx> wrote:

Dear all,

we're in the process of migrating our codebase from ESF to Kura. The transition was mostly painless, but we ran into one issue. We cannot get a reference to the ConnectionFactory so we can access the serial port. It doesn't work in our code but also not in the serial publisher kura example. Our current code base used the Kura Workspace 1.0 download from the home page.

More specifically, in the component xml description we request a reference to the ConnectionFactory via:
<reference bind="setConnectionFactory" cardinality="1..1" interface="org.osgi.service.io.ConnectionFactory" name="ConnectionFactory" policy="static" unbind="unsetConnectionFactory"/>

But the service never gets started by the OSGi framework. If I remove the reference statement, the service is started but setConnectionFactory never gets called.

Any pointers would be highly appreciated.

Thanks and all the best,
John

John Read
Tel: +49-89-454590-34
Mob:  +49-1752014830
HRB München 139 379
GF: E.Kampmann, J.Read
Ust.-Id: DE 216 798 561



_______________________________________________
kura-dev mailing list
kura-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/kura-dev

_______________________________________________
kura-dev mailing list
kura-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/kura-dev

_______________________________________________
kura-dev mailing list
kura-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/kura-dev

_______________________________________________
kura-dev mailing list
kura-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/kura-dev


John Read
Tel: +49-89-454590-34
Mob:  +49-1752014830
HRB München 139 379
GF: E.Kampmann, J.Read
Ust.-Id: DE 216 798 561



Attachment: signature.asc
Description: Message signed with OpenPGP using GPGMail


Back to the top