This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
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

S130 Testing

I want to use the s130 softdevice because we need the broadcaster/observer mode at the same time. I bought the nRF51 Dongle and the beacon Device.I use the Keil IDE, debugging works until i hit a breakpoint. After that I think the programm doesn´t work correct.

  1. Is this a normal behavior?

For our project we don´t want to connect the BLE devices. We want to make the whole communication with abvertising messages. Example

Device A advertises Device B receives the advertising message Device B sends a advertising message Device A receives the advertising message

  1. Is it possible to do this with the Softdevice s130?
  2. Which of the example files for Programm Application will be the right choice?

Thanks in advance!

    1. Yes this is a normal behavior, after you hit the breakpoint, you halt the CPU but the internal timers in the nRF51 still are running and when they expire will have interrupts handling pending. When you continue from your breakpoint, the stack will notice the timers have strange values and behaves in a unpredicted way. So the point is once you hit your breakpoint we cannot expect the softdevice to work normally.

    here are few answers on this

    devzone.nordicsemi.com/.../ devzone.nordicsemi.com/.../

    1. In short you want devices A and B keeps swapping between central and peripheral roles. This should be possible. This is one of the main uses cases of S130. I think the closest app i can find is nRF51_SDK_8.0.0\nRF51_SDK_8.0.0_5fc2c3a\examples\ble_central_and_peripheral\experimental

    In this experiment you can atleast see how you can manage state machine for your roles on the device depending on incoming events.

    Update:

    S130_Sample_App.pdf

  • Thanks for your response. I was using the experimantal demo you mentioned. Now I have able to run the debug_trace. Every time I want to connect to a peripheral I get this messages on the uart:

    Advertisement stopped.<\r>
    <\n>S130_DEMO_LOG: ..\..\src\main.c: 869: (Peripheral 0) Connecting.<\r>
    <\n>S130_DEMO_LOG: ..\..\src\main.c: 885: (Peripheral 0) Connection error: error code 0x5<\r>
    <\n>(Peripheral 0) Device not found.<\r>
    <\n>S130_DEMO_LOG: ..\..\src\main.c: 869: (Peripheral 1) Connecting.<\r>
    <\n>S130_DEMO_LOG: ..\..\src\main.c: 885: (Peripheral 1) Connection error: error code 0x5<\r>
    <\n>(Peripheral 1) Device not found.<\r>
    <\n>S130_DEMO_LOG: ..\..\src\main.c: 869: (Peripheral 2) Connecting.<\r>
    <\n>S130_DEMO_LOG: ..\..\src\main.c: 885: (Peripheral 2) Connection error: error code 0x5<\r>
    <\n>(Peripheral 2) Device not found.<\r>
    <\n>Advertisement starts.<\r>
    <\n>
    

    I´m using a sniffer tool. In this tool I saw that both devices are advertising. This can´t be correct. As far as I know the peripheral is advertising and the central is the observer. Every peripheral example in the SDK is advertising. Perhaps you understand whats wrong here?

    Are you able to explain how I can swap between Broadcaster and Observer in S130?

  • sorry for late response. I gave you that example to see how you can change states between central and peripheral. The demo_app which you used starts its role depending on the button state. Please look into the function do_work() in main.c to see how you control this. by default if you do not change anything, both devices are advertising and there is no connection happening between each other, hence the error that says NRF_ERROR_NOT_FOUND (0x05)

  • Thanks for your response the uart log which i posted appeared when I pressed Button 1 to connect to a device. I´m not able to connect to a device. I testet (ble_central_and_peripheral\experimental) on both devices pca10031 and pca10028.

  • I attached a PDF file that explains you how to run this example. This example is NOT made to flash into two devices and expect the devices to connect to each other. If you flash the same app into two devices, then your two devices start to advertise expecting some connect request to come from some central. This example advertises first, expects central from other device( device that is connected to master control panel) to scan this advertisement and then connect to this device. If you want your two devices to work with each other automatically, then you have to make another application that is doing exactly opposite of what this experimental app is doing. I have given you this example to see how your application can make your device to be both advertising and scanning depending on the events you get and the buttons you press. For your use case where

    Device A advertises Device B receives the advertising message Device B sends a advertising message Device A receives the advertising message
    

    you have to make changes to this app and then flash the new app into your second device to work if the above has to work.

Related