cancel
Showing results for 
Search instead for 
Did you mean: 

BlueNRG – Send/Receive Data.

Posted on October 05, 2015 at 11:21

My device is configured as a SERVER in an advertising mode.

ret = aci_gap_set_discoverable(ADV_NONCONN_IND, 160, 160, PUBLIC_ADDR, NO_WHITE_LIST_USE, sizeof(local_name), local_name, 0, NULL, 0, 0);

It sends an advertising beacon with a user data.

if (bluenrg_tx_count > period)
{
bluenrg_tx_count = 0;
ret = aci_gap_update_adv_data(sizeof(manuf_data), manuf_data);
}

The other side - CLIENT reads the data.

What if I want to get some data on the SERVER side? Can I do it in the same pattern by getting the advertising data from the CLIEN or should I implement services and characteristics in it?

4 REPLIES 4
Posted on October 05, 2015 at 11:34

Hi,

the ADV data type permits to obtain information from a server before a connection is establised, therefore from ADV data you can read the local name, TX power level, manufacturing data and so on.

In general, if you want to obatin more information of a peer device, you have to define services and characteristics.

In the package DK 1.8., you can find different IAR project as example (chat, sensor demo, etc...)

Regards,

GM

My device is configured as a SERVER in an advertising mode.

ret = aci_gap_set_discoverable(ADV_NONCONN_IND, 160, 160, PUBLIC_ADDR, NO_WHITE_LIST_USE, sizeof(local_name), local_name, 0, NULL, 0, 0);

It sends an advertising beacon with a user data.

if (bluenrg_tx_count > period)
{
bluenrg_tx_count = 0;
ret = aci_gap_update_adv_data(sizeof(manuf_data), manuf_data);
}

The other side - CLIENT reads the data.

What if I want to get some data on the SERVER side? Can I do it in the same pattern by getting the advertising data from the CLIEN or should I implement services and characteristics in it?

Posted on October 05, 2015 at 15:17

I understand that the ADV data type permits to obtain information from a server before a connection is established. Can I do the opposite? - obtain information from a client before a connection is established?

Posted on October 06, 2015 at 11:12

Hi,

You cannot obtain info from a client before the connection is established.

Without connection, you can obtain info only from ADV packet.

Regards,

GM

Posted on October 06, 2015 at 12:10

I see. Thank you.