Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception: <type 'exceptions.TypeError'> /dev/ttyUSB1 #31

Open
magic7s opened this issue Sep 2, 2021 · 4 comments
Open

Exception: <type 'exceptions.TypeError'> /dev/ttyUSB1 #31

magic7s opened this issue Sep 2, 2021 · 4 comments

Comments

@magic7s
Copy link

magic7s commented Sep 2, 2021

I'm getting a TypeError when trying to scan GoControl HUSBZB-1. Scan fails, the flash seems to complete, but still unable to see anything on zigbee2MQTT.

OS: Raspbian GNU/Linux Buster (10) on Raspberry Pi 3b+

pi@homebridge:~/husbzb-firmware $ python2.7 ./ncp.py scan
Connecting to.. /dev/ttyUSB1 57600 True False
Exception: <type 'exceptions.TypeError'> /dev/ttyUSB1
Connecting to.. /dev/ttyUSB0 57600 True False
^CException: <type 'exceptions.KeyboardInterrupt'> /dev/ttyUSB0
Exception: <type 'exceptions.IndexError'> /dev/ttyAMA0
{"ports": [{"deviceType": "unknown", "pid": "8A2A", "port": "/dev/ttyUSB1", "vid": "10C4"}, {"deviceType": "unknown", "pid": "8A2A", "port": "/dev/ttyUSB0", "vid": "10C4"}, {"deviceType": "unknown", "port": "/dev/ttyAMA0"}]}
pi@homebridge:~/husbzb-firmware $ python2.7 ./ncp.py flash -p /dev/ttyUSB1 -f ncp-uart-sw-6.7.8.ebl
Restarting NCP into Bootloader mode...
CEL stick
EM3581 Serial Bootloader v5.4.1.0 b962

Successfully restarted into bootloader mode! Starting upload of NCP image...
Finished!
Rebooting NCP...
pi@homebridge:~/husbzb-firmware $ python2.7 ./ncp.py scan
Connecting to.. /dev/ttyUSB1 57600 True False
Exception: <type 'exceptions.TypeError'> /dev/ttyUSB1
Connecting to.. /dev/ttyUSB0 57600 True False
^CException: <type 'exceptions.KeyboardInterrupt'> /dev/ttyUSB0
Exception: <type 'exceptions.IndexError'> /dev/ttyAMA0
{"ports": [{"deviceType": "unknown", "pid": "8A2A", "port": "/dev/ttyUSB1", "vid": "10C4"}, {"deviceType": "unknown", "pid": "8A2A", "port": "/dev/ttyUSB0", "vid": "10C4"}, {"deviceType": "unknown", "port": "/dev/ttyAMA0"}]}
@magic7s
Copy link
Author

magic7s commented Sep 3, 2021

Doing a bit of poor mans debugging...

At line 209 the response is ['\x1a', '\xc1', '\x02', '\x0b', '\n', 'R', '~'] which returns isV8 = True.

Then at 441 the response is ['\x12', 'C', '\xa1', '\xa9', '\xfe', '*', '\x15', '\xb5', ',', '\x95', 'L', '"', '\xa2', 'U', '8', '\x95', '\x14', '~']

So 444 returns a <type 'exceptions.TypeError'>

@magic7s
Copy link
Author

magic7s commented Sep 3, 2021

I was able to solve my actual problem of zigbee2mqtt not working with the HUSBZB device. It was actually the default baud speed in zigbee2mqtt. Here are the settings that worked. I still did not get the firmware version to show, but the upgrade was successful as you can see from my original output. So I don't know if an update was needed or not. Feel free to close this issue, or not.

serial:
  port: /dev/ttyUSB1
  adapter: ezsp
advanced:
  baudrate: 57600

@doron1
Copy link

doron1 commented Jul 29, 2022

At line 209 the response is ['\x1a', '\xc1', '\x02', '\x0b', '\n', 'R', '~'] which returns isV8 = True.

Then at 441 the response is ['\x12', 'C', '\xa1', '\xa9', '\xfe', '*', '\x15', '\xb5', ',', '\x95', 'L', '"', '\xa2', 'U', '8', '\x95', '\x14', '~']

So 444 returns a <type 'exceptions.TypeError'>

I'm seeing the exact same situation, with the exact same response from the stick. Any idea as to how to resolve?

@B0ndo2
Copy link

B0ndo2 commented Dec 2, 2022

I was able to solve my actual problem of zigbee2mqtt not working with the HUSBZB device. It was actually the default baud speed in zigbee2mqtt. Here are the settings that worked. I still did not get the firmware version to show, but the upgrade was successful as you can see from my original output. So I don't know if an update was needed or not. Feel free to close this issue, or not.

serial:
  port: /dev/ttyUSB1
  adapter: ezsp
advanced:
  baudrate: 57600

I tried this and it is not working for me. It causes the addon to be stuck showing as started but the frontend displays a blank page
root@8513c2d0f1e7:/tmp/silabs# ./ncp.py scan
Connecting to.. /dev/ttyUSB1 57600 True False
{"ports": [{"port": "/dev/ttyUSB1", "vid": "10C4", "pid": "8A2A", "deviceType": "zigbee", "stackVersion": "6.7.8-373"}]}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants