Moves the nanokernel LIFO in-code comments to the .h file. The comments
were changed to the Javadoc Doxygen format. A comment per alias was
created based on the original comment.
Change-Id: Iacd6bf1136ceac439d05669ef51cf28b858b306b
Signed-off-by: Rodrigo Caballero <rodrigo.caballero.abraham@intel.com>
Packetbuf is not global now. Pass net_mbuf parameter to
packebuf apis.
Change-Id: Ie272e78c3294e26ad14ba0d350668ad5ac99f797
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
Using swap_in_place algorithm allows to eliminate more buffers.
Change-Id: Ifefd291e45b84213114d665adff9839fb131a185
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Add local and remote Connection Signature Resolving Keys and helper
functions.
Change-Id: I63af2e566dccc6ffb5397d28bde6f04bc78b93b1
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Checking error returned by L2CAP & SMP allows to fail Bluetooth
initialization in case something goes wrong.
Change-Id: Ie1c796eb64bcdee0f9dc99638c79fd4d7c05e456
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
In a case there no crypto library, AES-CMAC Message Authentication Code
might be calculated with the help of Host Controller LE Encrypt command.
Change-Id: If7073bf4baa3f86c04728712f6789cc269673da7
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
All public APIs shall contain the complete documentation including
@return in case the function return something.
Change-Id: I1f16eaf988ace1a3ac760c59eacd71a6a5912df9
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This adds bt_gatt_write which can used to write attribute value.
Change-Id: I45a02e6dbf642ed1bcab8234180f2c48a28e2874
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Adds to btshell app a command to enable mimic GATT client to
perform multiple read attributes request using set of input handles.
The syntax is: gatt-read-multiple <address> <addres-type> <h1> <h2> ...
Handles should be entered as hex values and are 2-octets wide each.
Change-Id: Ic37a4486a11c645685cbfc782d36457af0fe9453
Signed-off-by: Arkadiusz Lichwa <arkadiusz.lichwa@tieto.com>
Allows shell commands read more number of input parameters.
It is updated to 10 input parameters.
Change-Id: Ia943e8c6f0caaaf74cebcdb9dbe3542d90b2e4b9
Signed-off-by: Arkadiusz Lichwa <arkadiusz.lichwa@tieto.com>
This function operates on bt_conn so it should be in conn.c and
exported through conn.h. Rename it with the appropriate bt_conn_*
prefix.
Change-Id: Id17c67f0e95cc1afb10aa7742b2d2ce0110ea616
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Rename the hci_core.c (previously internal) variable 'dev' to 'bt_dev'
and export it through hci_core.h. This way e.g. bt_conn doesn't need
to store an internal reference to it.
Change-Id: Ic1368c8f20d307c6a13a412f80d8183b56d7a76b
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Let bt_le_scan_update() perform all necessary changes to active
scanning so that it's even more helpful to the start/stop scanning
APIs as well as the bt_connect_le() API.
Change-Id: I8ee2daf96297749f782d364dfb66c7d0bbc48f5e
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
The bt_disconnect deals with the bt_conn object and should therefore
reside in conn.c and be exported through conn.h. It should also have
the appropriate bt_conn_* prefix.
Change-Id: I75eb648fd9aa8ced9a991d472c319d25f4b772af
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
In case bt_att_send fails the buffer reference need to be dropped
otherwise it will never return to the buffer poll.
Change-Id: I644a0af52d9f64fcb43a982cf121a0c51b676b90
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This adds bt_gatt_read which can used to read attribute values.
Note: Attributes which values are bigger than the MTU need to be read
multiple time until the end since the stack cannot cache any data.
Change-Id: I09c502eeb674a577673182c35a0e1a84519fd3b7
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This makes it possible to take advantage of the function also from
bt_disconnect() in the CONNECT_SCAN state.
Change-Id: I8c740f2b49b7690b6020ffd5bff6f04f8f850a5d
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Prepare the function for more generic usage where it can also disable
scanning if necessary. Once all bt_conn related function are moved to
conn.c this needs to be exported, so use the proper bt_ prefix.
Change-Id: I07c1bc7981b25a516682a8d7e6566af36d3c1fd8
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
There's no state where we'd want the AUTO_CONNECT flag to stay enabled
when requesting explicit disconnection.
Change-Id: I76dc112071d30199bb5201e5d5633125e1035ad5
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Calling bt_conn_set_auto_conn one can decide if auto connect shall
be used. If so, everytime the connection is lost, passive scanning
will be enabled to listen for connectable advertisements from
remote device and re-establish the connection.
Auto connect can be disabled if one decide to disconnect from
this device using bt_disconnect or call bt_conn_set_auto_conn
with auto_conn flag set to false.
Change-Id: Ic9952e313cb8612ea6c72838be0755805daeffcf
Signed-off-by: Mariusz Skamra <mariusz.skamra@tieto.com>
To avoid a forward declaration in a subsequent patch.
Change-Id: Ib3fc482af8f1fadda8e27af99811f73e64cd175a
Signed-off-by: Mariusz Skamra <mariusz.skamra@tieto.com>
Modifies ATT transport bt_att_read_mult_req type used in read multiple
request.
Internally now it's been declared as array of handles.
For ensuring validness of minimum PDU length being 4 octets wide for
multiple read request, new define is introduced and used instead of
type sizeof evaluation.
Change-Id: I8b0096497d456c0e6fa6b5b1eb88bb1b8079ae04
Signed-off-by: Arkadiusz Lichwa <arkadiusz.lichwa@tieto.com>
Enables directly add 16-bit value at the end of operational buffer.
Value is converted to little-endian format before is appended.
Position of buffer's tail is updated during addition.
Usage of bt_buf_add() call enables monitoring available limited room
in the buffer when CONFIG_BLUETOOTH_DEBUG is on.
Change-Id: Id7ac62cd3b11ef03302e94185a7faae747eccb20
Signed-off-by: Arkadiusz Lichwa <arkadiusz.lichwa@tieto.com>
Update test_15_4 makefile and prj files to support
CONFIG_NETWORKING_WITH_15_4_LOOPBACK_UART build.
Change-Id: I8247b67b1beac18f7c62349d049694cf5aa437ca
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
Add support for 802.15.4 dummy radio driver to send frames
through qemu uart and and receive frames through uart. So
two qemus can send and receive 802.15.4 frames.
Change-Id: I325281d04234f7ec07c66bf31691c18a9d7c4d93
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
This adds bt_gatt_discover_descriptors which can used to discover all
descriptors in the given range.
Change-Id: Idf93852ef9d8ba3bfce20dc0b95f4e11aa0dc73d
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
If the advertising event type is not connectable, we shouldn't
try to establish connection with this device.
Change-Id: I5be6427858856a6318553ddc0acf53aa2d991b7b
Signed-off-by: Mariusz Skamra <mariusz.skamra@tieto.com>
If we have IRK stored for device we try to connect to,
it means we should look up bt_conn based on identity address,
not the address from advertising or connection complete event.
Change-Id: Iccbd766acf9a62cfe5e967cf54597854881f37d5
Signed-off-by: Mariusz Skamra <mariusz.skamra@tieto.com>
check_pending_conn gives more information about what this function
is actually doing.
Change-Id: Id21580e03bb1c341c7cf3671a666e385738fb3d4
Signed-off-by: Mariusz Skamra <mariusz.skamra@tieto.com>
During allocation ATT pdu buffer there's possibility to precheck
whether length of such buffer doesn't exceeds ATT MTU.
Change-Id: I7f729e4d7f7474d7f33e417ea61a00ceeb7426c5
Signed-off-by: Arkadiusz Lichwa <arkadiusz.lichwa@tieto.com>
This adds above function to stop ongoing advertising.
Change-Id: I16b3913524a61e844a81cbe733f2b8e6072ab442
Signed-off-by: Mariusz Skamra <mariusz.skamra@tieto.com>
When we already have bt_keys object and want to ensure that it
contains a certain key type it's wasteful to have to go and call
bt_keys_get_type() (because of the extra lookup it'll do).
Change-Id: I97831e6817e734d7e8b6aa18c7917736577f3438
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This adds function handler for Find Info Response PDU which call the
request callback:
< ACL Data TX: Handle 3585 flags 0x00 dlen 9
ATT: Find Information Request (0x04) len 4
Handle range: 0x0010-0x0011
> ACL Data RX: Handle 3585 flags 0x02 dlen 14
ATT: Find Information Response (0x05) len 9
Format: UUID-16 (0x01)
Handle: 0x0010
UUID: Characteristic (0x2803)
Handle: 0x0011
UUID: Heart Rate Control Point (0x2a39)
Change-Id: I981e9efe75f6eb032d9468549272c82720cb133d
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
With this patch, Identity Information and Identity Address
Information are properly received. There was a bug when
returning too early from smp_pairing_master function
and not setting BT_SMP_CMD_IDENT_INFO bit in allowed_cmds.
bt: bt_smp_recv (0x0010f054): Received SMP code 0x06 len 17
bt: smp_pairing_encrypt (0x0010f054):
bt: bt_smp_recv (0x0010f054): Received SMP code 0x07 len 11
bt: smp_pairing_master (0x0010f054):
bt: bt_smp_recv (0x0010f054): Received SMP code 0x08 len 17
bt: bt_smp_recv: Unexpected SMP code 0x08
bt: bt_smp_recv (0x0010f054): Received SMP code 0x09 len 8
bt: bt_smp_recv: Unexpected SMP code 0x09
The return should be after distributing LTK, EDIV and Rand if
IdKey was not set.
bt: bt_smp_recv (0x0010effc): Received SMP code 0x06 len 17
bt: smp_pairing_encrypt (0x0010effc):
bt: bt_smp_recv (0x0010effc): Received SMP code 0x07 len 11
bt: smp_pairing_master (0x0010effc):
bt: bt_smp_recv (0x0010effc): Received SMP code 0x08 len 17
bt: smp_ident_info (0x0010effc):
bt: bt_smp_recv (0x0010effc): Received SMP code 0x09 len 8
bt: smp_ident_addr_info (0x0010effc):
bt: smp_ident_addr_info (0x0010effc): identity 88:63:DF:88:0E:83 (public)
bt: bt_smp_disconnected (0x0010effc): conn 0x0010badc handle 64
Change-Id: Ic98cf6fd6ad2f7e41c6cd506d39fc9a9571a491f
Signed-off-by: Mariusz Skamra <mariusz.skamra@tieto.com>