Visual Studio / XCode problem:
I found that having installed the command line tools using "xcode-select --install" that my Xamarin.iOS project in Visual Studio kept showing "Xcode is not currently installed or could not be found".
After much ado, I discovered in Xcode > Preferences > Locations > Command Line Tools, that the drop down was blank.
When I selected the drop down, the Command line Tools that were just installed were available, and when I selected that and rebooted Visual Studio, that the error message went away.
Hope it helps.
Post
Replies
Boosts
Views
Activity
I can verify the 'will it or wont it?' questions in the original post, and answers to date:
Indeed there is support for BL 5.0 Extended Advertising Support in iOS.
The way I deduced this is that I wrote the code in Android, and broadcast advertisements using that from a Samsung 20+, and in my iPhone 12 Pro, I downloaded the nRF Connect app, and was able to receive the Bluetooth 5.0 advertisements there.
Here's the Android code that demonstrated the capability in the Android (the actual extended advertising code is about 30 - 40 lines long), and all of the following variables returned true:
// Android Code
						var IsLe2MPhySupported = bluetoothAdapter.IsLe2MPhySupported;
						var IsLeCodedPhySupported = bluetoothAdapter.IsLeCodedPhySupported;
						var IsLeExtendedAdvertisingSupported = bluetoothAdapter.IsLeExtendedAdvertisingSupported;
						var IsLePeriodicAdvertisingSupported = bluetoothAdapter.IsLePeriodicAdvertisingSupported;
						var IsMultipleAdvertisementSupported = bluetoothAdapter.IsMultipleAdvertisementSupported;
						var IsOffloadedFilteringSupported = bluetoothAdapter.IsOffloadedFilteringSupported;
						var IsOffloadedScanBatchingSupported = bluetoothAdapter.IsOffloadedScanBatchingSupported;
and here is the PHY code (again, Android):
						byte[] bytes = Encoding.ASCII.GetBytes("The quick brown fox jumped over the lazy dog"); // Bytes:	54 68 65 20 71 75 69 63 6b 20 62 72 6f etcetera
						var uuid = new Android.OS.ParcelUuid(Java.Util.UUID.FromString("6bf6b447-63a8-4cea-81bd-15d87f3b3e43"));
						var parameters = new AdvertisingSetParameters.Builder()
										.SetLegacyMode(false)
										.SetInterval(AdvertisingSetParameters.IntervalHigh)
										.SetTxPowerLevel(AdvertiseTxPower.Medium)
										.SetPrimaryPhy((ScanSettingsPhy)Android.Bluetooth.BluetoothPhy.Le1m)
										.SetSecondaryPhy((ScanSettingsPhy)Android.Bluetooth.BluetoothPhy.Le2m);
						AdvertiseData data = new AdvertiseData.Builder()
												.AddServiceData(uuid, bytes)
												.Build();
						advertiser.StartAdvertisingSet(parameters.Build(), data, null, null, null, new AdvertisingSetCB());
The great thing is that I received the data in the iPhone nRF Connect app, that the Android code advertised: it is reasonable to assume that if the nRF Connect app can do it, that the code exists so that we can write the same functionality ourselves.
So yes, iPhone is capable.
Unfortunately the Apple API documentation is older than when the Bluetooth 5.0 specification was printed, so I haven't been able to replicate the Android behaviour on iOS, however I posted this to both encourage people, and at least to alert people to the proof that they are on the right track.
Does anyone have some actual code?
My understanding is that BL 5.0 will advertise up to 255 bytes, however in the most basic mode, the bytes cannot be changed once advertising begins. The Bluetooth specification does allow another mode to allow the advertised data to be updated, and that is the code that I am in particular looking for.
Just imagine that the latitude and longitude are in the data that are being advertised, and that the device's position is changing ... I'm interested in being able to modify the bytes in real time, as the position changes!
Kind regards!