Open microgeniusz80 opened 1 year ago
same issue here, any suggestion?
same issue here, any suggestion?
set duration in AdvertiseSettings
final AdvertiseSettings advertiseSettings = AdvertiseSettings(timeout: 50000);
then start advertising
await FlutterBlePeripheral().start(
advertiseData: advertiseData,
advertiseSettings: advertiseSettings,
);
Are you using android? The timeout is 400ms by default. You need to set the timeout value if you want it advertise longer.
"Limit advertising to a given amount of time. May not exceed 180000 milliseconds. Default: 400 milliseconds"
latest library update causes advertisement not showing anymore.
I/BluetoothLeAdvertiser(15672): startAdvertising is called I/BluetoothAdapter(15672): isLeEnabled(): ON I/BluetoothLeAdvertiser(15672): startAdvertisingSet, calling package name = dev.steenbakker.flutter_ble_peripheral_example I/BluetoothAdapter(15672): isLeEnabled(): ON I/FlutterBlePeripheral(15672): onStartSuccess() mode: 2, txPOWER 1 I/BLE Peripheral state (15672): advertising I/BluetoothLeAdvertiser(15672): stopAdvertising is called I/BluetoothLeAdvertiser(15672): stopAdvertisingSet, calling package name = dev.steenbakker.flutter_ble_peripheral_example V/AudioManager(15672): querySoundEffectsEnabled... I/BluetoothLeAdvertiser(15672): stopAdvertising is called
it seems that as soon as I/BLE Peripheral state (15672): advertising happened, within a second: I/BluetoothLeAdvertiser(15672): stopAdvertising is called.
I/BLE Peripheral state (15672): advertising I/BluetoothLeAdvertiser(15672): stopAdvertising is called These two lines were generated together when the start advertising button was clicked.
causing, it not to show any advertisement
previous version was fine