This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Linux/CC2530: Z-Stack_Linux_Gateway porting problem

Part Number: CC2530
Other Parts Discussed in Thread: Z-STACK, CC2531,

Tool/software: Linux

Hello Sirs,

 I'm using mips SoC and connect to TI zigbee mobule via uart. After downloading and porting the Z-Stack_Linux_Gateway-1.0.1 to my board, some applications would crash. The logs are as follows :
 Do I use wrong setting or miss something to be porting?
 Please help giving suggestions.
 Thanks!

# ./zigbeeHAgw mips
running zigbeegw.scr on an mips
skipping zigbee reset
Starting the ZigBee gateway subsystem
deviceKey = 0  (0 )
devPath = '/dev/ttyS1'
logPath = '/tmp/NpiLnxLog.txt'
... freeing memory (ret 0)
Port: 2533
Following IP addresses are available:

NPI started (pid 1367) at Thu Jan  1 08:03:55 GMT 1970
connect: Connection refused
[ZSTACKZNP_SRVR/MAIN] ERROR: ERROR: signal 11 was trigerred:
[ZSTACKZNP_SRVR/MAIN] ERROR:   Fault address: (nil)
[ZSTACKZNP_SRVR/MAIN] ERROR:   Fault reason: address not mapped to object
[ZSTACKZNP_SRVR/MAIN] ERROR: Stack trace folows:
./ZLSZNP_mips(segmentation_fault_handler+0x540)[0x440f78]
[ZSTACKZNP_SRVR/MAIN] ERROR: Executing original handler...
ZLSZNP started (pid 1372) at Thu Jan  1 08:03:59 GMT 1970
[NWK_MGR/MAIN] :  there are 2 args
[NWK_MGR/MAIN] :  argv[0] = ./NWKMGR_SRVR_mips
[NWK_MGR/MAIN] :  argv[1] = 127.0.0.1:2536
connect: Connection refused
[NWK_MGR/MAIN] ERROR: ERROR: signal 11 was trigerred:
[NWK_MGR/MAIN] ERROR:   Fault address: (nil)
[NWK_MGR/MAIN] ERROR:   Fault reason: address not mapped to object
[NWK_MGR/MAIN] ERROR: Stack trace folows:
./NWKMGR_SRVR_mips(segmentation_fault_handler+0x540)[0x45a348]
[NWK_MGR/MAIN] ERROR: Executing original handler...
NETWORK MANAGER started (pid 1375) at Thu Jan  1 08:04:00 GMT 1970
connect: Connection refused
connect: Connection refused
[GATEWAY/MAIN] ERROR: ERROR: signal 11 was trigerred:
[GATEWAY/MAIN] ERROR:   Fault address: (nil)
[GATEWAY/MAIN] ERROR:   Fault reason: address not mapped to object
[GATEWAY/MAIN] ERROR: Stack trace folows:
./GATEWAY_SRVR_mips(segmentation_fault_handler+0x540)[0x46c268]
[GATEWAY/MAIN] ERROR: Executing original handler...
GATEWAY SERVER started (pid 1378) at Thu Jan  1 08:04:02 GMT 1970
connect: Connection refused
connect: Connection refused
[OTASRVR/MAIN] ERROR: ERROR: signal 11 was trigerred:
[OTASRVR/MAIN] ERROR:   Fault address: (nil)
[OTASRVR/MAIN] ERROR:   Fault reason: address not mapped to object
[OTASRVR/MAIN] ERROR: Stack trace folows:
./OTA_SRVR_mips[0x4229f8]
[OTASRVR/MAIN] ERROR: Executing original handler...
OTA SERVER started (pid 1381) at Thu Jan  1 08:04:04 GMT 1970
starting tracker with our pid ./zigbeeHAgw and pid list 1367 1372 1378 1381
===================================================
NETWORK MANAGER exited with code 139 at Thu Jan  1 08:04:04 GMT 1970
killall: GATEWAY_SRVR_mips: no process killed
killall: OTA_SRVR_mips: no process killed
killall: ZLSZNP_mips: no process killed
killall: NPI_lnx_mips_server: no process killed
unexpected exit code (139) from netmgr!
skipping zigbee reset

  • We are looking at this request will send a reply soon.
  • Hi Sirs,
    I fixes some problems, but it still can't be bring up correctly. Would you help to give some advices?
    Thanks.

    # ./zigbeeHAgw mips
    running zigbeegw.scr on an mips
    skipping zigbee reset
    Starting the ZigBee gateway subsystem
    deviceKey = 0 (0 )
    devPath = '/dev/ttyS1'
    logPath = '/tmp/NpiLnxLog.txt'
    ... freeing memory (ret 0)
    Port: 2533
    Following IP addresses are available:

    IPv4: interface: lo IP Address 127.0.0.1
    IPv4: interface: br0 IP Address 192.168.1.12
    IPv6: interface: lo IP Address ::1
    IPv6: interface: eth0 IP Address fe80::2e0:4cff:fe81:adc3
    IPv6: interface: eth0.4 IP Address fe80::2e0:4cff:fe81:adc3
    IPv6: interface: eth0.5 IP Address fe80::2e0:4cff:fe81:adc3
    IPv6: interface: nas0 IP Address fe80::200:ff:fe01:2
    IPv6: interface: br0 IP Address fe80::1
    IPv6: interface: nas0_0 IP Address fe80::2e0:4cff:fe81:adc8
    The socket will listen on the following IP addresses:

    IPv4: 0.0.0.0
    IPv6: ::
    0.0.0.0 means it will listen to all available IP address

    waiting for first connection on #4...
    NPI started (pid 1518) at Thu Jan 1 08:05:00 GMT 1970
    Connected to #6.(127.0.0.1 / ::77c0:3000:0:0)
    ZLSZNP started (pid 1523) at Thu Jan 1 08:05:04 GMT 1970
    [NWK_MGR/MAIN] : there are 2 args
    [NWK_MGR/MAIN] : argv[0] = ./NWKMGR_SRVR_mips
    [NWK_MGR/MAIN] : argv[1] = 127.0.0.1:2536
    [NWK_MGR/MAIN] : ************************************************
    [NWK_MGR/MAIN] : * Network Manager Server v1.0.1 *
    [NWK_MGR/MAIN] : * The following are the avaible key commands: *
    [NWK_MGR/MAIN] : * Exit Program. - q *
    [NWK_MGR/MAIN] : ************************************************

    NETWORK MANAGER started (pid 1529) at Thu Jan 1 08:05:05 GMT 1970
    [GATEWAY/MAIN] :
    [GATEWAY/MAIN] : ************************************************
    [GATEWAY/MAIN] : * Gateway Server v1.0.1 *
    [GATEWAY/MAIN] : * The following are the avaible key commands: *
    [GATEWAY/MAIN] : * Exit Program. - q *
    [GATEWAY/MAIN] : ************************************************

    : Host name lookup failure.[main (299)] osgiManage Server is unreachable.
    GATEWAY SERVER started (pid 1535) at Thu Jan 1 08:05:07 GMT 1970
    [OTASRVR/MAIN] :
    [OTASRVR/MAIN] : ************************************************
    [OTASRVR/MAIN] : * OTA Upgrade Server 1.0.1 *
    [OTASRVR/MAIN] : * The following are the avaible key commands: *
    [OTASRVR/MAIN] : * Exit Program. - q *
    [OTASRVR/MAIN] : ************************************************

    [NWK_MGR/MAIN] ERROR: ERROR: signal 11 was trigerred:
    [NWK_MGR/MAIN] ERROR: Fault address: (nil)
    [NWK_MGR/MAIN] ERROR: Fault reason: address not mapped to object
    [NWK_MGR/MAIN] ERROR: Stack trace folows:
    ./NWKMGR_SRVR_mips(segmentation_fault_handler+0x540)[0x45a348]
    [NWK_MGR/MAIN] ERROR: Executing original handler...
    OTA SERVER started (pid 1543) at Thu Jan 1 08:05:09 GMT 1970
    [OTASRVR/MAIN] :
    Error - Could not register OTA endpoint with zstackserver.Exiting...

    starting tracker with our pid ./zigbeeHAgw and pid list 1518 1523 1535 1543
    ===================================================
    NETWORK MANAGER exited with code 139 at tracking 4 pids, 1518 1523 1535 1543
    when we see something missing we will send a SIGUSR2 to pid 1464
    Thu Jan 1 08:05:09 GMT 1970
    send: Connection reset by peer
    killall: OTA_SRVR_mips: no process killed
    unexpected exit code (139) from netmgr!
  • Hello, I haven't had the chance to work with a mips SoC. However what I can see from the second log you provide is that the TI zigbee module's connection is not working. I've found that same log when I launch the ./zigbeeHAgw script without the CC2531 dongle is not connected. I would make sure that the devPath where the TI module is located matches the one you set on the configuration. Can you tell me the model of the TI module you're using and more details on the setup steps you followed?
  • Hi Mr. Mauricio,
    Thanks for your reply. The zigbee chip is CC2530 and communicate via UART.
    The NPI_Gateway.cfg setting is as follows:
    [PORT]
    port=2533
    [DEVICE]
    deviceKey=0 ; UART
    devPath="/dev/ttyS1" ; UART
    speed=115200
    flowcontrol=0
    [SPI]
    speed=500000 ; Set default speed 500kHz
    [LOG]
    log="/tmp/NpiLnxLog.txt" ; file to log all event/error

    I use scope to check UART TX ( from SoC to TI CC2530 ) and there are signals.
  • I change the UART baudrate to 57600. It seems the zigbee module have some response, but still would cause crash

    The following log with enable DEBUG

    # ./zigbeeHAgw mips
    running zigbeegw.scr on an mips
    skipping zigbee reset
    Starting the ZigBee gateway subsystem
    gpioCfg 0x427dcc
    gpioCfg[0] 0x5a81a0
    gpioCfg[0].gpio 0x5a91b8
    gpioCfg[0].levelshifter 0x5a9339
    gpioCfg[1] 0x5a81a4
    gpioCfg[1].gpio 0x5a94c0
    gpioCfg[1].levelshifter 0x5a9641
    gpioCfg[2] 0x5a81a8
    gpioCfg[2].gpio 0x5a97c8
    gpioCfg[2].levelshifter 0x5a9949
    ------------------------------------------------------
    Serial Config Parsing:
    - Section: DEVICE
    - Key: deviceKey
    Found section [PORT]es
    Found section [DEVICE]
    Found wanted section!
    Line to process deviceKey=0 ; UART (strlen=18)
    Found key 'deviceKey' in 'deviceKey=0 ; UART'
    Found value '0 '
    Found value2 '0 '
    deviceKey = 0 (0 )
    ------------------------------------------------------
    Serial Config Parsing:
    - Section: DEVICE
    - Key: devPath
    Found section [PORT]es
    Found section [DEVICE]
    Found wanted section!
    Line to process deviceKey=0 ; UART (strlen=18)
    Line to process #deviceKey=1 ; SPI (strlen=18)
    Line to process (strlen=0)
    Line to process #devPath="/dev/ttyACM0" ; UART/CDC (strlen=34)
    Line to process devPath="/dev/ttyS1" ; UART (strlen=27)
    Found key 'devPath' in 'devPath="/dev/ttyS1" ; UART'
    Found value '/dev/ttyS1'
    Found value2 '/dev/ttyS1'
    devPath = '/dev/ttyS1'
    ------------------------------------------------------
    Serial Config Parsing:
    - Section: LOG
    - Key: log
    Found section [PORT]es
    Found section [DEVICE]
    Found section [UART]es
    Found section [SPI]tes
    Found section [LOG]tes
    Found wanted section!
    Line to process log="/tmp/NpiLnxLog.txt" ; file to log all event/error (strlen=54)
    Found key 'log' in 'log="/tmp/NpiLnxLog.txt" ; file to log all event/error'
    Found value '/tmp/NpiLnxLog.txt'
    Found value2 '/tmp/NpiLnxLog.txt'
    logPath = '/tmp/NpiLnxLog.txt'
    ------------------------------------------------------
    Serial Config Parsing:
    - Section: UART
    - Key: speed
    Found section [PORT]es
    Found section [DEVICE]
    Found section [UART]es
    Found wanted section!
    Line to process speed=57600 (strlen=11)
    Found key 'speed' in 'speed=57600'
    Found value '57600'
    Found value2 '57600'
    ------------------------------------------------------
    Serial Config Parsing:
    - Section: UART
    - Key: flowcontrol
    Found section [PORT]es
    Found section [DEVICE]
    Found section [UART]es
    Found wanted section!
    Line to process speed=57600 (strlen=11)
    Line to process # ; speed (strlen=9)
    Line to process #speed=115200 (strlen=13)
    Line to process # ; speed (strlen=9)
    Line to process flowcontrol=0 (strlen=13)
    Found key 'flowcontrol' in 'flowcontrol=0'
    Found value '0'
    Found value2 '0'
    [UART] Opening device /dev/ttyS1
    [UART] Install IO signal handler
    [UART] Baud rate set to 57600 (0x001001)
    [UART] c_cflag set to 0x0018B1
    ------------------------------------------------------
    Serial Config Parsing:
    - Section: PORT
    - Key: port
    Found section [PORT]es
    Found wanted section!
    Line to process port=2533 (strlen=9)
    Found key 'port' in 'port=2533'
    Found value '2533'
    Found value2 '2533'
    ... freeing memory (ret 0)
    Port: 2533
    Following IP addresses are available:

    [ipclib/server/npi_lnx_ipc.c][main][940] getifaddrs ok
    [main][942]
    IPv4: interface: lo IP Address 127.0.0.1
    IPv4: interface: br0 IP Address 192.168.1.12
    IPv6: interface: lo IP Address ::1
    IPv6: interface: eth0 IP Address fe80::2e0:4cff:fe81:adc3
    IPv6: interface: eth0.3 IP Address fe80::2e0:4cff:fe81:adc3
    IPv6: interface: eth0.5 IP Address fe80::2e0:4cff:fe81:adc3
    IPv6: interface: nas0 IP Address fe80::200:ff:fe01:2
    IPv6: interface: br0 IP Address fe80::1
    IPv6: interface: nas0_0 IP Address fe80::2e0:4cff:fe81:adc8
    The socket will listen on the following IP addresses:

    IPv4: 0.0.0.0
    IPv6: ::
    0.0.0.0 means it will listen to all available IP address

    waiting for first connection on #4...
    [UART] Wait for mutex in rx entry:
    NPI started (pid 1342) at Thu Jan 1 08:05:59 GMT 1970
    Connected to #6.(127.0.0.1 / ::7789:e000:0:0)
    [startupInfo][860] getifaddrs ok
    Receive message...
    NPI SREQ: (len 5) 0x02 0x25 0x3E 0xFF 0xFF
    [UART] npi_parseframe: found frame, going to npi_procframe
    [UART] npi_procframe, subsys: 0x65, Cmd ID: 0x3E, length: 1 ,Data:
    0x00,
    [UART] npi_procframe signal synch response received (invoked by read loop)
    NPI SRSP: (len 4) 0x01 0x65 0x3E 0x00
    ...sent 4 bytes to Client #6
    !Done
    Receive message...
    NPI SREQ: (len 11) 0x08 0x21 0x09 0x84 0x00 0x00 0x04 0x00 0x00 0x08 0x00
    [UART] npi_parseframe: found frame, going to npi_procframe
    [UART] npi_procframe, subsys: 0x61, Cmd ID: 0x09, length: 1 ,Data:
    0x00,
    [UART] npi_procframe signal synch response received (invoked by read loop)
    NPI SRSP: (len 4) 0x01 0x61 0x09 0x00
    ...sent 4 bytes to Client #6
    !Done
    Receive message...
    NPI SREQ: (len 9) 0x06 0x21 0x09 0x83 0x00 0x00 0x02 0xFF 0xFF
    [UART] npi_parseframe: found frame, going to npi_procframe
    [UART] npi_procframe, subsys: 0x61, Cmd ID: 0x09, length: 1 ,Data:
    0x00,
    [UART] npi_procframe signal synch response received (invoked by read loop)
    NPI SRSP: (len 4) 0x01 0x61 0x09 0x00
    ...sent 4 bytes to Client #6
    !Done
    Receive message...
    NPI SREQ: (len 8) 0x05 0x21 0x09 0x87 0x00 0x00 0x01 0x00
    [UART] npi_parseframe: found frame, going to npi_procframe
    [UART] npi_procframe, subsys: 0x61, Cmd ID: 0x09, length: 1 ,Data:
    0x00,
    [UART] npi_procframe signal synch response received (invoked by read loop)
    NPI SRSP: (len 4) 0x01 0x61 0x09 0x00
    ...sent 4 bytes to Client #6
    !Done
    Receive message...
    NPI SREQ: (len 10) 0x07 0x21 0x15 0x96 0x00 0xC4 0x64 0x00 0x00 0x00
    [UART] npi_parseframe: found frame, going to npi_procframe
    [UART] npi_procframe, subsys: 0x60, Cmd ID: 0x00, length: 3 ,Data:
    0x00, 0x00, 0x00,
    [UART] npi_procframe signal synch response received (invoked by read loop)
    NPI SRSP: (len 4) 0x01 0x61 0x15 0xFF
    ...sent 4 bytes to Client #6
    !Done
    Receive message...
    NPI AREQ: (len 3) 0x00 0x45 0x40
    !Done
    [UART] npi_parseframe: found frame, going to npi_procframe
    [UART] npi_procframe, subsys: 0x45, Cmd ID: 0xC0, length: 1 ,Data:
    0x00,
    [UART] npi_procframe signal areq callback thread (invoked by read loop)
    [-->] 1 bytes, subSys 0x45, cmdId 0xC0, pData: 0x08
    Dispatch AREQ to all active connections: #6.
    ...sent 4 bytes to Client #6
    Receive message...
    NPI SREQ: (len 4) 0x01 0x25 0x53 0x80
    [UART] npi_parseframe: found frame, going to npi_procframe
    [UART] npi_procframe, subsys: 0x60, Cmd ID: 0x00, length: 3 ,Data:
    0x00, 0x00, 0x00,
    [UART] npi_procframe signal synch response received (invoked by read loop)
    NPI SRSP: (len 4) 0x01 0x65 0x53 0xFF
    ...sent 4 bytes to Client #6
    !Done
    [UART] npi_parseframe: found frame, going to npi_procframe
    [UART] npi_procframe, subsys: 0x45, Cmd ID: 0xC0, length: 1 ,Data:
    0x00,
    [UART] npi_procframe signal areq callback thread (invoked by read loop)
    [-->] 1 bytes, subSys 0x45, cmdId 0xC0, pData: 0x09
    Dispatch AREQ to all active connections: #6.
    ...sent 4 bytes to Client #6
    Receive message...
    NPI SREQ: (len 3) 0x00 0x25 0x50
    [UART] npi_parseframe: found frame, going to npi_procframe
    [UART] npi_procframe, subsys: 0x60, Cmd ID: 0x00, length: 3 ,Data:
    0x00, 0x00, 0x00,
    [UART] npi_procframe signal synch response received (invoked by read loop)
    NPI SRSP: (len 4) 0x01 0x65 0x50 0xFF
    ...sent 4 bytes to Client #6
    !Done
    Receive message...
    NPI SREQ: (len 8) 0x05 0x25 0x36 0x02 0xFF 0x08 0x00 0x00
    [UART] npi_parseframe: found frame, going to npi_procframe
    [UART] npi_procframe, subsys: 0x60, Cmd ID: 0x00, length: 3 ,Data:
    0x00, 0x00, 0x00,
    [UART] npi_procframe signal synch response received (invoked by read loop)
    NPI SRSP: (len 4) 0x01 0x65 0x36 0xFF
    ...sent 4 bytes to Client #6
    !Done
    Receive message...
    NPI SREQ: (len 4) 0x01 0x25 0x53 0x80
    [UART] npi_parseframe: found frame, going to npi_procframe
    [UART] npi_procframe, subsys: 0x60, Cmd ID: 0x00, length: 3 ,Data:
    0x00, 0x00, 0x00,
    [UART] npi_procframe signal synch response received (invoked by read loop)
    NPI SRSP: (len 4) 0x01 0x65 0x53 0xFF
    ...sent 4 bytes to Client #6
    !Done
    ZLSZNP started (pid 1347) at Thu Jan 1 08:06:03 GMT 1970
    [NWK_MGR/MAIN] : there are 2 args
    [NWK_MGR/MAIN] : argv[0] = ./NWKMGR_SRVR_mips
    [NWK_MGR/MAIN] : argv[1] = 127.0.0.1:2536
    [startupInfo][860] getifaddrs ok
    [NWK_MGR/MAIN] : ************************************************
    [NWK_MGR/MAIN] : * Network Manager Server v1.0.1 *
    [NWK_MGR/MAIN] : * The following are the avaible key commands: *
    [NWK_MGR/MAIN] : * Exit Program. - q *
    [NWK_MGR/MAIN] : ************************************************

    Receive message...
    NPI SREQ: (len 16) 0x0D 0x24 0x00 0x01 0x04 0x01 0x07 0x00 0x00 0x00 0x01 0x00 0x00 0x01 0x06 0x00
    [UART] npi_parseframe: found frame, going to npi_procframe
    [UART] npi_procframe, subsys: 0x60, Cmd ID: 0x00, length: 3 ,Data:
    0x00, 0x00, 0x00,
    [UART] npi_procframe signal synch response received (invoked by read loop)
    NPI SRSP: (len 4) 0x01 0x64 0x00 0xFF
    ...sent 4 bytes to Client #6
    !Done
    Receive message...
    NPI SREQ: (len 3) 0x00 0x25 0x50
    [UART] npi_parseframe: found frame, going to npi_procframe
    [UART] npi_procframe, subsys: 0x60, Cmd ID: 0x00, length: 3 ,Data:
    0x00, 0x00, 0x00,
    [UART] npi_procframe signal synch response received (invoked by read loop)
    NPI SRSP: (len 4) 0x01 0x65 0x50 0xFF
    ...sent 4 bytes to Client #6
    !Done
    Receive message...
    NPI SREQ: (len 6) 0x03 0x21 0x08 0x01 0x00 0x00
    [UART] npi_parseframe: found frame, going to npi_procframe
    [UART] npi_procframe, subsys: 0x61, Cmd ID: 0x08, length: 10 ,Data:
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x30,
    [UART] npi_procframe signal synch response received (invoked by read loop)
    NPI SRSP: (len 13) 0x0A 0x61 0x08 0x00 0x08 0x30 0x56 0xC6 0x0D 0x00 0x4B 0x12 0x00
    ...sent 13 bytes to Client #6
    !Done
    [NWK_MGR/MAIN] ERROR: ERROR: signal 11 was trigerred:
    [NWK_MGR/MAIN] ERROR: Fault address: (nil)
    [NWK_MGR/MAIN] ERROR: Fault reason: address not mapped to object
    [NWK_MGR/MAIN] ERROR: Stack trace folows:
    ./NWKMGR_SRVR_mips(segmentation_fault_handler+0x540)[0x45a348]
    [NWK_MGR/MAIN] ERROR: Executing original handler...
    Receive message...
    NPI SREQ: (len 4) 0x01 0x24 0x04 0x00
    [UART] npi_parseframe: found frame, going to npi_procframe
    [UART] npi_procframe, subsys: 0x60, Cmd ID: 0x00, length: 3 ,Data:
    0x00, 0x00, 0x00,
    [UART] npi_procframe signal synch response received (invoked by read loop)
    NPI SRSP: (len 4) 0x01 0x64 0x04 0xFF
    ...sent 4 bytes to Client #6
    !Done
    NETWORK MANAGER started (pid 1353) at Thu Jan 1 08:06:04 GMT 1970
    connect: Connection refused
    [startupInfo][860] getifaddrs ok
    [GATEWAY/MAIN] :
    [GATEWAY/MAIN] : ************************************************
    [GATEWAY/MAIN] : * Gateway Server v1.0.1 *
    [GATEWAY/MAIN] : * The following are the avaible key commands: *
    [GATEWAY/MAIN] : * Exit Program. - q *
    [GATEWAY/MAIN] : ************************************************
    [GATEWAY/MAIN] : Error - No Network Manager Server Detected. Exiting...

    GATEWAY SERVER started (pid 1359) at Thu Jan 1 08:06:06 GMT 1970
    connect: Connection refused
    [startupInfo][860] getifaddrs ok
    [OTASRVR/MAIN] :
    [OTASRVR/MAIN] : ************************************************
    [OTASRVR/MAIN] : * OTA Upgrade Server 1.0.1 *
    [OTASRVR/MAIN] : * The following are the avaible key commands: *
    [OTASRVR/MAIN] : * Exit Program. - q *
    [OTASRVR/MAIN] : ************************************************
    [OTASRVR/MAIN] :
    Error - No Network Manager Server Detected. Exiting...
    OTA SERVER started (pid 1365) at Thu Jan 1 08:06:08 GMT 1970
    starting tracker with our pid ./zigbeeHAgw and pid list 1342 1347 1359 1365
    ===================================================
    NETWORK MANAGER exited with code 139 at tracking 4 pids, 1342 1347 1359 1365
    when we see something missing we will send a SIGUSR2 to pid 1288
    Thu Jan 1 08:06:08 GMT 1970
    killall: GATEWAY_SRVR_mips: no process killed
    killall: OTA_SRVR_mips: no process killed
    Receive message...
    Will disconnect #6
    Done with 6
    Removing connection #6
    unexpected exit code (139) from netmgr!
  • Hello, could you try setting the flowcontrol to enabled. If you haven't changed the source project for the ZNP, it is enabled. Also the original baudrate was correct it should be 115200.
  • Can you specify where to setting the flow control to enable?
  •  mentioned the configuration used..
    The NPI_Gateway.cfg setting is as follows:
    [PORT]
    port=2533
    [DEVICE]
    deviceKey=0 ; UART
    devPath="/dev/ttyS1" ; UART
    speed=115200
    flowcontrol=0 <--- Try setting this to 1
    [SPI]
    speed=500000 ; Set default speed 500kHz
    [LOG]
    log="/tmp/NpiLnxLog.txt" ; file to log all event/error

  • @ since the default value of flowcontrol is 1 (enable), I suggest you to set it as disable (0) to test again.

  • Hi YK,
    The SoC I used don't support flow control. Does it must need flow control ?

    Thanks.
    Kevin
  • No, you don't have to. So, I suggest you to disable it.
  • Hi YK,
    I have disabled flow control and fix that crash problem. Now there is another problem.
    When execute NWK Mgr , NPI deamon would receive unknown request and then cause error. The log is as following:
    Please help to give any advices. Thanks!

    # ./zigbeeHAgw mips

    running zigbeegw.scr on an mips
    done processing arguments, board type mips, target mips
    NPI is 'NPI_lnx_mips_server'
    Zstack linux server is 'ZLSZNP_mips'
    gateway server is 'GATEWAY_SRVR_mips'
    network manager is 'NWKMGR_SRVR_mips'
    OTA server is 'OTA_SRVR_mips'
    making sure there are no lingering servers...
    there are 0 NIP servers
    there are 0 ZLS servers
    there are 0 GATEWAY servers
    there are 0 NWKMGR servers
    there are 0 OTA servers
    (total 0)
    done
    making sure there are no lingering servers...
    there are 0 NIP servers
    there are 0 ZLS servers
    there are 0 GATEWAY servers
    there are 0 NWKMGR servers
    there are 0 OTA servers
    (total 0)
    done
    skipping zigbee reset
    Starting the ZigBee gateway subsystem
    ===================================================
    starting NPI, cmd ' ./NPI_lnx_mips_server NPI_Gateway.cfg ' atThu Jan 1 08:01:10 GMT 1970
    will delay 4 secs before starting Zstack
    deviceKey = 0 (0 )
    devPath = '/dev/ttyS1'
    logPath = '/tmp/NpiLnxLog.txt'
    ... freeing memory (ret 0)
    waiting for first connection on #4...
    NPI started (pid 1339) at Thu Jan 1 08:01:14 GMT 1970
    ===================================================
    starting ZLSZNP, cmd ' ' atThu Jan 1 08:01:14 GMT 1970
    will delay 4 secs before starting GW
    Trying to connect...
    Connected to #6.
    Connected.
    Port: 166201832
    Following IP addresses are available:

    IPv4: interface: lo IP Address 127.0.0.1
    IPv4: interface: br0 IP Address 192.168.1.12
    IPv6: interface: lo IP Address ::1
    IPv6: interface: eth0 IP Address fe80::2e0:4cff:fe81:adc3
    IPv6: interface: eth0.3 IP Address fe80::2e0:4cff:fe81:adc3
    IPv6: interface: eth0.5 IP Address fe80::2e0:4cff:fe81:adc3
    IPv6: interface: nas0 IP Address fe80::200:ff:fe01:2
    IPv6: interface: br0 IP Address fe80::1
    IPv6: interface: nas0_0 IP Address fe80::2e0:4cff:fe81:adc8
    The socket will listen on the following IP addresses:

    IPv4: 0.0.0.0
    IPv6: ::
    0.0.0.0 means it will listen to all available IP address

    waiting for first connection on #6...
    ZLSZNP started (pid 1345) at Thu Jan 1 08:01:19 GMT 1970
    ===================================================
    starting NETWORK_MGR, cmd './NWKMGR_SRVR_mips 127.0.0.1:2536 ' at Thu Jan 1 08:01:19 GMT 1970
    will delay 1 secs after starting netmgr
    [NWK_MGR/MAIN] : there are 2 args
    [NWK_MGR/MAIN] : argv[0] = ./NWKMGR_SRVR_mips
    [NWK_MGR/MAIN] : argv[1] = 127.0.0.1:2536
    Trying to connect...
    Connected to #7.
    Connected.
    Port: 2540
    Following IP addresses are available:

    IPv4: interface: lo IP Address 127.0.0.1
    IPv4: interface: br0 IP Address 192.168.1.12
    IPv6: interface: lo IP Address ::1
    IPv6: interface: eth0 IP Address fe80::2e0:4cff:fe81:adc3
    IPv6: interface: eth0.3 IP Address fe80::2e0:4cff:fe81:adc3
    IPv6: interface: eth0.5 IP Address fe80::2e0:4cff:fe81:adc3
    IPv6: interface: nas0 IP Address fe80::200:ff:fe01:2
    IPv6: interface: br0 IP Address fe80::1
    IPv6: interface: nas0_0 IP Address fe80::2e0:4cff:fe81:adc8
    The socket will listen on the following IP addresses:

    IPv4: 0.0.0.0
    IPv6: ::
    0.0.0.0 means it will listen to all available IP address

    waiting for first connection on #6...
    [NWK_MGR/MAIN] : ************************************************
    [NWK_MGR/MAIN] : * Network Manager Server v1.0.1 *
    [NWK_MGR/MAIN] : * The following are the avaible key commands: *
    [NWK_MGR/MAIN] : * Exit Program. - q *
    [NWK_MGR/MAIN] : ************************************************

    [nmRegEndpoint][4493] len 21
    Can only accept AREQ or SREQ for now...
    Unknown: (len 24) 0x15 0x00 0x31 0x20 0x08 0x20 0x10 0x01 0x1A 0x0D 0x08 0x01 0x10 0x84 0x02 0x18 0x07 0x20 0x00 0x28 0x00 0x30 0x06 0x20
    [ERR] npi_ipc_errno 0x01030400
    Exit socket while loop
    connect: No such file or directory
    connect: No such file or directory
    ... freeing memory (ret 1)
    recv: Connection reset by peer
    NETWORK MANAGER started (pid 1352) at Thu Jan 1 08:01:20 GMT 1970
  • Do you try to run it with "sudo ./zigbeeHAgw mips"?