0
votes

I have already checked many solutions and nothing works. Here is what the issue is:

I have changed the name of Raspberry Pi in /etc/machine-info file, /etc/hostname file and also changed the mapping in /etc/hosts. In each of the 3 places, the name provided is "Robot-100".

I built an iOS application using ReactNative and react-native-ble-manager package https://github.com/innoveit/react-native-ble-manager. When the iPhone scans, I see "LocalName" as "Robot-100" and "name" as "raspberrypi". The iPhone even prompts the user asking to pair with "raspberrypi" (Meaning, it uses the "name" parameter").

The BLE object information that I get in ReactNative project is {"id":"D97E0B3A-CE58-7D21-BBC3-CCE12B890364","rssi":-87,"advertising":{"serviceUUIDs":["1812"],"kCBAdvDataRxSecondaryPHY":0,"kCBAdvDataRxPrimaryPHY":1,"isConnectable":1,"localName":"Robot-100","kCBAdvDataTimestamp":630620030.238658},"name":"raspberrypi"}

I have cleared the previously connected devices from the iPhone. Still I get the name and prompt with "raspberrypi".

This means, there is some other place where I need to change the bluetooth name of the Raspberry Pi device. It would be nice to get additional help to figure out what is wrong in the configuration.

1
Given that you are using an iOS app, I am assuming that this is over Bluetooth Low Energy and not classic Bluetooth. What method are you using to advertise on the Raspberry PI? Are you using built in command line tools (e.g. btmon, bluetoothctl), or your own application that you wrote from scratch? - Youssif Saeed
You are right, it is BLE. I did try with bluetootctl. No luck. - Vishnu

1 Answers

0
votes

I could not figure out what was the error. As a last option, I reformatted the SD card and created a new image. Post that, the first thing I did was to change 'hostname' and bluetooth name in the machine-info file. After that, I do not see this problem.