This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Host application daemon for Bluetooth module (to change name of BT module based on BD Address of chip)

Hi,

I would like to know  is their any host application daemon available  for Bluetooth module, which used to change the configuration and Bluetooth module name based on the BD address of BT chip which reads from ROM.

As like hostapd in WLAN which generates and runs at bootup time, which makes to change the WIFi name according to bssid which red from ROM.

Please suggests

Thanks and regards

Basavaraj

  • Hi Basavaraj,

    That depends on the BT stack being used. Which stack are you using?
    If you are using BlueZ, the easiest way would be to do:

    Read Name: hciconfig hci0 name
    Write Name: hciconfig hci0 name 'test123'

    During every turn on, the BlueZ stack will read the BD address from: /var/lib/bluetooth/XX:XX:XX:XX:XX:XX/config and write it to the device.
    For the first turn on, the name is read from: /etc/bluetooth/main.conf

    So you can modify either of the files to suit your requirement.

    Regards,
    Gigi Joseph.
  • Hi Gigi

    Thank you for reply,

    yes, we are using bluez stack 4.1 version,

    These methods are allow to change the name manually from user in debugging/development stage,

    I would like to know is their any method to change BT name according to BD address red from ROM,

    For Ex :- my BD address which red ROM at bootup is "XX:XX:XX:XX:XX:25", so my BT module name should change as "my_bt_22" dynamically.

    Please explain to us if any such way

    Thanks and regards
    Basu
  • Hi Basu,

    This is a very unique requirement.
    As far as I know, there won't be any app that does it that already exists. You will have to write it yourself.

    Please see the API -> hci_write_local_name() - defined in BlueZ\lib\bluetooth\hci_lib.h

    If you are using Dbus, please see the "SetProperty" method in "Adapter" interface.

    Regards,
    Gigi Joseph.