Skip to content
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

Change how BluetoothAdapter identifies devices #173

Merged
merged 3 commits into from
May 8, 2021
Merged

Conversation

tthiery
Copy link
Member

@tthiery tthiery commented Apr 30, 2021

  • Abstract identity in an interface independent of Mac Address
  • Change PoweredUpHost function to use generic state instead
    of bluetooth address as ulong
  • Implement interface in existing adapters (simple transformation)
  • Change BluetoothKernel interface to accept device instead of
    bluetooth address
  • Add formatting to the MAC Address DeviceInfo

Closes #154

- Abstract identity in an interface independent of Mac Address
- Change PoweredUpHost function to use generic state instead
  of bluetooth address as ulong
- Implement interface in existing adapters (simple transformation)
- Change BluetoothKernel interface to accept device instead of
  bluetooth address
- Modify existing examples

#154 breaking
@Berdsen
Copy link
Contributor

Berdsen commented May 4, 2021

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.

- Added device identifier for iOS
- Reworked device identifier for Xamarin

#154
@tthiery tthiery merged commit c5d1cb5 into master May 8, 2021
@tthiery tthiery deleted the issue-154-deviceinfo branch May 8, 2021 10:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Discuss BLE Interface, BLE MAC Address and general Selection Handling
2 participants