Multiple simultaneous connections do not work

Trying to support multiple simultaneous connection on the RL78/G1D in modem mode for an OPERATIONAL collector for health devices has proved to be a major challenge. By operational I mean exchanges with peripherals on the time scales in the order of milliseconds and not seconds (like with the provided interactive demo).

The approach is as follows:

  • Use device search (and not observation though I would prefer observation since I can control it without using VS methods) to scan for devices
  • Find a device one wants to connect with
  • Turn off device search and start the connection
  • When the connection indication occurs, restart the device search so one can find other devices
  • In the mean time, perform all the connection operations needed with health devices (service discovery, reading the DIS, pairing, configuring descriptors, etc.).

This approach does not work but I cannot understand why. I CAN understand the need to turn off scanning while connecting as one is still engaged with the advertising channels. Though I can get a second connection while the first device is connected, when the first device disconnects all scanning ceases to function and any ongoing pairing can cause unpredictable results. 

How is one supposed to do multiple connections WITHOUT using white lists (should that even work)? I do not understand why the above approach fails. Trying to solve this problem has cost me months and I still have no solution. If the RL78G1D developers could provide a demo collector application that works with multiple real devices this would be great. But better would be an explanation as to how to support multiple connections as well as an explanation as to why the above approach is not working.

Thanks

  • You had better stop the device search while performing all the connection operations to avoid many serial communications at the same time.

  • In reply to K.noto:

    If you read the sequence diagram in the note you will see that I do exactly that. If, on the other hand you mean that I cannot re-start device search until the device disconnects, then what you are saying is that multiple simultaneous connections cannot be done. So I am not sure what you mean by the comment.

  • In reply to Brian:

    For others reading this forum and noting that replies are not too helpful I have found out the following. Not only cannot one not scan while connecting one also cannot scan while pairing. So you need to turn off scanning BOTH during connection (which I can understand since that is using the same channels as scanning until the connection is established) AND pairing (which I don't understand because that is using the connection channels).

    I am also using Device search instead of Observation because I was once told that Observation will not work while connected. That is really bad because the use of device search for background scanning is difficult as it is fixed in its duty cycle and duration. I have managed to obtain undocumented methods to change the duty cycle and duration by using the VS methods. It is slow and cumbersome but one cannot scan with a full duty cycle and expect to be efficient. Nevertheless, with the Device search modifications and stopping the device search (scanning) while connecting AND pairing, the RL78 will not deadlock and multiple simultaneous connections will work. So the above cycles becomes

    Use device search (and not observation though I would prefer observation since I can control it without using VS methods) to scan for devices.

    • Find a device one wants to connect with
    • Turn off device search and start the connection
    • When the connection indication occurs, restart the device search so one can find other devices. One needs to use the VS methods to set lower duty cycles and longer durations
    • In the mean time, perform all the connection operations needed with health devices (service discovery, reading the DIS, pairing, configuring descriptors, etc.).
    • When pairing is needed, stop device search
    • When pairing is done, restart device search

    Note that this applies to V120 and the PC RBLE HOST. I have not tried it yet with the RX64M v120 RBLE HOST. I did not get the same sequence as above to work in earlier versions.