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

Z-Stack 3 on CC2652R/CC1352P adventures #1429

Closed
Koenkk opened this issue Apr 14, 2019 · 913 comments
Closed

Z-Stack 3 on CC2652R/CC1352P adventures #1429

Koenkk opened this issue Apr 14, 2019 · 913 comments

Comments

@Koenkk
Copy link
Owner

Koenkk commented Apr 14, 2019

NOTE 2020-12-11 locked, please continue here: #5266

Texas Instruments has recently released a new high performance Zigbee chip: the CC2652R. This chip is much faster and contains much more memory than the CC2530/CC2531.

This issue is created in order to gather feedback of users using the CC2652R AND Z-Stack 3.0 (= Zigbee 3.0)

Notes

  • The device can be bought here: http://www.ti.com/tool/launchxl-cc26x2r1
  • No additional flashing hardware is needed, it has an on-board programmer (no CC debugger needed).
  • The board has +- the size of a Raspberry Pi
  • Zigbee 3.0!
  • Flash using Flash Programmer v2
  • Firmware can be found here in the bin folder: https://github.com/Koenkk/Z-Stack-firmware/tree/master/coordinator/Z-Stack_3.x.0
  • It's not possible to migrate your Zigbee 1.2 network (requires repairing)
  • The network restore trick that we used in Zigbee 1.2 doesn't work anymore (due to better security policies). A backup of the CC2652R is taken at every shutdown of zigbee2mqtt, file can be found under data/coordinator_backup.json. This backup is automatically restored when starting with a new flashed CC2652R.
  • Requires latest zigbee2mqtt dev branch.
@JLFN
Copy link
Contributor

JLFN commented Apr 14, 2019

@Koenkk can this board be bought from inside of Europe? I need to pay extra taxes if bought outside.

@Koenkk
Copy link
Owner Author

Koenkk commented Apr 14, 2019

@JLFN mine shipped from the Netherlands.

@lolorc
Copy link
Contributor

lolorc commented Apr 14, 2019

mine too
I was able to flash it with uniflash on linux.

@JLFN
Copy link
Contributor

JLFN commented Apr 14, 2019

@JLFN mine shipped from the Netherlands.

Can you please give me link of the page where you bought it from that shipped from the NL.

@Koenkk
Copy link
Owner Author

Koenkk commented Apr 14, 2019

@JLFN just from TI.

@Koenkk
Copy link
Owner Author

Koenkk commented Apr 14, 2019

The Xiaomi end device undefined model ID issue had nothing to do with the CC2652R, it was actually a zigbee2mqtt bug, fixed in latest dev branch.

@dh-harald
Copy link

I've got mine today morning (from NL as well). Today, there will be a big migration project :)

@tunip
Copy link

tunip commented Apr 15, 2019

Before I also "jump on the adventure train", I have 2 questions.

  1. Range
    Could someone rate the range of this device? Could we connect a antenna to increase the range?

  2. Router
    Is this device only for a coordinator role? Or would we see also in the future a router firmware?

Thx

@salopette
Copy link

Hello, does that part have an antenna? What is the range of that? and pays off the switch from cc2531 to cc2652r ????

@lolorc
Copy link
Contributor

lolorc commented Apr 15, 2019

@salopette it has a pcb antenna and an unconnected connector, see https://e2e.ti.com/support/wireless-connectivity/bluetooth/f/538/t/723337

@lolorc
Copy link
Contributor

lolorc commented Apr 15, 2019

I only have osram plugs and aqara devices, aqara temp/humidity sensors are mostly ok to rebind, but it's not as straightforward for the other ones.
for instance, I haven't been able to pair MCCGQ01LM, MFKZQ01LM and DJT11LM devices yet.

@dh-harald
Copy link

dh-harald commented Apr 15, 2019

I'm done with re-pairing... Looks good... Re-pairing done with QBKG11LM, QBKG04LM, RTCGQ11LM, GL-C-008, E1746. Link qualities are better than CC2531.

@lolorc
Copy link
Contributor

lolorc commented Apr 15, 2019

i've been able to pair MCCGQ01LM, MFKZQ01LM and DJT11LM, but still there's something very wrong with aqara devices.
With the aqara gateway and another alternative gw (zigate), the pairing action is very straightforward, it only needs one action on the device, with those 3 models I had to do something like pressing the pairing button several times per second after the initial long press action, worst was DJT11LM

@Koenkk
Copy link
Owner Author

Koenkk commented Apr 16, 2019

@dh-harald do you see big improvements in link quality?

@dh-harald
Copy link

@Koenkk with CC2531, I had 50-70 link quality, not I've 100-120.

@lolorc
Copy link
Contributor

lolorc commented Apr 16, 2019

This morning it looked like my cc2652 had crashed. z2m wasn't able to use its serial port anymore. Had to restart rpi. Most of the pairings have been lost.

Link quality looks also better than what I had with cheap cc2530+cc2591.

@lolorc
Copy link
Contributor

lolorc commented Apr 16, 2019

@tunip range looks better, antenna should be possible as there's a connector.
router should be doable, but currently the changes to build a router firmware are closed-source.

@dh-harald
Copy link

dh-harald commented Apr 16, 2019

This morning it looked like my cc2652 had crashed. z2m wasn't able to use its serial port anymore. Had to restart rpi. Most of the pairings have been lost.

I've something similar ATM... All devices are offline, can't ping by the controller. I had it yesterday, I needed to disconnect it from usb (poweroff)... Now I'm not at home, so I need to figure out, how I can disconect it from remote :(

@lolorc
Copy link
Contributor

lolorc commented Apr 16, 2019

@dh-harald if it was connected to a PC, I would try to use uniflash to reset the board.
Myself i need to find a way to program the board on the rpi from my linux pc, I'll give a try to ser2net+socat.

@dh-harald
Copy link

dh-harald commented Apr 16, 2019

@dh-harald if it was connected to a PC, I would try to use uniflash to reset the board.
Myself i need to find a way to program the board from my linux pc, I'll give a try to ser2net+socat.

It's an arm64 box, so I'm afraid, I can't run uniflash on it :(
But if you can figure out, please share the solution :)

@dh-harald
Copy link

@tunip I already tried them, but it didn't work.

@Koenkk
Copy link
Owner Author

Koenkk commented Apr 16, 2019

Mine also crashed after 2 days (Request timeout errors)

@lolorc
Copy link
Contributor

lolorc commented Apr 16, 2019

the mqtt messages with empty action are not related to cc2652, are they ?

  serialport/stream binding.read finished +1ms
  cc-znp { sof: 254,
  cc-znp   len: 28,
  cc-znp   type: 'AREQ',
  cc-znp   subsys: 'AF',
  cc-znp   cmd: 'incomingMsg',
  cc-znp   payload:
  cc-znp    { groupid: 0,
  cc-znp      clusterid: 18,
  cc-znp      srcaddr: 64732,
  cc-znp      srcendpoint: 2,
  cc-znp      dstendpoint: 1,
  cc-znp      wasbroadcast: 0,
  cc-znp      linkquality: 108,
  cc-znp      securityuse: 0,
  cc-znp      timestamp: 5007337,
  cc-znp      transseqnumber: 0,
  cc-znp      len: 8,
  cc-znp      data: <Buffer 18 38 0a 55 00 21 02 00> },
  cc-znp   fcs: 97,
  cc-znp   csum: 97 } +21ms
  serialport/stream _read reading +18ms
  serialport/binding-abstract read +19ms
  serialport/bindings/unixRead Starting read +18ms
  cc-znp:AREQ <-- AF:incomingMsg, { groupid: 0, clusterid: 18, srcaddr: 64732, srcendpoint: 2, dstendpoint: 1, wasbroadcast: 0, linkquality: 108, securityuse: 0, timestamp: 5007337, transseqnumber: 0, len: 8, data: <Buffer 18 38 0a 55 00 21 02 00> } +35ms
  zigbee-shepherd:af dispatchIncomingMsg(): type: incomingMsg, msg: {"groupid":0,"clusterid":18,"srcaddr":64732,"srcendpoint":2,"dstendpoint":1,"wasbroadcast":0,"linkquality":108,"securityuse":0,"timestamp":5007337,"transseqnumber":0,"len":8,"data":{"type":"Buffer","data":[24,56,10,85,0,33,2,0]}} +126ms
  zigbee-shepherd:msgHdlr IND <-- AF:incomingMsg, transId: 0 +39ms
  serialport/bindings/unixRead waiting for readable because of code: EAGAIN +6ms
  serialport/bindings/poller Polling for "readable" +27ms
  zigbee-shepherd:af dispatchIncomingMsg(): type: zclIncomingMsg, msg: {"groupid":0,"clusterid":18,"srcaddr":64732,"srcendpoint":2,"dstendpoint":1,"wasbroadcast":0,"linkquality":108,"securityuse":0,"timestamp":5007337,"transseqnumber":0,"len":8,"data":{"0":24,"1":56,"2":10,"3":85,"4":0,"5":33,"6":2,"7":0},"zclMsg":{"frameCntl":{"frameType":0,"manufSpec":0,"direction":1,"disDefaultRsp":1},"manufCode":0,"seqNum":56,"cmdId":"report","payload":[{"attrId":85,"dataType":33,"attrData":2}]}} +5ms
  zigbee2mqtt:debug 4/16/2019, 8:13:05 PM Received zigbee message of type 'attReport' with data '{"cid":"genMultistateInput","data":{"presentValue":2}}' of device 'lumi.sensor_cube' (cube_02) of endpoint 2
  zigbee2mqtt:info 4/16/2019, 8:13:05 PM MQTT publish: topic 'zigbee2mqtt/cube_02', payload '{"action":"wakeup","linkquality":108,"last_seen":1555438385033,"elapsed":813581}'
  zigbee2mqtt:info 4/16/2019, 8:13:05 PM MQTT publish: topic 'zigbee2mqtt/cube_02', payload '{"action":""}'

@lolorc
Copy link
Contributor

lolorc commented Apr 16, 2019

another funny issue with a door window sensor, and I haven't touched the pair button, I was just playing with a magnet. In the end the device is removed from the network

  serialport/stream binding.read finished +10ms                                                                                                                                                                    │
  cc-znp { sof: 254,                                                                                                                                                                                               │
  cc-znp   len: 27,                                                                                                                                                                                                │
  cc-znp   type: 'AREQ',                                                                                                                                                                                           │
  cc-znp   subsys: 'AF',                                                                                                                                                                                           │
  cc-znp   cmd: 'incomingMsg',                                                                                                                                                                                     │
  cc-znp   payload:                                                                                                                                                                                                │
  cc-znp    { groupid: 0,                                                                                                                                                                                          │
  cc-znp      clusterid: 6,                                                                                                                                                                                        │
  cc-znp      srcaddr: 33589,                                                                                                                                                                                      │
  cc-znp      srcendpoint: 1,                                                                                                                                                                                      │
  cc-znp      dstendpoint: 1,                                                                                                                                                                                      │
  cc-znp      wasbroadcast: 0,                                                                                                                                                                                     │
  cc-znp      linkquality: 135,                                                                                                                                                                                    │
  cc-znp      securityuse: 0,                                                                                                                                                                                      │
  cc-znp      timestamp: 7527883,                                                                                                                                                                                  ┤
  cc-znp      transseqnumber: 0,                                                                                                                                                                                   │
  cc-znp      len: 7,                                                                                                                                                                                              │
  cc-znp      data: <Buffer 18 12 0a 00 00 10 00> },                                                                                                                                                               │
  cc-znp   fcs: 49,                                                                                                                                                                                                │
  cc-znp   csum: 49 } +18ms                                                                                                                                                                                        │
  cc-znp { sof: 254,                                                                                                                                                                                               │
  cc-znp   len: 27,                                                                                                                                                                                                │
  cc-znp   type: 'AREQ',                                                                                                                                                                                           │
  cc-znp   subsys: 'AF',                                                                                                                                                                                           │
  cc-znp   cmd: 'incomingMsg',                                                                                                                                                                                     │
  cc-znp   payload:                                                                                                                                                                                                │
  cc-znp    { groupid: 0,                                                                                                                                                                                          │
  cc-znp      clusterid: 6,                                                                                                                                                                                        │
  cc-znp      srcaddr: 33589,                                                                                                                                                                                      │
  cc-znp      srcendpoint: 1,                                                                                                                                                                                      │
  cc-znp      dstendpoint: 1,                                                                                                                                                                                      │
  cc-znp      wasbroadcast: 0,                                                                                                                                                                                     │
  cc-znp      linkquality: 126,                                                                                                                                                                                    │
  cc-znp      securityuse: 0,                                                                                                                                                                                      │
  cc-znp      timestamp: 7574573,                                                                                                                                                                                  │
  cc-znp      transseqnumber: 0,                                                                                                                                                                                   │
  cc-znp      len: 7,                                                                                                                                                                                              │
  cc-znp      data: <Buffer 18 13 0a 00 00 10 01> },                                                                                                                                                               │
  cc-znp   fcs: 102,                                                                                                                                                                                               │
  cc-znp   csum: 102 } +8ms                                                                                                                                                                                        │
  cc-znp { sof: 254,                                                                                                                                                                                               │
  cc-znp   len: 27,                                                                                                                                                                                                │
  cc-znp   type: 'AREQ',                                                                                                                                                                                           │
  cc-znp   subsys: 'AF',                                                                                                                                                                                           │
  cc-znp   cmd: 'incomingMsg',                                                                                                                                                                                     │
  cc-znp   payload:                                                                                                                                                                                                │
  cc-znp    { groupid: 0,                                                                                                                                                                                          │
  cc-znp      clusterid: 6,                                                                                                                                                                                        │
  cc-znp      srcaddr: 33589,                                                                                                                                                                                      │
  cc-znp      srcendpoint: 1,                                                                                                                                                                                      │
  cc-znp      dstendpoint: 1,                                                                                                                                                                                      │
  cc-znp      wasbroadcast: 0,                                                                                                                                                                                     │
  cc-znp      linkquality: 117,                                                                                                                                                                                    │
  cc-znp      securityuse: 0,                                                                                                                                                                                      │
  cc-znp      timestamp: 7594239,                                                                                                                                                                                  │
  cc-znp      transseqnumber: 0,                                                                                                                                                                                   │
  cc-znp      len: 7,                                                                                                                                                                                              │
  cc-znp      data: <Buffer 18 14 0a 00 00 10 00> },                                                                                                                                                               │
  cc-znp   fcs: 205,                                                                                                                                                                                               ┤
  cc-znp   csum: 205 } +15ms                                                                                                                                                                                       ┤
  serialport/stream _read reading +31ms                                                                                                                                                                            │
  serialport/binding-abstract read +42ms                                                                                                                                                                           │
  serialport/bindings/unixRead Starting read +33ms                                                                                                                                                                 │
  zigbee-shepherd:af dispatchIncomingMsg(): type: zclIncomingMsg, msg: {"groupid":0,"clusterid":1030,"srcaddr":28406,"srcendpoint":1,"dstendpoint":1,"wasbroadcast":0,"linkquality":117,"securityuse":0,"timestamp"│
  zigbee2mqtt:debug 4/16/2019, 8:43:08 PM Received zigbee message of type 'attReport' with data '{"cid":"msOccupancySensing","data":{"occupancy":1}}' of device 'lumi.sensor_motion' (0xmotion_sensor_01) of endpoi│
  zigbee2mqtt:info 4/16/2019, 8:43:08 PM MQTT publish: topic 'zigbee2mqtt/motion_sensor_01', payload '{"occupancy":true,"linkquality":117,"last_seen":1555440188148,"elapsed":82240}'                              │
  cc-znp:AREQ <-- AF:incomingMsg, { groupid: 0, clusterid: 6, srcaddr: 33589, srcendpoint: 1, dstendpoint: 1, wasbroadcast: 0, linkquality: 135, securityuse: 0, timestamp: 7527883, transseqnumber: 0, len: 7, dat│
  zigbee-shepherd:af dispatchIncomingMsg(): type: incomingMsg, msg: {"groupid":0,"clusterid":6,"srcaddr":33589,"srcendpoint":1,"dstendpoint":1,"wasbroadcast":0,"linkquality":135,"securityuse":0,"timestamp":75278│
  zigbee-shepherd:msgHdlr IND <-- AF:incomingMsg, transId: 0 +54ms                                                                                                                                                 │
  cc-znp:AREQ <-- AF:incomingMsg, { groupid: 0, clusterid: 6, srcaddr: 33589, srcendpoint: 1, dstendpoint: 1, wasbroadcast: 0, linkquality: 126, securityuse: 0, timestamp: 7574573, transseqnumber: 0, len: 7, dat│
  zigbee-shepherd:af dispatchIncomingMsg(): type: incomingMsg, msg: {"groupid":0,"clusterid":6,"srcaddr":33589,"srcendpoint":1,"dstendpoint":1,"wasbroadcast":0,"linkquality":126,"securityuse":0,"timestamp":75745│
  zigbee-shepherd:msgHdlr IND <-- AF:incomingMsg, transId: 0 +7ms                                                                                                                                                  │
  cc-znp:AREQ <-- AF:incomingMsg, { groupid: 0, clusterid: 6, srcaddr: 33589, srcendpoint: 1, dstendpoint: 1, wasbroadcast: 0, linkquality: 117, securityuse: 0, timestamp: 7594239, transseqnumber: 0, len: 7, dat│
  zigbee-shepherd:af dispatchIncomingMsg(): type: incomingMsg, msg: {"groupid":0,"clusterid":6,"srcaddr":33589,"srcendpoint":1,"dstendpoint":1,"wasbroadcast":0,"linkquality":117,"securityuse":0,"timestamp":75942│
  zigbee-shepherd:msgHdlr IND <-- AF:incomingMsg, transId: 0 +7ms                                                                                                                                                  │
  serialport/bindings/unixRead Finished read 74 bytes +38ms                                                                                                                                                        │
  serialport/stream binding.read finished +39ms                                                                                                                                                                    │
  cc-znp { sof: 254,                                                                                                                                                                                               │
  cc-znp   len: 37,                                                                                                                                                                                                │
  cc-znp   type: 'AREQ',                                                                                                                                                                                           ┤
  cc-znp   subsys: 'AF',                                                                                                                                                                                           │
  cc-znp   cmd: 'incomingMsg',                                                                                                                                                                                     │
  cc-znp   payload:                                                                                                                                                                                                │
  cc-znp    { groupid: 0,                                                                                                                                                                                          │
  cc-znp      clusterid: 0,                                                                                                                                                                                        │
  cc-znp      srcaddr: 33589,                                                                                                                                                                                      │
  cc-znp      srcendpoint: 1,                                                                                                                                                                                      │
  cc-znp      dstendpoint: 1,                                                                                                                                                                                      │
  cc-znp      wasbroadcast: 0,                                                                                                                                                                                     │
  cc-znp      linkquality: 120,                                                                                                                                                                                    │
  cc-znp      securityuse: 0,                                                                                                                                                                                      │
  cc-znp      timestamp: 7594503,                                                                                                                                                                                  │
  cc-znp      transseqnumber: 0,                                                                                                                                                                                   │
  cc-znp      len: 17,                                                                                                                                                                                             │
  cc-znp      data: <Buffer 1c 5f 11 15 0a 01 ff 42 09 04 21 a8 13 0a 21 00 00> },                                                                                                                                 │
  cc-znp   fcs: 79,                                                                                                                                                                                                │
  cc-znp   csum: 79 } +48ms                                                                                                                                                                                        │
  cc-znp { sof: 254,                                                                                                                                                                                               │
  cc-znp   len: 27,                                                                                                                                                                                                │
  cc-znp   type: 'AREQ',                                                                                                                                                                                           │
  cc-znp   subsys: 'AF',                                                                                                                                                                                           │
  cc-znp   cmd: 'incomingMsg',                                                                                                                                                                                     │
  cc-znp   payload:                                                                                                                                                                                                │
  cc-znp    { groupid: 0,                                                                                                                                                                                          │
  cc-znp      clusterid: 6,                                                                                                                                                                                        │
  cc-znp      srcaddr: 33589,                                                                                                                                                                                      │
  cc-znp      srcendpoint: 1,                                                                                                                                                                                      │
  cc-znp      dstendpoint: 1,                                                                                                                                                                                      │
  cc-znp      wasbroadcast: 0,                                                                                                                                                                                     │
  cc-znp      linkquality: 123,                                                                                                                                                                                    │
  cc-znp      securityuse: 0,                                                                                                                                                                                      │
  cc-znp      timestamp: 7599348,                                                                                                                                                                                  │
  cc-znp      transseqnumber: 0,                                                                                                                                                                                   │
  cc-znp      len: 7,                                                                                                                                                                                              │
  cc-znp      data: <Buffer 18 16 0a 00 00 10 01> },                                                                                                                                                               │
  cc-znp   fcs: 223,                                                                                                                                                                                               │
  cc-znp   csum: 223 } +9ms                                                                                                                                                                                        │
  serialport/stream _read reading +18ms                                                                                                                                                                            │
  serialport/binding-abstract read +56ms                                                                                                                                                                           │
  serialport/bindings/unixRead Starting read +18ms                                                                                                                                                                 │
  zigbee-shepherd:af dispatchIncomingMsg(): type: zclIncomingMsg, msg: {"groupid":0,"clusterid":6,"srcaddr":33589,"srcendpoint":1,"dstendpoint":1,"wasbroadcast":0,"linkquality":135,"securityuse":0,"timestamp":75┤
  zigbee2mqtt:debug 4/16/2019, 8:43:08 PM Received zigbee message of type 'attReport' with data '{"cid":"genOnOff","data":{"onOff":0}}' of device 'lumi.sensor_magnet.aq2' (0xdoor_window_sensor_04) of endpoint 1 │
  zigbee2mqtt:info 4/16/2019, 8:43:08 PM MQTT publish: topic 'zigbee2mqtt/door_window_sensor_04', payload '{"contact":true,"linkquality":135,"last_seen":1555440188206,"elapsed":23558}'                           │
  zigbee-shepherd:af dispatchIncomingMsg(): type: zclIncomingMsg, msg: {"groupid":0,"clusterid":6,"srcaddr":33589,"srcendpoint":1,"dstendpoint":1,"wasbroadcast":0,"linkquality":126,"securityuse":0,"timestamp":75│
  zigbee2mqtt:debug 4/16/2019, 8:43:08 PM Received zigbee message of type 'attReport' with data '{"cid":"genOnOff","data":{"onOff":1}}' of device 'lumi.sensor_magnet.aq2' (0xdoor_window_sensor_04) of endpoint 1 │
  zigbee2mqtt:info 4/16/2019, 8:43:08 PM MQTT publish: topic 'zigbee2mqtt/door_window_sensor_04', payload '{"contact":false,"linkquality":126,"last_seen":1555440188217,"elapsed":11}'                             │
  zigbee-shepherd:af dispatchIncomingMsg(): type: zclIncomingMsg, msg: {"groupid":0,"clusterid":6,"srcaddr":33589,"srcendpoint":1,"dstendpoint":1,"wasbroadcast":0,"linkquality":117,"securityuse":0,"timestamp":75│
  zigbee2mqtt:debug 4/16/2019, 8:43:08 PM Received zigbee message of type 'attReport' with data '{"cid":"genOnOff","data":{"onOff":0}}' of device 'lumi.sensor_magnet.aq2' (0xdoor_window_sensor_04) of endpoint 1 │
  zigbee2mqtt:info 4/16/2019, 8:43:08 PM MQTT publish: topic 'zigbee2mqtt/door_window_sensor_04', payload '{"contact":true,"linkquality":117,"last_seen":1555440188229,"elapsed":12}'                              │
  cc-znp:AREQ <-- AF:incomingMsg, { groupid: 0, clusterid: 0, srcaddr: 33589, srcendpoint: 1, dstendpoint: 1, wasbroadcast: 0, linkquality: 120, securityuse: 0, timestamp: 7594503, transseqnumber: 0, len: 17, da│
  zigbee-shepherd:af dispatchIncomingMsg(): type: incomingMsg, msg: {"groupid":0,"clusterid":0,"srcaddr":33589,"srcendpoint":1,"dstendpoint":1,"wasbroadcast":0,"linkquality":120,"securityuse":0,"timestamp":75945│
  zigbee-shepherd:msgHdlr IND <-- AF:incomingMsg, transId: 0 +62ms                                                                                                                                                 │
  cc-znp:AREQ <-- AF:incomingMsg, { groupid: 0, clusterid: 6, srcaddr: 33589, srcendpoint: 1, dstendpoint: 1, wasbroadcast: 0, linkquality: 123, securityuse: 0, timestamp: 7599348, transseqnumber: 0, len: 7, dat│
  zigbee-shepherd:af dispatchIncomingMsg(): type: incomingMsg, msg: {"groupid":0,"clusterid":6,"srcaddr":33589,"srcendpoint":1,"dstendpoint":1,"wasbroadcast":0,"linkquality":123,"securityuse":0,"timestamp":75993│
  zigbee-shepherd:msgHdlr IND <-- AF:incomingMsg, transId: 0 +4ms                                                                                                                                                  │
  zigbee2mqtt:debug 4/16/2019, 8:43:08 PM Received zigbee message of type 'devChange' with data '{"cid":"genOnOff","data":{"onOff":0}}' of device 'lumi.sensor_magnet.aq2' (0xdoor_window_sensor_04) of endpoint 1 │
  zigbee2mqtt:debug 4/16/2019, 8:43:08 PM Received zigbee message of type 'devChange' with data '{"cid":"genOnOff","data":{"onOff":0}}' of device 'lumi.sensor_magnet.aq2' (0xdoor_window_sensor_04) of endpoint 1 │
  serialport/bindings/unixRead waiting for readable because of code: EAGAIN +52ms                                                                                                                                  │
  serialport/bindings/poller Polling for "readable" +161ms                                                                                                                                                         │
  zigbee-shepherd:af dispatchIncomingMsg(): type: zclIncomingMsg, msg: {"groupid":0,"clusterid":0,"srcaddr":33589,"srcendpoint":1,"dstendpoint":1,"wasbroadcast":0,"linkquality":120,"securityuse":0,"timestamp":75│
  zigbee2mqtt:debug 4/16/2019, 8:43:08 PM Received zigbee message of type 'attReport' with data '{"cid":"genBasic","data":{"65281":{"4":5032,"10":0}}}' of device 'lumi.sensor_magnet.aq2' (0xdoor_window_sensor_04┤
  zigbee2mqtt:info 4/16/2019, 8:43:08 PM MQTT publish: topic 'zigbee2mqtt/door_window_sensor_04', payload '{"contact":false,"linkquality":120,"last_seen":1555440188255,"elapsed":26}'                             │
  zigbee-shepherd:af dispatchIncomingMsg(): type: zclIncomingMsg, msg: {"groupid":0,"clusterid":6,"srcaddr":33589,"srcendpoint":1,"dstendpoint":1,"wasbroadcast":0,"linkquality":123,"securityuse":0,"timestamp":75│
  zigbee2mqtt:debug 4/16/2019, 8:43:08 PM Received zigbee message of type 'attReport' with data '{"cid":"genOnOff","data":{"onOff":1}}' of device 'lumi.sensor_magnet.aq2' (0xdoor_window_sensor_04) of endpoint 1 │
  zigbee2mqtt:info 4/16/2019, 8:43:08 PM MQTT publish: topic 'zigbee2mqtt/door_window_sensor_04', payload '{"contact":false,"linkquality":123,"last_seen":1555440188264,"elapsed":9}'                              │
  zigbee2mqtt:debug 4/16/2019, 8:43:08 PM Received zigbee message of type 'devChange' with data '{"cid":"genBasic","data":{"65281":[null,null,null,null,5032,null,null,null,null,null,0]}}' of device 'lumi.sensor_│
  zigbee2mqtt:debug 4/16/2019, 8:43:08 PM Received zigbee message of type 'devChange' with data '{"cid":"genOnOff","data":{"onOff":1}}' of device 'lumi.sensor_magnet.aq2' (0xdoor_window_sensor_04) of endpoint 1 │
  serialport/bindings/poller received "readable" +357ms                                                                                                                                                            │
  serialport/binding-abstract read +409ms                                                                                                                                                                          │
  serialport/bindings/unixRead Starting read +357ms                                                                                                                                                                │
  serialport/bindings/unixRead Finished read 8 bytes +0ms                                                                                                                                                          │
  serialport/stream binding.read finished +409ms                                                                                                                                                                   │
  serialport/stream _read reading +1ms                                                                                                                                                                             │
  serialport/binding-abstract read +1ms                                                                                                                                                                            │
  serialport/bindings/unixRead Starting read +1ms                                                                                                                                                                  │
  serialport/bindings/unixRead Finished read 10 bytes +0ms                                                                                                                                                         │
  serialport/stream binding.read finished +0ms                                                                                                                                                                     │
  cc-znp { sof: 254,                                                                                                                                                                                               │
  cc-znp   len: 13,                                                                                                                                                                                                │
  cc-znp   type: 'AREQ',                                                                                                                                                                                           │
  cc-znp   subsys: 'ZDO',                                                                                                                                                                                          │
  cc-znp   cmd: 'leaveInd',                                                                                                                                                                                        │
  cc-znp   payload:                                                                                                                                                                                                │
  cc-znp    { srcaddr: 33589,                                                                                                                                                                                      │
  cc-znp      extaddr: '0xdoor_window_sensor_04',                                                                                                                                                                  │
  cc-znp      request: 0,                                                                                                                                                                                          │
  cc-znp      removechildren: 0,                                                                                                                                                                                   │
  cc-znp      rejoin: 1 },                                                                                                                                                                                         │
  cc-znp   fcs: 244,                                                                                                                                                                                               │
  cc-znp   csum: 244 } +415ms                                                                                                                                                                                      │
  serialport/stream _read reading +4ms                                                                                                                                                                             │
  serialport/binding-abstract read +5ms                                                                                                                                                                            │
  serialport/bindings/unixRead Starting read +5ms                                                                                                                                                                  │
  cc-znp:AREQ <-- ZDO:leaveInd, { srcaddr: 33589, extaddr: '0xdoor_window_sensor_04', request: 0, removechildren: 0, rejoin: 1 } +374ms                                                                            │
  zigbee-shepherd Device: 0xdoor_window_sensor_04 leave the network. +1m                                                                                                                                           │
  zigbee2mqtt:debug 4/16/2019, 8:43:08 PM Received zigbee message of type 'devLeaving' with data '"0xdoor_window_sensor_04"' of endpoint undefined                                                                 │
  zigbee2mqtt:warn 4/16/2019, 8:43:08 PM Message without device!                                                                                                                                                   │
  zigbee-shepherd:msgHdlr IND <-- ZDO:leaveInd +373ms                                                                                                                                                              │
  serialport/bindings/unixRead waiting for readable because of code: EAGAIN +4ms                                                                                                                                   │

@lolorc
Copy link
Contributor

lolorc commented Apr 16, 2019

looks like it happens very often :-(

  zigbee2mqtt:debug 4/16/2019, 8:22:47 PM Received zigbee message of type 'devLeaving' with data '"switch_square_01"' of endpoint undefined
  zigbee2mqtt:debug 4/16/2019, 8:42:06 PM Received zigbee message of type 'devLeaving' with data '"0xdoor_window_sensor_05"' of endpoint undefined
  zigbee2mqtt:debug 4/16/2019, 8:43:08 PM Received zigbee message of type 'devLeaving' with data '"0xdoor_window_sensor_04"' of endpoint undefined
  zigbee2mqtt:debug 4/16/2019, 8:50:59 PM Received zigbee message of type 'devLeaving' with data '"aqara_07"' of endpoint undefined
  zigbee2mqtt:debug 4/16/2019, 8:57:26 PM Received zigbee message of type 'devLeaving' with data '"aqara_05"' of endpoint undefined
  zigbee2mqtt:debug 4/16/2019, 9:32:16 PM Received zigbee message of type 'devLeaving' with data '"0xdoor_window_sensor_06"' of endpoint undefined
  zigbee2mqtt:debug 4/16/2019, 9:33:26 PM Received zigbee message of type 'devLeaving' with data '"0xdoor_window_sensor_07"' of endpoint undefined
  zigbee2mqtt:debug 4/16/2019, 9:50:50 PM Received zigbee message of type 'devLeaving' with data '"cube_01"' of endpoint undefined
  zigbee2mqtt:debug 4/16/2019, 9:56:36 PM Received zigbee message of type 'devLeaving' with data '"motion_lum_02"' of endpoint undefined
  zigbee2mqtt:debug 4/16/2019, 10:01:48 PM Received zigbee message of type 'devLeaving' with data '"switch_02"' of endpoint undefined
  zigbee2mqtt:debug 4/16/2019, 10:42:33 PM Received zigbee message of type 'devLeaving' with data '"door_window_sensor_03"' of endpoint undefined
  zigbee2mqtt:debug 4/16/2019, 10:57:39 PM Received zigbee message of type 'devLeaving' with data '"cube_03"' of endpoint undefined
  zigbee2mqtt:debug 4/16/2019, 11:02:43 PM Received zigbee message of type 'devLeaving' with data '"switch_01"' of endpoint undefined

@Koenkk
Copy link
Owner Author

Koenkk commented Apr 17, 2019

@lolorc the empty actions are probably some converter bug. I haven't seen the dev leaving yet (and I have many Xiaomi devices)

Mine crashed again this morning, but I was able to get it working again by only replugging the CC2652R (no restart of zigbee2mqtt). Trying to catch a DEBUG=* log now.

@lolorc
Copy link
Contributor

lolorc commented Apr 17, 2019

mine crashed as well this morning, it can't stay more than 12h without crashing. Is there a way to debug or get a crash stack from the second serial port for example ?

replugging cc2652r is not a solution when not at home, but hey it's the early alpha tests with cc2652r.

I've been running with 'DEBUG=* | tee /tmp/something' for a while now, but it's lost when rebooting, I'm now logging to a nfs server.

@lolorc
Copy link
Contributor

lolorc commented Apr 17, 2019

the leaveind issues might be related to fairecasoimeme/ZiGate#38 (comment)

it wasn't happening with cc2530+firmware from end of 2018.

if you look at my logs, the leaveInd message has rejoin:1, is it normal to consider it gone ?
(unfortunatly I don't have any log from before with my cc2530)

@djeepp5
Copy link

djeepp5 commented Nov 19, 2020

I saw a post that it was possible to connect to the cc1352p-2 via an ESP8266 or an raspberry using serial2ethernet. Maybe is that the best solution for you? It is possible to let all containers on your NUC and let them communicate with the zigbee over ethernet.

another solution maybe to install the zigbee2mqtt on another device which is connected over MQTT.

@kevincaradant
Copy link

kevincaradant commented Nov 19, 2020

Mhh I could be do that. What is the main problem in fact ? Is it the CC1352P-2 board connected via USB ?

Is it Z2M which runs on x86 or x64 architecture (with Docker) ?

Is it my Mosquitto MQTT broker (without Docker in my case) running on x86 / x64 architecture (I don't think so that is the problem)

I have some difficulties to understand why he could be more stable on Raspberry pi than NUC. ARM architecture ?
However, I saw @Koenkk to say somewhere he runs on a NUC (all its domotics install). What is your OS ? Do you have issues a lot of by month ?
I'm currently running on a NUC7I5BNH with a SSD and 8Go RAM under Ubuntu 16.04 since around 3 years. I would continue like that if possible :)

@Koenkk
Copy link
Owner Author

Koenkk commented Nov 19, 2020

@kevincaradant my production setup is Ubuntu 20.04 in Docker on a NUC6CAYH with the ZZH adapter, never had these issues (also ran a long time on with a CC2652 launchpad, no problems)

@kevincaradant
Copy link

Ok thank you. it's Interesting maybe I just should upgrade my ubuntu version.

I'm going to create a backup of it and try this in the case where I got again adapter issue 6000 ms.

if others runs on NUC and with a CC1352P, I'm interesting about your feedback on it

@piit79
Copy link

piit79 commented Nov 19, 2020

Just to add my 2 cents - I've been running z2m with LAUNCHXL-CC26X2R1 first and now with a zzh! stick (also with CC2652) on a PCEngines apu2c4 (with an AMD Jaguar x86_64 CPU) for a few months and fortunately never faced the "adapter error" issue. So it's not a general issue on x86 PCs...

@kevincaradant
Copy link

kevincaradant commented Nov 19, 2020

Thanks :)

Just a last question, on CC26XX and CC13XX
Do you specified a specifig channel or it could be not recommanded ? I set it to channel 25 but I don't think so it's bad, isn't it ?
And I always have this from my previous CC2531. Is it still useful ?

baudrate: 115200
rtscts: false
availability_timeout: 60

Thanks

I will tell you in some days / weeks if eveything works well :)

@markuspeter
Copy link
Contributor

I saw a post that it was possible to connect to the cc1352p-2 via an ESP8266 or an raspberry using serial2ethernet. Maybe is that the best solution for you? It is possible to let all containers on your NUC and let them communicate with the zigbee over ethernet.

That's exactly what I did, and for the last 5 months it has been rock solid. After having some problems with devices (hue outdoor sensor) disconnecting from the old CC2531 over USB, I bought the CC1352P-2 board, attached a serial to ethernet converter module to it, and powered both with POE. Zigbee2mqtt runs on the synology in the basement, whereas the CC1352P-2 is in a central location of the house.
image

And yes, I will eventually make an enclosure for the board and the adapter...

@XRyu
Copy link
Contributor

XRyu commented Nov 20, 2020

I saw a post that it was possible to connect to the cc1352p-2 via an ESP8266 or an raspberry using serial2ethernet. Maybe is that the best solution for you? It is possible to let all containers on your NUC and let them communicate with the zigbee over ethernet.

That's exactly what I did, and for the last 5 months it has been rock solid. After having some problems with devices (hue outdoor sensor) disconnecting from the old CC2531 over USB, I bought the CC1352P-2 board, attached a serial to ethernet converter module to it, and powered both with POE. Zigbee2mqtt runs on the synology in the basement, whereas the CC1352P-2 is in a central location of the house.
image

And yes, I will eventually make an enclosure for the board and the adapter...

Wow, thats exactly the setup i would love to use! I have z2m running on Synology too. Would you be able to make a small manual and tips for the Parts and Software you used? :)

@markuspeter
Copy link
Contributor

Wow, thats exactly the setup i would love to use! I have z2m running on Synology too. Would you be able to make a small manual and tips for the Parts and Software you used? :)

Not sure I'd call it a manual, but here's what I've done:

Parts (I hope it's ok to post ali links):

Load the latest and greatest release of zigbee2mqtt firmware on the CC1352P2. Then disconnect the 2 jumpers in the picture - I just put them on one of the pins to not lose them:
image

I used 4 cables to establish the serial connection to the S2E adapter. The S2E adapter is powered from the CC1352P2 3.3V pin, the other pins are ground, DIO12 (RX) and DIO13 (TX) :
image

On the S2E side, make sure to attach the RX pin of the CC1352P2 (DIO12) to the TX pin of the S2E adapter, and the TX pin to the RX.

The CC1352P2 gets powered through the micro-USB from the POE splitter, whereas the S2E adapter should be connected to the splitter with the RJ45 connector.

To configure the S2E adapter, in my case I had to go to 192.168.1.7 (not 192.168.0.7 as stated on aliexpress...), factory setting is user admin, pwd admin. I configured it to use DHCP, then configured a static IP on the DHCP server. The settings of the device I set to:

image

The actual ip and ports are not important of course, I highlighted the ip and port which have to be used in the configuration.yaml of zigbee2mqtt:

serial:
  port: 'tcp://192.168.207.18:20108'
advanced:
  baudrate: 115200
  rtscts: false
  ...

Don't forget to change the pan_id when migrating from a CC2531 as I did.

As said before, this is very stable, never went down, only once for updating the firmware :) .

That's about all I can think of, hope it helps someone.

@dirstel
Copy link

dirstel commented Nov 24, 2020

I used 4 cables to establish the serial connection to the S2E adapter. The S2E adapter is powered from the CC1352P2 3.3V pin, the other pins are ground, DIO12 (RX) and DIO13 (TX) :
image
On the S2E side, make sure to attach the RX pin of the CC1352P2 (DIO12) to the TX pin of the S2E adapter, and the TX pin to the RX.

As I'm using the cc2652r Launchpad, I tried to do the same but struggeld when looking at the PINs DIO12 and DIO13. Maybe the Layout is different or the printing on the board is wrong - I don't know. Ididn't want to try and fry my cc2652.
So I connected the RX/TX to the PINS of the opened Jumpers (which are labeld RX/TX) and it works like a charme. As mentioned above:

On the S2E side, make sure to attach the RX pin of the cc2652 to the TX pin of the S2E adapter, and the TX pin to the RX.

@markuspeter
Copy link
Contributor

As I'm using the cc2652r Launchpad, I tried to do the same but struggeld when looking at the PINs DIO12 and DIO13. Maybe the Layout is different or the printing on the board is wrong - I don't know. Ididn't want to try and fry my cc2652.

From what I could see on the pinout, the pins are labelled DIO2 (RX) and DIO3 (TX) on the cc2652r, and they are at they same place as the ones on the cc1352. But of course using the jumper pins is the same, + you get the labels 👍 so that's even better in order to be sure when connecting it.

@walthowd
Copy link

I've been running a week now with XDS firmware 02.03.00.18 and also switched to a USB 2.0 extension cable on my NUC8i7BEH and have not had any issues now.

Another possible solution for other 1352P2 users would be to use a simple FTDI adapter and bypass the XDS debugger, using @markuspeter 's directions above.

@pedroke
Copy link

pedroke commented Nov 29, 2020

Has anybody tested the new firmware with enhanced transmit power? Would you share the experience and what impact can be observed on LQI? I would expect that receiver sensitivity is more important here, but I'm really curious :)

@kevincaradant
Copy link

kevincaradant commented Nov 29, 2020

I'm running with the latest firmware, the LQI is better around of 20/30. In this moment I have a lot of timeout wierd issues but I don't think it's related to the latest firmware (with the increased range), the previous one had also this issue from my side.

LQI is very sensible, sometimes I have 90 and sometimes I have 25 :). It's a little bit tricky to understand this value because a lot of factors can have a bad behavior on it during few seconds ( interferences, walls, wind, computers, phone, wifi ect ect).

In an other way, you can have 90 as LQI with a lot issues (interferences) not stable and a 10 LQI stable (like my bulbs, 6 meters away of the coordinator) but 0 issue with them.
And this value is for me a little bit wrong because it's the value from the device until the coordinator but if I look the map, the bulb is routed on my plug and the signal is around of 130 . I hope my opinion is clear, it's dificult to explain it :)

But personnally, I think it's not bad to have the most high value possible for the range increasing the signal :).

@pedroke
Copy link

pedroke commented Nov 29, 2020

@kevincaradant Thanks Kevin for the feedback. I fully agree with you regarding LQI. But anyway it is still one of the few quantitative and measurable factors when talking about zigbee network reliability and stability.. I'm glad to hear that transmit power had at least some impact :)

@walthowd
Copy link

walthowd commented Dec 4, 2020

Finally had two more crashes on the CC1352P2 running XDS 02.03.00.18 firmware and USB 2.0 extension cable -- so it seemed one or the other made the crash less likely, but it's still occurring.

@chbarg
Copy link

chbarg commented Dec 4, 2020

Which Zigbee 3.0 firmware would work on the CC2652P (with amplifier)?

CC1352P has amp (amp enable registers and sub-1 GHz, not used) but the CC2652R has no amp and no sub-1 GHz registers.

One of the modules I ordered has a built-in amp: https://www.aliexpress.com/item/1005001265532720.html

My plan is to connect then thru a CP2104 or FT232H serial to USB and use it as a coordinator.

Thank you

@kevincaradant
Copy link

kevincaradant commented Dec 4, 2020

Finally had two more crashes on the CC1352P2 running XDS 02.03.00.18 firmware and USB 2.0 extension cable -- so it seemed one or the other made the crash less likely, but it's still occurring.

What is the NUC that you're using ? Under what OS ? Do you use a USB 2.0 or 3.0 ?
On mine, the NUC have only USB 3.0 so I have no choice. I'm running under Ubuntu 20.04 LTS with a usb 2.0 cable of 4 meters (more exactly (2M +2M) so I used 2 cables.

I'm using the latest firmware available for CC1352-P2 with Z2M 1.16.2. For the moment everything works as expected.
No more timeout for the moment (4 days so it's too soon to say something but before I had timeout every day ...)

2 days ago, I had 3 Xiaomi which left the network without reason ... I needed to re-pair them but maybe it's a problem of battery even if I have more than 3080mV (100%). So I still keep on eye on this issue.

@pedroke
Copy link

pedroke commented Dec 4, 2020

Regarding Xiaomi sensors leaving the network. I noticed that two of my Aqara sensors are pretty sensitive to coordinator availability. E.g. when they cannot reach coordinator for some time - it is out of reach, or offline, those devices go to deep sleep and stop sending reports. I need to wake them by pressing pairing button. Strange thing is that this happen more likely with only two of my sensors and I have many more which remain awake.. Either it depends on the firmware version of the sensor, or maybe it depends on the frequency of messages being sent. Maybe there is a counter which count unsuccessfully delivered messages and if the threshold is reached, device falls asleep. That's my observation.

@mvjt
Copy link

mvjt commented Dec 4, 2020

My ZZH stopped working today again. Running the latest firmware with the increased antenna gain. Just unplugging and plugging in the ZZH and everything was up and running again.

@kevincaradant
Copy link

kevincaradant commented Dec 4, 2020

Regarding Xiaomi sensors leaving the network. I noticed that two of my Aqara sensors are pretty sensitive to coordinator availability. E.g. when they cannot reach coordinator for some time - it is out of reach, or offline, those devices go to deep sleep and stop sending reports. I need to wake them by pressing pairing button. Strange thing is that this happen more likely with only two of my sensors and I have many more which remain awake.. Either it depends on the firmware version of the sensor, or maybe it depends on the frequency of messages being sent. Maybe there is a counter which count unsuccessfully delivered messages and if the threshold is reached, device falls asleep. That's my observation.

Yes this is interesting your point of view. I don't know if it was useful or not but I enabled availability_timeout: 60 and report: true as options and for the moment everything is okay.
In my case, I have an open/close Xiaomi sensor very far of the coordinator (8 meters) (linked on a Bitron video plug router) and used really few like once by week and it never left the network for some weeks.
In contrary, my bedroom motion sensor directly linked on the coordinator because motion and coordinator are really close (1-2 meters of each other) , this motion is used 3 times by day at least, and it left the network 2 days after. So weird.

My ZZH stopped working today again. Running the latest firmware with the increased antenna gain. Just unplugging and plugging in the ZZH and everything was up and running again.

Logs ? somehing which can explain it ? How many time it works before to fall down ?

@ProASV
Copy link

ProASV commented Dec 9, 2020

Which Zigbee 3.0 firmware would work on the CC2652P (with amplifier)?

CC1352P has amp (amp enable registers and sub-1 GHz, not used) but the CC2652R has no amp and no sub-1 GHz registers.

One of the modules I ordered has a built-in amp: https://www.aliexpress.com/item/1005001265532720.html

My plan is to connect then thru a CP2104 or FT232H serial to USB and use it as a coordinator.

Thank you

See:
https://github.com/egony/cc2652p_E72-2G4M20S1E/tree/master/firmware/coordinator
and:
https://github.com/egony/cc2652p_E72-2G4M20S1E/wiki

@chbarg
Copy link

chbarg commented Dec 9, 2020

Which Zigbee 3.0 firmware would work on the CC2652P (with amplifier)?
CC1352P has amp (amp enable registers and sub-1 GHz, not used) but the CC2652R has no amp and no sub-1 GHz registers.
One of the modules I ordered has a built-in amp: https://www.aliexpress.com/item/1005001265532720.html
My plan is to connect then thru a CP2104 or FT232H serial to USB and use it as a coordinator.
Thank you

See:
https://github.com/egony/cc2652p_E72-2G4M20S1E/tree/master/firmware/coordinator
and:
https://github.com/egony/cc2652p_E72-2G4M20S1E/wiki

@ProASV thank you for the tip.
@egony , great work. I will try it as soon as I can. I am really new to the TI world, so it will be interesting.

@workinganimal
Copy link

Sorry if this is wrong place for my question but can i use CC1352P all versions for zigbee coordinator? I mean i have the CC1352P - 1 and i have used it for almost a year now but in the documentation is written that it has to be the CC1352P - 2. Am i missing here something or can i use all the boards 1,2 and 4?

@Koenkk
Copy link
Owner Author

Koenkk commented Dec 11, 2020

@workinganimal check #5262 (comment)

@Koenkk Koenkk closed this as completed Dec 11, 2020
@Koenkk Koenkk reopened this Dec 11, 2020
@Koenkk
Copy link
Owner Author

Koenkk commented Dec 11, 2020

Since this is not an issue anymore I've created a discussion for it: #5266 . Let's continue there.

@Koenkk Koenkk closed this as completed Dec 11, 2020
Repository owner locked as resolved and limited conversation to collaborators Dec 11, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests