This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

basic central tutorial please

Dear all

I am looking for a tutorial like this https://devzone.nordicsemi.com/guides/short-range-guides/b/bluetooth-low-energy/posts/ble-central-tutorial

It sounds quite helpful, but it is a bit old and tools are outdated and functions look different, some links are not available anymore, could someone point me to a newer one please? I am new and use VS Code and latest nrf connect, and aim to develop a generic central application to make connection and exchange data. 

Thank you .

Ping

Parents
  • hello, Kenneth

    Thanks for your reply!

    About 3 - SDP, I tried a few examples and had a bit of understanding, but I am still not sure the completer procedure to exchange data between connected peers, here is the procedure by my understanding and questions too, correct me if I am wrong please. 

    1. Central does active scan and get peripheral's service UUID it advertises, the UUID can be passed to bt_gatt_dm_start() function and find all services, so peripheral must advertising its service UUID, some peripheral advertising more than 1 UUID, is this right? in the case of it advertise more than 1 service UUID, gatt_discovery() need to do discover for each UUID? 

    2. Central initiate connection and then call gatt_discovery() function using the service UUID it scanned, and here is the print out of the central uart sample by bt_gatt_dm_data_print(dm) function.

    ATT[1]:     UUID: 0x2803    Handle: 0x0011    Value:
    
    Characteristic: 0x6e400003-b5a3-f393-e0a9-e50e24dcca9e    Properties: 0x0010
    
    ATT[2]:     UUID: 0x6e400003-b5a3-f393-e0a9-e50e24dcca9e    Handle: 0x0012    Value:
    
    ATT[3]:     UUID: 0x2902    Handle: 0x0013    Value:
    
        CCCD
    
    ATT[4]:     UUID: 0x2803    Handle: 0x0014    Value:
    
    Characteristic: 0x6e400002-b5a3-f393-e0a9-e50e24dcca9e    Properties: 0x000C
    
    ATT[5]:     UUID: 0x6e400002-b5a3-f393-e0a9-e50e24dcca9e    Handle: 0x0015    Value: 
    

    3. Then probably need to define client to get the handles? like this bt_nus_handles_assign(dm, nus)? But different client seems have different client definition, the BAS service client have a different definition with NUS, so I am not sure how to make the client generic to access handles for all? please advise.

    Thank you for your patience .

    Ping

  • It's really up to you how you implement and do this. 

    If you are implementing a BLE profile, then you need to follow the BLE profile and service specification as specified by bluetooth.

    If you are implementing a proprieatary BLE application, then you can do this whatever you like (e.g. there is no need to put any UUID in the advertisment if you don't want to).

    Best regards,
    Kenneth

Reply
  • It's really up to you how you implement and do this. 

    If you are implementing a BLE profile, then you need to follow the BLE profile and service specification as specified by bluetooth.

    If you are implementing a proprieatary BLE application, then you can do this whatever you like (e.g. there is no need to put any UUID in the advertisment if you don't want to).

    Best regards,
    Kenneth

Children
  • Thank you for reply, Kenneth

    I am developing a central application, and needs to connect to peripherals which are connectable and exchange data, You are right there are some peripherals don't advertising services or anything, in that case there is no need to discovery anything and that is not what I am discussing here.

    Please advise further on how to implement BLE profile and service specification, I need to start from a simple application like how to talk to peripheralLBS example? and need to make it generic later. I am not sure what I need to do after discovery of the ATT[ ] & handles.

    Your input is much appreciated.

    Ping

  • You ask legit quesitons, but it's kind of out of the scope of the tech support we provide to tutor developers on how BLE works and designed, we provide examples that show various usage, and you should from looking at the example implementation get some understanding on how it works, but you still need to also look at other sources for knowledge on how BLE is and how it can be used.

    Kenneth

Related