Wednesday, October 28, 2015

How to use SensorTag CC2650STK with CC-DEVPACK-DEBUGGER as HostTest and connect to BLE BTool.

The following steps show you how to use SensorTag CC2650STK with CC-DEVPACK-DEBUGGER as HostTest and connect to BLE BTool.

1. Revise the following code in Board.h

#define Board_UART_RX IOID_2 /* RF1.7 */
#define Board_UART_TX IOID_3 /* RF1.9 */

to

#define Board_UART_RX IOID_28 /* RF1.7 */
#define Board_UART_TX IOID_29 /* RF1.9 */

2. Rebuild HostTest and download it to CC2650STK.
3. Disconnect CC2650STK from CC-DEVPACK-DEBUGGER and connect it to restart.
4. Find COM port of XDS110 Class Application/User UART.



5. Open BTool and select COM port of XDS110 Class Application/User UART. Remember to select Flow to None.




6. You should see CC2650STK BLE HostTest is connected.



Friday, October 23, 2015

How to do device binding from TI Ztool and CC2531 USB dongle to CC2650 SensorTag using ZDO_BIND_REQ.

The following steps show how to do device binding from TI Ztool and CC2531 USB dongle to CC2650 SensorTag using  ZDO_BIND_REQ.

1. Refer to http://sunmaysky.blogspot.tw/2015/10/setup-zigbee-ha-coordinator-with-ti.html and setup Zigbee HA coordinator with TI Ztool and CC2531 USB dongle and use CC2650 SensorTag as Zigbee end device to join coordinator.


2. Use ZDO_IEEE_ADDR_REQ with ShortAddr=0 to request IEEE address of coordinator which we would need when we do binding request. In my test, it responses IEEEAddr: 0x00124B0002F1DC2B.




3. Send ZDO_BIND_REQ with DstAddr=0x65D1 (short address of CC2650STK), SrcAddress=0x124B00069F3B89 (IEEE address of CC2650STK), SrcEndPoint=9 (active endpoint of temperature cluster support in CC2650STK), ClusterID=0x0402 (Zigbee cluster temperature ID), BindAddrMode=0x03 (must use 64 Bits address mode), BindAddr=0x00124B0002F1DC2B (IEEE address of coordinator in test case),and BindEndPoint=7 (active endpoint on coordinator).


 4. After sending ZDO_BIND_REQ, you would receive ZDO_BIND_RSP which shows binding success. The temperature report would be receive as AF_INCOMING_MSG.


5. The temperature is shown on latest two bytes (little endian) of AF_INCOMING_MSG data

Setup Zigbee HA coordinator with TI Ztool and CC2531 USB dongle and use CC2650 SensorTag as Zigbee end device to join coordinator.

The following steps show you how to setup Zigbee HA coordinator with TI Ztool and CC2531 USB dongle and use CC2650 SensorTag as Zigbee end device to join coordinator.

1. Use CC Debugger to download CC2531ZNP-Pro-Secure_LinkKeyJoin.hex to your CC2531 USB dongle. Plug CC2531 USB dongle into USB socket of your PC and you should have it enum as a CDC Serial Port (mine is COM29 in the test.)


2. Set com port setting to 115200 Baudrate and Handshake as none


3. Press "Scan for devices" button on Ztool. If your COM port is scanned successfully in ZTool, it should looks like the following screen shot.


4. Run the attached script coordinator_light.zip to initialize coordinator from Ztool.


  

    p.s. The script uses Zigbee channel 11 and do remember to change ZC_Com in the script to your CC2531 virtual COM number. In my test, it is COM29.

5. Build Zigbee SensorTag (CC2650STK) to join as end device. Make sure you use -DDEFAULT_CHANLIST=0x00000800 (channel 11) in f8wconfig.cfg and set "xHOLD_AUTO_START" and "xNV_RESTORE" in ZStackCore. Set "xZCL_EZMODE" in SensorTag application. Compile SensorTag and download it to your CC2650STK.




6. Enable permit join on coordinator by sending ZDO_MGMT_PERMIT_JOIN_REQUEST with AddrMode=0x02, DstAddr=0, and Duration=255.




7.Power on CC2650STK and you should see ZDO_END_DEVICE_ANNCE_IND some seconds later.


Setup Zigbee HA coordinator with TI Ztool and CC2531 USB dongle and use CC2650 SensorTag as Zigbee end device to join coordinator.

The following steps show you how to setup Zigbee HA coordinator with TI Ztool and CC2531 USB dongle and use CC2650 SensorTag as Zigbee end device to join coordinator.

1. Use CC Debugger to download CC2531ZNP-Pro-Secure_LinkKeyJoin.hex to your CC2531 USB dongle. Plug CC2531 USB dongle into USB socket of your PC and you should have it enum as a CDC Serial Port (mine is COM29 in the test.)


2. Set com port setting to 115200 Baudrate and Handshake as none


3. Press "Scan for devices" button on Ztool. If your COM port is scanned successfully in ZTool, it should looks like the following screen shot.
 

4. Run the attached script coordinator_light.zip to initialize coordinator from Ztool.


  

    p.s. The script uses Zigbee channel 11 and do remember to change ZC_Com in the script to your CC2531 virtual COM number. In my test, it is COM29.

5. Build Zigbee SensorTag (CC2650STK) to join as end device. Make sure you use -DDEFAULT_CHANLIST=0x00000800 (channel 11) in f8wconfig.cfg and set "xHOLD_AUTO_START" and "xNV_RESTORE" in ZStackCore. Set "xZCL_EZMODE" in SensorTag application. Compile SensorTag and download it to your CC2650STK.




6. Enable permit join on coordinator by sending ZDO_MGMT_PERMIT_JOIN_REQUEST with AddrMode=0x02, DstAddr=0, and Duration=255.




7.Power on CC2650STK and you should see ZDO_END_DEVICE_ANNCE_IND some seconds later.