How to connect my bluetooth peripheral uart example with 3rd party bluetooth applications

Hi everyone, I am quite newbee to nRF5340 and nRF ecosystem. Anyway, my goal is to talk with 3rd party application to receive positioning data over bluetooth and then I have to mirror these data to another MCU via UART. I modified peripheral uart example in way to send data received from BL to other MCU. This is working with nRF's own bluetooth serial application and other 3rd party bluetooth serial application, but whenever I try to connect my nRF5340 from 3rd party GNS applications, it could not connect. I don't know the reason and I am open to any suggestions. 

Thanks.

Parents
  • Hi,

    Can you explain a bit more? The third party device you are connecting to, is it a peripheral or a central? Which exact device is it? What sevice(s) does it have, are they standard ones and/or custom ones? And what about pairing/bonding?

    If you do not know the answer to these questions, and if the device is a peripheral, a good start could be to connect to it from nRF Connect for desktop, and do service discovery to see what services it provides.

    If you are not even able to connect, perhaps the third party device use whitelisting, or some other mechanism that prevents you from connecting? Would it be possible to put in in a pairing mode where it would advertise without a whitelist for a while (this is a common thing to do)?

  • Hello,

    1. I picked bluetooth/peripheral_uart example for my custom nRF5340 board.

    2. I modified UART in a way to would send received data from BL to my another MCU runs over board.

    3. I disabled Buttons in that example in a way that would accept pairing number default. ( you also need to press button to confirm whether pairing codes is true in nRF5340.

    4. I connect with nRFConnect Bluetooth Serial Interface and sent some words and It worked and also managed to send these words to my another MCU.

    5. I also tried with another bluetooth serial terminal in google play. It also worked.

    6. Then I started to evaluate my real goal.

    The real goal is, I downloaded LEFEBURE NTRIP Client app to my mobile phone to get GNSS positioning data and send the data over BLE to my peripheral device e.g my custom nrF5340 board.

    My phone could see Uart Nordic Servis as my device and whenever I try to connect my device from inside of app, it could not connect.

    I also downloaded another app like lefebure and but did not work.

    Is it clear enough ? Please let me know.

    Device is my phone Redmi 10 2022. Host Application : LEFEBURE NTRIP Client. I am not sure which one is central but both my phone device and app should be central as far as I know. You can also see available ble device from this application.

  • ismail_embedded said:
    I do not know what app requires to connect and where would I get this info. 

    If you did not make the app, you either need to sniff or do something else to observe it externally, or ask the manufacturer: I cannot assist with reverse engineering, though.

    ismail_embedded said:

    My advertise packet in RF5340 is default packet comes with peripheral uart example and did not any modification.

    Should I also know the advertise package of application ?

    If the nRF is peripheral, the nRF is advertising, and the phone is the central that should connect. You need to know this part though, or ask the app developer or mak your own app. The point is that there is an interface here which is not known, and you need to find a way to know how this should work, and that I can unfortnately not help you with.

  • http://lefebure.com/software/android-ntripclient/

    They mention here about Serial Port Profile, it is a thing should my android phone or nRF have ?

  • No, the serial port profile is a bluetooth classic concept. It does not exist in BLE.

  • Hi,

    Then this problem implies the root cause doesn't it ?

    If this true, there would be two way: one is finding an app which has serial port interface that support BLE , or we will design our own app ???

  • Hi,

    ismail_embedded said:
    Then this problem implies the root cause doesn't it ?

    I am not familiar with the LEFEBURE NTRIP Client, but reading about it it looks like this use SPP, so yes. This is only something you can use with classic Bluetooth, and not BLE, so it cannot be used with any nRF devices.

    ismail_embedded said:
    If this true, there would be two way: one is finding an app which has serial port interface that support BLE

    That does not exist, as the standard is for Bluetooth classic.

    ismail_embedded said:
    or we will design our own app ???

    That still does not work if you want to use SPP, as that is not possible, but the alternative would be to use a custom service with your own app. (This custom service could perhaps simple by the Nordic UART service.)

Reply
  • Hi,

    ismail_embedded said:
    Then this problem implies the root cause doesn't it ?

    I am not familiar with the LEFEBURE NTRIP Client, but reading about it it looks like this use SPP, so yes. This is only something you can use with classic Bluetooth, and not BLE, so it cannot be used with any nRF devices.

    ismail_embedded said:
    If this true, there would be two way: one is finding an app which has serial port interface that support BLE

    That does not exist, as the standard is for Bluetooth classic.

    ismail_embedded said:
    or we will design our own app ???

    That still does not work if you want to use SPP, as that is not possible, but the alternative would be to use a custom service with your own app. (This custom service could perhaps simple by the Nordic UART service.)

Children
Related