I have an IoT expansion card with TI WiLink TM WL1831MOD for WiFi and BT.
I am following the instructions to generate the driver for the BT component on Git Hub:
I managed to create the .cwe file that needs to be flashed on the WP on my board (yocto_wp84.cwe). (steps 1 to 8)
The following step, though, is problematic:
9. Reflash new image with Bluetooth driver module support to the target board
FDT command: fdt yocto_wp85.cwe
My environment does not have the “fdt” command. I don’t find any reference to it on Legato.it either.
What can I do?
I saw on another post that the same problem could be solved by using fwupdate.
So, I ran:
$ fwupdate download yocto_wp85.cwe 192.168.2.2
Connecting to service …
Connecting to service …
Download started …
Download successful
I think the instructions on GitHub should update to suggest “fwupdate” instead of “fdt”.
$ app install bluetoothUtil.wp85.update 192.168.2.2
Applying update from file ‘bluetoothUtil.wp85.update’ to device at address ‘192.168.2.2’.
Unpacking package: 100% ++++++++++++++++++++++++++++++++++++++++++++++++++
Applying update: 100% ++++++++++++++++++++++++++++++++++++++++++++++++++
SUCCESS
Done
I can now see that this app is running on the WP and that both the LEDs on the IoT card (one for wifi and the other for Bluetooth) are ON.
Now the question is: how do I know if the Bluetooth driver is working ok? I tried to do a BT scan with my smartphone but I could not detect anytthing.
Any suggestion?
I tried to compile BleSensorInterface but I got the following error:
$ make
mkapp -t wp85 bleSensorInterface.adef
** ERROR:
/home/acal/test_bluetooth/Demos-74a620c30e78d56f0e38d1d752cd829df963a112/BleSensorInterface/bleSensorInterface/Component.cdef:17:8: error: Couldn’t find file 'dataRouter.api.'
Makefile:4: recipe for target ‘all’ failed
make: *** [all] Error 1
It fails in the Component.cdef file here:
requires:
{
api:
{
dataRouter.api
le_cfg.api
}
}
I located the file dataRouter.api in my mangoh directory:
$MANGOH_ROOT/apps/DataRouter/dataRouter.api
So, I modified the Component.cdef accordingly
requires:
{
api:
{
$MANGOH_ROOT/apps/DataRouter/dataRouter.api
le_cfg.api
}
}
but it still fails:
mkapp -t wp85 bleSensorInterface.adef
** ERROR:
/home/acal/test_bluetooth/Demos-74a620c30e78d56f0e38d1d752cd829df963a112/BleSensorInterface/bleSensorInterface/Component.cdef:19:2: error: Couldn’t find file '…/…/…//apps/DataRouter/dataRouter.api.'
Makefile:4: recipe for target ‘all’ failed
make: *** [all] Error 1
I’m sure there is a better way.
Is there any environment variable I need to set?
I think you can directly copy the dataRouter.api (in folder $MANGOH_ROOT/apps/DataRouter) to the “bleSensorInterface” folder where you compiled the application.