Forums - Onboard demo without Cloud Mode with two QCA4020

7 posts / 0 new
Last post
Onboard demo without Cloud Mode with two QCA4020
JBloom
Join Date: 20 Mar 19
Posts: 7
Posted: Tue, 2019-04-30 05:59

Hi,

I would like to replicate Onboard demo without cloud mode with two QCA4020 development kits.

The build command I use is build.bat t 4020 1 1 cdb. 

What I see by default in qca_onboarding application is that Radio Mode is set to Coordinator.

My question is: How can I program one development kit to be End Device? Do I set it in qca_onboarding application or do I use some other build command?

Best regards,

JBloom

  • Up0
  • Down0
c_rpedad
Profile picture
Join Date: 18 Jun 18
Location: San Jose
Posts: 317
Posted: Mon, 2019-05-06 11:58
while using Onboard demo without cloud mode, the build command "build.bat t 4020 1 1 cdb" is to configure the build with BLE/ZigBee functionality. In order to program second development kit as end device, you need to use the QCA_onboarding mobile application. Kindly onboard the first device which is Zigbee coordinator followed by second device, the mobile application automatically detects the coordinator and prompts in the ZigBee onboarding screen as End device.
  • Up0
  • Down0
JBloom
Join Date: 20 Mar 19
Posts: 7
Posted: Thu, 2019-05-16 08:10

Hi raja_pedada,

Thanks for the answer! I still cannot make this work. When I try to onboard the second device, after "Fetching Zigbee details..." I see that the Capability field is set to "Coordinator". I tried to click on the field and change it to "End device" but it wasn't possible. I only managed to onboard both devices in Coordinator mode and to read sensor data separately frrom one another.

Kind regards,

JBloom

  • Up0
  • Down0
c_rpedad
Profile picture
Join Date: 18 Jun 18
Location: San Jose
Posts: 317
Posted: Wed, 2019-06-05 15:48
Can you share us the console logs and steps executed to connect two 4020 board using Onboard demo without cloud mode. Make sure you have cleared all the devices under mobile application (click on setting icon at top right corner and delete entries) before onboarding both devices.
  • Up0
  • Down0
JBloom
Join Date: 20 Mar 19
Posts: 7
Posted: Thu, 2019-06-06 08:22

Hi,

Here are the steps I took for this demo:

  • 1. Both devices are programmed with the same FW
  • 2. Both devices are powered and listed in the mobile app 
  • 3. The first device is onboarded as the coordinator and sensor data is read, please find the logs below:
  •  
Onboard: OpenStack().
Onboard: Bluetooth Stack ID: 1.
Onboard: Number ACL Buffers: 16, ACL Buffer Size: 81
Onboard: BD_ADDR: 0x239999F0FD8C
Onboard: BD_ADDR: 23:99:99:f0:fd:8c
Onboard: Successfully registered Zigbee Onboard Service, ServiceID = 4.
Onboard: Successfully registered Offline Onboard Service, ServiceID = 5.
Onboard: Initialized AWS
Onboard: Waiting for OFFLINE_Recv event
 
 
Onboard: /*---------------------------------------------------------------*/
Onboard:                Image build time: Fri Apr 12 18:51:00 2019
Onboard:                Chipset version : qca4020
Onboard:                RTOS            : threadx
Onboard:                Onboarding VIA   : BLE
Onboard:                 Onboardable Radios:
Onboard:                        WIFI
Onboard:                        ZIGBEE
Onboard: /*-----------------------------------------------------------------*/
Onboard: read_wifi_config
 
Command List:
  Commands:
     0. Ver
     1. Help
     2. Exit
 
  Subgroups:
     3. Onboard
 
 
>
Onboard: Onboard Credentials Not stored
Onboard: read_zigbee_config
Onboard: Onboard Credentials Not stored
Onboard: Thermo_stat_values already loadedbytes_read num = 1
Onboard:    GAP_LE_Advertising_Enable success, Advertising Interval Range: 100 - 200.
 
Onboard: Waiting for Onboard events ...
Onboard: Monitor Thread is runnning ----------------------
Onboard: Rised signal: 8
Onboard: waiting on Monitor thread
Onboard: pir signal reached
Onboard: pir offline breach
Onboard: BD_ADDR: 23:99:99:f0:fd:8c
Onboard: Pir message: {"QCA4020_f0fd8c":{"message":"Motion detected"}}
 
Onboard: Waiting for Onboard events ...
Onboard:            total       used       free
Onboard: Heap:     173568     105792      67776
Onboard: mutex unlock done ---------
Onboard: waiting on Monitor thread
Onboard: etLE_Connection_Complete with size 24.
Onboard:    Status:              0x00.
Onboard:    Role:                Slave.
Onboard:    Address Type:        QAPI_BLE_LAT_RANDOM_E.
Onboard:    BD_ADDR:             0x4895AF895D0C.
Onboard:    Connection Interval: 49.
Onboard:    Slave Latency:       0.
 
>
Onboard: etGATT_Connection_Device_Connection with size 16:
Onboard:    Connection ID:   1.
Onboard:    Connection Type: LE.
Onboard:    Remote Device:   0x4895AF895D0C.
Onboard:    Connection MTU:  23.
 
Onboard: Selected Remote Device:
Onboard:    Address:       0x4895AF895D0C
Onboard:    ID:            1
 
>
Onboard: etLE_Channel_Selection_Algorithm_Update with size 16.
Onboard:   Channel Selection Algorithm:        CSA #1.
Onboard:   Connection Address Type:            QAPI_BLE_LAT_RANDOM_E.
Onboard:   Connection Address:                 0x4895AF895D0C.
 
>
Onboard: etLE_Authentication with size 96.
Onboard: Extended Pairing Request: 0x4895AF895D0C.
Onboard:    IO Capability:       Keyboard/Display.
Onboard:    Bonding Type:        Bonding.
Onboard:    MITM:                TRUE.
Onboard:    Secure Connections:  TRUE.
Onboard:    OOB:                 OOB Not Present.
Onboard:    Encryption Key Size: 16.
Onboard:    Sending Keys:
Onboard:       LTK:              YES.
Onboard:       IRK:              YES.
Onboard:       CSRK:             YES.
Onboard:       Link Key:         YES.
Onboard:    Receiving Keys:
Onboard:       LTK:              YES.
Onboard:       IRK:              YES.
Onboard:       CSRK:             YES.
Onboard:       Link Key:         YES.
Onboard: Sending Pairing Response to 0x4895AF895D0C.
Onboard: GAP_LE_Authentication_Response returned 0.
 
>
Onboard: Exchange MTU Response.
Onboard: Connection ID:   1.
Onboard: Transaction ID:  1.
Onboard: Connection Type: LE.
Onboard: BD_ADDR:         0x4895AF895D0C.
Onboard: MTU:             517.
 
>
Onboard: etLE_Connection_Parameter_Update_Request with size 14.
Onboard:    BD_ADDR:                     0x4895AF895D0C
Onboard:    Connection Interval Minimum: 8
Onboard:    Connection Interval Maximum: 8
Onboard:    Slave Latency:               0
Onboard:    Supervision Timeout:         5000
 
>
Onboard: etLE_Authentication with size 96.
Onboard: latExtendedConfirmationRequest.
Onboard:    Secure Connections:     YES.
Onboard:    Just Works Pairing:     NO.
Onboard:    Keypress Notifications: NO.
Onboard: Passkey: 123456.
 
>
Onboard: etLE_Connection_Parameter_Updated with size 14.
Onboard:    BD_ADDR:             0x4895AF895D0C
Onboard:    Status:              0
Onboard:    Connection Interval: 8
Onboard:    Slave Latency:       0
Onboard:    Supervision Timeout: 5000
 
>
Onboard: etLE_Encryption_Change with size 12.
 
>
Onboard: etLE_Authentication with size 96.
Onboard:  Encryption Information from RemoteDevice: 0x4895AF895D0C.
Onboard:                              Key Size: 16.
 
>
Onboard: etLE_Authentication with size 96.
Onboard: Identity Information Request 0x4895AF895D0C.
Onboard:    qapi_BLE_GAP_LE_Authentication_Response (larEncryptionInformation) success.
 
>
Onboard: etLE_Authentication with size 96.
Onboard:  Identity Information from RemoteDevice: 0x4895AF895D0C.
 
>
Onboard: etLE_Authentication with size 96.
Onboard: Pairing Status: 0x4895AF895D0C.
Onboard:         Status: 0x00.
Onboard:         Key Size: 16.
 
>
Onboard: etLE_Connection_Parameter_Update_Request with size 14.
Onboard:    BD_ADDR:                     0x4895AF895D0C
Onboard:    Connection Interval Minimum: 49
Onboard:    Connection Interval Maximum: 49
Onboard:    Slave Latency:               0
Onboard:    Supervision Timeout:         5000
 
>
Onboard: etLE_Connection_Parameter_Updated with size 14.
Onboard:    BD_ADDR:             0x4895AF895D0C
Onboard:    Status:              0
Onboard:    Connection Interval: 49
Onboard:    Slave Latency:       0
Onboard:    Supervision Timeout: 5000
 
>
Onboard: Zigbee LinkKey gnZ49JfYQMznVPGw
Onboard: Zigbee Mode c
Onboard:            total       used       free
Onboard: Heap:     173568     109328      64240
Onboard: mutex unlock done ---------
Onboard: waiting on Monitor thread
Onboard: Initiate Zigbee Onboarding
Onboard: Op_Mode:c
Onboard: Master_key=gnZ49JfYQMznVPGw
Onboard: bytes_written num = 1
Onboard: bytes_written num = 16
Onboard: Rised signal: 4
Onboard: config_zigbee
Onboard: Starting Zigbee
Onboard: Starting ZB CO-Ordinator
Onboard:    GAP_LE_Advertising_Disable returned -1.
Onboard:  Enable Co-ordinator UUID added
Onboard:    GAP_LE_Advertising_Enable success, Advertising Interval Range: 100 - 200.
Onboard: ZigBee stack initialized.
Onboard: Extended Address: 000023A999F0FD8C
Onboard: >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Onboard: Zigbehandle: 00000001
Onboard: Mac Value 99f0fd8c
Onboard: Successfully set Extended Address
Onboard: Extended Address: 000000FF99F0FD8C
Onboard: Short Address:    0xFFFF
Onboard: Successfully created Zigbee network
Onboard: Timer Set PermitTime 255 sec
Onboard: Permitted to join
Onboard: Timer is Set
Onboard: In ZCL_OnOff_Demo_Create_Client, Endpoint = 111
Onboard: In ZCL_OnOff_Demo_Create_Client, Endpoint = 113
Onboard: Zigbee is configured successfully
 
Onboard: Waiting for Onboard events ...
Onboard: Form confirm
Onboard:   Status:  0
Onboard:   Channel: 21
 
>
Onboard: etGATT_Connection_Device_Disconnection with size 16:
Onboard:    Connection ID:   1.
Onboard:    Connection Type: LE.
Onboard:    Remote Device:   0x4895AF895D0C.
 
>
Onboard: etLE_Disconnection_Complete with size 16.
Onboard:    Status: 0x00.
Onboard:    Reason: 0x13.
Onboard:    BD_ADDR: 0x4895AF895D0C.
Onboard:  Enable Co-ordinator UUID added
Onboard:    GAP_LE_Advertising_Enable returned -66.
 
>
Onboard:            total       used       free
Onboard: Heap:     173568     154688      18880
Onboard: mutex unlock done ---------
Onboard: waiting on Monitor thread
Onboard:            total       used       free
Onboard: Heap:     173568     154688      18880
Onboard: mutex unlock done ---------
Onboard: waiting on Monitor thread
Onboard:            total       used       free
Onboard: Heap:     173568     154688      18880
Onboard: mutex unlock done ---------
Onboard: waiting on Monitor thread
Onboard:            total       used       free
Onboard: Heap:     173568     154688      18880
Onboard: mutex unlock done ---------
Onboard: waiting on Monitor thread
Onboard:            total       used       free
Onboard: Heap:     173568     154688      18880
Onboard: mutex unlock done ---------
Onboard: waiting on Monitor thread
Onboard:            total       used       free
Onboard: Heap:     173568     154688      18880
Onboard: mutex unlock done ---------
Onboard: waiting on Monitor thread
Onboard:            total       used       free
Onboard: Heap:     173568     154688      18880
Onboard: mutex unlock done ---------
Onboard: waiting on Monitor thread
Onboard: etLE_Connection_Complete with size 24.
Onboard:    Status:              0x00.
Onboard:    Role:                Slave.
Onboard:    Address Type:        QAPI_BLE_LAT_RANDOM_E.
Onboard:    BD_ADDR:             0x4D19914D0979.
Onboard:    Connection Interval: 49.
Onboard:    Slave Latency:       0.
 
Onboard: Resolved Address (0x4D19914D0979)
Onboard:    Identity Address:       0x68E7C26D123C
Onboard:    Identity Address Type:  Random Identity
 
>
Onboard: etGATT_Connection_Device_Connection with size 16:
Onboard:    Connection ID:   2.
Onboard:    Connection Type: LE.
Onboard:    Remote Device:   0x4D19914D0979.
Onboard:    Connection MTU:  23.
 
Onboard: Selected Remote Device:
Onboard:    Address:       0x4D19914D0979
Onboard:    ID:            2
 
>
Onboard: etLE_Channel_Selection_Algorithm_Update with size 16.
Onboard:   Channel Selection Algorithm:        CSA #1.
Onboard:   Connection Address Type:            QAPI_BLE_LAT_RANDOM_E.
Onboard:   Connection Address:                 0x4D19914D0979.
 
>
Onboard: etLE_Authentication with size 96.
Onboard: Extended Pairing Request: 0x4D19914D0979.
Onboard:    IO Capability:       Keyboard/Display.
Onboard:    Bonding Type:        Bonding.
Onboard:    MITM:                TRUE.
Onboard:    Secure Connections:  TRUE.
Onboard:    OOB:                 OOB Not Present.
Onboard:    Encryption Key Size: 16.
Onboard:    Sending Keys:
Onboard:       LTK:              YES.
Onboard:       IRK:              YES.
Onboard:       CSRK:             YES.
Onboard:       Link Key:         YES.
Onboard:    Receiving Keys:
Onboard:       LTK:              YES.
Onboard:       IRK:              YES.
Onboard:       CSRK:             YES.
Onboard:       Link Key:         YES.
Onboard: Sending Pairing Response to 0x4D19914D0979.
Onboard: GAP_LE_Authentication_Response returned 0.
 
>
Onboard: Exchange MTU Response.
Onboard: Connection ID:   2.
Onboard: Transaction ID:  25.
Onboard: Connection Type: LE.
Onboard: BD_ADDR:         0x4D19914D0979.
Onboard: MTU:             517.
 
>
Onboard: etLE_Connection_Parameter_Update_Request with size 14.
Onboard:    BD_ADDR:                     0x4D19914D0979
Onboard:    Connection Interval Minimum: 8
Onboard:    Connection Interval Maximum: 8
Onboard:    Slave Latency:               0
Onboard:    Supervision Timeout:         5000
 
>
Onboard: etLE_Authentication with size 96.
Onboard: latExtendedConfirmationRequest.
Onboard:    Secure Connections:     YES.
Onboard:    Just Works Pairing:     NO.
Onboard:    Keypress Notifications: NO.
Onboard: Passkey: 123456.
 
>
Onboard: etLE_Connection_Parameter_Updated with size 14.
Onboard:    BD_ADDR:             0x4D19914D0979
Onboard:    Status:              0
Onboard:    Connection Interval: 8
Onboard:    Slave Latency:       0
Onboard:    Supervision Timeout: 5000
 
>
Onboard: etLE_Encryption_Change with size 12.
 
>
Onboard: etLE_Authentication with size 96.
Onboard:  Encryption Information from RemoteDevice: 0x4D19914D0979.
Onboard:                              Key Size: 16.
 
>
Onboard: etLE_Authentication with size 96.
Onboard: Identity Information Request 0x4D19914D0979.
Onboard:    qapi_BLE_GAP_LE_Authentication_Response (larEncryptionInformation) success.
 
>
Onboard: etLE_Authentication with size 96.
Onboard:  Identity Information from RemoteDevice: 0x4D19914D0979.
 
>
Onboard: etLE_Authentication with size 96.
Onboard: Pairing Status: 0x4D19914D0979.
Onboard:         Status: 0x00.
Onboard:         Key Size: 16.
 
>
Onboard: etLE_Connection_Parameter_Update_Request with size 14.
Onboard:    BD_ADDR:                     0x4D19914D0979
Onboard:    Connection Interval Minimum: 49
Onboard:    Connection Interval Maximum: 49
Onboard:    Slave Latency:               0
Onboard:    Supervision Timeout:         5000
 
>
Onboard: etLE_Connection_Parameter_Updated with size 14.
Onboard:    BD_ADDR:             0x4D19914D0979
Onboard:    Status:              0
Onboard:    Connection Interval: 49
Onboard:    Slave Latency:       0
Onboard:    Supervision Timeout: 5000
 
>
Onboard:  Length of the Data 38
Onboard: Json buffer: {"getList":{"dName":"QCA4020_f0fd8c"}}
Onboard: tokens: 5
Onboard: keyword :getList
Onboard: parent_id: 1
Onboard: parent_id: 2
Onboard: parent_id: 3
Onboard: Inside_t[i].Parent:
Onboard: BD_ADDR: 23:99:99:f0:fd:8c
Onboard: local device name: "QCA4020_f0fd8c"
Onboard: Device_name:"QCA4020_f0fd8c"
Onboard: construct_dlist_response
Onboard: BD_ADDR: 23:99:99:f0:fd:8c
Onboard: Process flag : 1
Onboard: offline_send_buf : {"dList":[{"dName":"QCA4020_f0fd8c"}]}
Onboard: Waiting for OFFLINE_Recv event
Onboard: Process flag : 2
Onboard: buffer sending: {"dList":[{"dName":"QCA4020_f0fd8c"}]}
Onboard: Process flag : 0
Onboard:  Length of the Data 38
Onboard: Json buffer: {"getList":{"dName":"QCA4020_f0fd8c"}}
Onboard: tokens: 5
Onboard: keyword :getList
Onboard: parent_id: 1
Onboard: parent_id: 2
Onboard: parent_id: 3
Onboard: Inside_t[i].Parent:
Onboard: BD_ADDR: 23:99:99:f0:fd:8c
Onboard: local device name: "QCA4020_f0fd8c"
Onboard: Device_name:"QCA4020_f0fd8c"
Onboard: construct_dlist_response
Onboard: Process flag : 1
Onboard: BD_ADDR: 23:99:99:f0:fd:8c
Onboard: offline_send_buf : {"dList":[{"dName":"QCA4020_f0fd8c"}]}
Onboard: Waiting for OFFLINE_Recv event
Onboard: Process flag : 2
Onboard: buffer sending: {"dList":[{"dName":"QCA4020_f0fd8c"}]}
Onboard: Process flag : 0
Onboard:  Length of the Data 38
Onboard: Json buffer: {"getList":{"dName":"QCA4020_f0fd8c"}}
Onboard: tokens: 5
Onboard: keyword :getList
Onboard: parent_id: 1
Onboard: parent_id: 2
Onboard: parent_id: 3
Onboard: Inside_t[i].Parent:
Onboard: BD_ADDR: 23:99:99:f0:fd:8c
Onboard: local device name: "QCA4020_f0fd8c"
Onboard: Device_name:"QCA4020_f0fd8c"
Onboard: construct_dlist_response
Onboard: Process flag : 1
Onboard: BD_ADDR: 23:99:99:f0:fd:8c
Onboard: offline_send_buf : {"dList":[{"dName":"QCA4020_f0fd8c"}]}
Onboard: Waiting for OFFLINE_Recv event
Onboard:            total       used       free
Onboard: Heap:     173568     154888      18680
Onboard: mutex unlock done ---------
Onboard: waiting on Monitor thread
Onboard: Process flag : 2
Onboard: buffer sending: {"dList":[{"dName":"QCA4020_f0fd8c"}]}
Onboard: Process flag : 0
Onboard:  Length of the Data 38
Onboard: Json buffer: {"getList":{"dName":"QCA4020_f0fd8c"}}
Onboard: tokens: 5
Onboard: keyword :getList
Onboard: parent_id: 1
Onboard: parent_id: 2
Onboard: parent_id: 3
Onboard: Inside_t[i].Parent:
Onboard: BD_ADDR: 23:99:99:f0:fd:8c
Onboard: local device name: "QCA4020_f0fd8c"
Onboard: Device_name:"QCA4020_f0fd8c"
Onboard: Process flag : 1
Onboard: construct_dlist_response
Onboard: BD_ADDR: 23:99:99:f0:fd:8c
Onboard: offline_send_buf : {"dList":[{"dName":"QCA4020_f0fd8c"}]}
Onboard: Waiting for OFFLINE_Recv event
Onboard: Process flag : 2
Onboard: buffer sending: {"dList":[{"dName":"QCA4020_f0fd8c"}]}
Onboard: Process flag : 0
Onboard:  Length of the Data 38
Onboard: Json buffer: {"getList":{"dName":"QCA4020_f0fd8c"}}
Onboard: tokens: 5
Onboard: keyword :getList
Onboard: parent_id: 1
Onboard: parent_id: 2
Onboard: parent_id: 3
Onboard: Inside_t[i].Parent:
Onboard: BD_ADDR: 23:99:99:f0:fd:8c
Onboard: local device name: "QCA4020_f0fd8c"
Onboard: Device_name:"QCA4020_f0fd8c"
Onboard: construct_dlist_response
Onboard: BD_ADDR: 23:99:99:f0:fd:8c
Onboard: Process flag : 1
Onboard: offline_send_buf : {"dList":[{"dName":"QCA4020_f0fd8c"}]}
Onboard: Waiting for OFFLINE_Recv event
Onboard: Process flag : 2
Onboard: buffer sending: {"dList":[{"dName":"QCA4020_f0fd8c"}]}
Onboard: Process flag : 0
Onboard:  Length of the Data 38
Onboard: Json buffer: {"getList":{"dName":"QCA4020_f0fd8c"}}
Onboard: tokens: 5
Onboard: keyword :getList
Onboard: parent_id: 1
Onboard: parent_id: 2
Onboard: parent_id: 3
Onboard: Inside_t[i].Parent:
Onboard: BD_ADDR: 23:99:99:f0:fd:8c
Onboard: local device name: "QCA4020_f0fd8c"
Onboard: Device_name:"QCA4020_f0fd8c"
Onboard: construct_dlist_response
Onboard: BD_ADDR: 23:99:99:f0:fd:8c
Onboard: offline_send_buf : {"dList":[{"dName":"QCA4020_f0fd8c"}]}
Onboard: Process flag : 1
Onboard: Waiting for OFFLINE_Recv event
Onboard: buffer sending: {"dList":[{"dName":"QCA4020_f0fd8c"}]}
Onboard: Process flag : 0
Onboard: Process flag : 0
Onboard:  Length of the Data 57
Onboard: Json buffer: {"sensors":{"QCA4020_f0fd8c":{"dName":"QCA4020_f0fd8c"}}}
Onboard: tokens: 7
Onboard: keyword :sensors
Onboard: BD_ADDR: 23:99:99:f0:fd:8c
Onboard: Device_name: "QCA4020_f0fd8c"
Onboard: BD_ADDR: 23:99:99:f0:fd:8c
Onboard: BD_ADDR: 23:99:99:f0:fd:8c
Onboard: Update_flag = 2
Onboard:   ------  Temperature ------
Onboard: DegCx8 T0:0xa2  T1:0xe  T0_T_MSB:c4
Onboard: Process flag : 1
Onboard: DegCx8 with MSB T0:0xa2  T1:0x10e
Onboard: register 2's comp T0:3 T1:725 T:488
Onboard: DegCx8 T0:162 T1:270 Tx10:2345
Onboard: Current Temperature:29.3
 
Onboard: ------  Relative Humidity ------
Onboard: rHx2 H0:0x3f  H1:0x89
Onboard: 2's comp H0_T0:-12 H1_T0:-11137 H:-5216
Onboard: rHx2 Hx10:976
Onboard: Current rH:48.8% rH
Onboard:   ------  Temperature ------
Onboard: DegCx8 T0:0xa2  T1:0xe  T0_T_MSB:c4
Onboard: DegCx8 with MSB T0:0xa2  T1:0x10e
Onboard: register 2's comp T0:3 T1:725 T:487
Onboard: DegCx8 T0:162 T1:270 Tx10:2343
Onboard: Current Temperature:29.2
 
Onboard: ------  Relative Humidity ------
Onboard: rHx2 H0:0x3f  H1:0x89
Onboard: 2's comp H0_T0:-12 H1_T0:-11137 H:-5230
Onboard: rHx2 Hx10:977
Onboard: Current rH:48.8% rH
Onboard: CH 1:16795   CH 0:28672
Onboard: Light ch0 Lux=286
Onboard: light sensor value : 286, gain:7, ch0:28672
Onboard: -------------------------------------------Pressure=0x0004B4FC
Onboard: Temp=0x000823F0
Onboard: Current Temp DegC=5.81
Onboard: Pressure_sensor_calculated: 1002.794739
Onboard: Compass return value: 0
Onboard: HX:-5   HY:247   HZ:173
Onboard: TEMP:28   X_G:237   Y_G:-368   Z_G:-494
Onboard: X_G:1.036875   Y_G:-1.610000   Z_G:-2.161250
Onboard: X_XL:466   Y_XL:-216   Z_XL:16423
Onboard: X_XL:1.036875   Y_XL:-1.610000   Z_XL:-2.161250
Onboard: TEMP:28   X_G:240   Y_G:-360   Z_G:-499
Onboard: X_G:1.036875   Y_G:-1.610000   Z_G:-2.161250
Onboard: X_XL:449   Y_XL:-183   Z_XL:16412
Onboard: X_XL:0.268412   Y_XL:-0.109397   Z_XL:9.811093
Onboard: BD_ADDR: 23:99:99:f0:fd:8c
Onboard: Breach buf: {"QCA4020_f0fd8c":{"message": "Thermostat threshold breached"}}
Onboard: Waiting for OFFLINE_Recv event
Onboard: Process flag : 2
Onboard: buffer sending: {"reported":{"QCA4020_f0fd8c":{"temp":{"temp_id1":29.3},"hum":{"humidity_id1":48.8},"amb":{"light_senor_id1":286},"thermo":{"thermostat_id1":{"actual":27,"op_mode":"AUTO","desired":22,"op_state":"AC_ON","threshold":2}},"pres":{"pressure_sensor_id1":1002.79},"comp":{"compass_id1":{"X":-5,"Y":247,"Z":173}},"gyro":{"gyro_id1":{"X":1.04,"Y":-1.61,"Z":-2.16}},"accel":{"accelerometer_id1":{"X":0.27,"Y":-0.11,"Z":9.81}}}}}
Onboard: Process flag : 0
Onboard:  Length of the Data 57
Onboard: Json buffer: {"sensors":{"QCA4020_f0fd8c":{"dName":"QCA4020_f0fd8c"}}}
Onboard: tokens: 7
Onboard: keyword :sensors
Onboard: BD_ADDR: 23:99:99:f0:fd:8c
Onboard: Device_name: "QCA4020_f0fd8c"
Onboard: BD_ADDR: 23:99:99:f0:fd:8c
Onboard: BD_ADDR: 23:99:99:f0:fd:8c
Onboard: Update_flag = 2

4.  Then the second device is onboarded and here it is already observed in the mobile app that the mode is set to Coordinator once again. Please find logs for the end device below:

Onboard: OpenStack().
Onboard: Bluetooth Stack ID: 1.
Onboard: Number ACL Buffers: 16, ACL Buffer Size: 81
Onboard: BD_ADDR: 0x049399F0FD8C
Onboard: BD_ADDR: 04:93:99:f0:fd:8c
Onboard: Successfully registered Zigbee Onboard Service, ServiceID = 4.
Onboard: Successfully registered Offline Onboard Service, ServiceID = 5.
Onboard: Initialized AWS
Onboard: Waiting for OFFLINE_Recv event
 
 
Onboard: /*---------------------------------------------------------------*/
Onboard:                Image build time: Fri Apr 12 18:51:00 2019
Onboard:                Chipset version : qca4020
Onboard:                RTOS            : threadx
Onboard:                Onboarding VIA   : BLE
Onboard:                 Onboardable Radios:
Onboard:                        WIFI
Onboard:                        ZIGBEE
Onboard: /*-----------------------------------------------------------------*/
Onboard: read_wifi_config
 
Command List:
  Commands:
     0. Ver
     1. Help
     2. Exit
 
  Subgroups:
     3. Onboard
 
 
>
Onboard: Onboard Credentials Not stored
Onboard: read_zigbee_config
Onboard: Onboard Credentials Not stored
Onboard: Thermo_stat_values already loadedbytes_read num = 1
Onboard:    GAP_LE_Advertising_Enable success, Advertising Interval Range: 100 - 200.
 
Onboard: Waiting for Onboard events ...
Onboard: Monitor Thread is runnning ----------------------
Onboard: Rised signal: 8
Onboard: waiting on Monitor thread
Onboard: pir signal reached
Onboard: pir offline breach
Onboard: BD_ADDR: 04:93:99:f0:fd:8c
Onboard: Pir message: {"QCA4020_f0fd8c":{"message":"Motion detected"}}
 
Onboard: Waiting for Onboard events ...
Onboard: etLE_Connection_Complete with size 24.
Onboard:    Status:              0x00.
Onboard:    Role:                Slave.
Onboard:    Address Type:        QAPI_BLE_LAT_RANDOM_E.
Onboard:    BD_ADDR:             0x73B53969A814.
Onboard:    Connection Interval: 49.
Onboard:    Slave Latency:       0.
 
>
Onboard: etGATT_Connection_Device_Connection with size 16:
Onboard:    Connection ID:   1.
Onboard:    Connection Type: LE.
Onboard:    Remote Device:   0x73B53969A814.
Onboard:    Connection MTU:  23.
 
Onboard: Selected Remote Device:
Onboard:    Address:       0x73B53969A814
Onboard:    ID:            1
 
>
Onboard: etLE_Channel_Selection_Algorithm_Update with size 16.
Onboard:   Channel Selection Algorithm:        CSA #1.
Onboard:   Connection Address Type:            QAPI_BLE_LAT_RANDOM_E.
Onboard:   Connection Address:                 0x73B53969A814.
 
>
Onboard: etLE_Authentication with size 96.
Onboard: Extended Pairing Request: 0x73B53969A814.
Onboard:    IO Capability:       Keyboard/Display.
Onboard:    Bonding Type:        Bonding.
Onboard:    MITM:                TRUE.
Onboard:    Secure Connections:  TRUE.
Onboard:    OOB:                 OOB Not Present.
Onboard:    Encryption Key Size: 16.
Onboard:    Sending Keys:
Onboard:       LTK:              YES.
Onboard:       IRK:              YES.
Onboard:       CSRK:             YES.
Onboard:       Link Key:         YES.
Onboard:    Receiving Keys:
Onboard:       LTK:              YES.
Onboard:       IRK:              YES.
Onboard:       CSRK:             YES.
Onboard:       Link Key:         YES.
Onboard: Sending Pairing Response to 0x73B53969A814.
Onboard: GAP_LE_Authentication_Response returned 0.
 
>
Onboard: Exchange MTU Response.
Onboard: Connection ID:   1.
Onboard: Transaction ID:  1.
Onboard: Connection Type: LE.
Onboard: BD_ADDR:         0x73B53969A814.
Onboard: MTU:             517.
 
>
Onboard: etLE_Connection_Parameter_Update_Request with size 14.
Onboard:    BD_ADDR:                     0x73B53969A814
Onboard:    Connection Interval Minimum: 8
Onboard:    Connection Interval Maximum: 8
Onboard:    Slave Latency:               0
Onboard:    Supervision Timeout:         5000
 
>
Onboard: etLE_Authentication with size 96.
Onboard: latExtendedConfirmationRequest.
Onboard:    Secure Connections:     YES.
Onboard:    Just Works Pairing:     NO.
Onboard:    Keypress Notifications: NO.
Onboard: Passkey: 123456.
 
>
Onboard: etLE_Connection_Parameter_Updated with size 14.
Onboard:    BD_ADDR:             0x73B53969A814
Onboard:    Status:              0
Onboard:    Connection Interval: 8
Onboard:    Slave Latency:       0
Onboard:    Supervision Timeout: 5000
 
>
Onboard: etLE_Encryption_Change with size 12.
 
>
Onboard: etLE_Authentication with size 96.
Onboard:  Encryption Information from RemoteDevice: 0x73B53969A814.
Onboard:                              Key Size: 16.
 
>
Onboard: etLE_Authentication with size 96.
Onboard: Identity Information Request 0x73B53969A814.
Onboard:    qapi_BLE_GAP_LE_Authentication_Response (larEncryptionInformation) success.
 
>
Onboard: etLE_Authentication with size 96.
Onboard:  Identity Information from RemoteDevice: 0x73B53969A814.
 
>
Onboard: etLE_Authentication with size 96.
Onboard: Pairing Status: 0x73B53969A814.
Onboard:         Status: 0x00.
Onboard:         Key Size: 16.
 
>
Onboard: etLE_Connection_Parameter_Update_Request with size 14.
Onboard:    BD_ADDR:                     0x73B53969A814
Onboard:    Connection Interval Minimum: 49
Onboard:    Connection Interval Maximum: 49
Onboard:    Slave Latency:               0
Onboard:    Supervision Timeout:         5000
 
>
Onboard: etLE_Connection_Parameter_Updated with size 14.
Onboard:    BD_ADDR:             0x73B53969A814
Onboard:    Status:              0
Onboard:    Connection Interval: 49
Onboard:    Slave Latency:       0
Onboard:    Supervision Timeout: 5000
 
>
Onboard:            total       used       free
Onboard: Heap:     173568     109320      64248
Onboard: mutex unlock done ---------
Onboard: waiting on Monitor thread
Onboard: Zigbee LinkKey gnZ49JfYQMznVPGw
Onboard: Zigbee Mode c
Onboard: Initiate Zigbee Onboarding
Onboard: Op_Mode:c
Onboard: Master_key=gnZ49JfYQMznVPGw
Onboard: bytes_written num = 1
Onboard: bytes_written num = 16
Onboard: Rised signal: 4
Onboard: config_zigbee
Onboard: Starting Zigbee
Onboard: Starting ZB CO-Ordinator
Onboard:    GAP_LE_Advertising_Disable returned -1.
Onboard:  Enable Co-ordinator UUID added
Onboard:    GAP_LE_Advertising_Enable success, Advertising Interval Range: 100 - 200.
Onboard: ZigBee stack initialized.
Onboard: Extended Address: 000004A399F0FD8C
Onboard: >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Onboard: Zigbehandle: 00000001
Onboard: Mac Value 99f0fd8c
Onboard: Successfully set Extended Address
Onboard: Extended Address: 000000FF99F0FD8C
Onboard: Short Address:    0xFFFF
Onboard: Successfully created Zigbee network
Onboard: Timer Set PermitTime 255 sec
Onboard: Permitted to join
Onboard: Timer is Set
Onboard: In ZCL_OnOff_Demo_Create_Client, Endpoint = 111
Onboard: In ZCL_OnOff_Demo_Create_Client, Endpoint = 113
Onboard: Zigbee is configured successfully
 
Onboard: Waiting for Onboard events ...
Onboard:            total       used       free
Onboard: Heap:     173568     154888      18680
Onboard: mutex unlock done ---------
Onboard: waiting on Monitor thread
Onboard: Form confirm
Onboard:   Status:  0
Onboard:   Channel: 23
 
>
Onboard: etGATT_Connection_Device_Disconnection with size 16:
Onboard:    Connection ID:   1.
Onboard:    Connection Type: LE.
Onboard:    Remote Device:   0x73B53969A814.
 
>
Onboard: etLE_Disconnection_Complete with size 16.
Onboard:    Status: 0x00.
Onboard:    Reason: 0x13.
Onboard:    BD_ADDR: 0x73B53969A814.
Onboard:  Enable Co-ordinator UUID added
Onboard:    GAP_LE_Advertising_Enable returned -66.
 
>
Onboard:            total       used       free
Onboard: Heap:     173568     154680      18888
Onboard: mutex unlock done ---------
Onboard: waiting on Monitor thread
 
  • Up0
  • Down0
c_rpedad
Profile picture
Join Date: 18 Jun 18
Location: San Jose
Posts: 317
Posted: Thu, 2019-06-06 13:51

Thank you for sharing the logs,

As part of onboard we assign the device name based on last 8bytes if the Device BLE MAC address in case of onboard without cloud mode demo.

Since both devices have same last 8 bytes ( 99:f0:fd:8c): you are not able to assign as end device
Device 1 :  BD_ADDR: 23:99:99:f0:fd:8c
Device 2: BD_ADDR: 04:93:99:f0:fd:8c

you can verify this by seeing the Zigbee initialization part of both log captures:
Device 1:

Onboard: ZigBee stack initialized.
Onboard: Extended Address: 000023A999F0FD8C
Onboard: >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Onboard: Zigbehandle: 00000001
Onboard: Mac Value 99f0fd8c
Onboard: Successfully set Extended Address
Onboard: Extended Address: 000000FF99F0FD8C
Onboard: Short Address:    0xFFFF
Onboard: Successfully created Zigbee network
Onboard: Timer Set PermitTime 255 sec
 
Device 2:
Onboard: ZigBee stack initialized.
Onboard: Extended Address: 000004A399F0FD8C
Onboard: >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Onboard: Zigbehandle: 00000001
Onboard: Mac Value 99f0fd8c
Onboard: Successfully set Extended Address
Onboard: Extended Address: 000000FF99F0FD8C
Onboard: Short Address:    0xFFFF
Onboard: Successfully created Zigbee network
Onboard: Timer Set PermitTime 255 sec


In order to resolve the above issue, you can use a different device where the BLE MAC address(last 8bits) doesnt match  or
You can rewrite the BLE MAC address in NVM and flash on other device.

To rewrite the BLE address using NVM file:
Edit @target\quartz\nvm\config\2.0\4040\CDB\QCA4020_2p0.nvm file and rewrite the TagNum 5 (Tag number 5 is used to allow a customer to program their own public Bluetooth address to differentiate from the one stored in OTP.)

[Tag2]
TagNum = 5
TagLength = 6
TagValue = 01 02 03 04 05 06


 

 

  • Up0
  • Down0
JBloom
Join Date: 20 Mar 19
Posts: 7
Posted: Fri, 2019-06-07 03:34

Hi raja_pedada,

I've changed the MAC address as you described and the demo works!

Thanks a lot!

Regards,

JBloom

  • Up0
  • Down0
or Register

Opinions expressed in the content posted here are the personal opinions of the original authors, and do not necessarily reflect those of Qualcomm Incorporated or its subsidiaries (“Qualcomm”). The content is provided for informational purposes only and is not meant to be an endorsement or representation by Qualcomm or any other party. This site may also provide links or references to non-Qualcomm sites and resources. Qualcomm makes no representations, warranties, or other commitments whatsoever about any non-Qualcomm sites or third-party resources that may be referenced, accessible from, or linked to this site.