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

iOS.Device: update device name upon connecting to peripheral #792

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

janusw
Copy link
Member

@janusw janusw commented Dec 29, 2023

This is a second attempt to fix #541 and #703, following the first attempt in PR #711, which apparently was unsuccessful.

@baneageorge
Copy link

baneageorge commented Dec 29, 2023

Hi @janusw , thank you for your quick action. Unfortunately it gives an error, when I try to install the nuget.
I can see it in the nuget manager but when I try to update or install, it fails. Bellow is some of the log:

Resolving conflicts for MonoAndroid,Version=v13.0...
Detected package version outside of dependency constraint: Xamarin.Forms 5.0.0.2612 requires Xamarin.AndroidX.Lifecycle.LiveData (>= 2.3.1.1 && <= 2.6.1.1) but version Xamarin.AndroidX.Lifecycle.LiveData 2.6.1.3 was resolved.
Detected package version outside of dependency constraint: Xamarin.Forms 5.0.0.2612 requires Xamarin.Google.Android.Material (>= 1.4.0.2 && < 1.9.0) but version Xamarin.Google.Android.Material 1.9.0.2 was resolved.
Unable to find package Plugin.BLE with version (>= 3.1.0-beta.1-5-gf61e598)
  - Found 46 version(s) in nuget.org [ Nearest version: 3.1.0-beta.1 ]
  CACHE https://api.nuget.org/v3-flatcontainer/plugin.ble/index.json
Resolving conflicts for .NETStandard,Version=v2.1...
Unable to find package Plugin.BLE with version (>= 3.1.0-beta.1-5-gf61e598)
  - Found 46 version(s) in nuget.org [ Nearest version: 3.1.0-beta.1 ]
  - Found 0 version(s) in /usr/local/share/dotnet/library-packs

@janusw
Copy link
Member Author

janusw commented Dec 30, 2023

Unable to find package Plugin.BLE with version (>= 3.1.0-beta.1-5-gf61e598)
  - Found 46 version(s) in nuget.org [ Nearest version: 3.1.0-beta.1 ]
  - Found 0 version(s) in /usr/local/share/dotnet/library-packs

Sounds like the nupkg is not found. Did you set up a local package source that contains the nupkg downloaded from this PR?

@baneageorge
Copy link

@janusw I follow the same steps as with previous PR. with the previous one I can install OK, although it says already exists which is very strange.
image

I also try a complete clean of the project (bin, obj...)

This is what I get now when I install the old PR

All packages and projects are compatible with .NETStandard,Version=v2.1.
Package 'Plugin.BLE.3.0.0-rc.1-2-ge03790e' already exists in project 'EggRider'
Committing restore...

@baneageorge
Copy link

@janusw I feel is some bug with VS on mac...
I manually copied the nuget to /usr/local/share/dotnet/library-packs and it installed.

Successfully uninstalled 'Plugin.BLE 3.0.0-rc.1-2-ge03790e' from EggRider.iOS
Successfully installed 'Plugin.BLE 3.1.0-beta.1-5-gf61e598' to EggRider.iOS

The problem become even worse now. The name for connected device is not picked up even after turning on/off the bluetooth, which normally solved this issue.

Device name is: UpdC1
StartScan
Advertised Name returns -> UpdC1
ConnectToKnownDeviceAsync -> Connected device name returns -> DeviceC1 (the service uuid seems to be correct)

@janusw
Copy link
Member Author

janusw commented Dec 30, 2023

@janusw I feel is some bug with VS on mac...

Wouldn't be the first one 🙈

I manually copied the nuget to /usr/local/share/dotnet/library-packs and it installed.

👍

The problem become even worse now. The name for connected device is not picked up even after turning on/off the bluetooth, which normally solved this issue.

Well, alright. Then there is indeed a good reason why that line was commented out 😆. Anyway, it was worth a try. Thanks for testing.

I guess @GerryWilko is right with his assessment in #541 that this is a bug in CoreBluetooth. Maybe someone should report it to Apple directly ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Device name changes not reflected in connect to known device
2 participants