Closed rshadow closed 4 years ago
That device is already supported. Are you using our Raspbian image, or something else?
I used these instructions: https://www.zigbee2mqtt.io/getting_started/flashing_the_cc2531.html And this firmware https://github.com/mozilla-iot/zigbee-adapter/blob/master/firmware/CC2531-dev-272.hex
on PC: Linux 4.19.0-8-amd64 #1 SMP Debian 4.19.98-1 (2020-01-26) x86_64 GNU/Linux
I'm asking about your gateway. Did you use our prebuilt Raspbian images, or are you running the gateway on something else (e.g. something you built yourself or with a .deb package).
Linux 4.19.0-8-amd64 #1 SMP Debian 4.19.98-1 (2020-01-26) x86_64 GNU/Linux from package: $ apt-cache policy webthings-gateway webthings-gateway: Installed: 0.12.0-1 Candidate: 0.12.0-1 Version table: *** 0.12.0-1 100 100 /var/lib/dpkg/status
Ah, there's the issue. The tty device is owned by root:dialout
, but the gateway runs as user webthings
. You'll need to resolve that before the adapter can use the device.
Probably the simplest way to resolve this is to make the webthings user a member of the dialout group.
I add webthings user to dialout group:
$ sudo -u webthings groups
webthings dialout
and try give access for all
$ sudo chmod a+rw /dev/ttyACM0
$ ls -al /dev/ttyACM0
crw-rw-rw- 1 root dialout 166, 0 мая 12 23:21 /dev/ttyACM0
but still not found
@dhylands there shouldn't be any other special privileges, right?
@dhylands there shouldn't be any other special privileges, right?
Not that I'm aware of. Biggest thing is that group changes should be confirmed with the id command. They don't take effect until a logout/login (often simpler to reboot). The id command will show all of the groups that the current user is a member of. Make sure dialout is in the list.
Yes, I know about the need for a relogin. I reboot the computer. Since all the corrections have been exhausted, the matter is probably in my computer or device.
I'm assuming the /dev/ttyACM0 is the cc2531 port. It looks like it's not being seen as a USB serial port but rather a regular serial port, since this is the message being printed: https://github.com/mozilla-iot/serial-prober-node/blob/ff6fcbc01b40f3fd4fe4bcc8b02b05980721faa9/serial-prober.js#L221 rather than this one: https://github.com/mozilla-iot/serial-prober-node/blob/ff6fcbc01b40f3fd4fe4bcc8b02b05980721faa9/serial-prober.js#L217-L219
Is this running inside a Docker container or virtual machine?
The node code for linux winds up issuing the command: udevadm info -e
and the output from that gets parsed to determine what serial ports exist and what information is available for them. What does running that command produce when run on your system?
There is a version of udevadm provided with the gateway that might give better results. In addition to running the above, also try running the udevadm
script included in the gateway/tools directory and reporting the output from that.
You're right! Runs inside the LXC container.
On host:
$ udevadm info -e
...
P: /devices/pci0000:00/0000:00:12.0/usb4/4-1/4-1:1.0/tty/ttyACM0
N: ttyACM0
L: 0
S: serial/by-path/pci-0000:00:12.0-usb-0:1:1.0
S: serial/by-id/usb-Texas_Instruments_TI_CC2531_USB_CDC___0X00124B0019387711-if00
E: DEVPATH=/devices/pci0000:00/0000:00:12.0/usb4/4-1/4-1:1.0/tty/ttyACM0
E: SUBSYSTEM=tty
E: DEVNAME=/dev/ttyACM0
E: MAJOR=166
E: MINOR=0
E: USEC_INITIALIZED=1952040723175
E: ID_BUS=usb
E: ID_VENDOR_ID=0451
E: ID_MODEL_ID=16a8
E: ID_PCI_CLASS_FROM_DATABASE=Serial bus controller
E: ID_PCI_SUBCLASS_FROM_DATABASE=USB controller
E: ID_PCI_INTERFACE_FROM_DATABASE=OHCI
E: ID_VENDOR_FROM_DATABASE=Texas Instruments, Inc.
E: ID_MODEL_FROM_DATABASE=SB7x0/SB8x0/SB9x0 USB OHCI0 Controller
E: ID_VENDOR=Texas_Instruments
E: ID_VENDOR_ENC=Texas\x20Instruments
E: ID_MODEL=TI_CC2531_USB_CDC
E: ID_MODEL_ENC=TI\x20CC2531\x20USB\x20CDC
E: ID_REVISION=0009
E: ID_SERIAL=Texas_Instruments_TI_CC2531_USB_CDC___0X00124B0019387711
E: ID_SERIAL_SHORT=__0X00124B0019387711
E: ID_TYPE=generic
E: ID_USB_INTERFACES=:020201:0a0000:
E: ID_USB_INTERFACE_NUM=00
E: ID_USB_DRIVER=cdc_acm
E: ID_USB_CLASS_FROM_DATABASE=Communications
E: ID_PATH=pci-0000:00:12.0-usb-0:1:1.0
E: ID_PATH_TAG=pci-0000_00_12_0-usb-0_1_1_0
E: DEVLINKS=/dev/serial/by-path/pci-0000:00:12.0-usb-0:1:1.0 /dev/serial/by-id/usb-Texas_Instruments_TI_CC2531_USB_CDC___0X00124B0019387711-if00
E: TAGS=:systemd:
Inside LXC:
$ udevadm info -e
...
P: /devices/pci0000:00/0000:00:12.0/usb4/4-1/4-1:1.0/tty/ttyACM0
N: ttyACM0
L: 0
E: DEVPATH=/devices/pci0000:00/0000:00:12.0/usb4/4-1/4-1:1.0/tty/ttyACM0
E: SUBSYSTEM=tty
E: DEVNAME=/dev/ttyACM0
E: MAJOR=166
E: MINOR=0
$ ./tools/udevadm info -e
P: /devices/pci0000:00/0000:00:12.0/usb4/4-1/4-1:1.0/tty/ttyACM0
N: ttyACM0
E: DEVNAME=/dev/ttyACM0
E: ID_VENDOR_ID=0451
E: ID_MODEL_ID=16a8
E: ID_SERIAL_SHORT=__0X00124B0019387711
E: ID_VENDOR_ENC=Texas Instruments
Then I made a symlink to tools/udevadm and something worked:
2020-06-05 13:35:29.776 INFO : Loading add-on: zigbee-adapter
2020-06-05 13:35:37.028 INFO : zigbee-adapter: Opening database: /etc/webthings-gateway/config/db.sqlite3
2020-06-05 13:35:37.504 INFO : zigbee-adapter: Loading add-on zigbee-adapter from /etc/webthings-gateway/addons/zigbee-adapter
2020-06-05 13:35:41.149 INFO : zigbee-adapter: DEBUG config = 'serialProber'
2020-06-05 13:35:41.153 INFO : zigbee-adapter: Enabling DEBUG_serialProber
2020-06-05 13:35:41.512 INFO : zigbee-adapter: SerialProber: /dev/ttyACM0 filter for XBee didn't match.
2020-06-05 13:35:41.514 INFO : zigbee-adapter: SerialProber: /dev/ttyACM0 filter for deConz didn't match.
2020-06-05 13:35:41.514 INFO : zigbee-adapter: SerialProber: Probing /dev/ttyACM0 at 115200 for cc2531
2020-06-05 13:35:41.515 INFO : zigbee-adapter: SerialProber: Opening /dev/ttyACM0 at 115200 baud
2020-06-05 13:35:41.591 INFO : zigbee-adapter: SerialProber: Probing /dev/ttyACM0 ...
2020-06-05 13:35:41.596 INFO : zigbee-adapter: SerialProber: Sent: <Buffer fe 00 21 01 20>
2020-06-05 13:35:41.604 INFO : zigbee-adapter: SerialProber: Rcvd: <Buffer fe 02 61 01 79 07 1c>
2020-06-05 13:35:41.605 INFO : zigbee-adapter: SerialProber: Probe successful
2020-06-05 13:35:41.919 INFO : zigbee-adapter: this.driver = ZStackDriver {}
2020-06-05 13:35:43.406 INFO : zigbee-adapter: ZStack reset. Reason 0
2020-06-05 13:35:43.407 INFO : zigbee-adapter: ZStack dongle 2, product: 0, version: 2.7.2
2020-06-05 13:35:44.425 INFO : zigbee-adapter: AF SRSP for cmd 0 status error 184!
2020-06-05 13:35:45.427 INFO : zigbee-adapter: AF SRSP for cmd 0 status error 184!
2020-06-05 13:35:46.429 ERROR : zigbee-adapter: No parser for SRSP, subsystem 15
2020-06-05 13:35:52.244 ERROR : zigbee-adapter: No parser for SRSP, subsystem 6
2020-06-05 13:35:53.562 ERROR : zigbee-adapter: No parser for SRSP, subsystem 6
2020-06-05 13:35:53.563 ERROR : zigbee-adapter: No parser for SRSP, subsystem 6
2020-06-05 13:35:54.298 INFO : zigbee-adapter: ZStack device state changed to 8
2020-06-05 13:35:54.300 ERROR : zigbee-adapter: handleExplicitRx: Unrecognize frame received
2020-06-05 13:35:54.302 ERROR : zigbee-adapter: { sof: 254,
2020-06-05 13:35:54.302 ERROR : zigbee-adapter: len: 1,
2020-06-05 13:35:54.303 ERROR : zigbee-adapter: type: 2,
2020-06-05 13:35:54.304 ERROR : zigbee-adapter: subsys: 5,
2020-06-05 13:35:54.305 ERROR : zigbee-adapter: cmd: 192,
2020-06-05 13:35:54.305 ERROR : zigbee-adapter: payload: <Buffer 08>,
2020-06-05 13:35:54.306 ERROR : zigbee-adapter: fcs: 140,
2020-06-05 13:35:54.306 ERROR : zigbee-adapter: csum: 140,
2020-06-05 13:35:54.307 ERROR : zigbee-adapter: id: undefined }
2020-06-05 13:36:02.201 INFO : zigbee-adapter: ZStack device state changed to 9
2020-06-05 13:36:02.202 INFO : zigbee-adapter: Zigbee coordinator started!
2020-06-05 13:36:02.211 INFO : zigbee-adapter: ZigbeeNode created: addr64: 00124b0019387711 addr16: 0000
2020-06-05 13:36:02.212 ERROR : zigbee-adapter: handleExplicitRx: Unrecognize frame received
2020-06-05 13:36:02.213 ERROR : zigbee-adapter: { sof: 254,
2020-06-05 13:36:02.213 ERROR : zigbee-adapter: len: 1,
2020-06-05 13:36:02.215 ERROR : zigbee-adapter: type: 2,
2020-06-05 13:36:02.215 ERROR : zigbee-adapter: subsys: 5,
2020-06-05 13:36:02.216 ERROR : zigbee-adapter: cmd: 192,
2020-06-05 13:36:02.216 ERROR : zigbee-adapter: payload: <Buffer 09>,
2020-06-05 13:36:02.216 ERROR : zigbee-adapter: fcs: 141,
2020-06-05 13:36:02.217 ERROR : zigbee-adapter: csum: 141,
2020-06-05 13:36:02.219 ERROR : zigbee-adapter: id: undefined }
2020-06-05 13:36:02.224 INFO : zigbee-adapter: NWK info:
2020-06-05 13:36:02.225 INFO : zigbee-adapter: PANID: 5209
2020-06-05 13:36:02.225 INFO : zigbee-adapter: Ext PANID: 124b001938771100
2020-06-05 13:36:02.225 INFO : zigbee-adapter: Current channel: 0
2020-06-05 13:36:02.232 INFO : zigbee-adapter: readDeviceInfo: read failed: { [Error: ENOENT: no such file or directory, open '/etc/webthings-gateway/data/zigbee-adapter/zb-00124b0019387711.json']
2020-06-05 13:36:02.232 INFO : zigbee-adapter: errno: -2,
2020-06-05 13:36:02.233 INFO : zigbee-adapter: code: 'ENOENT',
2020-06-05 13:36:02.234 INFO : zigbee-adapter: syscall: 'open',
2020-06-05 13:36:02.234 INFO : zigbee-adapter: path:
2020-06-05 13:36:02.235 INFO : zigbee-adapter: '/etc/webthings-gateway/data/zigbee-adapter/zb-00124b0019387711.json' }
2020-06-05 13:36:02.262 INFO : zigbee-adapter: IEEE: 00124b0019387711
2020-06-05 13:36:02.264 INFO : zigbee-adapter: Channels: 00f0ff07
2020-06-05 13:36:02.264 INFO : zigbee-adapter: PanID: ffff
2020-06-05 13:36:02.265 INFO : zigbee-adapter: Saving PAN ID: 5209 to NV ram!
2020-06-05 13:36:02.281 INFO : zigbee-adapter: Sending Mgmt LQI (Neighbor Table) Req (0x0031)
2020-06-05 13:36:02.298 INFO : zigbee-adapter: ----- Scan Starting -----
2020-06-05 13:36:02.299 INFO : zigbee-adapter: ----- Nodes -----
2020-06-05 13:36:02.301 INFO : zigbee-adapter: Node: 00124b0019387711 0000 Name: zb-00124b0019387711-Dongle rebindRequired: true endpoints: []
2020-06-05 13:36:02.303 INFO : zigbee-adapter: -----------------
2020-06-05 13:36:02.304 INFO : zigbee-adapter: ----- Scan Complete -----
2020-06-05 13:36:02.304 INFO : zigbee-adapter: ----- Nodes -----
2020-06-05 13:36:02.305 INFO : zigbee-adapter: Node: 00124b0019387711 0000 Name: zb-00124b0019387711-Dongle rebindRequired: true endpoints: []
2020-06-05 13:36:02.306 INFO : zigbee-adapter: -----------------
2020-06-05 13:36:02.307 INFO : zigbee-adapter: ----- Update Network Addresses Complete -----
I'm trying to use a dongle I bought pre-flashed from ITead on Aliexpress.
Before I enabled FTDI serial in the settings I saw this:
2020-09-22 11:31:28.969 INFO : zigbee-adapter: Serial Device found @ /dev/ttyAMA0
2020-09-22 11:31:28.972 INFO : zigbee-adapter: Serial Device found @ /dev/ttyS0
2020-09-22 11:31:28.974 INFO : zigbee-adapter: USB Serial Device 0451:16a8 Vendor: Texas Instruments Serial: __0X00124B0018E2AB77 found @ /dev/ttyACM0
2020-09-22 11:31:28.977 ERROR : zigbee-adapter: Failed to start add-on zigbee-adapter: No Zigbee dongle found
Then I tried enabling that FTDI option, and that seemed to have done something. So far I'm not able to add devices though (trying a basic IKEA lightbulb at the moment).
2020-09-22 13:08:43.742 INFO : zigbee-adapter: Cancelling pairing mode
2020-09-22 13:08:43.745 INFO : zigbee-adapter: Sending Mgmt Permit Join Req (0x0036)
2020-09-22 13:08:43.748 ERROR : zigbee-adapter: handleExplicitRx: Unrecognize frame received
2020-09-22 13:08:43.753 ERROR : zigbee-adapter: { sof: 254,
2020-09-22 13:08:43.755 ERROR : zigbee-adapter: len: 1,
2020-09-22 13:08:43.757 ERROR : zigbee-adapter: type: 2,
2020-09-22 13:08:43.759 ERROR : zigbee-adapter: subsys: 5,
2020-09-22 13:08:43.760 ERROR : zigbee-adapter: cmd: 203,
2020-09-22 13:08:43.762 ERROR : zigbee-adapter: payload: <Buffer 00>,
2020-09-22 13:08:43.764 ERROR : zigbee-adapter: fcs: 143,
2020-09-22 13:08:43.766 ERROR : zigbee-adapter: csum: 143,
2020-09-22 13:08:43.767 ERROR : zigbee-adapter: id: 3 }
2020-09-22 13:08:54.105 INFO : Unloading ZigbeeAdapter
2020-09-22 13:08:54.114 INFO : zigbee-adapter: Adapter: ZigbeeAdapter unloaded
2020-09-22 13:08:58.712 INFO : Loading add-on: zigbee-adapter
2020-09-22 13:09:01.938 INFO : zigbee-adapter: Opening database: /home/pi/.mozilla-iot/config/db.sqlite3
2020-09-22 13:09:03.379 INFO : zigbee-adapter: Loading add-on zigbee-adapter from /home/pi/.mozilla-iot/addons/zigbee-adapter
2020-09-22 13:09:03.561 INFO : zigbee-adapter: DEBUG config = ''
2020-09-22 13:09:04.968 INFO : zigbee-adapter: this.driver = ZStackDriver {}
2020-09-22 13:09:06.008 INFO : zigbee-adapter: ZStack reset. Reason 0
2020-09-22 13:09:06.012 INFO : zigbee-adapter: ZStack dongle 2, product: 0, version: 2.6.3
2020-09-22 13:09:07.051 INFO : zigbee-adapter: AF SRSP for cmd 0 status error 184!
2020-09-22 13:09:08.051 INFO : zigbee-adapter: AF SRSP for cmd 0 status error 184!
2020-09-22 13:09:09.055 ERROR : zigbee-adapter: No parser for SRSP, subsystem 0
2020-09-22 13:09:09.648 ERROR : zigbee-adapter: No parser for SRSP, subsystem 6
2020-09-22 13:09:09.651 INFO : zigbee-adapter: ZStack device state changed to 9
2020-09-22 13:09:09.654 INFO : zigbee-adapter: Zigbee coordinator started!
2020-09-22 13:09:09.666 INFO : zigbee-adapter: ZigbeeNode created: addr64: 00124b0018e2xxxx addr16: 0000
2020-09-22 13:09:09.673 ERROR : zigbee-adapter: handleExplicitRx: Unrecognize frame received
2020-09-22 13:09:09.677 ERROR : zigbee-adapter: { sof: 254,
2020-09-22 13:09:09.680 ERROR : zigbee-adapter: len: 1,
2020-09-22 13:09:09.682 ERROR : zigbee-adapter: type: 2,
2020-09-22 13:09:09.684 ERROR : zigbee-adapter: subsys: 5,
2020-09-22 13:09:09.687 ERROR : zigbee-adapter: cmd: 192,
2020-09-22 13:09:09.689 ERROR : zigbee-adapter: payload: <Buffer 09>,
2020-09-22 13:09:09.691 ERROR : zigbee-adapter: fcs: 141,
2020-09-22 13:09:09.693 ERROR : zigbee-adapter: csum: 141,
2020-09-22 13:09:09.695 ERROR : zigbee-adapter: id: undefined }
2020-09-22 13:09:09.699 INFO : zigbee-adapter: NWK info:
2020-09-22 13:09:09.701 INFO : zigbee-adapter: PANID: 7e09
2020-09-22 13:09:09.704 INFO : zigbee-adapter: Ext PANID: 124b0018e2xxxx00
2020-09-22 13:09:09.706 INFO : zigbee-adapter: Current channel: 0
2020-09-22 13:09:09.727 INFO : zigbee-adapter: IEEE: 00124b0018e2xxxx
2020-09-22 13:09:09.730 INFO : zigbee-adapter: Channels: 00080000
2020-09-22 13:09:09.732 INFO : zigbee-adapter: PanID: 7e09
2020-09-22 13:09:09.734 INFO : zigbee-adapter: Sending Mgmt LQI (Neighbor Table) Req (0x0031)
2020-09-22 13:09:19.734 INFO : zigbee-adapter: Sending Mgmt LQI (Neighbor Table) Req (0x0031)
2020-09-22 13:09:29.739 INFO : zigbee-adapter: Sending Mgmt LQI (Neighbor Table) Req (0x0031)
2020-09-22 13:09:39.750 INFO : zigbee-adapter: ----- Scan Starting -----
2020-09-22 13:09:39.755 INFO : zigbee-adapter: ----- Nodes -----
2020-09-22 13:09:39.759 INFO : zigbee-adapter: Node: 00124b0018e2xxxx 0000 Name: zb-00124b0018e2xxxx-Dongle rebindRequired: true endpoints: []
2020-09-22 13:09:39.762 INFO : zigbee-adapter: -----------------
2020-09-22 13:09:39.766 INFO : zigbee-adapter: ----- Scan Complete -----
2020-09-22 13:09:39.770 INFO : zigbee-adapter: ----- Nodes -----
2020-09-22 13:09:39.773 INFO : zigbee-adapter: Node: 00124b0018e2xxxx 0000 Name: zb-00124b0018e2xxxx-Dongle rebindRequired: true endpoints: []
2020-09-22 13:09:39.776 INFO : zigbee-adapter: -----------------
2020-09-22 13:09:39.780 INFO : zigbee-adapter: ----- Update Network Addresses Complete -----
2020-09-22 13:12:54.212 INFO : Unloading ThingURLAdapter
2020-09-22 13:12:54.235 INFO : thing-url-adapter: Adapter: ThingURLAdapter unloaded
2020-09-22 13:13:00.100 INFO : About to call startPairing on ZigbeeAdapter
2020-09-22 13:13:00.118 INFO : Opened a new things socket
2020-09-22 13:13:00.124 INFO : zigbee-adapter: Pairing mode started, timeout = 60
2020-09-22 13:13:00.129 INFO : zigbee-adapter: Sending Mgmt Permit Join Req (0x0036)
2020-09-22 13:13:13.515 INFO : zigbee-adapter: Device ec1bbdfffeaa8839:xxxx left network!
2020-09-22 13:14:00.115 INFO : Pairing timeout
2020-09-22 13:14:00.122 INFO : zigbee-adapter: Cancelling pairing mode
2020-09-22 13:14:00.125 INFO : zigbee-adapter: Sending Mgmt Permit Join Req (0x0036)
2020-09-22 13:14:00.138 ERROR : zigbee-adapter: handleExplicitRx: Unrecognize frame received
2020-09-22 13:14:00.142 ERROR : zigbee-adapter: { sof: 254,
2020-09-22 13:14:00.143 ERROR : zigbee-adapter: len: 1,
2020-09-22 13:14:00.146 ERROR : zigbee-adapter: type: 2,
2020-09-22 13:14:00.147 ERROR : zigbee-adapter: subsys: 5,
2020-09-22 13:14:00.149 ERROR : zigbee-adapter: cmd: 203,
2020-09-22 13:14:00.151 ERROR : zigbee-adapter: payload: <Buffer 00>,
2020-09-22 13:14:00.153 ERROR : zigbee-adapter: fcs: 143,
2020-09-22 13:14:00.155 ERROR : zigbee-adapter: csum: 143,
2020-09-22 13:14:00.157 ERROR : zigbee-adapter: id: 3 }
I purchased the CC2531 device. Flash it according to the instructions. But the plugin does not find it.
Shop: https://aliexpress.ru/item/4000439492385.html?spm=a2g0s.9042311.0.0.644133ede2Egf9
Info: