From: Nordic ID Support <support@nordicid.com>
Sent: Friday, December 8, 2017 12:02 AM
To: Jin <jin@intensecomp.com>
Subject: RE: Sampo S2 MQTT settings
Hi Jin,
Here are comments from the developer:
127.0.0.1 refers to localhost so you don’t need to recompile if you change the IP-address of your device.
Unfortunately, we don’t have a Python sample available yet. There’s probably other options available, but I’m guessing that this could be one if you choose to use mono in your project: https://github.com/markallanson/nmqtt With Python you can probably use the Paho MQTT Python Client https://github.com/eclipse/paho.mqtt.python
I have created a small sample for Mono/C# which sends out streaming data from the NurApi using the above nmqtt-library. https://github.com/NordicID/ar8x_samples/tree/master/nurapisample Feel free to modify it to fit your needs. Basically what it does it that it sends the seen EPC codes to “nurapisample/epc”-topic on the MQTT and on the webUI of the application you can view the received events on this topic. On the webUI there’s single button which you can use the receive “all” the EPC codes which the application has seen since it was started. The button uses the Restful service implemented in the C# sources. Other events come through MQTT. The MQTT broker is not persistent i.e. all messages are only available when they are sent by the publisher.
Keep in mind that the above sample implements only the basic inventory streaming and does not access any settings of the NurApi or the MQTT broker. If you wish to modify code and require more information on how to use the NurApi, please find more examples from the Windows-samples available here: https://github.com/NordicID/nur_sample_windows
Basically, the only difference between the Windows C# samples and with Mono C#(in addition to WinForms-UI) projects for the Raspbian is that you need to use different versions of the NurApiDotNet.dll & the NurApi.dll. Instead of using the native NurApi.dll built for Windows, you need to use the libNurApiRaspi.so found in https://github.com/NordicID/nur_sdk/tree/master/native/linux Basically you’ll just need to copy the libNurApiRaspi.so and rename it to NurApi.dll and copy it to the /lib-folder of your application zip-package.
Best Regards,
Turo Rantanen | Technical Support Engineer
Nordic ID | Salo IoT- Campus | Joensuunkatu 7 | FI-24100 Salo | Finland
Skype turo.rantanen | Skype for Business turo.rantanen@nordicid.com
Support +358 2 727 7790 | Service +358 2 727 7791 | Direct +358 40 838 0284
www.nordicid.com| RFID Arena | Facebook | Twitter | YouTube
From: Jin [mailto:jin@intensecomp.com]
Sent: Monday, December 04, 2017 12:59 PM
To: Nordic ID Support <support@nordicid.com>
Subject: RE: Sampo S2 MQTT settings
Hi Turo,
I set the S2 IP address to static 10.0.0.101.
From the Java sample src I notice:
String nurDevice = "127.0.0.1"; |
int nurPort = 4333; |
publishMessage("\nConnecting to : " + nurDevice + "\n", topicev); |
try |
{ |
NurApiSocketTransport socket = new NurApiSocketTransport(nurDevice, nurPort); |
mApi.setTransport(socket); |
mApi.connect(); |
}
It’s the 127.0.0.1 still applicable? Do I need to recompile?
Note:
Do you have any working sample for MQTT in Python or Mono? I’ve issue to code in Python or Mono is the NurApi library. It’s available? I used to code in .NET environment.
Currently we’ve a customer would like to get S2 about 50 units if the MQTT or HTTP Post application available. The requirement is getting tags from inventory. Previously we recommend S1 and they must install their own controller/PC. Since S2 can install application internally it’s more practical than S1.
Regards,
Jin
From: Nordic ID Support [mailto:support@nordicid.com]
Sent: Thursday, November 30, 2017 7:31 PM
To: Jin Chua <jin@intensecomp.com>
Subject: RE: Sampo S2 MQTT settings
Hi Jin,
Here are comments from the development team:
The OS running on Sampo S2 is Debian based, so basically it should be possible to run anything on what runs on regular Debian. For non-native languages, there’s Mono and Python preinstalled & native code should execute just fine as well as long as you compile it to the platform using a proper toolchain i.e. https://github.com/raspberrypi/tools/tree/master/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/arm-linux-gnueabihf/bin
Any additional VM’s and similar need to be added to application sandbox zip-package, as it’s done with the Java sample. So basically in that sense, there are no language restrictions as long as you can import your virtual machine or similar to the zip-package.
See the samples for more information on how to run your applications:
https://github.com/NordicID/ar8x_samples/blob/master/appimportsample/zipcontents/bin/run
i.e. mono apps can started like this(mono is preinstalled):
mono ~/ThirdPartyAppPing.exe
https://github.com/NordicID/ar8x_samples/blob/master/javasample/zipcontents/bin/run
i.e. java apps can be started like this(Java is not preinstalled, using the VM in the application package):
~/java/bin/java -Djava.library.path=../lib -cp ../lib/NurApi.jar:../lib/NurApiSocketTransport.jar:../lib/org.eclipse.paho.client.mqttv3-1.1.0.jar:. javasample_ar8x
On the above example, Java is executed in /mnt/userdata/apps/javasample/bin/java/bin/java
SQLite does not require a separate server process since it’s a disk-based database. The application zip-file or the application can create files to it’s own directories, so SQLite files can be created. If your application and the framework/VM supports accessing SQLite files, then you can use SQLite files.
Best Regards,
Turo Rantanen | Technical Support Engineer
Nordic ID | Salo IoT- Campus | Joensuunkatu 7 | FI-24100 Salo | Finland
Skype turo.rantanen | Skype for Business turo.rantanen@nordicid.com
Support +358 2 727 7790 | Service +358 2 727 7791 | Direct +358 40 838 0284
www.nordicid.com| RFID Arena | Facebook | Twitter | YouTube
From: Jin Chua [mailto:jin@intensecomp.com]
Sent: Thursday, November 30, 2017 12:51 PM
To: Nordic ID Support <support@nordicid.com>
Subject: RE: Sampo S2 MQTT settings
Is SQLite supported in Sampo S2?
From: Jin <jin@intensecomp.com>
Sent: Thursday, November 30, 2017 6:31:56 PM
To: 'Nordic ID Support'
Subject: RE: Sampo S2 MQTT settings
Hi Turo,
Thanks.
May I know other than Java language what programming language supported in Sampo S2 internal application? I plan to develop HTTP Post to install in Sampo S2. I’ve read the Java sample code you forward to me and think I can replace the MQTT Client with HTTP Post/TCP client.
Regards,
Jin
From: Nordic ID Support [mailto:support@nordicid.com]
Sent: Thursday, November 30, 2017 6:24 PM
To: Jin <jin@intensecomp.com>
Subject: RE: Sampo S2 MQTT settings
Hi Jin,
Yes. Sampo S2 has a service running on it called Mosquitto which is the MQTT broker. Basically, in the sample Java application, there are 2 clients where the other one publishes messages and the second one listens for them. So yes, the Java-code is the publisher and the javascript on the index.htm subscribes to these messages and waits for them. However, there’s no difference between the 2 sides of this sample, meaning that both sides can publish messages and both sides can receive them. So both are more or less just clients(instead of publishers or subscribers)
Best Regards,
Turo Rantanen | Technical Support Engineer
Nordic ID | Salo IoT- Campus | Joensuunkatu 7 | FI-24100 Salo | Finland
Skype turo.rantanen | Skype for Business turo.rantanen@nordicid.com
Support +358 2 727 7790 | Service +358 2 727 7791 | Direct +358 40 838 0284
www.nordicid.com| RFID Arena | Facebook | Twitter | YouTube
From: Jin [mailto:jin@intensecomp.com]
Sent: Thursday, November 30, 2017 12:07 PM
To: Nordic ID Support <support@nordicid.com>
Subject: RE: Sampo S2 MQTT settings
Hi Turo,
Note:
Sampo S2 is MQTT Broker/Server right? The sample Java application is Publisher right?
Regards,
Jin
From: Nordic ID Support [mailto:support@nordicid.com]
Sent: Tuesday, November 21, 2017 8:58 PM
To: Jin Chua <jin@intensecomp.com>
Subject: RE: Sampo S2 MQTT settings
Hi Jin,
You’ll need to write an application which performs the inventory and writes the EPCs through MQTT. It is more or less up to you how you will implement this. You can find more information about this from the links found here:
Guides on using the Sampo S2 & getting started to create applications for it:
https://github.com/NordicID/ar8x_samples/tree/master/docs
NurApi:
https://github.com/NordicID/nur_sdk
As shown on the Javasample in the previous e-mail, one possibility to send EPC through MQTT can achieved by publishing the messages with Paho.MQTTClient-library after performing an inventory.
For LLRP you can use the Nordic ID Norma: https://github.com/NordicID/ar8x_samples/tree/master/norma
The norma.zip is a prebuild application package for the Sampo S2 and it can be installed directly to the reader via the Application tab. After installation, you’ll need to start it through the application management view and it should then automatically connect to the internal reader. The default LLRP port used in Norma is 5084, so your LLRP client should be able to connect to the reader using its IP-address & the mentioned port 5084.
You are correct about the Nordic ID Norma being a “middleware”, meaning that it acts as a translator between the LLRP clients and the UHF module on the device. But then again if it’s installed directly on the reader instead of an additional PC, it shouldn’t matter that much from the perspective of the LLRP client.
Best Regards,
Turo Rantanen | Technical Support Engineer
Nordic ID | Salo IoT- Campus | Joensuunkatu 7 | FI-24100 Salo | Finland
Skype turo.rantanen | Skype for Business turo.rantanen@nordicid.com
Support +358 2 727 7790 | Service +358 2 727 7791 | Direct +358 40 838 0284
www.nordicid.com| RFID Arena | Facebook | Twitter | YouTube
From: Jin Chua [mailto:jin@intensecomp.com]
Sent: Tuesday, November 21, 2017 1:51 PM
To: Nordic ID Support <support@nordicid.com>
Subject: RE: Sampo S2 MQTT settings
Hi Turo,
I a question. May I know how the RFID EPC sent thru MQTT? Is the inventory mode automatically turn on? I can't find that in the Sampo S2 Web UI.
Any idea how can we write application to run on Sampo S2. I've check all the features available in Sampo S2 Web UI. I found the Application tab and notice we're able to add an application into the list.
Note:
I did email you about LLRP a week ago. I notice the LLRP provided is not natively available. We still need the LLRP middleware to communicate to the readers.
From: Nordic ID Support <support@nordicid.com>
Sent: Tuesday, November 21, 2017 7:29:35 PM
To: Jin
Subject: RE: Sampo S2 MQTT settings
Hi Jin,
Unfortunately, there’s no manual for configuring MQTT on the device, but by default, the MQTT service(Mosquitto) uses ports 1883(MQTT) and 1884(MQTT web sockets) for MQTT client connections, and the default settings allow also anonymous connections. You can change these settings in the “System Services-Mosquitto” configuration view on the Sampo S2 WebUI. Basically, on this view, you can define the ports used, anonymous access and whether to allow web sockets to connect. Also, usernames/passwords can be altered in this view.
Here’s a simplified sample app for Sampo S2 which uses the MQTT web sockets to monitor the status of the Java application executed on the device: https://github.com/NordicID/ar8x_samples/tree/master/javasample
Unfortunately, the platform does not have a similar feature as the Impinj has for the HTTP POST/TCP, but something similar will be probably added as a feature to the device(though no schedule for this yet).
Best Regards,
Turo Rantanen | Technical Support Engineer
Nordic ID | Salo IoT- Campus | Joensuunkatu 7 | FI-24100 Salo | Finland
Skype turo.rantanen | Skype for Business turo.rantanen@nordicid.com
Support +358 2 727 7790 | Service +358 2 727 7791 | Direct +358 40 838 0284
www.nordicid.com| RFID Arena | Facebook | Twitter | YouTube
From: Jin [mailto:jin@intensecomp.com]
Sent: Tuesday, November 21, 2017 10:35 AM
To: Nordic ID Support <support@nordicid.com>
Subject: Sampo S2 MQTT settings
Hi Support,
I’m looking for user manual/guide how to setup MQTT in Sampo S2. I need some idea how the RFID captured and upload to server through MQTT.
Note:
Can Sampo S2 offer something similar? HTTP POST/TCP.
https://support.impinj.com/hc/en-us/articles/202755278-Speedway-Connect
Regards,
Jin
Intensecomp Pte Ltd

Comments
Post a Comment