Zigbee NCP on raspberry PI4

I am trying to run the NCP light_zc sample (with nrf52840 dk on usb) on latest RaspberryPI 4 (aarch64)

The sample starts, does some communication on usb then the nrf reboots itself.

I have compiled the zboss library myself for aarch64.

I attach the trace log file for the host app.

0 8ef4eec0 2024-6-17 11:56:31 0/0/000.000 zb_init_ncp.c:141	[INFO1] FFD build
1 8ef4eec0 2024-6-17 11:56:31 0/0/000.000 zb_init_ncp.c:144	[INFO1] sizes: g_zb 11672 sched 1952 bpool 6660 addr 1612
2 8ef4eec0 2024-6-17 11:56:31 0/0/000.000 zb_init_ncp.c:147	[INFO1] zcl 1096
3 8ef4eec0 2024-6-17 11:56:31 0/0/000.000 zb_init_ncp.c:156	[INFO1] nvram 240
4 8ef4eec0 2024-6-17 11:56:31 0/0/000.000 zb_init_ncp.c:162	[INFO1] err_ind 8
5 8ef4eec0 2024-6-17 11:56:31 0/0/000.000 zb_init_ncp.c:169	[INFO1] scheduler q size 64
6 8ef4eec0 2024-6-17 11:56:31 0/0/000.000 zb_init_ncp.c:175	[INFO1] ZB_IOBUF_POOL_SIZE 40
  zbncp_ll_init_complete: (RX-IDLE : TX-IDLE)
           zbncp_ll_poll: @ time 1718625391852 [ack size 0]
zbncp_ll_rx_start_receiving: (RX-IDLE)
   zbncp_ll_rx_set_state: (RX-IDLE --> RX-RECEIVING-HDR)
           zbncp_ll_poll:                    >>> timeout 18446744073709551615/SERVICE [ack size 0]
           zbncp_ll_poll: @ time 1718625391852 [ack size 0]
           zbncp_ll_poll:                    >>> timeout 18446744073709551615 [ack size 0]
           zbncp_ll_poll: @ time 1718625392866 [ack size 0]
              zbncp_crc8: CRC8 init 00 data 0x5590fb5f42 size 4 -> crc 0xde
             zbncp_crc16: CRC16 init 0000 data 0x5590fb5f49 size 6 --> crc 0x20ae
   zbncp_ll_tx_alloc_pkt: (TX-IDLE) size 15 frame #0
zbncp_ll_tx_start_sending: (TX-IDLE) size 15
   zbncp_ll_tx_set_state: (TX-IDLE --> TX-SENDING-PKT)
           zbncp_ll_poll:                    >>> timeout 18446744073709551615/SERVICE [ack size 0]
           zbncp_ll_poll: @ time 1718625392867 [ack size 0]
           zbncp_ll_poll:                    >>> timeout 18446744073709551615 [ack size 0]
   zbncp_ll_tx_set_state: (TX-SENDING-PKT --> TX-PKT-SENT)
  zbncp_ll_send_complete: (RX-RECEIVING-HDR : TX-SENDING-PKT --> TX-PKT-SENT)
           zbncp_ll_poll: @ time 1718625392867 [ack size 0]
zbncp_ll_tx_start_waiting_ack: (TX-PKT-SENT) (RX-RECEIVING-HDR)
      zbncp_ll_alarm_set: 500
   zbncp_ll_tx_set_state: (TX-PKT-SENT --> TX-IDLE)
           zbncp_ll_poll:                    >>> timeout 500/SERVICE [ack size 0]
           zbncp_ll_poll: @ time 1718625392867 [ack size 0]
           zbncp_ll_poll:                    >>> timeout 500 [ack size 0]
   zbncp_ll_rx_set_state: (RX-RECEIVING-HDR --> RX-HDR-RECEIVED)
  zbncp_ll_recv_complete: (RX-RECEIVING-HDR --> RX-HDR-RECEIVED : TX-IDLE)
           zbncp_ll_poll: @ time 1718625392882 [ack size 0]
zbncp_ll_rx_validate_header: (RX-HDR-RECEIVED) size 7
              zbncp_crc8: CRC8 init 00 data 0x5590fb5d0a size 4 -> crc 0x8f
   zbncp_ll_rx_set_state: (RX-HDR-RECEIVED --> RX-HDR-VALIDATED)
           zbncp_ll_poll:                    >>> timeout 485/SERVICE [ack size 0]
           zbncp_ll_poll: @ time 1718625392883 [ack size 0]
zbncp_ll_rx_continue_receiving: (RX-HDR-VALIDATED) size 7 flags
   zbncp_ll_rx_set_state: (RX-HDR-VALIDATED --> RX-BODY-RECEIVED)
           zbncp_ll_poll:                    >>> timeout 484/SERVICE [ack size 0]
           zbncp_ll_poll: @ time 1718625392883 [ack size 0]
zbncp_ll_rx_complete_receiving: (RX-BODY-RECEIVED) rxflags 0x1
zbncp_ll_tx_complete_pkt: (TX-IDLE) ACK flags 0x1
   zbncp_ll_alarm_cancel: 484
zbncp_ll_tx_complete_pkt: zbncp_ll_tx_complete_pkt: Retransmit: 0
   zbncp_ll_rx_set_state: (RX-BODY-RECEIVED --> RX-IDLE)
zbncp_ll_rx_start_receiving: (RX-IDLE)
   zbncp_ll_rx_set_state: (RX-IDLE --> RX-RECEIVING-HDR)
           zbncp_ll_poll:                    >>> timeout 18446744073709551615/SERVICE [ack size 0]
           zbncp_ll_poll: @ time 1718625392883 [ack size 0]
           zbncp_ll_poll:                    >>> timeout 18446744073709551615 [ack size 0]
   zbncp_ll_rx_set_state: (RX-RECEIVING-HDR --> RX-HDR-RECEIVED)
  zbncp_ll_recv_complete: (RX-RECEIVING-HDR --> RX-HDR-RECEIVED : TX-IDLE)
           zbncp_ll_poll: @ time 1718625392886 [ack size 0]
zbncp_ll_rx_validate_header: (RX-HDR-RECEIVED) size 7
              zbncp_crc8: CRC8 init 00 data 0x5590fb5d0a size 4 -> crc 0x7c
   zbncp_ll_rx_set_state: (RX-HDR-RECEIVED --> RX-HDR-VALIDATED)
           zbncp_ll_poll:                    >>> timeout 18446744073709551615/SERVICE [ack size 0]
           zbncp_ll_poll: @ time 1718625392886 [ack size 0]
zbncp_ll_rx_continue_receiving: (RX-HDR-VALIDATED) size 7 flags
   zbncp_ll_rx_set_state: (RX-HDR-VALIDATED --> RX-RECEIVING_BODY)
           zbncp_ll_poll:                    >>> timeout 18446744073709551615/SERVICE [ack size 0]
           zbncp_ll_poll: @ time 1718625392886 [ack size 0]
           zbncp_ll_poll:                    >>> timeout 18446744073709551615 [ack size 0]
   zbncp_ll_rx_set_state: (RX-RECEIVING_BODY --> RX-BODY-RECEIVED)
  zbncp_ll_recv_complete: (RX-RECEIVING_BODY --> RX-BODY-RECEIVED : TX-IDLE)
           zbncp_ll_poll: @ time 1718625392887 [ack size 0]
zbncp_ll_rx_complete_receiving: (RX-BODY-RECEIVED) rxflags 0xc0
             zbncp_crc16: CRC16 init 0000 data 0x5590fb5d11 size 5 --> crc 0x30f9
    zbncp_ll_acknowledge: zbncp_ll_acknowledge: Create new ACK data. Retransmit: 0
   zbncp_ll_rx_set_state: (RX-BODY-RECEIVED --> RX-IDLE)
zbncp_ll_rx_start_receiving: (RX-IDLE)
   zbncp_ll_rx_set_state: (RX-IDLE --> RX-RECEIVING-HDR)
           zbncp_ll_poll:                    >>> timeout 18446744073709551615/SERVICE [ack size 0]
           zbncp_ll_poll: @ time 1718625392887 [ack size 0]
     zbncp_ll_tx_pop_ack: (RX-RECEIVING-HDR) Send ACK frameno 00 ackflags 0x1
              zbncp_crc8: CRC8 init 00 data 0x5590fb5e32 size 4 -> crc 0x8f
zbncp_ll_tx_start_sending: (TX-IDLE) size 7 -- ACK
   zbncp_ll_tx_set_state: (TX-IDLE --> TX-SENDING-ACK)
           zbncp_ll_poll:                    >>> timeout 18446744073709551615/SERVICE [ack size 7]
           zbncp_ll_poll: @ time 1718625392887 [ack size 7]
           zbncp_ll_poll:                    >>> timeout 18446744073709551615 [ack size 7]
   zbncp_ll_tx_set_state: (TX-SENDING-ACK --> TX-ACK-SENT)
  zbncp_ll_send_complete: (RX-RECEIVING-HDR : TX-SENDING-ACK --> TX-ACK-SENT)
           zbncp_ll_poll: @ time 1718625392887 [ack size 7]
zbncp_ll_tx_complete_ack: (TX-ACK-SENT) (RX-RECEIVING-HDR)
   zbncp_ll_tx_set_state: (TX-ACK-SENT --> TX-IDLE)
           zbncp_ll_poll:                    >>> timeout 18446744073709551615/SERVICE [ack size 0]
           zbncp_ll_poll: @ time 1718625392887 [ack size 0]
           zbncp_ll_poll:                    >>> timeout 18446744073709551615 [ack size 0]
7 8ef4eec0 2024-6-17 11:56:34 99/1520/002.290 zb_osif_serial_common.c:263	[ERROR] read error, errno: 0
8 8ef4eec0 2024-6-17 11:56:34 99/1520/002.291 zb_error_indication.c:114	[ERROR] >> zb_error_raise severity 255, err_code -2050
9 8ef4eec0 2024-6-17 11:56:34 99/1520/002.291 zb_error_indication.c:121	[ERROR] call a stack handler
10 8ef4eec0 2024-6-17 11:56:34 99/1520/002.291 high_level/host/ncp_host_startup.c:2026	[ERROR] read error, SoC reset expected
11 8ef4eec0 2024-6-17 11:56:34 99/1520/002.291 zb_osif_serial.c:117	[ERROR] failed to open file /dev/ttyACM1, errno: 2
12 8ef4eec0 2024-6-17 11:56:34 99/1520/002.291 zb_error_indication.c:114	[ERROR] >> zb_error_raise severity 255, err_code -2049
13 8ef4eec0 2024-6-17 11:56:34 99/1520/002.291 zb_error_indication.c:121	[ERROR] call a stack handler
14 8ef4eec0 2024-6-17 11:56:34 99/1520/002.292 zb_error_indication.c:138	[ERROR] << zb_error_raise
  zbncp_ll_init_complete: (RX-IDLE : TX-IDLE)
15 8ef4eec0 2024-6-17 11:56:34 99/1520/002.292 zb_error_indication.c:138	[ERROR] << zb_error_raise
           zbncp_ll_poll: @ time 1718625394133 [ack size 0]
zbncp_ll_rx_start_receiving: (RX-IDLE)
   zbncp_ll_rx_set_state: (RX-IDLE --> RX-RECEIVING-HDR)
16 8ef4eec0 2024-6-17 11:56:34 149/2288/002.292 zb_osif_serial_common.c:147	[ERROR] Read error: serial transport is not initialized!
           zbncp_ll_poll:                    >>> timeout 18446744073709551615/SERVICE [ack size 0]
           zbncp_ll_poll: @ time 1718625394133 [ack size 0]
           zbncp_ll_poll:                    >>> timeout 18446744073709551615 [ack size 0]
17 8ef4eec0 2024-6-17 11:56:34 149/2288/002.292 zb_osif_serial.c:117	[ERROR] failed to open file /dev/ttyACM1, errno: 2
18 8ef4eec0 2024-6-17 11:56:34 149/2288/002.292 zb_error_indication.c:114	[ERROR] >> zb_error_raise severity 255, err_code -2049
19 8ef4eec0 2024-6-17 11:56:34 149/2288/002.292 zb_error_indication.c:121	[ERROR] call a stack handler
20 8ef4eec0 2024-6-17 11:56:34 149/2288/002.292 zb_error_indication.c:138	[ERROR] << zb_error_raise
  zbncp_ll_init_complete: (RX-IDLE : TX-IDLE)
           zbncp_ll_poll: @ time 1718625394133 [ack size 0]
zbncp_ll_rx_start_receiving: (RX-IDLE)
   zbncp_ll_rx_set_state: (RX-IDLE --> RX-RECEIVING-HDR)
21 8ef4eec0 2024-6-17 11:56:34 149/2288/002.292 zb_osif_serial_common.c:147	[ERROR] Read error: serial transport is not initialized!
           zbncp_ll_poll:                    >>> timeout 18446744073709551615/SERVICE [ack size 0]
           zbncp_ll_poll: @ time 1718625394133 [ack size 0]
           zbncp_ll_poll:                    >>> timeout 18446744073709551615 [ack size 0]
22 8ef4eec0 2024-6-17 11:56:34 156/2396/002.400 zb_osif_serial.c:117	[ERROR] failed to open file /dev/ttyACM1, errno: 2
23 8ef4eec0 2024-6-17 11:56:34 156/2396/002.400 zb_error_indication.c:114	[ERROR] >> zb_error_raise severity 255, err_code -2049
24 8ef4eec0 2024-6-17 11:56:34 156/2396/002.400 zb_error_indication.c:121	[ERROR] call a stack handler
25 8ef4eec0 2024-6-17 11:56:34 156/2396/002.400 zb_error_indication.c:138	[ERROR] << zb_error_raise
  zbncp_ll_init_complete: (RX-IDLE : TX-IDLE)
           zbncp_ll_poll: @ time 1718625394240 [ack size 0]
zbncp_ll_rx_start_receiving: (RX-IDLE)
   zbncp_ll_rx_set_state: (RX-IDLE --> RX-RECEIVING-HDR)
26 8ef4eec0 2024-6-17 11:56:34 156/2396/002.400 zb_osif_serial_common.c:147	[ERROR] Read error: serial transport is not initialized!
           zbncp_ll_poll:                    >>> timeout 18446744073709551615/SERVICE [ack size 0]
           zbncp_ll_poll: @ time 1718625394240 [ack size 0]
           zbncp_ll_poll:                    >>> timeout 18446744073709551615 [ack size 0]
27 8ef4eec0 2024-6-17 11:56:34 163/2503/002.507 zb_osif_serial.c:117	[ERROR] failed to open file /dev/ttyACM1, errno: 2
28 8ef4eec0 2024-6-17 11:56:34 163/2503/002.508 zb_error_indication.c:114	[ERROR] >> zb_error_raise severity 255, err_code -2049
29 8ef4eec0 2024-6-17 11:56:34 163/2503/002.508 zb_error_indication.c:121	[ERROR] call a stack handler
30 8ef4eec0 2024-6-17 11:56:34 163/2503/002.508 zb_error_indication.c:138	[ERROR] << zb_error_raise
  zbncp_ll_init_complete: (RX-IDLE : TX-IDLE)
           zbncp_ll_poll: @ time 1718625394348 [ack size 0]
zbncp_ll_rx_start_receiving: (RX-IDLE)
   zbncp_ll_rx_set_state: (RX-IDLE --> RX-RECEIVING-HDR)
31 8ef4eec0 2024-6-17 11:56:34 163/2503/002.508 zb_osif_serial_common.c:147	[ERROR] Read error: serial transport is not initialized!
           zbncp_ll_poll:                    >>> timeout 18446744073709551615/SERVICE [ack size 0]
           zbncp_ll_poll: @ time 1718625394348 [ack size 0]
           zbncp_ll_poll:                    >>> timeout 18446744073709551615 [ack size 0]
32 8ef4eec0 2024-6-17 11:56:34 170/2611/002.615 zb_osif_serial.c:117	[ERROR] failed to open file /dev/ttyACM1, errno: 2
33 8ef4eec0 2024-6-17 11:56:34 170/2611/002.615 zb_error_indication.c:114	[ERROR] >> zb_error_raise severity 255, err_code -2049
34 8ef4eec0 2024-6-17 11:56:34 170/2611/002.615 zb_error_indication.c:121	[ERROR] call a stack handler
35 8ef4eec0 2024-6-17 11:56:34 170/2611/002.615 zb_error_indication.c:138	[ERROR] << zb_error_raise
  zbncp_ll_init_complete: (RX-IDLE : TX-IDLE)
           zbncp_ll_poll: @ time 1718625394455 [ack size 0]
zbncp_ll_rx_start_receiving: (RX-IDLE)
   zbncp_ll_rx_set_state: (RX-IDLE --> RX-RECEIVING-HDR)
36 8ef4eec0 2024-6-17 11:56:34 170/2611/002.615 zb_osif_serial_common.c:147	[ERROR] Read error: serial transport is not initialized!
           zbncp_ll_poll:                    >>> timeout 18446744073709551615/SERVICE [ack size 0]
           zbncp_ll_poll: @ time 1718625394455 [ack size 0]
           zbncp_ll_poll:                    >>> timeout 18446744073709551615 [ack size 0]
  zbncp_ll_init_complete: (RX-IDLE : TX-IDLE)
           zbncp_ll_poll: @ time 1718625394574 [ack size 0]
zbncp_ll_rx_start_receiving: (RX-IDLE)
   zbncp_ll_rx_set_state: (RX-IDLE --> RX-RECEIVING-HDR)
           zbncp_ll_poll:                    >>> timeout 18446744073709551615/SERVICE [ack size 0]
           zbncp_ll_poll: @ time 1718625394574 [ack size 0]
           zbncp_ll_poll:                    >>> timeout 18446744073709551615 [ack size 0]

Parents Reply Children
  • Hi, 

    Unfortunately, our expert could not see what the problem is just based on the logs since it seems like the issue can be on the NCP side as it resets. Please try to debug the NCP to see where or why the nRF52840 crashes. Or use the provided binaries.

  • I have tried with the provided libraries.

    Same result for light_zc or light_control. Although it seems it was doing something more than before(see logs.zip)

    Maybe the aarch64 is not well supported.

    I have already made a small change to consider pointer size 8 when __aarch64__ in the zboss sources

    src/ncp/low_level/zbncp_defs.h:120

    #if defined __GNUC__ && (defined __x86_64__ || defined __aarch64__)
    /** @brief Definition of pointer size for 64-bit platform. */
    #define ZBNCP_PTR_SIZE 8u
    #else
    /** @brief Definition of pointer size for 32-bit platform. */
    #define ZBNCP_PTR_SIZE 4u
    #endif

    I will try to make some debugging when I have some spare time.6404.logs.zip

Related