This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Yet another change device name question

I have been doing a bit  of searching and reading but I'm none the wiser.

I have a client that uses lots of BLE nRF51822 based modules made by Raytac Corporation in a classroom environment, there maybe 10 or more students trying to connect to 20 or more modules at the same time and all modules come up with the same screen name which becomes very messy.

I would like to change the device name so that a simple serial number (0-99) will come up on the screen display but it has to stay with the module itself and not just being renamed on the tablet or iPad.

Is this possible without reprogramming the chips using a programmer? Some threads seem to indicate that you have an app capable of doing this, if so which one in particular?

So we need "device-00", "device-01"... "device-99" programmed into the module itself so that when the students try to access their BLE devices will know which one is theirs by looking at a label that we will affix to the module.

Parents
  • Hi John,

    You need to update the firmware of the devices to add support for this using a programmer or OTA DFU, so it may be a bit of a problem if these devices are already in the field. Assuming you can program the devices once  you can do something like the following:

    1. Make sure the device name is writable (open), as indicated here.
    2. When there is a write to the device name characteristic:
      1. write that device name to flash using FDS so that it is can be read and used after any subsequent reset.
      2. call sd_ble_gap_device_name_set() with the new device name, and restart advertising if already advertising in order to use the new name, as indicated here.
    3. At startup, read the device name from flash and set it using sd_ble_gap_device_name_set().

    Please note that the phones may cash the device name for some time, so you may not necessarily see the new name when you scan with for example an iPhone until you connect to it.

Reply
  • Hi John,

    You need to update the firmware of the devices to add support for this using a programmer or OTA DFU, so it may be a bit of a problem if these devices are already in the field. Assuming you can program the devices once  you can do something like the following:

    1. Make sure the device name is writable (open), as indicated here.
    2. When there is a write to the device name characteristic:
      1. write that device name to flash using FDS so that it is can be read and used after any subsequent reset.
      2. call sd_ble_gap_device_name_set() with the new device name, and restart advertising if already advertising in order to use the new name, as indicated here.
    3. At startup, read the device name from flash and set it using sd_ble_gap_device_name_set().

    Please note that the phones may cash the device name for some time, so you may not necessarily see the new name when you scan with for example an iPhone until you connect to it.

Children
Related