examples of simple peripheral/central ble transmission nrf52 series

I am very familiar with PICs and some atmega stuff, just graduated university ee and the project I am working on requires transmitting very small amounts of data continuously via ble protocol. Actually transmitting real time gyroscope data. Nrf modules seemed the easiest/cheapest for our purpose and decided we would most likely end up going with someones 52 series module. I have been playing around awhile with the nordic 52 development board however I am finding the learning curve fairly steep with zephyr. I can do basic stuff, gpio, pwm, interrupts etc but am struggling with bluetooth. Would it be possible to get an example of a central device and peripheral device with a custom service and characteristic 128, that simply sends or receives 24 or more bits of data at a time.   I'm really trying to learn this and just feel myself lost, thanks.  I have been through many of the peripheral and central zephyr examples.

  • Hi,

    I would recommend you take a look at the nrf samples in nRF Connect for Desktop, more specifically central_uart and peripheral_uart that uses Nordic UART Service (NUS) Client. They uses the NUS service to send data back and forth between a UART connection and a BluetoothRegistered LE connection. The samples available in our SDK are a great starting point for examining various concepts.

    Also, in case you have not gotten started with the nRF Connect SDK, this course is another great starting point.

    Kind regards,
    Andreas

  • Thanks Andreas,  I have already gone through that course and have looked at the majority of the examples provided by nrf connect.  I have focused on central and peripheral example and have focused on uart central and peripheral example.  I know I am a slow learner but I have been studying this for 8 hrs a day for the past almost 3 weeks.   I understand the NUS service but I fail to understand how to make a custom service from custom uuid and send individual bytes of data in array format.  I apologize for my ignorance,  I am just greatly struggling.

  • Hi,
    No worries at all, I will do my best to help you progress with the issues you're struggling with and explain how to create custom services

    loganmeyer3 said:
    I have already gone through that course

    Great to hear!

    loganmeyer3 said:
    I have focused on central and peripheral example and have focused on uart central and peripheral example.

    I was thinking you had focused the zephyr/samples/bluetooth/central and peripheral and not ...nrf/samples/bluetooth/central_uart and peripheral_uart samples (there is a slight difference there), but if you've already examined them, then lets move on a bit.

    1) This course, should teach you everything you need to know about how to create your own services in NCS. Please not that this is not a tutorial or guide which and it is not maintained as it is not public, but rather a course developed to demonstrate how to create your own remote controller for students. The hands on is quite tedious w.r.t step by step, but I found it very handy when learning about custom services my self. You can also skip the parts which contains pwm motor control without any issues as long as you make the corresponding changes in the cmakelists and in main. The course also contains partial solutions in zips which you can download and compare/use in case you are stuck on the hands on.

    2) This guide, which is slightly old (ncs v1.2) but it should translate pretty good into NCS today, sheds some light on how to create your own custom services.

    I will try to dig up some more material, but in the meanwhile (if you have time) you could examine those resources1)

    Kind regards,
    andreas 

  • after quick skim this is very nice i will study all.  thank you for your help.   Can I keep this case open for a few days if I have anymore questions? Also i am not sure why this is private but I am happy for this to be public if it helps other people. 

  • Hi,

    Yes, you may keep this ticket open if you would like so for follow up questions which are related to the topic in this ticket. If you have new questions, I will of course try to reply and answer to them, but I would recommend to create new tickets for unique questions and cases.

    And also yes, I would say this type of ticket is something that is perfect as a public ticket as there are very likely more out there with the same questions and in the same situation, so go ahead and convert it if you're comfortable with that!

    Kind regards,
    Andreas

Related