This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Using nRF52840 over MQTT-SN Gateway with basic Nordic image

Hi,

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

This is working over Wifi with Paho library, 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)} <--> {nRF52840 basic image} <----(thread IPv6 network)--> {nRf52840 basic image} <--> {Raspi3B+ MQTT-SN Gateway} <--> {Azure Hub}

The main problems are:

- How do I configure the CLI image on the nRF so that I don't have to put the "udp send..." thing to send data (Or if it exists an image doing that already)?

- How to transmit Gateway data (that are, by default, transmitting data to end-devices over Wifi and IPv4) through the nRF serial connection? I mean, I could use the "socat" linux feature but how could the nRF know to which end-device he should transmit

Thanks for your help!

By the way, I'm part of an international company for this project, I would love to have a permanent contact with one of the nordic engineers to go on this project with my team. Thanks.

  • Hi Jeremie,

    Can I ask why you don't want to use our MQTT-SN specific examples here?

    How do I configure the CLI image on the nRF so that I don't have to put the "udp send..." thing to send data (Or if it exists an image doing that already)?

    This is exactly what the MQTT-SN specific examples do.

    How to transmit Gateway data (that are, by default, transmitting data to end-devices over Wifi and IPv4) through the nRF serial connection? I mean, I could use the "socat" linux feature but how could the nRF know to which end-device he should transmit

    I am not completely sure I understand what you want to achieve here. A drawing of the nodes and the comunication between them would be very helpful. The border router sends IPv6 packets through NCP so if you are using our implementation this should not be something to worry about.

    By the way, I'm part of an international company for this project, I would love to have a permanent contact with one of the nordic engineers to go on this project with my team. Thanks.

    Both private and public tickets in Devzone will be answer by Nordic tech support engineers, so this is the right place to keep in contact with us Slight smile look for the "Nordic Support Engineers" badge in our Devzone profile to know if you are talking to a Nordic employee or not.

    Best Regards,

    Marjeris

     

  • Hi Marjeris, thanks for your reply!

    Our client doesn't want to modify the Nordic's image with our own codes, he wants something proven stable that he won't have to maintain later so no "intelligence" on the Nordic. That's why all of my code has to be kept on the host. So i'm trying to find some solutions (and that's why I cannot use your solution).

    Right now I'm trying to make it with a full-NCP thread network but I cannot exchange personal messages with WPANTUND unfortunately

  • I know that from the gateway side, I can use the MQTT-SN gateway image on the raspberry paired with an NCP device, but how about the end-devices? With Paho's code there's no client side release

  • Hi Jeremie,

    Sorry for the late reply. I am sorry but I still don't understand what you are trying to achieve. What do you mean with the following:

    jelalanne said:
    but how about the end-devices? With Paho's code there's no client side release

     What are your end devices? Are you talking about thread end devices? Are they nRF52840s? What do you mean by keeping all of your code on the host? What is the host?

    Could you give me more info of the setup, and explain what you want to achieve?

    -Marjeris

  • Hi Marjeris,

    actually i have just achieved what I wanted to do!
    For those who are stuck with the same problem as me, I have used nRf52840 flashed with NCP/USB images connected to some Ubuntu computers (which are the end-devices) embedded with subs/pubs executables from njh library (https://github.com/njh/mqtt-sn-tools). Those NCPs are connected to a raspbian gateway using Paho connected with another NCP. I just had to configure the programs so that they use the right network interface created with WPANTUND.
    In the end-devices' programs, this is done by using setsockopt() and SO_BINDTODEVICE option.
    In the gateway's program, it's done by adding the right Broadcast UDP6 address in the gateway.conf file and changing SENSORNET value to udp6 in the Makefile :) 
    This is all! (well from what I remember)

Related