sharpbrick / powered-up

.NET implementation of the LEGO PoweredUp Protocol
MIT License
100 stars 19 forks source link

Change how BluetoothAdapter identifies devices #173

Closed tthiery closed 3 years ago

tthiery commented 3 years ago

Closes #154

Berdsen commented 3 years ago

Hi @tthiery, unfortunately I had not enough time but today I took this changes and improved them, so that I could establish a working connection also with iOS devices. I'm not done with the implementation but you can see the current code I made on your base here: https://github.com/sharpbrick/powered-up/compare/issue-154-deviceinfo...Berdsen:issue-154-deviceinfo-adjustements?expand=1

So the iOS solution will get a GUID as DeviceIdentifier (NSUuid) whereas the Android DeviceIdentifier will be the MacAdress as string :)

Works at least for both implementations, so we can go for this for now.

As an example with ExampleBluetoothByKnownAdress I have to give the NSUuid as string and it will also work. I need to check how this will work ExmpleTwoHubsMotorControl I have to check, if it is also working, when I know the UID.