This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Getting name and id from advertisers

Hi there

First I tell you what I'm, trying to do...

I want to made a connection between a robot and a pc. Over this connection I want to program the robot with new software.

The clue is that there are multiple robots with a dongle with the same services. Now i want to connect my pc with the correct robot. So i have to know the name and

also his uuid to connect to him (if i need uuid to connect and nothing else).

On the PC side i'm also using a nrf52840 Dongle

How can i get the number and name from advertising dongle for my central dongle while advertising/scanning ?

Is this even possible ?

If yes...how ?

I'm working with ble_app_uart example from sdk15.3 on central and peripheral. The service i'm using is NUS.

I'm using s140.

Thanks for every response.

greetings N3210

  • Hi

    Yes, this should be possible. If you give the peripheral "robots" different UUIDs the central will be able to tell them apart. Our custom BLE service example should be helpful when creating and implementing custom UUIDs. As for the software update/programming, you might want to take a look at the DFU (device firmware update) tutorial and examples. 

    Best regards,

    Simon

  • Great !

    But maybe you can tell me more about "where to catch the name and uuid from advertisers".

    I think there have to be some advertising data which the central catch. I mean the central has to connect to a uuid (or mac) address and this address has to be catched somewhere....

    Maybe this address is just temporarily saved in some struct and after connection i'd be deleted...but i want to save the addresses and the name in a struct array or something else....and send over the usb to our selfmade Windows Application (made with QT). There I should be able to choose the name of the robot which send the correct address back to the dongle. Then the dongle connects to the robot i choosed.

    Also I was working on ble_uart_central example but I read somewhere that the connection via USB interface and uart modul isn't as simple. So should I change to USBD_BLE_UART Example , combine usb_cdc_acm example with my existing project ble_uart_central or something else ??

    What's the best way to get a communication (TX RX) with PC to pca10059 and from pca10059(central) to another pca10059(peripheral) ?

    I know that's a lot of questions but this is for a school project...and time is running :)

    Greetings and thanks for every response !

    N3210

  • Hi

    You do this during service discovery. Again, the custom BLE service example explains how to decide what is shown to a central during service discovery. As far as I know, there shouldn't be any problems using the ble_app_uart_c example, could you provide a link to where you read this? I think the ble_app_uart example should be fine for your central. 

    Best regards,

    Simon

  • Thanks for your answer Simon !

    About the problem with nrf52840 Dongle with ble_app_uart_c example  and usb i read here:

    https://devzone.nordicsemi.com/f/nordic-q-a/41714/ble-central-uart-example-for-pca10059-nrf52840-dongle/162558#162558

    Steven Grunza told there " On the PCA10059 the UART does not connect to the USB bus " but I have to use the USB interface.

    Maybe I misunderstand something !

    Also I have to declare RX_, TX_, RTS_ and CTS_PIN_NUMBER ..but i don't find those for pca10059 usb connector.

    Greetings N3210

Related