Hi @cchenry,
When I run the command, I get: root@fx30:/legato/apps/e0d0a1631b75f51c01a659e398b5c876/read-only/bin# ./hciconfig -a hci0: Type: BR/EDR Bus: UART BD Address: 00:00:00:00:00:00 ACL MTU: 0:0 SCO MTU: 0:0 DOWN RX bytes:0 acl:0 sco:0 events:0 errors:0 TX bytes:36 acl:0 sco:0 commands:9 errors:0 Features: 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 Packet type: DM1 DH1 HV1 Link policy: Link mode: SLAVE ACCEPT
and
root@fx30:/legato/apps/e0d0a1631b75f51c01a659e398b5c876/read-only/bin# ./hciconfig hci0 up Can't init device hci0: Connection timed out (110)
I’ll try the same with my new bluetooth device and I’ll also try with my smartphone
Also, when I rebooted my FX and try again the script, I have: root@fx30:/legato/apps/e0d0a1631b75f51c01a659e398b5c876/read-only/bin# ./bt-init.sh PWD is: /legato/apps/e0d0a1631b75f51c01a659e398b5c876/read-only/bin Can't set device: Device or resource busy Can't initialize device: Device or resource busy hci0: Type: BR/EDR Bus: UART BD Address: 00:00:00:00:00:00 ACL MTU: 0:0 SCO MTU: 0:0 DOWN RX bytes:0 acl:0 sco:0 events:0 errors:0 TX bytes:24 acl:0 sco:0 commands:6 errors:0 Can't init device hci0: Connection timed out (110)
Hi @mahtab, @GabiSRC,
How did each of you build the FX30 kernel with the bluetooth options? Did you follow the legato-spm or did you grab the WP85 source package?
The TI file is out of date for the IoT card, what fixed it was getting an updated firmware driver and replacing the one in the demo app. That’s all that was needed. It’s very important to get the right firmware driver for your bluetooth device.
One thing I’d still like some help with is, I want to develop a legato app that can call on the hci & rfcomm api, instead of running the hci tools on the command line, but the build_bluex_util scripts don’t produce any libraries that I can see - there are .lo and .la files for bluetooth but not a .so dynamic library. How would I go about producing a dynamic library that I can use in my legato application ?
update - actually I can see a libbluetooth-internal.a and a libbluetooth.so.x.x.x file after enabling build library support, but if I include them in a ldflags section of a cdef I still get build errors resolving hci_ api calls )…ahh it’s ok, figured it out…
For my side, I didn’t need to change the TI firmware version. Rather, the UART2 CTS line needs to be driven low in order to communicate with the TI chip.
@GabiSRC, where are you at now? I’m unsure if you’re using the TI chip or a different one still?
Hi,
Still the same for me…(with a non-TI chip)
So if I understand correctly, for each bluetooth device manufacturer, we need to put the correct firmware?
If “any” doesn’t get you a BD Address, then you’d have to get the right firmware file for your chip. It shouldn’t be too hard to track down from the vendor or even from reading off the top of the chip - or the IOT card. Then you have to make sure that hciconfig recognizes the type, like “texas”. Check the file hciattach.c around line 1100
Hi @GabiSRC,
Each BT mfg is different. If you look at hciattach.c around the area the mahtab mentioned, you’ll see there’s a table of different manufacturers. Check to see if yours is there and already supported.
For the TI chip, the bts file is loaded when hciattach is called. Are you currently using “any” when you call hciattach?
Could you please verify if the chipset you’re using supports 2-wire UART only mode?