Commit Graph

29 Commits

Author SHA1 Message Date
Alexandre Bard 99ec03ae74 tibluetooth: Handle errors intead of relying on abritrary delay
There is no guarantee that a fix delay is actually enough, because with
the BT_EN gpio, we only control activation of bluetooth on the chip. But
we don't know the status of the whole chip.

Also hciattach has anyway a timeout of 5 seconds, so 0.1 seconds does
probably not make a big difference in this regard.

So in order to make it the safest possible, we can only rely a failure
handling and retrying. The number 5 for retries has been defined since
repeated restart of the service with only 3 retries leads to failure
pretty quickly. At 4 there is no failure anymore. So with 5 we are sure
the risk of failure is really low.

BugzID: 70195
2021-02-10 12:18:33 +01:00
Alexandre Bard b034539375 tibluetooth: Start only after bluetooth0 symlink is ready
The service must wait until udev has setup the symlink, since it is
using it.

BugzID: 69855
2021-01-20 15:37:26 +01:00
Alexandre Bard 36546bdf67 tibluetooth: Add missing dependency to gpio tools
This package contains gpioset, gpiofind, etc
This tools are required to access the gpios from shell scripts.

Also fixes the RDEPENDS ${PN}

BugzID: 65420
2021-01-19 12:27:13 +01:00
Lucien Mueller 9361b9851c tibluetooth: optimize build.
Signed-off-by: Lucien Mueller <lucien.mueller@netmodule.com>
2021-01-18 14:45:58 +01:00
Lucien Mueller 1c8c1bb002 tibluetooth: improved the service to be more generic.
Name the BT_EN gpio in the device tree when you want to use this service.
It has to be found with the command: "gpiofind BT_EN".

Signed-off-by: Lucien Mueller <lucien.mueller@netmodule.com>
2021-01-18 14:19:36 +01:00
Ramon Moesching 39810b981b tibluetooth: remove firmware file, handled speratly
The wifi and bluetooth chip ti wl18xx firmware files are handled by seperate
meta-netmodule-wlan layer.

BugzID: 67576

Signed-off-by: Ramon Moesching <ramon.moesching@netmodule.com>
2020-11-11 12:50:48 +01:00
Alexandre Bard 7a107f2695 tibluetooth: Restart on failure
It can happen that hciattach fails because of timeout.
Reexecuting the service in this case makes sure that the bluetooth
device is handled by bluetoothctl.

BugzID: 65391
2020-08-06 23:09:57 +02:00
Ramon Moesching 7397bb8e90 tibluetooth: hw26 initial bsp
Forked from nmhw21

BugzID: 63686

Signed-off-by: Ramon Moesching <ramon.moesching@netmodule.com>
2020-06-24 15:54:47 +02:00
Ramon Moesching a8ff9e15a6 tibluetooth: initial nmhw24 bluetooth service
BugzID: 58405

Signed-off-by: Ramon Moesching <ramon.moesching@netmodule.com>
2019-08-14 11:40:44 +02:00
Alexandre Bard 667fbe16d9 tibluetooth: Cleanup and use MACHINE_FEATURES 2019-07-23 11:29:40 +02:00
Alexandre Bard 44d382f295 hw16: tibluetooth: Delay startup
Since we moved to kernel 4.19 the WLAN/BT chip needs some time to
be initialized
2019-04-11 16:42:15 +02:00
Alexandre Bard 6c7f1b04f6 ti-connectivity: Use variable for lib directory 2019-04-09 11:06:00 +02:00
Alexandre Bard 4f86b24e74 hw16: Rename from nbhw to nrhw 2018-10-31 07:25:26 +01:00
Patrick Zysset e3cb20f2d1 nmhw21: update tibluetooth service name for nmhw21
Signed-off-by: Patrick Zysset <patrick.zysset@netmodule.com>
2018-10-26 01:10:57 +02:00
Patrick Zysset 929a4a1b9a nmhw21: fix machine definitions and branches
Signed-off-by: Patrick Zysset <patrick.zysset@netmodule.com>
2018-10-20 02:32:22 +02:00
Ramon Moesching 1981cc2383 tibluetooth: add vcu machine to install tasks
copy .service from nrhw20 to vcu
Signed-off-by: Ramon Moesching <ramon.moesching@netmodule.com>
2018-08-28 23:05:32 +02:00
Ramon Moesching 3b6d49491d tibluetooth: remove fct machine dependencies from recipe
Signed-off-by: Ramon Moesching <ramon.moesching@netmodule.com>
2018-06-13 13:47:01 +02:00
Alexandre Bard d1170bca5b Merge branch 'jethro' into fct
Conflicts:
	conf/machine/am335x-nbhw16.conf
	conf/machine/am335x-nrhw20.conf
	recipes-bsp/u-boot/u-boot-am335x-nbhw16-v1_git.bb
	recipes-bsp/u-boot/u-boot-am335x-nbhw16-v2_git.bb
	recipes-connectivity/tibluetooth/tibluetooth.bb
	recipes-connectivity/tibluetooth/tibluetooth/tibluetooth-nrhw20.service
	recipes-core/sw-update/sw-update/am335x-nrhw20/sw_update_config
2018-04-04 15:36:44 +02:00
Alexandre Bard 70d6eb29f6 nbhw16-fct : Fix tibluetooth recipe 2018-03-26 16:27:45 +02:00
Alexandre Bard 24ba1c2f82 nbhw16+nrhw20: Fix warning on boot related to bluetooth 2018-03-01 14:02:25 +01:00
Stefan Eichenberger d66712a16e tibluetooth: add support for nrhw20-fct 2018-02-22 17:51:08 +01:00
Alexandre Bard 061bfedd2b nrhw20: Update GPIO pin in BT init script 2018-02-22 16:45:12 +01:00
Alexandre Bard 5cdd281e6e nrhw20: Update GPIO pin in BT init script 2018-02-20 11:24:14 +01:00
Stefan Eichenberger 084ca35283 bluetooth: update bluez5 to 5.44, update ti firmware
The BLE connect needs too much time (>2s) which can trigger the kernel
to send an error. This is unwanted with the new firmware it works a
little better but an increase of the timeout to 5s in the kernel is
still necessary.
2017-04-05 16:32:47 +02:00
Stefan Eichenberger bcfc1d459d tibluetooth: make tibluetooth depend on bluetooth 2017-01-12 15:58:09 +01:00
Stefan Eichenberger 5a98ee7cca tibluetooth: change tty device from ttyO5 to ttyS5
Trough to another UART driver which works much better on am335x, the
naming is now correct again (ttyS instead of ttyO)
2016-11-10 19:21:41 +01:00
Stefan Eichenberger 0549f1c9a0 tibluetooth: update firmware to newest version 2016-11-10 19:21:08 +01:00
Stefan Eichenberger 93edc7c821 nbhw16: use bluetooth in non_st mode
If bluetooth is used in non_st mode we can use the normal uart_hci
driver. This driver works much better and the whole setup is much
easier. We don't need the Shared Transfer stuff anyhow, because the
module does not have GPS or FM.
2016-08-25 15:56:23 +02:00
Stefan Eichenberger 8113167ad8 bluetooth: add tibluetooth stuff for nbhw16 2016-07-22 17:33:51 +02:00