Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug:Cannot read smart meter after exporting code (RXTX problems) #10

Open
JamesPiggott opened this issue Feb 26, 2016 · 0 comments
Open

Comments

@JamesPiggott
Copy link

After exporting fpai-apps and starting it with the ./start script the flexiblepower.driver.smartmeter module does not connect to the meter. It only works when I use Ubuntu in VMware (my development environment) but not on my Beaglebone Black which I tested with Ubuntu, Debian and Red Hat. The problem may be due to the RXTX drivers. Despite repeating the same installation procedures the problem persists. Reading the smart meters works with the cu command.

Smart meter data is expected to be read by SmartMeterDriverImpl
This does work when I start the application in Eclipse.

A sample of the error output can be seen below.
...........................................................................................
Java HotSpot(TM) Client VM warning: You have loaded library /tmp/osgi.5438687587654095755.fw/bundle17/version0.0/bundle.jar-lib/0/technolution/librxtxSerial.so which might have disabled stack guard. The VM will try to fix the stack guard now.

It's highly recommended that you fix the library with 'execstack -c ', or link it with '-z noexecstack'.

java.lang.UnsatisfiedLinkError: /tmp/osgi.5438687587654095755.fw/bundle17/version0.0/bundle.jar-lib/0/technolution/librxtxSerial.so: /tmp/osgi.5438687587654095755.fw/bundle17/version0.0/bundle.jar-lib/0/technolution/librxtxSerial.so: cannot open shared object file: No such file or directory thrown while loading gnu.io.RXTXCommDriver

08:25:33.546 [CM Event Dispatcher (Fire ConfigurationEvent: pid=org.flexiblepower.smartmeter.resource.driver.SmartMeterDriverImpl.378cbeda-b09e-42e5-980d-37693781a357)] ERROR f.d.s.1.0.0.SNAPSHOT-201602231017 - [org.flexiblepower.smartmeter.resource.driver.SmartMeterDriverImpl(3)] The activate method has thrown an exception

java.lang.UnsatisfiedLinkError: /tmp/osgi.5438687587654095755.fw/bundle17/version0.0/bundle.jar-lib/0/technolution/librxtxSerial.so: /tmp/osgi.5438687587654095755.fw/bundle17/version0.0/bundle.jar-lib/0/technolution/librxtxSerial.so: cannot open shared object file: No such file or directory

            at java.lang.ClassLoader$NativeLibrary.load(Native Method) ~[na:1.8.0_65]

            at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1938) ~[na:1.8.0_65]

.....................................................................................
SmartMeterDriverImpl.java has been adjusted to also accept data packets from the Landis and Gyr E350 which has a different communication protocol. However reverting back to an old version of fpai-apps did not help. This problem centers solely around the RXTX libraries.

A potential work around is using Python or Shell to read the raw data packets and use the remaining code of flexiblepower.driver.smartmeter to create power consumption format. Not my preferred solution for now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant