-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Switch connection to specified target device? #150
Comments
Great - well detailed description @joedevsys. Thanks for that. I've felt the same but couldn't put it into words as good as that @f1andrew @quaxalber have a look at the above. Any thoughts? |
I share the sentiment that changing target devices ranges from cumbersome to frustrating UX wise. I really like the idea of target-specific device names. This could allow for a smoother switching. |
There is a problem I think with just changing the advertising or device name. It basically didn't work when we did it this way. Well some OS/Bluetooth stack it did - but certainly not on iOS . Reason being is most systems don't really care what the heck the name is called - its the MAC address that matters. Am I recalling this correctly @f1andrew ? Maybe there is improvements to be made though like you say Joe |
Makes sense to me for device name, though I'm thinking advertised service name if that makes a difference? |
Fair point @willwade
I think in this context it doesn't. While some systems allow for changing the advertising/Bluetooth name different from the device name, the issue remains for systems that solely rely on the MAC. @joedevsys |
Having spent an afternoon watching an AAC user trying to trigger the correct device to bother connecting itself and trying to do this through the limited features available in AAC software I think this needs to be a whole lot easier to drive and a whole lot easier to show what's going on. |
What I’ve not considered is our new relaykeys receiver dongle code. I wonder if there’s anything we can do to help fix this IF the sender knows the receiver. Eg. Each receiving dongle has a known and fixed address. Maybe we can send some kind of packet data to the all bar the others to stop advertising. I don’t know.. random thoughts here! |
Making command for switching to specific device can be made. I will do that. The thing that dongle is waiting for connection can't really be changed. And I have to check it more in detail about altering MAC address. |
Here is first attempt of switching to specific device: #152 Switching to specific device is available via Serial and Cli. Serial interface: Cli commands: I've tested by switching between three devices and it's working. |
Amazing. Thanks @f1andrew . If either of you want to test this on your own boards and cant be bothered to do the Arduino libraries - let me know what board you have and I'll create a UF2 file for your board. For a short time here is a Windows build of the software: https://acecentreuk.sharepoint.com/:u:/s/AnonymousShares/ER5YRxu2YmdGmkx-lzonGz8BmUSzO7uiKGhBuODsbPaP_Q?e=439Q7h |
Great stuff. I'd like to test on my nRF52840 USB Key with TinyUF2 Bootloader |
Great here you are @quaxalber |
Thanks @f1andrew. Looking good but I need to do more testing to be sure. So far a couple of minor issues:
I'll report back after more testing... [edited for clarity] |
|
Thanks @willwade
Is this issue known to you? Any idea what might cause it? |
Don't delete that uf2 file. Just drag and drop it on top! |
Tried that too. It doesn't show the error but when I re-insert the dongle while pressing the button, the timestamps still show 2021 for created, accessed, modified. I guess it's not supposed to be that way? Or does it reset each time? |
@quaxalber - sorry - it can be a right pain when it doesnt work. Its possible I've messed up that uf2 file. For now it would be wise doing the long way round and doing the arduino install. Its not that hard with the new Arduino software.. sorry! (I'm back next week when I can create another one..) |
|
This is working very well and much easier for the AAC user I'm working with. I created some buttons on the AAC device, one for each target, and it connects fairly quickly to desired device. Seems fairly reliable too, switching between 3 targets. The only disadvantage is polling to see the result after a delay causes issues on Communicator 5 so user needs to wait and then press another button to see the result, therefore Feature Request created for optional auto polling. |
yeah. I too had some brief time to try and it looks great to me. (@quaxalber - apologies - i havent had time to try and get another uf2 for you.. but I should soon enough). @joedevsys Auto polling makes sense. What are you thinking it could do to check the connection? Send a key? |
See #153 |
Is your feature request related to a problem? Please describe.
When used from AAC software, particularly for people with accessibility needs, changing target device to a specific target is tricky if multiple targets are paired. The current method is switchBleConnection() which disconnects and waits for the next Central to initiate a connection. This is frustrating as it takes time and if several possible targets may need to keep changing to cycle to the desired one. This is compounded by Focus Assist issues #112 so user has to manually allow enough time for reconnection and then check what he's connected to.
Describe the solution you'd like
On the arduino: an unused parameter is already passed to switchBleConnection(char* myLine). Could this be used to specify the targetname, lookup bleDeviceNameList[] and set appropriate values of switchBleConnStartIndex, switchBleConnCurrIndex? Would this successfully cycle round until it got the right connection?
For debate: The problem here is a BLE peripheral advertises and waits for the central to connect, but the user wants to drive the connection from the peripheral. Another approach, instead of cycling around disconnection/connection cycles until the right one occurs, is it feasible to manipulate the advertising or device name so the each target only recognises the dongle when the dongle wants that target? e.g. When adding new device bleDeviceNameList[i] advertise/pair as "AceRK_i", then when wanting to connect to it change the advertising to this. The other devices won't connect until they see "AceRK_j" etc.???
Any thoughts?
The text was updated successfully, but these errors were encountered: