Skip to content
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
  1. Home
  2. Development
  3. Wireless nRF24L01+ sniffer for MySensors

Wireless nRF24L01+ sniffer for MySensors

Scheduled Pinned Locked Moved Development
omgsnifferwiresharknrf24l01+
108 Posts 19 Posters 70.1k Views 18 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • YveauxY Yveaux

    @epierre said:

    @Yveaux can you do me a favour ? colord blind people cannot read red on black... they represent 10% of the population...

    What is red on black? Some coloring in Wireshark?
    If so, I don't choose the colors, Wireshark does! I just mark it as 'warning'.
    Have a look at Edit->Preferences->User Interface->Font and colors to see if you can change it to your likings.

    AH, now I see what you mean! The text on my blog :-)

    Also, does your software runs under nano ;-)

    I didn't test it, but don't see why it shouldn't!

    marceltrapmanM Offline
    marceltrapmanM Offline
    marceltrapman
    Mod
    wrote on last edited by
    #33

    @Yveaux said:

    What is red on black? Some coloring in Wireshark?

    It is your blog.
    Mostly white on black but, when highlighted, also red on black...

    Fulltime Servoy Developer
    Parttime Moderator MySensors board

    I use Domoticz as controller for Z-Wave and MySensors (previously Indigo and OpenHAB).
    I have a FABtotum to print cases.

    YveauxY 1 Reply Last reply
    0
    • marceltrapmanM marceltrapman

      @Yveaux said:

      What is red on black? Some coloring in Wireshark?

      It is your blog.
      Mostly white on black but, when highlighted, also red on black...

      YveauxY Offline
      YveauxY Offline
      Yveaux
      Mod
      wrote on last edited by
      #34

      @marceltrapman Colors are not my top priority right now, but I'll put in on the list then. Thanks for the hint.

      http://yveaux.blogspot.nl

      1 Reply Last reply
      0
      • epierreE epierre

        @Yveaux ah a vb programmer... you need to install the msvcr110.dll msvcr110.dll t to make it start with wine. (does not work with mono...)

        then I have wireshark but I don't understand what to do next...
        "Connect Wireshark to \.\pipe\wireshark to continue..."

        YveauxY Offline
        YveauxY Offline
        Yveaux
        Mod
        wrote on last edited by
        #35

        @epierre It's not written in vb! Shame on your! It's pure hardcore C!
        If you get it to run on Linux (?) using Wine then let us know please!

        http://yveaux.blogspot.nl

        epierreE 1 Reply Last reply
        1
        • YveauxY Yveaux

          @epierre It's not written in vb! Shame on your! It's pure hardcore C!
          If you get it to run on Linux (?) using Wine then let us know please!

          epierreE Offline
          epierreE Offline
          epierre
          Hero Member
          wrote on last edited by
          #36

          @Yveaux yes I did... but I stopped here not knowing how to do it:

          Connect Wireshark to \.\pipe\wireshark to continue...
          

          z-wave - Vera -> Domoticz
          rfx - Domoticz <- MyDomoAtHome <- Imperihome
          mysensors -> mysensors-gw -> Domoticz

          YveauxY 1 Reply Last reply
          0
          • epierreE epierre

            @Yveaux yes I did... but I stopped here not knowing how to do it:

            Connect Wireshark to \.\pipe\wireshark to continue...
            
            YveauxY Offline
            YveauxY Offline
            Yveaux
            Mod
            wrote on last edited by
            #37

            @epierre It's in the blog: start a new command window and navigate to the wiresrak directory (c:\program files\wireshark)
            Then run:

             wireshark -k -i \\.\pipe\wireshark
            

            And it should automatically connect to the named pipe (which is written to from the nrf24sniff.exe tool) and start capturing.

            http://yveaux.blogspot.nl

            epierreE 1 Reply Last reply
            0
            • YveauxY Yveaux

              @epierre It's in the blog: start a new command window and navigate to the wiresrak directory (c:\program files\wireshark)
              Then run:

               wireshark -k -i \\.\pipe\wireshark
              

              And it should automatically connect to the named pipe (which is written to from the nrf24sniff.exe tool) and start capturing.

              epierreE Offline
              epierreE Offline
              epierre
              Hero Member
              wrote on last edited by
              #38

              @Yveaux yes but through wine are they POSIX compliant so my linux wireshark can connect to it ?

              z-wave - Vera -> Domoticz
              rfx - Domoticz <- MyDomoAtHome <- Imperihome
              mysensors -> mysensors-gw -> Domoticz

              YveauxY 1 Reply Last reply
              0
              • epierreE epierre

                @Yveaux yes but through wine are they POSIX compliant so my linux wireshark can connect to it ?

                YveauxY Offline
                YveauxY Offline
                Yveaux
                Mod
                wrote on last edited by
                #39

                @epierre I guess not, as Linux uses files as named pipes and \.\pipe\wireshark is not a regular Linux file path...
                Furthermore the Wireshark dissectors should compile on Linux, but I didn't test it.
                You could try to also run windows Wireshark through Wine, maybe the named pipes will pass the data along just fine...

                http://yveaux.blogspot.nl

                1 Reply Last reply
                0
                • marceltrapmanM marceltrapman

                  @Yveaux said:

                  The console application is 32bits. I don't know if the 32 bits versions are included in the 64 bits installers...

                  That was not the issue...

                  Below is the wrap-up that I also posted on your blog:

                  There are 3 things that I bumped into though that I would like to share with you and those that decide to use the sniffer.

                  1. Immediately after starting** 'Nrf24Sniff.exe -P6'** (the rest is default in my case) I got this error message 'The program can't start because MSVCR110.dll is missing...'. It basically complains that 'Visual C++ Redistributable Packages for Visual Studio 2012 SP 4' is not installed but that is not true. After doing a bit of searching I found that I needed to** install or repair 'Microsoft Essentials'**.
                    Once this was done the program works as expected (don't ask me why, this must be pure MS genius).

                  2. Once Wireshark was started like described I noticed that the Nrf24Sniff console window displayed a *'Wait for sniffer to restart' *message. The author mentions that this will only take a few seconds but in my case I actually needed to reset the Arduino for it to go away. No exception.

                  3. After creating the correct setup in Wireshark I expected data to show up but it did not. I wondered why and ran a complete test to see that the Ardiuno was ok, radio sufficiently powered etc. but that was all ok. I then re-read the article and found that the author says 'when monitoring MySensors 1.4beta traffic (at non-default 1Mb/s)'. I completely missed this and that caused the issue.The MySensors 1.4beta is set to 250b/s by default. Once I started the sniffer like 'Nrf24Sniff.exe -P6 -r2' everything works as expected.

                  Now I have to find some time to read the third article so that I understand what happens on my screen :)

                  Anyway, good stuff and a big thank you goes to @Yveaux ...

                  YveauxY Offline
                  YveauxY Offline
                  Yveaux
                  Mod
                  wrote on last edited by Yveaux
                  #40

                  @marceltrapman said:

                  1. Once Wireshark was started like described I noticed that the Nrf24Sniff console window displayed a *'Wait for sniffer to restart' *message. The author mentions that this will only take a few seconds but in my case I actually needed to reset the Arduino for it to go away. No exception.

                  I changed the nrf24snif.exe to explicitly reset the Arduino (works for Uno) by lowering DTR/RTS lines. Should work for (most?) other Arduino's too, but I don't have any other to test one.
                  For me it seems to work now. Could you test if this works stable for you too?

                  Oh yeah, I added support for some status leds to the Sniffer, connected to A0..A4 and via resistors to GND:

                  • A0 sniffer monitoring (LED turns off during reset)
                  • A1 sniffer receiving a packet
                  • A2 sniffer transmitting (serially) a packet
                  • A3 new configuration received
                  • A4 buffer overflow

                  http://yveaux.blogspot.nl

                  marceltrapmanM 2 Replies Last reply
                  0
                  • YveauxY Yveaux

                    @marceltrapman said:

                    1. Once Wireshark was started like described I noticed that the Nrf24Sniff console window displayed a *'Wait for sniffer to restart' *message. The author mentions that this will only take a few seconds but in my case I actually needed to reset the Arduino for it to go away. No exception.

                    I changed the nrf24snif.exe to explicitly reset the Arduino (works for Uno) by lowering DTR/RTS lines. Should work for (most?) other Arduino's too, but I don't have any other to test one.
                    For me it seems to work now. Could you test if this works stable for you too?

                    Oh yeah, I added support for some status leds to the Sniffer, connected to A0..A4 and via resistors to GND:

                    • A0 sniffer monitoring (LED turns off during reset)
                    • A1 sniffer receiving a packet
                    • A2 sniffer transmitting (serially) a packet
                    • A3 new configuration received
                    • A4 buffer overflow
                    marceltrapmanM Offline
                    marceltrapmanM Offline
                    marceltrapman
                    Mod
                    wrote on last edited by
                    #41

                    @Yveaux Nice.

                    When I find the time I will test it for Uno and Mega.
                    Not sure that I have a free Nano right now.
                    Also not sure that I have a soldered Pro Mini.

                    Fulltime Servoy Developer
                    Parttime Moderator MySensors board

                    I use Domoticz as controller for Z-Wave and MySensors (previously Indigo and OpenHAB).
                    I have a FABtotum to print cases.

                    1 Reply Last reply
                    0
                    • YveauxY Yveaux

                      @marceltrapman said:

                      1. Once Wireshark was started like described I noticed that the Nrf24Sniff console window displayed a *'Wait for sniffer to restart' *message. The author mentions that this will only take a few seconds but in my case I actually needed to reset the Arduino for it to go away. No exception.

                      I changed the nrf24snif.exe to explicitly reset the Arduino (works for Uno) by lowering DTR/RTS lines. Should work for (most?) other Arduino's too, but I don't have any other to test one.
                      For me it seems to work now. Could you test if this works stable for you too?

                      Oh yeah, I added support for some status leds to the Sniffer, connected to A0..A4 and via resistors to GND:

                      • A0 sniffer monitoring (LED turns off during reset)
                      • A1 sniffer receiving a packet
                      • A2 sniffer transmitting (serially) a packet
                      • A3 new configuration received
                      • A4 buffer overflow
                      marceltrapmanM Offline
                      marceltrapmanM Offline
                      marceltrapman
                      Mod
                      wrote on last edited by marceltrapman
                      #42

                      @Yveaux

                      Oh yeah, I added support for some status leds to the Sniffer, connected to A0..A4 and via resistors to GND:

                      • A0 sniffer monitoring (LED turns off during reset)
                      • A1 sniffer receiving a packet
                      • A2 sniffer transmitting (serially) a packet
                      • A3 new configuration received
                      • A4 buffer overflow

                      Maybe I should create a (little) shield for this that holds the radio as well.
                      Or just use a prototype board...

                      Fulltime Servoy Developer
                      Parttime Moderator MySensors board

                      I use Domoticz as controller for Z-Wave and MySensors (previously Indigo and OpenHAB).
                      I have a FABtotum to print cases.

                      YveauxY 1 Reply Last reply
                      0
                      • marceltrapmanM marceltrapman

                        @Yveaux

                        Oh yeah, I added support for some status leds to the Sniffer, connected to A0..A4 and via resistors to GND:

                        • A0 sniffer monitoring (LED turns off during reset)
                        • A1 sniffer receiving a packet
                        • A2 sniffer transmitting (serially) a packet
                        • A3 new configuration received
                        • A4 buffer overflow

                        Maybe I should create a (little) shield for this that holds the radio as well.
                        Or just use a prototype board...

                        YveauxY Offline
                        YveauxY Offline
                        Yveaux
                        Mod
                        wrote on last edited by
                        #43

                        @marceltrapman Maybe all of the LEDs are a bit overkill, but the RX LED and maybe the buffer-full LED can seriously be handy.

                        http://yveaux.blogspot.nl

                        1 Reply Last reply
                        0
                        • marceltrapmanM Offline
                          marceltrapmanM Offline
                          marceltrapman
                          Mod
                          wrote on last edited by
                          #44

                          I only checked the UNO with the new sketch (no LEDs) and the new iteration of nrf24snif.exe and both work as expected...

                          @Yveaux Well done again!

                          Fulltime Servoy Developer
                          Parttime Moderator MySensors board

                          I use Domoticz as controller for Z-Wave and MySensors (previously Indigo and OpenHAB).
                          I have a FABtotum to print cases.

                          1 Reply Last reply
                          0
                          • marceltrapmanM marceltrapman

                            Everything works now.

                            Did not see any packets coming in though but I remember having an issue with a couple of Uno's and I am not sure if this was one of them.

                            Anyway, I will do some more testing tomorrow.
                            Very exited :)

                            YveauxY Offline
                            YveauxY Offline
                            Yveaux
                            Mod
                            wrote on last edited by Yveaux
                            #45

                            @marceltrapman And? How did the testing go?
                            I fixed the Nrf24sniff.exe to use static linking so the msvcr110.dll should no longer be required.
                            Also fixed executable so it runs on WinXP now (untested...).

                            http://yveaux.blogspot.nl

                            marceltrapmanM 2 Replies Last reply
                            0
                            • YveauxY Yveaux

                              @marceltrapman And? How did the testing go?
                              I fixed the Nrf24sniff.exe to use static linking so the msvcr110.dll should no longer be required.
                              Also fixed executable so it runs on WinXP now (untested...).

                              marceltrapmanM Offline
                              marceltrapmanM Offline
                              marceltrapman
                              Mod
                              wrote on last edited by
                              #46

                              @Yveaux To be honest, I have played with it a little but I have not come much further.
                              Spent my time this weekend on other things :)
                              Will let you know soon!

                              Fulltime Servoy Developer
                              Parttime Moderator MySensors board

                              I use Domoticz as controller for Z-Wave and MySensors (previously Indigo and OpenHAB).
                              I have a FABtotum to print cases.

                              1 Reply Last reply
                              0
                              • R Offline
                                R Offline
                                Rasmus Eneman
                                wrote on last edited by
                                #47

                                Could the line quality information be queried directly by the gateway so that it can be known without additional hardware?

                                YveauxY 1 Reply Last reply
                                0
                                • R Rasmus Eneman

                                  Could the line quality information be queried directly by the gateway so that it can be known without additional hardware?

                                  YveauxY Offline
                                  YveauxY Offline
                                  Yveaux
                                  Mod
                                  wrote on last edited by
                                  #48

                                  @Rasmus-Eneman no, the nrf24 does not expose it. You can query the amount of retries it took before a message got an acknowledgement, which could be used as quality indication.

                                  http://yveaux.blogspot.nl

                                  1 Reply Last reply
                                  0
                                  • R Offline
                                    R Offline
                                    Rasmus Eneman
                                    wrote on last edited by
                                    #49

                                    @Yveaux Okej, Thank You!

                                    1 Reply Last reply
                                    0
                                    • YveauxY Yveaux

                                      @marceltrapman And? How did the testing go?
                                      I fixed the Nrf24sniff.exe to use static linking so the msvcr110.dll should no longer be required.
                                      Also fixed executable so it runs on WinXP now (untested...).

                                      marceltrapmanM Offline
                                      marceltrapmanM Offline
                                      marceltrapman
                                      Mod
                                      wrote on last edited by marceltrapman
                                      #50

                                      @Yveaux said:

                                      And? How did the testing go?

                                      So, testing went well :)
                                      I found a couple of malformed packets coming in so I will have to investigate that.
                                      Yesterday evening I created my first shield, first double sided board and in fact the first true 'home brew' pcb in my entire life...

                                      This is what it looks like (it is a bit of a mess because I messed up my via's the first time...
                                      IMG_0502.jpg

                                      Fulltime Servoy Developer
                                      Parttime Moderator MySensors board

                                      I use Domoticz as controller for Z-Wave and MySensors (previously Indigo and OpenHAB).
                                      I have a FABtotum to print cases.

                                      YveauxY 1 Reply Last reply
                                      1
                                      • marceltrapmanM marceltrapman

                                        @Yveaux said:

                                        And? How did the testing go?

                                        So, testing went well :)
                                        I found a couple of malformed packets coming in so I will have to investigate that.
                                        Yesterday evening I created my first shield, first double sided board and in fact the first true 'home brew' pcb in my entire life...

                                        This is what it looks like (it is a bit of a mess because I messed up my via's the first time...
                                        IMG_0502.jpg

                                        YveauxY Offline
                                        YveauxY Offline
                                        Yveaux
                                        Mod
                                        wrote on last edited by Yveaux
                                        #51

                                        @marceltrapman Wooow! First 'official' sniffer PCB! :+1: (did you give it an oldskool look? looks 50 years+ old :-)
                                        Great it worked out that well!

                                        In my experience there are always some malformed packets, nothing to worry about.

                                        http://yveaux.blogspot.nl

                                        marceltrapmanM 1 Reply Last reply
                                        0
                                        • YveauxY Yveaux

                                          Ok, brace yourself! :zap:

                                          I finally had the time to write on my blog about the wireless network sniffer I've been working on lately.
                                          For the impatient see:

                                          • http://yveaux.blogspot.nl/2014/07/nrf24l01-sniffer-part-1.html
                                          • http://yveaux.blogspot.nl/2014/07/nrf24l01-sniffer-part-2.html
                                          • http://yveaux.blogspot.nl/2014/07/nrf24l01-sniffer-part-3.html

                                          This wireless sniffer allows you to capture traffic on air between multiple nodes of your MySensors network and is able to even capture packets with invalid CRC Values. The amount of CRC errors gives a fair indication of link quality, which is not provided by the nRF24.

                                          The sniffer in action:
                                          http://www.youtube.com/embed/wxjxm0LnkAk

                                          Actual capturing is performed by an nRF24L01+ module connected to an Arduino (we all known how to do that ;-) ). No other hardware is required.

                                          A small piece of software (currently only for Windows, sorry @hek) reads the packet data from the sniffer and forwards it to Wireshark, a network protocol analyzer.
                                          Wireshark then allows you to inspect the packages from high-level down to the individual bits, filter by content, and analyze statistics.
                                          Details are all in the blog posts. Last post in this series, which is yet to be written, will dive into using Wireshark and getting useful information from it.
                                          I didn't want to keep this tool to myself until finally finished and documented, so there can (will?) still be some bugs left...

                                          Please discuss any issues/ideas/suggestions in here or in my blog.

                                          Happy sniffin' to all of you!

                                          DammeD Offline
                                          DammeD Offline
                                          Damme
                                          Code Contributor
                                          wrote on last edited by
                                          #52
                                          This post is deleted!
                                          1 Reply Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          20

                                          Online

                                          11.7k

                                          Users

                                          11.2k

                                          Topics

                                          113.1k

                                          Posts


                                          Copyright 2025 TBD   |   Forum Guidelines   |   Privacy Policy   |   Terms of Service
                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • MySensors
                                          • OpenHardware.io
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular