Thread network technology - 07 OpenThread Border Router with Raspberry Pi and nRF52840-dongle

แชร์
ฝัง
  • เผยแพร่เมื่อ 26 มิ.ย. 2024
  • Thread is a network technology for wireless networks based on IPv6. It can communicate directly with other IPv6 or IPv4 networks via a border router. In this video, we implement a border router using a Raspberry PI 4b+ and an nRF52840 dongle as the radio co-processor (RCP). We ping the Google DNS server (8.8.8.8) and a local IPv4 address on our LAN from a Threaddevice. We also send a CoAP message to a CoAP server on our private LAN.
    You can support me at Patreon:
    / wsnandiot
    ##Software###########
    Raspberry PI OS:
    www.raspberrypi.org/downloads...
    Raspberry PI Imager:
    www.raspberrypi.com/software/
    GIT repository for nRF52840 as RCP:
    github.com/openthread/ot-nrf5...
    nRF connect (Programmer) for flashing the nRF52840-dongle:
    www.nordicsemi.com/Products/D...
    GIT repository for Raspberry PI as OpenThread Border Router:
    github.com/openthread/ot-br-p...
    nRF5 SDK for Thread and Zigbee:
    www.nordicsemi.com/Products/D...
    ##Hardware###########
    Raspberry PI 4b+:
    www.raspberrypi.com/products/...
    USB-Dongle nRF52840-dongle:
    www.nordicsemi.com/Products/D...
    Developerboard nRF52840-dk:
    www.nordicsemi.com/Products/D...
    00:00 Indroduction
    00:09 Network topology
    01:48 Hardware overview
    02:56 Raspberry PI OS installation
    09:09 NCP and RCP
    11:16 Download nRF5840 GIT-repository
    13:06 Build a RCP-firmware for nRF52840-dongle
    15:55 Transfer the firmware on the dongle
    20:39 Download GIT-repository for OpenThread Border Router
    21:50 Install the border router software on the Raspberry PI
    23:50 Setting the Thread network parameter on the border router
    27:45 Setting up a Threaddevice with a nRF52840 Developerkit
    28:53 Commissioning and join the Thread network
    31:35 Ping Google-DNS and a PC in our LAN
    37:03 Sending a CoAP-message to a CoAP-server in our LAN
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 39

  • @adraintokyo7994
    @adraintokyo7994 ปีที่แล้ว +3

    Very happy to see this sort of Thread material becoming available. Thanks Markus for all your work, big help with the steep OT learning curve. Much appreciated.

  • @forcerxp
    @forcerxp ปีที่แล้ว +3

    I did the same couple months ago, excellent work. I know it takes a lot of time to get here from scratch from wrong guides.

  • @ThatEngineerPayyan
    @ThatEngineerPayyan ปีที่แล้ว +3

    Really nice video! Cleared my doubts. Thanks, Markus!😀🙂

  • @SurajZachariahManesh
    @SurajZachariahManesh ปีที่แล้ว +1

    Thanks for the video Markus. This will help me save a lot of time.

  • @alicanoztuna7136
    @alicanoztuna7136 ปีที่แล้ว

    Very useful and well described video for Thread border router

  • @nicoladellino8124
    @nicoladellino8124 ปีที่แล้ว +1

    Very nice video, TNX.

  • @thaleslenin
    @thaleslenin ปีที่แล้ว

    Ótimo vídeo! Claro e informativo. Obrigado.

  • @JonathanBeri
    @JonathanBeri ปีที่แล้ว +1

    Great content, Markus! Also a fan of OpenThread 🙂 what's the best way to contact you about your work?

  • @Microcontrollerslab
    @Microcontrollerslab ปีที่แล้ว

    Can we use LWM2M as a data exchange protocols instrad of MQTT or COAP?

    • @wsniot
      @wsniot  ปีที่แล้ว

      Yes, has nothing to do with the BorderRouter. It forwarded just the IP-packages, you can use any application layer you want. And LWM2M uses anyway mostly CoAP as underlying protocol.

  • @DriesMoerman
    @DriesMoerman หลายเดือนก่อน

    Hi Markus. I've been following your process with the dk version with a Pi4 and been able to fix some of the issues on the way. Now I'm getting stuck at the script for bootloader
    "Detecting C compiler ABI info - failed"
    Pardon my ignorance, but I can't seem to find a way for cmake to recognize the compiler. Would you be able to point me in the right direction?

  • @mustafanasralla
    @mustafanasralla ปีที่แล้ว

    We followed all steps mentioned in the tutorial. When we reached the step of writing the hex file to the dongle, the file does not get successfully written. Can anyone help if this issue was resolved already?

  • @simranmanghwani3514
    @simranmanghwani3514 ปีที่แล้ว

    Video is really helpful, thank you very much for making this type of excellent content! I just want to ask that have you connected the development kit to the laptop or to raspberry pi using USB as it is not clear to me?

    • @wsniot
      @wsniot  ปีที่แล้ว +1

      Only the nRF52840 dongle is connected to the Raspberry Pi for border router functionality. The developer kit is connected to the PC, but only for the power supply. The developer kit transfers the data wirelessly with Thread to the border router, which then forwards this message to the server over the TCP/IP network.

    • @simranmanghwani3514
      @simranmanghwani3514 ปีที่แล้ว

      @@wsniot Thank you very much! and one more thing you had connected two pins through the cable on the development kit, can you please specify the pin names.

    • @wsniot
      @wsniot  ปีที่แล้ว +1

      @@simranmanghwani3514 If you dont have any problems with your developer kit, you dont have to connect the pins. There is a resistor to weak on my version on the developer board. Sometimes i had to wait up to 10 minutes until my dk was powered up. I guess the humidity and the salt in the air here have a part on it. After discussing it with Nordic support they gave me this solution and that they replace the resistor in the new dks.

    • @simranmanghwani3514
      @simranmanghwani3514 ปีที่แล้ว

      @@wsniot Thank you very much!
      I understood your point.
      Thanks for the reply.

    • @simranmanghwani3514
      @simranmanghwani3514 ปีที่แล้ว

      I am trying to use the PCA10040 development kit of Nordic but while connecting it with Putty it returns the same command in output which is provided as input, can you please suggest something for this or any alternate way for setting up the thread network

  • @aug7333
    @aug7333 ปีที่แล้ว

    Hello Markus
    The video was very helpful, thanks. Border router and thread devices work fine. I have a question about joining thread devices. If the thread joiner device has no cli port( like a thread power socket), how can I join the thread device to the thread mesh?
    Thanks

    • @wsniot
      @wsniot  ปีที่แล้ว

      There are different solutions. I dont know how it works with the thread power socket. It can be done on mesh with pushing a button to initiate the joining. It can be done automatically when powering up. In both cases i think the passphrase have to be preinstalled on the joiner.
      Off-mesh it can be done over bluetooth with the mobile phone over the border router, if the joiner have bluetooth support. There is a thread app available for joining.

    • @aug7333
      @aug7333 ปีที่แล้ว

      ​@@wsniot Thanks Markus!
      I asked Eve Systems costomer service if the Eve Energy socket works with an optenthread border router.
      The reply:
      Thank you for contacting Eve Systems customer service.
      The only Thread Border routers for HAP (HomeKit Access Protocol) are: HomePod mini and/or the Apple TV 4K (2nd generation) or Apple TV 4K (3rd generation, Wi-Fi + Ethernet).
      So it doesn't work, sorry.

  • @sohaib3088
    @sohaib3088 ปีที่แล้ว

    how can we configure thread end devices?

  • @user-kh3xu8uv2d
    @user-kh3xu8uv2d 4 หลายเดือนก่อน

    Hi sir,
    I'm new in thread protocol, may I ask if it is possible to replace the nRF52840 Developerkit to nRF52840 dongle? Then I can use two dongles to do same way as you did in video.
    Thank you!

    • @wsniot
      @wsniot  4 หลายเดือนก่อน +1

      Yes, its possible. Bit of course the flashing of the firmware you have to make manually with the programmer app.

    • @user-kh3xu8uv2d
      @user-kh3xu8uv2d 4 หลายเดือนก่อน

      @@wsniot Got it! Thank you for your quick answer! For flash part, so I just need to follow your way (build dongle firmware as RCP part in your video) to flash my dongle, final step to select ot-cli-ftd instead of ot-rcp, am I correct?
      Thank you!

    • @wsniot
      @wsniot  4 หลายเดือนก่อน +1

      @@user-kh3xu8uv2d You can flash the compiled hex-file with the programmer over the bootloader. Of course dont forget to use the build-file for the usb dongle instead the dk-file.

  • @adrianw75
    @adrianw75 หลายเดือนก่อน

    I followed this exactly, but the command "commissioner joiner add * JO1NME" returns with Error 7: InvalidArgs

  • @poojagulhane7413
    @poojagulhane7413 ปีที่แล้ว

    Hello sir,
    I have connected nordiac kit to pc through serial communication,but putty server is not taking any input from keyboard.what to do in that case.

    • @wsniot
      @wsniot  ปีที่แล้ว

      What firmware was flashed on the DK? Did you try the CLI example? Did you choose the right baud rate?

  • @sohaib6828
    @sohaib6828 ปีที่แล้ว

    If i need to use this dongle just as a transceiver for my Raspberry Pi, do i need to just plug in to the USB port ?

    • @sebcal566
      @sebcal566 ปีที่แล้ว +3

      You need to write the hex file generated from the nrf github repo to the dongle, and then you can plug it in to the USB port. The Timestamp - 11:16 Download nRF5840 GIT-repository to ~21:00 should show you how to do that

    • @sohaib6828
      @sohaib6828 ปีที่แล้ว

      @@sebcal566 thank you so much

  • @simonebaraldi6753
    @simonebaraldi6753 ปีที่แล้ว

    Hi markus, i'm interested on how you have coded the client device to be able to send to the PC the temperature imformation.
    In particular i'd like to know how did you put your PC's IP address on the coap_client code, cause i tried to do that on VisualStudio by using the code of your video "Zephyr and Nordic nRF Connect SDK - 08 CoAP client/server communication", adding the IP of my pc instead of the meshlocaladdr of the coap_server device. I've put it into myMessageInfo.mPeerAddr using the function otIp6AddressFromString.
    Is that the correct mode? cause when i press the button on the prompt window appers nothing, while i'm running the python script.
    Could you advice me on how i could solve this issue?
    Thanks a lot
    Simon

    • @wsniot
      @wsniot  ปีที่แล้ว +1

      Hi Simone, i did just use otIp6AddressFromString, but you can set it of ourse also on other ways. Maybe you check where the real problem is. With tcpdump you can check the traffic on the border router. Did the br receive the package, does it send it to the outgoing interface and so on. On the pc you can also check the incoming traffic. Does a ping on the ip address from the PC is working via the CLI. Maybe the firewall is blocking things on the PC.

    • @simonebaraldi6753
      @simonebaraldi6753 ปีที่แล้ว

      @@wsniot Hi markus, i've a problem with otIp6AddressFromString: when i give the IP address of my PC the function does not convert the string to an IP address, i think it's because i give it in IPv4 format. How did you do with the IP of your PC? Have you used a special function or have you converted it in an IPv6 address, and if yes, how?
      Thanks a lot
      Simon

    • @wsniot
      @wsniot  ปีที่แล้ว +1

      @@simonebaraldi6753 otIp6AddressFromString only converts IPv6-addresses and also for addressind thread uses only ipv6.
      If you want to use the ipv4 address of your ps you have to convert it to an ipv6 address. You have to add the prefix which is assigned on your borderrouter to mark it as ipv6 address.
      Your PC gets nowadays also automatically an ipv6 address assigned in your LAN. So you could also use this one. Try to ping the address before over the CLI if its reachable.

    • @poojagulhane7413
      @poojagulhane7413 ปีที่แล้ว

      @@wsniot Can you make video on how we can connect thread devices to the multiple cloud via border router? else can you please share some resources ?