I’m trying to create a Detect Presence of BLE Devices using bx3105, I want to detect phone presence using bx3105 BLE and phone BLE then to calculate the distance between my phone and BX3105 using Distance = 10 ^ ((Measured Power — RSSI)/(10 * N)) but I don’t know how to auto-connect when I find my phone Bluetooth and how I get the measured power using AT Command.
Please help to confirm that the BT subsystem you using (BLE or BT Classic)? What the BT subsystem state was used (AT+SRBTSYSTEM)?
For the measured power, If I’m not wrong you’are metionning about transmit power of BX3105 device, right?
- If you use BLE please refer to commands AT+SRBLETXPWRCFG and AT+SRBLETXPWR.
- If you use BT Classic please refer to command AT+SRBTCTXPWR.
Please note that: For BT Classic, you just can only set a range for transmit power. The formula you mention, its apply for BLE.
Hi @jerdung ,
I’m trying to create an application using BLE connection so when my phone is detected the bx3105 must play a sound like welcome for this my SRBTSYSTEM is 3 BLE and BT Classic.
The device connect to phone by BLE has mentioned in topic BX3105 help getting started - #15 by mlw. You need to use the application on phone to connect to BX3105 device. With this application, it only connect to device from phone application.
So, I think BX3105 device cannot initiate the connection from it to the phone by BLE.
Hi @jerdung ,
Is there any way to do it with BT!? Or to program my bx3105 with Arduino or esp32 or any microcontroller to create a simple script because when I’m trying to create a script the serial pin tax return nothing even when I am changing the UART source select.
You can try with Bluetooth Classic, it can scan and find phone’s Bluetooth advertised (AT+SRBTINQ), device can connect to phone to stream audio by command AT+SRA2DPCNX, but its not option for auto connection.
I cannot find any command in the user guide to setting the sound, it only has command to control an AVRCP media stream from phone (AT+SRAVRCPPICMD).
Hope this is helpful for you.