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

Issue 154 deviceinfo adjustements #176

Conversation

Berdsen
Copy link
Contributor

@Berdsen Berdsen commented May 5, 2021

Hi @tthiery,

I reworked the xamarin deviceinfo a little bit.
Perhaps having a string deviceIdentifier might not be the best solution but currently works the following way:

  • IOS sets the NSUuid (GUID) as DeviceIdentifier (can be used to directly connect to the device)
  • Android sets the MacAddress as string as DeviceIdentifier ("xx:xx:xx:xx:xx:xx")
  • the XamarinBluetoothDeviceInfo will handle these infos and try to set the corresponding mac adress
  • IOS has the limitations, that you need to know the NSUuid if you want to connect to "known" device
  • I extended the BytesStringUtil class with some more conversions so we should rename the class perhaps to ConversionUtil
  • I will adjust the open pull request in example-xamarin

@tthiery tthiery merged commit 17789f4 into sharpbrick:issue-154-deviceinfo May 8, 2021
@tthiery tthiery self-requested a review May 8, 2021 10:21
@tthiery tthiery added area-bt-xamarin enhancement New feature or request labels May 8, 2021
@tthiery tthiery added this to the v4.0 (breaking) milestone May 8, 2021
tthiery added a commit that referenced this pull request May 8, 2021
- Abstract identity in an Bluetooth Device 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 info abstraction
   instead of bluetooth address
- Modify existing examples
- Add formatting to the MAC Address DeviceInfo
- Adjust Xamarin and iOS device identifiers (#176)

#154

Co-authored-by: Berdsen <berdsen.home@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-bt-xamarin enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants