Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

AIROC™ Bluetooth

AKORICHE
Level 1
First solution authored 25 sign-ins 10 sign-ins
Level 1

Hello,

I am using the MESH KIT, I connected one card to an PC. I use terminal to communicate with the device. My application is sensor client and temperature sensor server. The PC is connected to the sensor client card. From WICED HCI UART Control Protocol and hci_control_api.h I send this command to get temperature : 19 65 16 00 00

I get the response from the two seonsors : 19 81 16 11 00 1F 00 CD 65 00 00 00 FE F7 6D 3D 56 21 4F
00 01 2E 19 81 16 11 00 24 00 CD 65 00 00 00 FE F7 6D 3D 56 21 4F 00 01
2E 

I Want to know what mean each bytes to parse it in my application. Could you provide me help ?

 

 

 

 

 

 

 

0 Likes
1 Solution
DheerajPK_41
Moderator
Moderator 750 replies posted 500 likes received 500 replies posted
Moderator

Hi,

Have you provisioned the sensor client and server devices into a network? May I know how did you do that? 

I would suggest you to use MeshClientControl helper application (Provisioner) for communicating with mesh devices through HCI UART (using WICED HCI control protocol). The source code is also available along with the SDK. Please have a look at wiced_bt_mesh_format_hci_header() in the source code for the command format. 

https://github.com/Infineon/btsdk-host-peer-apps-mesh/tree/master/host 

FYI.

https://github.com/Infineon/btsdk-docs/blob/master/docs/BT-SDK/WICED-HCI-Control-Protocol.pdf

Thanks,

-Dheeraj

View solution in original post

0 Likes
5 Replies
DheerajPK_41
Moderator
Moderator 750 replies posted 500 likes received 500 replies posted
Moderator

Hi,

May I know which tool are you using to send the command and where are you observing these commands and events.  Could you please share us the exact steps to reproduce the scenario for further debug.

Thanks,

-Dheeraj

0 Likes
AKORICHE
Level 1
First solution authored 25 sign-ins 10 sign-ins
Level 1

Hi,

The kit is CYBT-213043-MESH-EZ-BT.  The client and server are provisionned.
The command is send via RealTerm.

The first configuration is this way

AKORICHE_2-1627545503399.png

 


I open the port that correspond to HCI UART.

AKORICHE_0-1627545240735.png

Then the commands are send as follow

AKORICHE_1-1627545295020.png

The wiced BL SKD V3.00
Modus ToolBox 2.3



 

0 Likes
DheerajPK_41
Moderator
Moderator 750 replies posted 500 likes received 500 replies posted
Moderator

Hi,

Have you provisioned the sensor client and server devices into a network? May I know how did you do that? 

I would suggest you to use MeshClientControl helper application (Provisioner) for communicating with mesh devices through HCI UART (using WICED HCI control protocol). The source code is also available along with the SDK. Please have a look at wiced_bt_mesh_format_hci_header() in the source code for the command format. 

https://github.com/Infineon/btsdk-host-peer-apps-mesh/tree/master/host 

FYI.

https://github.com/Infineon/btsdk-docs/blob/master/docs/BT-SDK/WICED-HCI-Control-Protocol.pdf

Thanks,

-Dheeraj

0 Likes
AKORICHE
Level 1
First solution authored 25 sign-ins 10 sign-ins
Level 1

Hi ,
Yes I provisonned them. In the diffrent tests, I used the phone app, MeshClient and MeshclientControl.

My aim is to ccreate a network. There will be several nodes with sensor server and a client sensor controlled by the host MCU. The MCU will send command to the client sensor to get the data(able to do it) and configure the network. I helped my self with hci_control_api.h and reading the frames send via uart wirth RS232 analyser. I want to create and open a network (as with clientMeshCOntroller) by sending frame from my mcu host to client sensor node, Is it possible to do it with HCI command ?

Thanks,

Koriche

 

0 Likes
DheerajPK_41
Moderator
Moderator 750 replies posted 500 likes received 500 replies posted
Moderator

Hi,

Few more details.

HCI Header is 5 bytes. 0x19 < 2 octets opcode> < 2 octets length>
The command that he is sending has opcode 0x1665 and length of parameters 0 (19 65 16 00 00)
2 responses. Items in red contain mesh HCI header, and it is possible that we do not fil them in the sample app.
19
81 16        // opcode 0x1681
11 00        // length 17 bytes
1F 00        // src
CD 65       // dst
00 00        // app key index
00             // element index
FE             // RSSI
F7             // TTL
6D 3D      // company id
56 21       // opcode
4F 00       // WICED_BT_MESH_PROPERTY_PRESENT_AMBIENT_TEMPERATURE
01            // 1 byte
2E            // 23 degrees Celsius (the value is in 0.5 degrees)

 

19
81 16     // opcode 0x1681
11 00    // length 17 bytes
24 00 CD 65 00 00 00 FE F7 6D 3D 56 21
4F 00    // WICED_BT_MESH_PROPERTY_PRESENT_AMBIENT_TEMPERATURE
01         // 1 byte
2E          // 23 degrees Celsius (the value is in 0.5 degrees)

 

Thanks,

-Dheeraj

0 Likes