zsmartsystems / com.zsmartsystems.zigbee.sniffer

ZigBee sniffer using Ember NCP and routing packets to Wireshark for display
Eclipse Public License 1.0
33 stars 17 forks source link

Unable to communicate with Ember NCP #33

Open alimdi opened 4 months ago

alimdi commented 4 months ago

Hi, I'm trying to use Zigbee Sniffer on usb-ITEAD_SONOFF_Zigbee_3.0_USB_Dongle_Plus_V2_20231218195308-if00. It has been flashed with the last silicon labs firmware.

Am I doing something wrong ?

root@nuc:~/zigbee# java -jar ZigbeeSniffer.jar -baud 460800 -flow none -port /dev/serial/by-id/usb-ITEAD_SONOFF_Zigbee_3.0_USB_Dongle_Plus_V2_20231218195308-if00
Z-Smart Systems Ember Packet Sniffer
NCP initialisation starting...
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
Opened serial port /dev/serial/by-id/usb-ITEAD_SONOFF_Zigbee_3.0_USB_Dongle_Plus_V2_20231218195308-if00 at 460800
Unable to communicate with Ember NCP
Unable to initialise NCP
cdjackson commented 4 months ago

Are you compiling your self, or using a pre-compiled JAR? I see you're using a very high baud rate - I've not tested this, and I think support was only added for this by Silabs recently, so possibly you will have a newer version of EZSP and will need to update the library - depending on how/when the JAR you're using was compiled.

I'd suggest to enable debug logging if possible so we can see what is actually happening...

alimdi commented 4 months ago

Are you compiling your self, or using a pre-compiled JAR? I see you're using a very high baud rate - I've not tested this, and I think support was only added for this by Silabs recently, so possibly you will have a newer version of EZSP and will need to update the library - depending on how/when the JAR you're using was compiled.

I'd suggest to enable debug logging if possible so we can see what is actually happening...

Hi,

Using 1.0.1 precompiled release. About the baud rate, I've used the one recommended by silicon labs after flashing the multipan rcp firmware. I've reverted back to Standard Zigbee (NCP) firmware - Baudrate 115200 and tested the pre-compiled without luck. Setting the -s option doesn't give much info

# (c) Ember - InSight Desktop
# File created with Z-Smart Systems ZigBeeSniffer

I'll try to recompile the jar myself (any available steps to follow for that?) and make the test again.

cdjackson commented 4 months ago

If you have maven, and the JDK installed, then it should be as simple as running mvn clean install to build a new JAR. If needed I can build one.

alimdi commented 4 months ago

Should definitely be easier for you, so thank you! Let me know if you need something on my side to do so.

cdjackson commented 4 months ago

I'll create a new JAR - just give me 12 or 24 hours as I'll re-release the main library as well so that it has the latest EZSP version support and this will take some hours to filter through the system...

cdjackson commented 4 months ago

You can find the new JAR here -:

https://github.com/zsmartsystems/com.zsmartsystems.zigbee.sniffer/releases/tag/1.0.2

This uses the latest library. Also, make sure that the correct flow control is selected - I found not much happens if the software flow control is required, and hardware is selected.

alimdi commented 4 months ago

Definitely working. Many thanks for your help !

root@nuc:~/zigbee# java -jar ZigbeeSniffer.jar -baud 115200 -flow hardware -port /dev/ttyACM0
Z-Smart Systems Ember Packet Sniffer
NCP initialisation starting...
Opened serial port /dev/ttyACM0 at 115200
Ember NCP version     : 7.4.2.0
Ember NCP EUI         : 90395EFFFE3FA01B
NCP initialisation complete...
Wireshark destination : /127.0.0.1:17754
Logging on channel    : 11
No device ID set. Last 16 bits of device EUID will be used.
WiresharkZepFrame [sequence=00000000, lqi=196, rssi=-51, data={41 88 00 8C F7 FF FF DD 65 09 12 FC FF DD 65 01 C6 34 C3 9D 00 00 74 04 00 28 FB 24 08 00 34 C3 9D 00 00 74 04 00 00 7B A3 67 FD 35 54 02 1E EB AB 08 86 F5 4F D4 68 18 FA E9 53 C6 0E 04 19 3F FA BE F5 68 17 3E 99 E0 31 CF 0A C1 D8 3D 0B 00}]