I’m using an imp005 and Silabs BGM113, I’m trying to use setscanparams() and startscan() to see how many adverts I get from nearby devices but I can’t seem to make it run.
Before that, I must open the bluetooth connection but I don’t know how to properly do that.
My bluetooth device is at uart0, and suppose the baudRate is 111111.
How can I start it if I cannot use hardware.bluetooth.open() and I don’t know the firmware?
imp005 does not have the BLE API as it has no BLE radio. To use the BLE API you need an imp004m (with the BLE jumpers fitted, see docs), or an impC001 with a pre-release OS build and an external 43438 or 43455 chip.
If you’re using an external BLE processor like the BGM113, you need to talk to the chip using its own UART protocol.
Back before SiLabs acquired BlueGiga, there was the BLE112, which is almost compatible with the BGM113, and we did a driver library for this which talked the BGAPI to the device.
To enable BGAPI support on the BGM113 I believe you need to configure and build firmware for the chip (it’s provided by SiLabs) - after this firwmare is loaded then the driver class for the imp should talk to the BLE chip. In the examples/firmware directory there are some examples for the BLE112 but you may need to dig a bit to work out how to do this on the BGM113.
No, you can’t pull on GitHub content from there, but you can do so if you use our cli tools impt and Builder, eg. @include "github:ElectricImpSampleCode/BuilderDemo/logging.nut"