Bluetooth WL18xx driver for mangOH: how to flash the driver


#1

hello,

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?

thanks
BR
Luigi


Application is not installed (MangOH Red WP8548)
#2

Hello,

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”.

Then I managed to execute the final step, that is:
10. Download bluetoothUtil app from https://github.com/mangOH/Demos/tree/master/BluetoothUtil as this will load the driver.

In practice, I ran “make” in the BluetoothUtil directory

BluetoothUtil$ make
mkapp -t wp85 bluetoothUtil.adef
[7/8] Creating info.properties
…/read-only./read-only/bin./read-only/bin/TIInit_11.8.32.bts./read-only/bin/bt-init.sh./read-only/bin/gatttool./read-only/bin/hciattach./read-only/bin/hciconfig./read-only/bin/hcitool./root.cfgdb39987d7d4436be5f6d7ca33f87b349 ./read-only/bin/TIInit_11.8.32.bts
1703f6f662eae1436ade4ed24f4493a9 ./read-only/bin/bt-init.sh
9b76c13a615ba5cee72bbb5871733dbd ./read-only/bin/gatttool
065e6a34547ba17a938f71f10fba2755 ./read-only/bin/hciattach
92972241ac181037292fab9f418bac16 ./read-only/bin/hciconfig
ba29a9adb4bbb740a83c3fde518c94c2 ./read-only/bin/hcitool
266f36a9a635328d90b802e97ef5ba50 ./root.cfg
[8/8] Packaging app

then I installed the executable on the target:

$ 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?

thanks in advance
Br
Luigi


#3

You need to run the BLE sensor interface to interact with a TI sensor stack


#4

Hi,

thanks for looking into this.

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?

thanks
BR
Luigi


#5

I think you can directly copy the dataRouter.api (in folder $MANGOH_ROOT/apps/DataRouter) to the “bleSensorInterface” folder where you compiled the application.