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.

Z-Stack Linux Gateway 1.0.1 zigbeeHAgw script throws error

Other Parts Discussed in Thread: CC2531, Z-STACK

Hello!

I am working with Z-Stack Linux Gateway 1.0.1 with beaglebone black and CC2531 dongle. I followed the instructions as given in quick start guide.

I hit ./zigbeeHAgw bbb

and I get following output:

root@beaglebone:/home/debian/Desktop/Z-Stack_Linux_Gateway-1.0.1/Precompiled_arm/servers# ./zigbeeHAgw bbb
running zigbeegw.scr on an ARM
resetting beaglebone black
 sleeping 6 seconds after reset... Using serial port: /dev/ttyACM0
/dev/ttyACM0: No such file or directory
/dev/ttyACM0 open failed
/dev/ttyACM0: No such file or directory
/dev/ttyACM0 open failed
done
stty: /dev/ttyACM0: No such file or directory
stty: /dev/ttyACM0: No such file or directory
Starting the ZigBee gateway subsystem
deviceKey = 0  (0 )
devPath = '/dev/ttyACM0'
logPath = './NpiLnxLog.txt'
... freeing memory (ret 0)
Port: 2533
Following IP addresses are available:

 IPv4: interface: lo     IP Address 127.0.0.1
 IPv4: interface: eth0   IP Address 192.168.2.72
 IPv4: interface: usb0   IP Address 192.168.7.2
 IPv6: interface: lo     IP Address ::1
 IPv6: interface: eth0   IP Address fe80::6eec:ebff:feab:e722
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 #3...
NPI started (pid 4559) at Thu May 15 02:22:31 UTC 2014
Connected to #5.(127.0.0.1 / ::e8f7:80be:30f8:80be)
^Ccaught SIGTERM, killing all the servers and cleaning up
terminating zigbeeHAGW (pid 4402)
Killed

The output of dmesg is:

root@beaglebone:~# dmesg | grep tty
[ 0.000000] Kernel command line: console=tty0 console=ttyO0,115200n8 quiet drm.debug=7 capemgr.enable_partno=BB-UART4 root=UUID=aa948514-2113-43af-9436-1317aadd4462 ro rootfstype=ext4 rootwait fixrtc quiet init=/lib/systemd/systemd
[ 0.000000] console [tty0] enabled
[ 0.535601] 44e09000.serial: ttyO0 at MMIO 0x44e09000 (irq = 72) is a OMAP UART0
[ 0.547473] console [ttyO0] enabled
[ 0.723140] 481a8000.serial: ttyO4 at MMIO 0x481a8000 (irq = 45) is a OMAP UART4
[ 1.259463] cdc_acm 1-1:1.0: ttyACM0: USB ACM device
[ 34.266205] cdc_acm 1-1:1.0: ttyACM0: USB ACM device
[ 224.041942] cdc_acm 1-1:1.0: ttyACM1: USB ACM device
[ 238.271082] cdc_acm 1-1:1.0: ttyACM0: USB ACM device

Please tell me if I have missed out something

thanks

  • Do you download CC2531-GW-ZNP_38724.hex to your CC2531 dongle?
  • I solved it, was a mistake
  • You are welcome.

  • Anjali,

    I am having exact same issue. Can you tell me how you solved it?

  • Do you download CC2531-GW-GNP_38724.hex to your CC2531 USB dongle and plug it into your BBB?
  • YK Chen, Yes I downloaded CC2531-GW-GNP_38724.hex to the CC2531 USB dongle as highlighted below but I still get the following error:

    root@beaglebone:~/z-stack_linux_gateway_arm_binaries/servers# ./zigbeeHAgw bbb
    running zigbeegw.scr on an ARM
    resetting beaglebone black
     sleeping 6 seconds after reset... Using serial port: /dev/ttyACM0
    zbSocProcessRpc: CMD0:41, CMD1:80, not handled
    Received System version.
      Transport Protocol Version: 2
      Product ID: 0
      Software Release: 2.6.1
      Software Revision: 38724
    done
    Starting the ZigBee gateway subsystem
    deviceKey = 0  (0 )
    devPath = '/dev/ttyACM0'
    logPath = './NpiLnxLog.txt'
    ... freeing memory (ret 0)
    Port: 2533
    Following IP addresses are available:

    ./zigbeeHAgw: line 324:  4895 Segmentation fault      $NPI_CMD
    NPI started (pid 4895) at Thu Jun 30 16:02:04 UTC 2016
    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 unavailable
    [ZSTACKZNP_SRVR/MAIN] ERROR: Executing original handler...
    ./zigbeeHAgw: line 351:  4930 Segmentation fault      $ZLSZNP_CMD
    ZLSZNP started (pid 4930) at Thu Jun 30 16:02:09 UTC 2016
    [NWK_MGR/MAIN] :  there are 2 args
    [NWK_MGR/MAIN] :  argv[0] = ./NWKMGR_SRVR_arm
    [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 unavailable
    [NWK_MGR/MAIN] ERROR: Executing original handler...
    ./zigbeeHAgw: line 407:  4963 Segmentation fault      $NWKMGR_CMD $NWKMGR_RESTART_FLAG
    NETWORK MANAGER started (pid 4963) at Thu Jun 30 16:02:10 UTC 2016
    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 unavailable
    [GATEWAY/MAIN] ERROR: Executing original handler...
    ./zigbeeHAgw: line 378:  4974 Segmentation fault      $GATEWAY_SERVER_CMD
    GATEWAY SERVER started (pid 4974) at Thu Jun 30 16:02:12 UTC 2016
    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 unavailable
    [OTASRVR/MAIN] ERROR: Executing original handler...
    ./zigbeeHAgw: line 438:  4992 Segmentation fault      $OTA_SERVER_CMD
    OTA SERVER started (pid 4992) at Thu Jun 30 16:02:14 UTC 2016
    starting tracker with our pid ./zigbeeHAgw and pid list 4895 4930 4974 4992
    ===================================================
    NETWORK MANAGER exited with code 139 at tracking 4 pids, 4895 4930 4974 4992
    Thu Jun 30 16:02:14 UTC 2016
    ./zigbeeHAgw: line 482:  5015 Killed                  ./track_servers $$ "$pids"
    GATEWAY_SRVR_arm: no process found
    OTA_SRVR_arm: no process found
    ZLSZNP_arm: no process found
    NPI_lnx_arm_server: no process found
    unexpected exit code (139) from netmgr!
    resetting beaglebone black
    ^Ccaught SIGTERM, killing all the servers and cleaning up
    terminating zigbeeHAGW (pid 4734)
    Killed
    root@beaglebone:~/z-stack_linux_gateway_arm_binaries/servers#

  • Also... as soon as the device reports "Following IP addresses are available:" the dongle power turns off as indicated by the green LED turning off.
  • What Debian image do you run on BBB?
  • I am running Debian 8.4

  • YK Chen, debian 7.8 works great - this fixed the problem. Thank you for your assistance!
    Dave
  • You are welcome and it's good to know it works.
  • YK,

    Thank you very much for all your help so far. I'm having an issue with (I think) device attributes. I have no trouble turning on and off a switch but I cannot get input from a simple switch, a temperature measurement device and a motion sensor. The simple switch and temperature sensor are enddpoints on the same device - a Samsung multipurpose sensor (IEEE Addr 00:0D:6F:00:05:98:6E:F1 ). The motion sensor is also Samsung (IEEE Addr 00:0D:6F:00:05:A3:07:F5). Below is my log file, and attached is my configuration for the TI gateway demo file gateway_config.tlg:


    //..........  Samsung MultiSensor  ................

    // Device IDs
    #define DeviceID_CombinedInterface 0x0007

    // Cluster IDs
    #define BasicClusterId 0x0000
    #define IdentifyClusterId 0x0003
    #define BinaryClusterId 0x000f
    #define TempSensorClusterId  0x0402    //0x00402 is TempSense ClusterId and 0x0302 for HVAC ClusterId TempSense DeviceId.
    #define UnknownClusterId 0x0019         // Suggested by Samsung!!

    endpoint { 9, CombinedInterfaceEpDef, CombinedInterfaceAttrList }

    endpointdef CombinedInterfaceEpDef { ha_profile, DeviceID_CombinedInterface , 0, CombinedInterfaceInputClusters, CombinedInterfaceOutputClusters }

    // clusterlists include a list of clusters
    // the common ZigBee clusters, such as basic, groups can use the symbol, rather than the number (e.g. 0x0006 or onoff) USE: 0x000f for Binary On/Off or Open/Close.
    clusterlist CombinedInterfaceOutputClusters { BasicClusterId, IdentifyClusterId }
    clusterlist CombinedInterfaceInputClusters { BasicClusterId, BinaryClusterId, TempSensorClusterId }//, UnknownClusterId }  //0x000f is the 'Binary Input' cluster id. and 0x0090 is the window status attribute.

    // attrs include an identifier, data type, and access control
    attr Identify_IdentifyTimeAttr { IdentifyClusterId, 0x0000, uint16, rdwr }
    attr Basic_ZCLVersionAttr { BasicClusterId, 0x0000, uint8, rdonly }
    attr Basic_BinaryInputAttr { BinaryClusterId, 0x0055, uint8, rdwr }  // 0x0055 reports 'PresentValue' (p170 ZigBee Spec.)
    attr TempSensorAttr { TempSensorClusterId, 0x0000, uint16, rdonly }
    //attr UnknownAttr { UnknownClusterId, 0x0090, uint8, rdonly}

    // attrlists are a collection of attributes
    attrlist CombinedInterfaceAttrList { Identify_IdentifyTimeAttr, Basic_ZCLVersionAttr, Basic_BinaryInputAttr,TempSensorAttr }//, UnknownAttr }
    //attrlist CombinedInterfaceAttrList { Identify_IdentifyTimeAttr, Basic_BinaryInputAttr,TempSensorAttr }


    //..........  Motion Sensor  ................

    // Device IDs
    #define DeviceID_IAS_Zone 0x0402

    // Cluster IDs
    #define BasicClusterId 0x0000
    #define IdentifyClusterId 0x0003
    #define IAS_ZoneClusterId 0x0500

    endpoint { 8, IAS_ZoneEpDef, IAS_ZoneAttrList }

    endpointdef IAS_ZoneEpDef { ha_profile, DeviceID_IAS_Zone , 0, IAS_ZoneInputClusters, IAS_ZoneOutputClusters }

    // clusterlists include a list of clusters
    clusterlist IAS_ZoneOutputClusters { BasicClusterId, IAS_ZoneClusterId }
    clusterlist IAS_ZoneInputClusters { BasicClusterId, IdentifyClusterId }

    // attrs include an identifier, data type, and access control
    // special case: if attribute datatype is charstring or octetstring, a length byte follows the type
    // { 99, charstring, 16, rdwr } // a character string up to 16 bytes
    attr Identify_IdentifyTimeAttr { IdentifyClusterId, 0x0000, uint16, rdwr }
    attr Basic_ZCLVersionAttr { BasicClusterId, 0x0000, uint8, rdonly }
    attr IAS_ZoneMotionSensorAttr { IAS_ZoneClusterId, 0x000d, uint8, rdonly }

    // attrlists are a collection of attributes
    attrlist IAS_ZoneAttrList { Identify_IdentifyTimeAttr, Basic_ZCLVersionAttr, IAS_ZoneMotionSensorAttr }

  • YK,

    Thank you very much for all your help so far. I'm having an issue with (I think) device attributes. I have no trouble turning on and off a switch but I cannot get input from a simple switch, a temperature measurement device and a motion sensor. The simple switch and temperature sensor are enddpoints on the same device - a Samsung multipurpose sensor (IEEE Addr 00:0D:6F:00:05:98:6E:F1 ). The motion sensor is also Samsung (IEEE Addr 00:0D:6F:00:05:A3:07:F5). Below is my log file, and attached is my configuration for the TI gateway demo file gateway_config.tlg:


    //..........  Samsung MultiSensor  ................

    // Device IDs
    #define DeviceID_CombinedInterface 0x0007

    // Cluster IDs
    #define BasicClusterId 0x0000
    #define IdentifyClusterId 0x0003
    #define BinaryClusterId 0x000f
    #define TempSensorClusterId  0x0402    //0x00402 is TempSense ClusterId and 0x0302 for HVAC ClusterId TempSense DeviceId.
    #define UnknownClusterId 0x0019         // Suggested by Samsung!!

    endpoint { 9, CombinedInterfaceEpDef, CombinedInterfaceAttrList }

    endpointdef CombinedInterfaceEpDef { ha_profile, DeviceID_CombinedInterface , 0, CombinedInterfaceInputClusters, CombinedInterfaceOutputClusters }

    // clusterlists include a list of clusters
    // the common ZigBee clusters, such as basic, groups can use the symbol, rather than the number (e.g. 0x0006 or onoff) USE: 0x000f for Binary On/Off or Open/Close.
    clusterlist CombinedInterfaceOutputClusters { BasicClusterId, IdentifyClusterId }
    clusterlist CombinedInterfaceInputClusters { BasicClusterId, BinaryClusterId, TempSensorClusterId }//, UnknownClusterId }  //0x000f is the 'Binary Input' cluster id. and 0x0090 is the window status attribute.

    // attrs include an identifier, data type, and access control
    attr Identify_IdentifyTimeAttr { IdentifyClusterId, 0x0000, uint16, rdwr }
    attr Basic_ZCLVersionAttr { BasicClusterId, 0x0000, uint8, rdonly }
    attr Basic_BinaryInputAttr { BinaryClusterId, 0x0055, uint8, rdwr }  // 0x0055 reports 'PresentValue' (p170 ZigBee Spec.)
    attr TempSensorAttr { TempSensorClusterId, 0x0000, uint16, rdonly }
    //attr UnknownAttr { UnknownClusterId, 0x0090, uint8, rdonly}

    // attrlists are a collection of attributes
    attrlist CombinedInterfaceAttrList { Identify_IdentifyTimeAttr, Basic_ZCLVersionAttr, Basic_BinaryInputAttr,TempSensorAttr }//, UnknownAttr }
    //attrlist CombinedInterfaceAttrList { Identify_IdentifyTimeAttr, Basic_BinaryInputAttr,TempSensorAttr }


    //..........  Motion Sensor  ................

    // Device IDs
    #define DeviceID_IAS_Zone 0x0402

    // Cluster IDs
    #define BasicClusterId 0x0000
    #define IdentifyClusterId 0x0003
    #define IAS_ZoneClusterId 0x0500

    endpoint { 8, IAS_ZoneEpDef, IAS_ZoneAttrList }

    endpointdef IAS_ZoneEpDef { ha_profile, DeviceID_IAS_Zone , 0, IAS_ZoneInputClusters, IAS_ZoneOutputClusters }

    // clusterlists include a list of clusters
    clusterlist IAS_ZoneOutputClusters { BasicClusterId, IAS_ZoneClusterId }
    clusterlist IAS_ZoneInputClusters { BasicClusterId, IdentifyClusterId }

    // attrs include an identifier, data type, and access control
    // special case: if attribute datatype is charstring or octetstring, a length byte follows the type
    // { 99, charstring, 16, rdwr } // a character string up to 16 bytes
    attr Identify_IdentifyTimeAttr { IdentifyClusterId, 0x0000, uint16, rdwr }
    attr Basic_ZCLVersionAttr { BasicClusterId, 0x0000, uint8, rdonly }
    attr IAS_ZoneMotionSensorAttr { IAS_ZoneClusterId, 0x000d, uint8, rdonly }

    // attrlists are a collection of attributes
    attrlist IAS_ZoneAttrList { Identify_IdentifyTimeAttr, Basic_ZCLVersionAttr, IAS_ZoneMotionSensorAttr }

  • What is your issue?
  • I have no trouble turning on and off an electrical outlet switch but I cannot get input from a simple switch (window/door open/close) and a temperature measurement device. The simple switch and temperature sensor are enddpoints on the same device - a Samsung multipurpose sensor (IEEE Addr 00:0D:6F:00:05:98:6E:F1 ).

  • Select this device and endpoint from the device list, and press 't'. The temperature will be read from the device and displayed in the device list, alongside the respective endpoint.

    If you want automatic periodic reading of the temperature attribute, press 'a' to enable automatic-sensor-reading. This will enable this feature for all the sensors in the network, regardless of the sensor currently selected in the device list. You should see the temperature display update every 5 seconds (assuming the sensor report new temperature). To disable automatic sensor reading, press 'a' again.
  • Thank you for the prompt reply. I have tried pressing the 'A' and my issue seems to be specific to the Samsung multi-sensor and also the Samsung motion detector. I am receiving responses from a motion/temperature sensor of a different manufacturer without any issues. Since my issue appears to be related only to the Samsung devices I will try to deal direct with them. Thank you again.
  • What does it mean when the TI Gateway Demo App reports the following in the log:
    received from GATEWAY: len=24, cmd_id=27, subsystem=83
    Raw=18:00:53:1B:08:1B:10:0C:1A:0D:08:00:11:D5:97:00:00:00:7A:13:00:28:01:20:0D:28:9F:21
    Unsupported incoming command id from gateway server (cmd_id 27)
    received from GATEWAY: len=24, cmd_id=27, subsystem=83
    Raw=18:00:53:1B:08:1B:10:0D:1A:0D:08:00:11:D5:97:00:00:00:7A:13:00:28:01:20:0D:28:9F:21
    Unsupported incoming command id from gateway server (cmd_id 27)

    There seems to be no reference to this 'error' in the ZigBee spec or any of the TI documentation.
  • I think this log is caused by device sends some unknown command to GW.
  • Can anyone tell me what Device Id 0x0107 might refer to? It is reported by the Beaglebone gateway but I cannot find any reference to it in any ZigBee spec.

  • According to Zigbee HA profile spec, device ID 0x0107 is occupancy sensor.