Subset of commits to fix the pairing for dual mode devices. Main
commit that fixes is 2d3685252a21cda4b918ad1cc4dd0572bd5c6d3c, but some
previous commits are required as well.
"""
For dual mode devices we need to pass address type used in pairing
events to reply with correct one on agent reply. Otherwise reply for
BR/EDR pairing of dual mode device would use address type (which is
valid only for LE address) resulting in reply being ignored by kernel
and eventually pairing timeout.
"""
https://jira.digi.com/browse/DEL-5226
Signed-off-by: Isaac Hermida <isaac.hermida@digi.com>
For avoid compilation error due to platform specific patches, first apply
the common patches and later apply platform specific patches.
Signed-off-by: Isaac Hermida <isaac.hermida@digi.com>
Create a multiple patch file with the original qualcomm code that adds
support for the qca6564 chip (hcitattach_rome)
Signed-off-by: Isaac Hermida <isaac.hermida@digi.com>
The experimental flag is needed to run the GATT server application.
https://jira.digi.com/browse/DEL-5023
Signed-off-by: Isaac Hermida <isaac.hermida@digi.com>
Avoid splitting the boot script message in two different lines:
Starting bluetooth hardware: [OK]
done.
Signed-off-by: Javier Viguera <javier.viguera@digi.com>
Tweaked to maintain some recipes' revisions to AUTOREV instead of the
fixed SHA1s from the tag.
Signed-off-by: Javier Viguera <javier.viguera@digi.com>
The following changes have been made to the bluetooth-init script:
* Remove "hciconfig hci0 up/down" and this is now deprecated and likely
to fail. We use the AutoEnable feature of bluetoothd for this now.
* Move setting the MAC address to hciattach instead of using hcitool.
* Remove resets performed by hcitool and hciconfig. The hciattach
application already performs a reset and that should suffice.
* Remove hciattach retries.
https://jira.digi.com/browse/DEL-3711https://jira.digi.com/browse/DEL-3436https://jira.digi.com/browse/DEL-3636https://jira.digi.com/browse/DEL-3955
Signed-off-by: Alex Gonzalez <alex.gonzalez@digi.com>
This commits adds patches to hciattach for the following:
* Strict flow control setting
The hciattach application has a flow | noflow command line argument that is
currently only applied on the first configuration of the uart port. The
hciattach_rome plugin ignores this setting and assumes hardware flow
control is always supported. This commits makes hciattach obey the user flow
control indication.
* Modify hciattach_rome to set MAC address. The MAC address setting
feature in the rome plugin now works with the command line specified
MAC.
* Reduce verbosity. hciattach now accepts a "-v" verbose flag. By
default verbose output it omitted.
https://jira.digi.com/browse/DEL-3711https://jira.digi.com/browse/DEL-3436https://jira.digi.com/browse/DEL-3636https://jira.digi.com/browse/DEL-3955
Signed-off-by: Alex Gonzalez <alex.gonzalez@digi.com>
- The Bluetooth daemon was always executed before setting up the
hardware, generating several problems specifically in the CCIMX6SBC.
This was causing the Bluetooth driver to override the Bluetooth name
and alias, as well as avoiding any host function on Bluetooth profiles.
Only pairing and ping was working, as well as client profile sides.
- This change also fixes some issues in the CCIMX6UL platforms with the
Bluetooth daemon failing to perform several bluetoothctl operations.
https://jira.digi.com/browse/DEL-4000https://jira.digi.com/browse/DEL-4015
Signed-off-by: David Escalona <david.escalona@digi.com>
Reviewing the patches while updating the QCA firmware to a new release,
I encountered this patch. On the original PR it says:
"Do not use hcitattach to reconfigure the baudrate but set it directly in the
Bluetooth FW file; this save us from some syncronism problems if we are not
using HW flow control."
Current spins of the module already use hw flow control. Also, not allowing
hciattach to override the baudrate does not seem right to me. It would be
enough with passing a 3M baudrate to hciattach to match the firmware
default.
Signed-off-by: Alex Gonzalez <alex.gonzalez@digi.com>
Implement:
* support to start, stop and restart interface
* states machine and retries system to recover from command failures
* overall simplification and code clean-up
https://jira.digi.com/browse/DEL-3858
Signed-off-by: Javier Viguera <javier.viguera@digi.com>
With the upgrade to Morty, there is a new bootscript that is provided
by Poky. This bootscript is just launching the generic bluetooth daemon,
but it's not doing any hardware initialization.
The fix is to split the hardware initialization to a different
bootscript 'bluetooth-init' and launch it also on boot.
https://jira.digi.com/browse/DEL-3855
Signed-off-by: Javier Viguera <javier.viguera@digi.com>
Do not use hcitattach to reconfigure the baudrate but set it directly in the
Bluetooth FW file; this work arounds some synchronization problems when not
using HW flow control.
https://jira.digi.com/browse/DEL-3052https://jira.digi.com/browse/DEL-3057
Signed-off-by: Isaac Hermida <isaac.hermida@digi.com>
Add a couple of bluez patches: one for increasing the number of connection
showed with "hcitool con" command and remove "refresh" option in hcitool
help that is not supported.
The qca6564 chip can support more than 10 simultaneous BLE connections.
https://jira.digi.com/browse/DEL-2735
Signed-off-by: Isaac Hermida <isaac.hermida@digi.com>
The power regulator connected to the qca6554 chip is always on, which causes
the Bluetooth part to not work correctly after a software-reset.
This commit asserts momentarily the BT_EN line during the start-up sequence
to reset the Bluetooth controller so that it is in a predictable state after a
reset.
https://jira.digi.com/browse/DEL-2623
Signed-off-by: Isaac Hermida <isaac.hermida@digi.com>
The steps to set the bluetooth MAC address is send an specific hci command
and an hci reset, so the bluetooth interface need to be up in order to
configure it.
Additionally we have generalized the way to read the MAC address from the
device tree and removed some old code for getting the MAC address in
kernel version 2.
https://jira.digi.com/browse/DUB-595
Signed-off-by: Isaac Hermida <isaac.hermida@digi.com>
Add a software workaround to disable the HW flow control because the SOM
revision 3 (and older) has swapped the bluetooth TX and RX lines so we need
to operate in DTE mode which implies that the HW control lines are swapped.
This also implies reducing the baudrate to avoid the need for HW flow control.
https://jira.digi.com/browse/DEL-2611
Signed-off-by: Isaac Hermida <isaac.hermida@digi.com>
Port the bluez5 qca6564 support based on 5.19 to the current version 5.33.
The ported version is based on qualcomm tag r110048.3.
https://jira.digi.com/browse/DEL-2581
Signed-off-by: Isaac Hermida <isaac.hermida@digi.com>
The script toggles the BT power GPIO regardless of the value being
undefined.
Check that the GPIO is defined before trying to toggle it.
Signed-off-by: Hector Palacios <hector.palacios@digi.com>
The BT power GPIOgpio was determined basing on machine name on device tree.
This corresponds to the name of the board, and might be changed by a user
that designs his own carrier board to use the module on.
Besides, the BT power GPIO is a pin that's routed on the module (both on
the ConnectCore 6 and on the ConnectCard for i.MX28) not on the carrier
board.
This commit determines the BT power GPIO basing on the module string inside
the 'compatible' property. This must exactly match the module name and is
a required property for using Digi module's BSP.
Signed-off-by: Hector Palacios <hector.palacios@digi.com>
https://jira.digi.com/browse/DEL-2109
Add BLUEZ5_NOINST_TOOLS to bluetooth packagegroup. Gatttool is
added to BLUEZ5_NOINST_TOOLS in bluez5.inc so it is not necessary
to add gatttooll to do_install_append function.
Signed-off-by: Urko Nalda <Urko.Nalda@digi.com>
Add support for bluez5 profiles under experimental flag.
Health Device Profile is an experimental profile.
https://jira.digi.com/browse/DEL-1936
Signed-off-by: Urko Nalda <Urko.Nalda@digi.com>
If the bluetoothd daemon is launched before the interface is ready
RFCOMM/L2CAP listening socket connections fail (apparently because
the channel is not ready) with BlueZ 5.
Signed-off-by: Hector Palacios <hector.palacios@digi.com>
https://jira.digi.com/browse/DEL-2042
yocto-2.0 (jethro) does not support bluez4 by default, it has been set
deprecated, but there is some functionality that does not work with bluez5
like bluetooth audio with alsa and some previous scripts like hdp.py are not
API compatible.
In order to compile a project with bluez4, just remove bluez5 from distro
features from your local.conf project.
DISTRO_FEATURES_remove = "bluez5"
https://jira.digi.com/browse/DEL-1943https://jira.digi.com/browse/DEL-995
Signed-off-by: Isaac Hermida <isaac.hermida@digi.com>
btfilter (abtfilt) and bluetoothd are two independent services. Break the
relationship between them and split the support in independent init scripts
https://jira.digi.com/browse/DEL-1933
Signed-off-by: Isaac Hermida <isaac.hermida@digi.com>
The script was basing on the variant coded in the HWID to determine
if the variant had bluetooth, by comparing to an array of hard-coded variants.
This required the script to be updated with every new variant that supported
Bluetooth.
The patch checks instead if the node 'bluetooth' exists at all in the device tree
to determine if the variant supports Bluetooth.
https://jira.digi.com/browse/DEL-1933
Signed-off-by: Isaac Hermida <isaac.hermida@digi.com>
We want to unlink the script from abtfilt application, so moved to a different
recipe (that includes hciattach).
https://jira.digi.com/browse/DEL-1933
Signed-off-by: Isaac Hermida <isaac.hermida@digi.com>
Add the following lines to add support for the HSP/HFP and A2DP profiles,
and to route the audio through the HCI SCO channel:
Enable=Source,Sink,Headset,Gateway,Control,Socket,Media
SCORouting=HCI
Signed-off-by: Alex Gonzalez <alex.gonzalez@digi.com>
This installs 'libbluetooth.a' in the toolchain (needed to build static
binaries that use libbluetooth).
https://jira.digi.com/browse/DEL-1303
Signed-off-by: Javier Viguera <javier.viguera@digi.com>
(cherry picked from commit f53ae4ab2af1bc5dd2f3f38f9d351d9eefd1f163)
gobject introspection is not supported in Yocto, so there is not a
python binding package to use it.
Bluez4 uses such functionality in some of the test scripts. This patch
replaces it with the legacy pygobject, so they can work again.
https://jira.digi.com/browse/DEL-1274
Signed-off-by: Javier Viguera <javier.viguera@digi.com>
The bbappend was created mostly to install an old version of the
'simple-agent' test application (the one included in the package was
failing) but upstream (Poky) has fixed most of the issues, so our
bbappend is just needed now to enable 'health' profile support.
Signed-off-by: Javier Viguera <javier.viguera@digi.com>
This cleans following warning:
Use of PRINC is deprecated.
The PR server should be used to automatically increment the PR.
See: https://wiki.yoctoproject.org/wiki/PR_Service
Signed-off-by: Javier Viguera <javier.viguera@digi.com>
'simple-agent' python script included with this package depends on
python-pygobject and python-dbus
https://jira.digi.com/browse/DEL-643
Signed-off-by: Javier Viguera <javier.viguera@digi.com>
The final product will be called "Digi Embedded for Yocto" or DEY for
short.
This commit renames all relevant files.
https://jira.digi.com/browse/DEL-474
Signed-off-by: Alex Gonzalez <alex.gonzalez@digi.com>