tube0013 / tube_gateways

Information and Documentation on Tube's Zigbee Gateways
272 stars 51 forks source link

EFR32 Pro Coordinator - CRC Error in frame #30

Open ardysusilo opened 3 years ago

ardysusilo commented 3 years ago

The Problem Getting CRC error in frame from time to time

Logger: bellows.uart
Source: /usr/local/lib/python3.8/site-packages/bellows/uart.py:84
First occurred: 10:33:01 AM (4 occurrences)
Last logged: 11:55:08 AM

CRC error in frame b'36bea1a9a52ab7b24794f025dd5592499c4e27abedce648bffc66389fc7e3ca7ebcdde6f8fffc7dbd5d2698c4623a9ec763ba5ea758241984c13b1e070381c0e07bb26e5ca658a459a4d9e4f9ff7c3d9d46a35a251904824c5eb7e' (b'c5eb' != b'f715')
CRC error in frame b'45f9a1a9a52af6b19a94f421435792499c4e27abedce468be6c66589fe7e2aa7ebcddeff6f8fffc7dbd5d2698c4623a9ec763ba5ea758241984c2613b1e070381c0e07bbe5ca658a459a4d9e4f9ff7c3d9d46a35a251904824e5797e' (b'e579' != b'c0a6')
CRC error in frame b'42fab1a90d2a4d7d66c92f07aa1e8049ff5c8227a67d7e' (b'a67d' != b'111d')
CRC error in frame b'0064b1a90d2ade14cc3f0726aa1e804960952769ea7e' (b'69ea' != b'198e')
CRC error in frame b'6242a1a9312afcb19e94e621735792499c4e27abedce7a8bf1c66589ff7e29a7ebcdde6f8fffc7dbd5d2698c4623a9ec763ba5ea758241984c2613b1e070381c0e07bbe5ca658a459a4d9e4f9ff7c3d9d46a35a2519048248caaff7e' (b'aaff' != b'aa00')

Last known working coordinator Using Sonoff ZBBridge, I never encountered CRC error in frame (within 2+ months of usage).

Currently Paired Devices 3 pcs of Sonoff Zigbee (BASICZBR3)

What I have tried

  1. Removing the devices (routers and end devices) manually
  2. Removing ZHA integration
  3. Removing Zigbee.db from /config
  4. Readding ZHA integration and pairing the devices manually again

YAML Configuration

zha:
  zigpy_config:
    network:
      channel: 25
    source_routing: true
    ezsp_config:
      CONFIG_APS_UNICAST_MESSAGE_COUNT: 30
      CONFIG_MAX_END_DEVICE_CHILDREN: 64
      CONFIG_SOURCE_ROUTE_TABLE_SIZE: 200
      CONFIG_ROUTE_TABLE_SIZE: 16
      CONFIG_ADDRESS_TABLE_SIZE: 32
      CONFIG_PACKET_BUFFER_COUNT: 254
      CONFIG_BINDING_TABLE_SIZE: 32
      CONFIG_NEIGHBOR_TABLE_SIZE: 26

Production Environment Hardware: HA Blue (Odroid N2+) connected via Ethernet HA Core: core-2021.6.6 Installation type: HA OS Supervisor: supervisor-2021.06.6 OS: Home Assistant OS 6.1 Zigbee Coordinator: EFR32 Pro by TubesZB connected via Ethernet EmberZNet version: 6.9.2.0 build 256

ardysusilo commented 3 years ago

Additional Test Removing all routers and end devices - leaving only the coordinator in the ZHA integration. However, CRC error in frame still persists in the logs.

Logger: bellows.uart
Source: /usr/local/lib/python3.8/site-packages/bellows/uart.py:84
First occurred: 2:02:26 PM (1 occurrences)
Last logged: 2:02:26 PM

CRC error in frame b'51ada1a9a52a35b25b944b258a5592499c4e27abedce668bfdc66389fc7e3fa7ebcdde6f8fffc7dbd5d2698c4623a9ec763ba5ea758241984c2613b1e070381c0e07bbe5caff658a459a4d9e4f9ff7c3d9d46a35a2519048246d3d7e' (b'6d3d' != b'7dc3')
tube0013 commented 3 years ago

Is anything working at all?

If the frame has wrong crc then it either was corrupted during transmission or it was sent incorrectly by the radio.

I am using the exact same setup and will check my logs in a bit to see if I see anything similar.

ardysusilo commented 3 years ago

@tube0013 Yes, everything is working. All devices are successfully paired and I can control them. The error pattern is as follows-

2021-07-06 14:02:26 DEBUG (MainThread) [bellows.ezsp.protocol] Send command readCounters: ()
2021-07-06 14:02:26 ERROR (bellows.thread_0) [bellows.uart] CRC error in frame b'51ada1a9a52a35b25b944b258a5592499c4e27abedce668bfdc66389fc7e3fa7ebcdde6f8fffc7dbd5d2698c4623a9ec763ba5ea758241984c2613b1e070381c0e07bbe5caff658a459a4d9e4f9ff7c3d9d46a35a2519048246d3d7e' (b'6d3d' != b'7dc3')
2021-07-06 14:02:26 DEBUG (MainThread) [bellows.ezsp.protocol] Application frame 241 (readCounters) received: b'20000200010020000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
ardysusilo commented 3 years ago

These are the error logs from only the coordinator in the ZHA integration-

Logger: bellows.uart
Source: /usr/local/lib/python3.8/site-packages/bellows/uart.py:84
First occurred: 2:02:26 PM (12 occurrences)
Last logged: 5:01:40 PM

CRC error in frame b'1202a1a9a52ac4b127944c256fff5692499c4e27abedce638bfdc66389fc7e32a7ebcdde6f8fffc7dbd5d2698c4623a9ec763ba5ea758241984c2613b1e070381c0e07bbe5ca658a459a4d9e4f9ff7c3d9d46a35a25190482436177e' (b'3617' != b'fd7f')
CRC error in frame b'120aa1a9a52a04b6de944c25ae5192499c4e27abedce638bfdc66389fc7e31ebcda7de6f8fffc7dbd5d2698c4623a9ec763ba5ea758241984c2613b1e070381c0e07bbe5ca658a459a4d9e4f9ff7c3d9d46a35a25190482425ec7e' (b'25ec' != b'0ca6')
CRC error in frame b'16eea1a9a52a9cb36b944e25dd5492499c4e27abedce658bfdc66389fc7e3aa7ebcdde6f8fffc7dbd5d2698c4623a9ec763ba5ea758241984c2613b1e070381c0e07bbe5ca658a459a4d9eff4f9ff7c3d9d46a35a25190482448277e' (b'4827' != b'f2b5')
CRC error in frame b'334ba1a9a52a62b6cd944125f25192499c4e27abedffce608bfdc66389fc7e30a7ebcdde6f8fffc7dbd5d2698c4623a9ec763ba5ea758241984c2613b1e070381c0e07bbe5ca658a459a4d9e4f9ff7c3d9d46a35a25190482476be7e' (b'76be' != b'fa07')
CRC error in frame b'5468a1a9a52a94b7e1944625c95092499c4e27abedce6f8bfdc66389fc7e2ca7ebcdde6f8fffc7dbd5d2698c46ff23a9ec763ba5ea758241984c2613b1e070381c0e07bbe5ca658a459a4d9e4f9ff7c3d9d46a35a2519048245c237e' (b'5c23' != b'9561')
tube0013 commented 3 years ago

Interesting. It's when counters are being read, those are just diagnostics stats from the radio.

Are they isolated to those?

ardysusilo commented 3 years ago

Yes, in the 12 error logs mentioned above, the CRC error in frame happen after DEBUG (MainThread) [bellows.ezsp.protocol] Send command readCounters: ()

Is it maybe correlated because I change the channel to 25?

tube0013 commented 3 years ago

I do t think so. I wouldn't stress to much about it as I said the counters are just stats. If devices are communicating fine.

If you don't mind could you post a bigger chunk of log from startup of zha through the first error.

I think you can grep bellows/zigpy/zha to keep it isolated to those.

I'd like to look and get some more eyes on it.

ardysusilo commented 3 years ago

Sure thing, here you go. From ZHA start until first error occured.

ZHA Debug.log