eclipse / paho.mqtt-sn.embedded-c

Paho C MQTT-SN gateway and libraries for embedded systems. Paho is an Eclipse IoT project.
https://eclipse.org/paho
Other
315 stars 178 forks source link

Using nRF52840 over MQTT-SN Gateway with basic Nordic image #147

Closed jelalanne closed 5 years ago

jelalanne commented 5 years ago

Hi,

I want to implement an MQTT-SN network with a Raspberry Pi 3B+ Paho MQTT/MQTT-SN transparent gateway and some End-Devices in MQTT-SN using njh library.

This is working over Wifi, but I want to implement this network with nRF52840 DKs over Thread between the gateway and the end-devices, while keeping basic images on the nordics (no MQTT-SN specific image on it, just basic, like CLI or something).

The structure is as followed: {End-Device(no internet)} <-(USB)-> {nRF52840 basic image} <----(thread IPv6 network)--> {nRf52840 basic image} <-(USB)-> {Raspi3B+ MQTT-SN Gateway} <--> {Azure Hub}

The main problems are:

Thanks for your help!

jelalanne commented 5 years ago

To close this page: All this time I was misunderstanding the use of nRF boards... Don't use CLI which is just for beginners to understand how it works. Use NCP all the way with NCP/USB images, and with sockets (setsockopt()) you may use the wpan0 interface created with WPANTUND, that's it.

Boje03 commented 4 years ago

Hello.

Unfortunately i cant contact you otherwise.

Is there any way you can share this project? I have tried for a long time and dont know how to setup Thread without using CLI.. (i am very much a beginner)

jelalanne commented 4 years ago

Hello :) I cannot share the project as it is industrial, so i'm due to confidence. But I can help you if you have any question. What I understood is that WPANTUND software emulates a network board on your host, just like wlan0 for WiFi or eth0 for Ethernet. This one is by default named wpan0. So when you create your app with sockets, you just have to specify that you want your socket linked to this particular wpan0, with the fonction "setsockopt()". Second thing, on the board's side, you have 2 choices: use a CLI image if you want to develop something very specific or just learn how the communication between 2 nRFs works. If you just want to exchange data, use the NCP image, it is made for this :) you will need nothing else. I don't remember exactly how to install it and connect the boards to the same network, but you will surely find some tutorials :) Just be careful to use the latest Nordic's tutorial page, there is 2 versions, and one of them is quite deprecated.

If you have any question, it will be a pleasure to answer them :)


De : Boje03 notifications@github.com Envoyé : jeudi 26 décembre 2019 21:47 À : eclipse/paho.mqtt-sn.embedded-c paho.mqtt-sn.embedded-c@noreply.github.com Cc : jelalanne jeremie.lalanne@hotmail.fr; State change state_change@noreply.github.com Objet : Re: [eclipse/paho.mqtt-sn.embedded-c] Using nRF52840 over MQTT-SN Gateway with basic Nordic image (#147)

Hello.

Unfortunately i cant contact you otherwise.

Is there any way you can share this project? I have tried for a long time and dont know how to setup Thread without using CLI.. (i am very much a beginner)

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHubhttps://github.com/eclipse/paho.mqtt-sn.embedded-c/issues/147?email_source=notifications&email_token=AH2AWCDDABVK7C56MRYKA33Q2UJ4ZA5CNFSM4HAM2X32YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEHWEAZY#issuecomment-569131111, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AH2AWCCO7HUUOJSDDEZS5ALQ2UJ4ZANCNFSM4HAM2X3Q.