How to change device name in SmartReady's App

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

cross mob
Anonymous
Not applicable

in the hello_sensor app, i tried to change the device name as below:

uint8_t hello_sensor_device_name[]          = "AnLuo";

char    hello_sensor_char_notify_value[]    = { 'A', 'L', ' ', '0', };

after build and download, the device name is still "Hello".

so, how to set the device name of one app?

0 Likes
1 Solution
MichaelF_56
Moderator
Moderator
Moderator
250 sign-ins 25 comments on blog 10 comments on blog

I'm not familiar with the SmartReady SDK as it has yet to be released to the Mass Market portfolio supported here on the community (use CSP for support), however, what you are trying to do should not be any different than WICED Smart (BLE) on the 2073XS.

There are essentially 2 places where we store the device name.


The one that you mentioned is used within advertisements. 

     /*.local_name                     =*/ "Hello",        // [LOCAL_NAME_LEN_MAX];

There is another instance which is stored in the GATT database.

CHARACTERISTIC_UUID16 (0x0015, 0x0016, UUID_CHARACTERISTIC_DEVICE_NAME,

                                     LEGATTDB_CHAR_PROP_READ, LEGATTDB_PERM_READABLE, 16),

       'H','e','l','l','o',0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,

To make sure that the name is not cached, you can change the device address in the Platforms\BCM020732TAG_Q32\... btp file

For example:

DLConfigBD_ADDRBase = "20732A001133"


Using this technique, the handset OS will see the new device.

Unable to change device name

View solution in original post

1 Reply
MichaelF_56
Moderator
Moderator
Moderator
250 sign-ins 25 comments on blog 10 comments on blog

I'm not familiar with the SmartReady SDK as it has yet to be released to the Mass Market portfolio supported here on the community (use CSP for support), however, what you are trying to do should not be any different than WICED Smart (BLE) on the 2073XS.

There are essentially 2 places where we store the device name.


The one that you mentioned is used within advertisements. 

     /*.local_name                     =*/ "Hello",        // [LOCAL_NAME_LEN_MAX];

There is another instance which is stored in the GATT database.

CHARACTERISTIC_UUID16 (0x0015, 0x0016, UUID_CHARACTERISTIC_DEVICE_NAME,

                                     LEGATTDB_CHAR_PROP_READ, LEGATTDB_PERM_READABLE, 16),

       'H','e','l','l','o',0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,

To make sure that the name is not cached, you can change the device address in the Platforms\BCM020732TAG_Q32\... btp file

For example:

DLConfigBD_ADDRBase = "20732A001133"


Using this technique, the handset OS will see the new device.

Unable to change device name