noble / bleno

A Node.js module for implementing BLE (Bluetooth Low Energy) peripherals
MIT License
2.12k stars 447 forks source link

Raspberry Pi 3 - Device Name #375

Closed Benjamin-Willard closed 6 years ago

Benjamin-Willard commented 6 years ago

Hello,

I have an issue where the device name is not being sent. It shows up blank unless I actually connect to the device then it will show up. I am not needing to set the environment BLENO_DEVICE_NAME as I am using the hostname.

I am also using this to startAdvertising.

bleno.startAdvertising(os.hostname(), [sd.app.config.ble.uuid], (error: any) => {
});
venkatraopasupuleti commented 6 years ago

Hi @Uniphix I have tested your code and its working fine on Ubuntu. Have you checked the output of os.hostname() ?

Benjamin-Willard commented 6 years ago

@venkatraopasupuleti This works and the output of os.hostname() has always returned for me. This is not working for RASPBIAN STRETCH LITE with the most updated kernel. It always happens to cause problems with the name until I connect to it via bluetooth, and once connected and I disconnect it shows up. If I turn off our mobile application clear etc. all of it. Reboot the Raspberry Pi and start it up again. The name shows up just fine. It's always the very first time for a specific mobile device.

venkatraopasupuleti commented 6 years ago

Hi @Uniphix I have tested it on RPI 3 B, RASPBIAN STRETCH LITE, kernel version 4.9.59. The bluetooth name appears as given in the code(os.hostname()). I have tested by turning off and on still no issue in broadcast of the name.

sandeepmistry commented 6 years ago

Closing for now due to lack of feedback, and @venkatraopasupuleti said things are working on their setup.