Wireless nRF24L01+ sniffer for MySensors
-
@marceltrapman said:
- 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
-
@marceltrapman said:
- 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
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... -
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... -
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 :) -
@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...). -
Could the line quality information be queried directly by the gateway so that it can be known without additional hardware?
-
Could the line quality information be queried directly by the gateway so that it can be known without additional hardware?
-
@Yveaux Okej, Thank You!
-
@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...).@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...

-
@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...

-
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/wxjxm0LnkAkActual 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!
This post is deleted! -
@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.
@Yveaux It is a combination of the board color (it really is a bit 'greenish') the green matte, daylight gone and the flash light :)
I am pretty content with it except that I need to think about those via's next time as well as using flux.
Any idea where those malformed packets come from?
-
@Yveaux It is a combination of the board color (it really is a bit 'greenish') the green matte, daylight gone and the flash light :)
I am pretty content with it except that I need to think about those via's next time as well as using flux.
Any idea where those malformed packets come from?
@marceltrapman try to combine vias with through hole components. E.g a resistor write can bring you to the other side of the board.
Or just make the board single sided. Should be doable for such a board and it is also easier to construct.
I switched to smd primarily to prevent drilling and reduce board space...
Just a matter of taste/laziness :) -
@Yveaux It is a combination of the board color (it really is a bit 'greenish') the green matte, daylight gone and the flash light :)
I am pretty content with it except that I need to think about those via's next time as well as using flux.
Any idea where those malformed packets come from?
@marceltrapman said
Any idea where those malformed packets come from?
I guess it's just inherent to wireless traffic. The same reason why a Wi-Fi connection gives different rates all of the time.
It's just a hunch, I didn't really dive into it.
Using the sniffer we could also get some real figures on e.g. the capacitor fix. It all can make a difference but as long as you cannot measure objectively it is all guessing... -
@marceltrapman try to combine vias with through hole components. E.g a resistor write can bring you to the other side of the board.
Or just make the board single sided. Should be doable for such a board and it is also easier to construct.
I switched to smd primarily to prevent drilling and reduce board space...
Just a matter of taste/laziness :)@Yveaux said:
try to combine vias with through hole components. E.g a resistor write can bring you to the other side of the board.
I know and I did that with the LED's but with a header that is more difficult.
Or just make the board single sided. Should be doable for such a board and it is also easier to construct.
I am sure but I did not want to do that. This also was a learning project for me :)
I switched to smd primarily to prevent drilling and reduce board space...
Just a matter of taste/laziness :)I am going to do that as well but I wanted to do one step at a time...
Thanks for your advice, much appreciated!!!
-
Hackaday! Congrats.
http://hackaday.com/2014/08/05/sniffing-nrf24l01-traffic-with-wireshark/
-
Updated the sniffer's Wireshark dissectors to MySensors 1.4b protocol version of Aug 18, 2014.
Please update the **mysensors2.dll **when you update to this 1.4b version.@Yveaux Thanks for putting this together. I'm trying it out today and seem to have everything running properly and without errors, but it's not capturing any packets. Can I just run nrf24sniff with all default parameters (other than the com port) for the current 1.4 release, or do I need to change some of them? I haven't made any changes to the default mysensor settings such as channel and data rate. I'm running it on a Mega, but have tested the radio, etc. using the BinarySwitchSensor sketch and it's communicating properly to my gateway/controller.
Thanks
Al