Skip to main content
mathgrelck
Associate
January 9, 2020
Question

Where to find BlueNRG-MS multiple masters example?

  • January 9, 2020
  • 1 reply
  • 1279 views

Dear ST Community

I'm trying to dig up the python script files for the BlueNRG-MS mentioned in the attached slideshow on page 28.

Specifically I'm looking for the file "Multiple_Connection_Slave_Role.py" since I'm looking to test whether it's possible to have two masters (iOS devices running the LightBlue app) connect to my NUCLEO-F401RE + X-NUCLEO-IDB05A1 development kit running BlueNRG-MS firmware version 7.3.

Can someone provide me with said script file, or provide some other means for me to test with multiple masters?

UPDATE:

I managed to find the scripts in Application/scripts/Multiple_Connection but unfortunately I've come to realize that this example is only meant to show 1 master connected to up to 8 slaves, which is not what I want to investigate. I want 2 masters connected to 1 slave.

It would be a great help just to hear a clear answer on whether it is technically possible using the BlueNRG-MS or not. If yes; then please guide me.

Kind regards

Mathias

    This topic has been closed for replies.

    1 reply

    mathgrelck
    Associate
    January 15, 2020

    I've discovered that there is a python script "C:/Program Files (x86)/STMicroelectronics/BlueNRG GUI 3.1.0/Application/scripts/MultipleConnections_Formula/Master_Slave.py" that seems to show exactly what I want to achieve.

    I found it because of this thread: https://community.st.com/s/question/0D50X0000B0vWmG/spbtle1s-connected-with-android-app-and-other-ble-device-on-same-time

    Unfortunately this script is not able to run successfully on my F401RE devkit, see attached error message.

    At the prompts I'm specifying: '2' masters, '0' slaves, '20' ms scan interval and '0' sleep time. I've tried it in stack modes 2, 3 and 4 (specified in "ACI Utilities --> Init Device").

    I think the reason for failing might be because the script is meant for BlueNRG-1 and 2, not the MS, but shouldn't MS be capable of the same as 1 and 2?

    0690X00000Bw10RQAR.png

    Small update:

    I can uncomment these lines

    --- line 346 ---
     status = ACI_GAP_START_GENERAL_DISCOVERY_PROC(LE_Scan_Interval=Scan_Interval, 
     LE_Scan_Window=Scan_Window)

    --- line 358 ---
    ## Starts discovery procedure 
     status = ACI_GAP_START_GENERAL_DISCOVERY_PROC(LE_Scan_Interval=Scan_Interval, 
     LE_Scan_Window=Scan_Window) 
     
    if status!= 0x00:
     ERROR('ACI_GAP_START_GENERAL_DISCOVERY_PROC FAILED')
    else:
     disc_procedure_is_ongoing = True

    in the script file to make it run without the exception (basically making sure it doesn't check for or enter scanning mode, since I'm not interested in that anyway). This makes it respond with ACI_GAP_SET_DISCOVERABLE OK, but the device remains undiscoverable... See attached image. What do?

    0690X00000Bw1IzQAJ.png