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

Getting serial data over BLE with nRF51 as master & AVR/HM-xxModule as peripheral

Hi
I'm attempting to transfer some text strings over ble
I have a nRF51 as master and a AVR & HM-10 module as peripheral.
The peripheral/AVR side I have working fine - When i connect to it via its advertisements, with the nRF Connect app I receive my data string expected.
However I have been unable to get the nRF51 to act as master - i.e Scan, connect to peripheral (using name as filter) then receive/send the serial data.
I can scan and connect to the correct peripheral device but cannot receive any data from it yet.

Using nRF5_SDK_12.3.0, I started with the "ble_central\ble_app_uart_c" example, I took a section from the "ble_app_multilink_central" to get the device name to filter my peripheral to connect to on. - This all works and connects fine.

However after connection I can see that the nRF runs the "db_disc_handler" function (and hence the "ble_nus_c_on_db_dic_evt" function") but than nothing after this.
From the nRF connect app (when connected to my peripheral) I see the following values:
Client - Generic Access UUID 0x1800, Generic Attribute UUID 0x1801 & Unknown Service 0000ff0-0000xxxxxxxxx....
When I 'receive' my data string (in nRF Connect) it comes in a notification from the unknown service (i.e. 0000ff0-00....)
I'm guessing my problem is that my peripheral does not show the nus service, so the nRF does not know what to do with the data.
I 'think' my real question is - How do I receive serial data on a master when the peripheral device does not have the nus id?

Sorry if my question is confusing... think amateur weekend pilot!

Thanks

Parents
  • Hi,

    Did you implement the Nordic UART service on the AVR, or are you using some other proprietary service on the peripheral?

    Are you able to connect the peripheral from nRF Toolbox UART app?

    Best regards,
    Jørgen

  • Hi Jørgen,

    No NUS is not implemented on the AVR(hence my issues), it is using an HM-11 serial/Bluetooth module and is programmed in Arduino 'land'.

    I was unable to connect to the Toolbox UART app (i believe this looks for the NUS service on the peripheral). I can connect via the nRF Connect App and see the data I want to receive in a notification, I can also connect in my nRF51 firmware, but was unable to get the data from the notification.

    Upon much Googling I came cross this tutorial:

    https://visualgdb.com/tutorials/arm/nrf51/central/

    It seems to do what I require.. i.e use nRF as a master to send/receive data/commands from a BLE device not using NUS (the peripheral device used in the example utilises the same UUID's and data structure. so I'm hopeful this will do the job.

    Tho problems persist, they are not really related to my original question.. so I'll start a new one.

    Many thanks.

    PaulP

Reply
  • Hi Jørgen,

    No NUS is not implemented on the AVR(hence my issues), it is using an HM-11 serial/Bluetooth module and is programmed in Arduino 'land'.

    I was unable to connect to the Toolbox UART app (i believe this looks for the NUS service on the peripheral). I can connect via the nRF Connect App and see the data I want to receive in a notification, I can also connect in my nRF51 firmware, but was unable to get the data from the notification.

    Upon much Googling I came cross this tutorial:

    https://visualgdb.com/tutorials/arm/nrf51/central/

    It seems to do what I require.. i.e use nRF as a master to send/receive data/commands from a BLE device not using NUS (the peripheral device used in the example utilises the same UUID's and data structure. so I'm hopeful this will do the job.

    Tho problems persist, they are not really related to my original question.. so I'll start a new one.

    Many thanks.

    PaulP

Children
No Data
Related