whad-team / whad-client

Wireless Hacking Devices Protocol client
MIT License
129 stars 8 forks source link

Crash when using the Scan method in touchlink.py #84

Open olijf opened 2 weeks ago

olijf commented 2 weeks ago

Hi Romain, I started using WHAD this weekend and managed to get the touchlink factory reset working.

I looked at the examples for the Zigbee Coordinator, and added an application for touchlinking. The API is very intuitive by the looks of it! So far so good.

I did encounter an error though:

whad/zigbee/stack/apl/zcl/clusters/touchlink.py", line 64, in scan
    return network_address
           ^^^^^^^^^^^^^^^
NameError: name 'network_address' is not defined

looking at touchlink.py it seems you commented something out and it is obvious what the issue is.

Am I using this correctly? or should I send the requests individually and implement this myself using scan_request, reset_to_factory_new etc? Is this maybe some test code?

Thank you, Olaf.

virtualabs commented 1 week ago

It looks like some test code remains here and network_address is definitely not defined in the current version. @RCayre worked on this implementation, I guess he's the one who could fix this without breaking anything :smile:.