Post

Replies

Boosts

Views

Activity

Core Bluetooth does not support scan and connection to bluetooth PAN profile devices in iOS
Looking for a solution to scan and connect to bluetooth PAN profile devices(via NAP role). We have implemented the below code using CoreBluetooth library. With this approach, we are not able to discover PAN devices, however, other Bluetooth devices are discovered. public class BluetoothScanner : CBCentralManagerDelegate, ICBPeripheralDelegate { private CBCentralManager centralManager; CBPeripheralManager peripheralManager; private List<CBPeripheral> bluetoothDevices = new List<CBPeripheral>(); private CBPeripheral connectedPeripheral; public List<CBPeripheral> BluetoothDevices { get => bluetoothDevices; set => bluetoothDevices = value; } public BluetoothScanner() { centralManager = new CBCentralManager(this, null); } public override void UpdatedState(CBCentralManager central) { if (central.State == CBCentralManagerState.PoweredOn) { NSDictionary keyValuePairs = new NSDictionary(); PeripheralScanningOptions options = new PeripheralScanningOptions(); options.AllowDuplicatesKey = true; central.ScanForPeripherals((CBUUID[])null,options ); } else { Console.WriteLine("Bluetooth is not available"); } } public override void DiscoveredPeripheral(CBCentralManager central, CBPeripheral peripheral, NSDictionary advertisementData, NSNumber RSSI) { if (advertisementData.ContainsKey(CBAdvertisement.DataServiceUUIDsKey) && advertisementData[CBAdvertisement.DataServiceUUIDsKey] is NSArray serviceUuids) { Console.WriteLine("serviceUUID:" + serviceUuids.ToString()); var _serviceUuid = serviceUuids.ToString(); string serviceUuid = _serviceUuid.Trim().Replace("(", "").Replace(")", "").Replace("\n", "").Replace(" ", ""); if (serviceUuid.Equals("1116") || serviceUuid.Equals("1115") || serviceUuid.Equals("1124")) { Console.WriteLine($"Discovered NAP device: {peripheral.Name} ({peripheral.Identifier})"); } } if (!BluetoothDevices.Contains(peripheral) && peripheral.Name !=null) { BluetoothDevices.Add(peripheral); } } }
2
0
731
Mar ’23
Access to Multicast networking capability for application
Hello, We need to request for multicast capability for our application. We are trying to raise a request for the same. But, we get an error message stating "Need to update account by agreeing to latest license agreement". Could you please help us with this as we do not see any pending license to be approved from our end. Is there any other process to get the approval for enabling multicast networking in our application?
1
0
499
May ’23