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.

CC2640R2F: SPP_BLE_SERVER not connecting with android app BLE scanner

Part Number: CC2640R2F

Hi,

SPP_BLE_SERVER is not connecting to the android app BLE scanner when I removed the hardcoded BDaddress. SPP_ble_server is an out of box example only with the above change.

the app was scanning and display the device name SPP_BLE_SERVER with its BDaddress. When I press connect it is returning CONNECT_FAIL.

//uint8 bdAddress[B_ADDR_LEN] = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05 };
//HCI_EXT_SetBDADDRCmd(bdAddress);

But, when the spp_ble_server was used with the above hardcoded address, the app was connecting to spp_ble_server and gives the service information successfully.

spp_ble_server is also connecting with board to board with spp_ble_client CC2640R2Flaunchpad(removed the autoconnect in client and scanning every time and then connect with server by received BDaddress) successfully.

we are making over own android app for BLE central. the SPP_ble_server is not connecting with our app too.

How can I make the SPP_BLE_SERVER connectable with Android app(BLE scanner) with device's original BDaddress(not hardcoded address)?

Is it a problem with Android app or SPP code?

regards,

Santhananarayanan

  • HI,

    I am using the TI BLE stack 1_35_00_33
    I am using a lenovo mobile with android v5.0.2

    thanks,
    Santhananarayanan
  • Hello Santhananarayanan,

    Are you using BLE pairing and bonding? Can you take an BLE air sniffer capture (not HCI dump) and attach to this thread? Some older Androids of the v5 version has issues with connecting to devices that were not scanned (autoConnect). I'm not sure if that's the case here. I'm hoping the sniffer shows the phone doing a scan.

    Best wishes
  • Hi,

    I am not using the BLE pairing and bonding.

    I attached the sniffer log here with Spp_ble_server device with mobile(BLE Scanner)sniffer_spp_blescanner.psd

    it seems the connect request(ADV_CONNECT_REQ) was not reaching the sniffer and device.

    but consider the OAD image A Project with the same mobile(BLE Scanner) ) the scenario is different.

    the sniffer and device catches the connect request (ADV_CONNECT_REQ) and connected. please see the sniffer file of thissniffer_oad_A_BLE_Scanner.psd

    the SPP_ble_server was connecting with SPP_ble_client in another launchpad. the server is creating problem with only the android.

    I like too know the problem with android or Device code.

    thanks,

    Santhananarayanan

  • Hello,

    For the "sniffer_spp_blescanner.psd", which device address is yours, i.e., the AdvA corresponding to the SPP BLE server? For catching the connect request, you may have to run the test multiple times until you get a valid capture since the sniffer only monitors one ADV channel. See the TI Packet Sniffer guide on the BLE Wiki for tips on how to catch the connect request. Configuring the peripheral for only one ADV channel will make it easier to capture.

    Best wishes

  • Hi,

    we enabled advertisement only in channel 37 in SPP_BLE_server

    In the sniffer software I added filter for channel 37 and the ADVA address 0xB0912265BAF5.

    now find the sniffer log here. now to the connection request was not captured heresniffer_spp_blescanner_2.psd

    regards,

    Santhananarayanan

  • Hello,

    Thank you for the log. Your ADV data seems to be different on every ADV event and doesn't match the advertData[] in spp_ble_serve.c. This is probably why the phone is not issuing a connect request. Do you see this with the fixed BDADDR?

    Best wishes
  • Hi,

    Sorry for the late reply.

    meanwhile we tried to update the advertisement data every time.

    with fixed advertisement data and fixed BD address also the connection request from the ble scanner was not reaching the peripheral. and the app returns Connect_fail/Disconnected. The sniffer log was here.sniffer_ble_spp_2.psd

    this happens only with spp_ble_server_oad_onchip.

    thanks,

    Santhananarayanan