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

Which SDK example should I use to setup the NRF51822 to only receive data from a Central, in this case a smart phone.

Hello,

I would like to configure the NRF51822 as a Peripheral to receive data from a smart phone, and then call a routine when the receive process has been terminated.

I have this working with the RF Digital Simblee chip, but now I need to do this with the Raytac MDBT40 so I can not use the internal routines in the Simblee of course.

I am thinking that the UART example would do it but I do not understand the various routines at this point, or even if this is the best example to use.

All I want is for the NRF51822 to receive a string of data from the phone and put it into an array, and upon termination of the receive process, call a routine where I will call some of my existing working code to appropriately process it from there. I do not need to send any data out of the NRF51822 back to the phone. Simplex communication only, phone only to transmit to the NRF51822.

Thank-you for your assistance.

Parents
  • Hello, Brian.

    > Which SDK?

    ICVersion

    I hope I'm looking at the correct MDBT40's datasheet. This says that the IC version 3 is used.

    Looking at the Nordic's Compatibility matrix, choose SDK 8 ~ 12. You can download the SDK from this webpage. Note that SDK 13 or above runs on nRF52 devices, not nRF51 devices.

    Contact Raytac to check whether the MDBT40 uses the IC version 3 nRF51 series, please.

    > All I want is for the NRF51822 to receive a string of data from the phone and put it into an array

    > I am thinking that the UART example would do it

    As you mentioned, I agree that E:\NordicSDK\nRF5_SDK_xxxx\examples\ble_peripheral\ble_app_uart example will the suitable for you.

    As mentioned in the Nordic Infocenter page (SDK 12 based), if your smartphone (central) app sends a string via NUS (Nordic UART Service), nus_data_handler is called. This function handles the received data.

    -Regards, MANGO

  • Hi, Brian.

    • I can use a higher version if you think it will be better. Hmm, Nordic devteam says that Do not judge the quality of SDK based on number of entries here. For instance, check this page and hope this helps for choosing the SDK.

    • Java code. I have no experience with Android app projects. How about checking Nordic's GitHub page? I think this will help you.

    • the array p_data can be read at the routine on_ble_evt in the second case statement assuming that I haven't understood your last question;

    are you trying to check the p_data array before the program counter points nus_data_handler?

    -Regards, MANGO

  • Hello, I have the IDE flashing the device and it is advertising now, but unfortunately I have some other work responsibilities which are going to delay development with this device.  I am at the point now where I can start creating code and testing, so I may have subsequent questions.  Thanks for your support.

Reply Children
No Data
Related