1

I am creating an OSGi bundle that will be executed under Kura (Target Platform: Kura Target Platform Equinox 3.8.1), on Raspberry Pi 2 model B.

The program should read data received on XBee and we want to use a library: https://github.com/andrewrapp/xbee-api

I created a new plugin project under Eclipse, "Plug-in from existing JAR archive" from the JAR files from the site above.

I tried to set the new plug in as "Required Plug-ins" in the MANIFEST.FM → Dependencies of my project, but that didn't work (java.lang.ClassNotFoundException)

I tried setting up a new folder in my project containing the library, but it is not working.

A similar question was asked, but I don't understand the answers because they are not detailed enough (Using an external java library in OSGI bundle).

Community
  • 1
  • 1
KatarinaM
  • 13
  • 5

2 Answers2

0

Instead of making a non-OSGi JAR file OSGi-ready or embedding it, I propose to look for an OSGi ready ZigBee bundle.

I would start with the zigbee4OSGi project. If this does not work well, then there is also a bundle from prosyst, but it does not seem to be free.

I found a ZigBee binding at openhab. This might help you to set up your project. I think they are using the same library you look for.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Christian Schneider
  • 19,420
  • 2
  • 39
  • 64
  • Added information: Kura runs on RPi 2B By reading the forum on the site you suggested, this isn't suited for rpi – KatarinaM Dec 14 '16 at 10:07
  • AFAIK XBee != ZigBee. Xbee uses ZigBee only as a transport layer protocol, not application protocol. So a ZigBee library (which works up to application level) would not "*talk*" to XBee modules. – Alessandro Da Rugna Dec 16 '16 at 14:11
0

If you are only using the XBee API inside of your bundle, you would probably be ok just embedding the Jar file in your bundle. I think this process is pretty well outlined here.

Community
  • 1
  • 1
David Woodard
  • 461
  • 2
  • 4