Move bluetooth and IP stack under the Networking menu.
Change-Id: I820191526d274143e196a7ecaf1ed9b020e8d0ef
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
scan_type should be set to BT_LE_SCAN_ACTIVE
Change-Id: I4cb4141919819ce104b002bfc0e89bedbc55e90d
Signed-off-by: Mariusz Skamra <mariusz.skamra@tieto.com>
When connected, the peripheral/slave can trigger changing connection parameters.
Handle such request on central/master and if needed update controller settings
regarding the relevant connection parameters.
Change-Id: If3c1d91752f8d3875918bd8bfe923330790f530e
Signed-off-by: Arkadiusz Lichwa <arkadiusz.lichwa@tieto.com>
This function allows to pick connection destination address.
Change-Id: I3e4959eec00905c64de3d8b9ef810b613c2e9f91
Signed-off-by: Szymon Janc <szymon.janc@tieto.com>
Use the Contiki simple UDP API when sending and receiving the
application data.
Change-Id: I39a379f30c8f7febbea223fcf8f8702faf82e39e
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Adding the user pointer to the uIP simple-udp API is vital so that
we can pass the net_buf to UDP receiver callback.
Change-Id: If7ee24f344fbd23eb7e0c3a99e78deb996d3667d
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Needed only in net_init.c so did not put the prototype into .h file.
Change-Id: If84e835d32bcfafd8e403ffa4def51fa72e0aa3e
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Needed so that UDP process can be called from net init.
Change-Id: Iaa165d7773b7f5851d0088aa0d7480b23e1a9199
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Allow the uIP stack to print information about its internal
status. By default the logging is disabled.
Change-Id: I55a03051d3f541b5f6ea950fdd6406814f937197
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Network driver should call this when it knows the device MAC or
EUI-64 address.
Change-Id: Ie03a80fcdb9a10cd1cb15f12037b3802da13bca9
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Create a separate utility function to set the IPv6 link local
address using the supplied MAC/EUI-64 address. This is needed
because the net_init() is normally called before the
MAC address is set.
Change-Id: I5d46bd8d802e95a99b4b340d1f37af893b798db8
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
TIMO_ENV changed to ZEPHYR_ENV as that one is now in use.
Change-Id: Ia7d7729a7210401ea2191710c708985c0282257a
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Adds user helper functions dealing with formatting bluetooth
address.
Refactors internal helpers using public ones.
Change-Id: If7b9f9a93b2aef3d25df55d6cfae9de05d8830b0
Signed-off-by: Arkadiusz Lichwa <arkadiusz.lichwa@tieto.com>
Enables sending LE discovery results to user app.
Updates central apps to use new scan API.
Change-Id: Id319c96e15554f2eed4cf507cddd114ca74aa8e5
Signed-off-by: Arkadiusz Lichwa <arkadiusz.lichwa@tieto.com>
hexadecimal is the usual format when defining GATT handles values so
printing in the same format makes it easier to debug.
Change-Id: I6babcadaf5a4cffbac73db29c155343540cee120
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This API is useful for applications wanting to monitor and disconnect
connections.
Change-Id: Ib1a98ece364f137262515fbb1163c6b08ddf792c
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
To be able to make these APIs usable for apps where the calls may
happen from preemptible tasks, it's safest to return a dedicated
reference and let the caller do bt_conn_put() once its done with the
object.
Change-Id: If227e088385b8c6f61f4061a54c745c0bff7a6c3
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
There's no clear need for this API (at least for now) and supporting
it means we really need to get all state cleanup procedures correct.
Remove it for now.
Change-Id: Ia2c7d51d410117bef12bc08f4f97a4e38ccfb77a
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This makes it clearer that this is a specialized API not intended for
general app usage (unlike most other things in bluetooth.h).
Change-Id: I0ce1d5903610a9b3a99cf0be9f0e1462b04bf45a
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
To make it clearer that these helpers are intended only for
Bluetooth-subsystem internal code, move them to a separate file.
Change-Id: Iea64780f5c61c1c96e12c9df378676bc49498fe4
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Adds internal HCI interface routine for creation of basic ACL LE link.
Most of the command interface parameters are fixed.
The internal interface is then used directly by simple public interface with
no connection validation.
Change-Id: I8ed72a9d01348e2a05b62facc9e85060e4500631
Signed-off-by: Arkadiusz Lichwa <arkadiusz.lichwa@tieto.com>
Now that we have a publicly exposed connection object it makes sense
to pass that to the connection callbacks rather than an address.
Change-Id: I8e9b17733d1789539a83c3dbc7a778336d2b71ff
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This one should be used for all public connection related APIs. Right
now it includes the reference counting and connection callback APIs.
Change-Id: Ib9b67e6115bb2e51322644757da1170851c3ca17
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
We'll have a public conn.h header file soon, so to avoid confusion
rename the existing conn.h to conn_internal.h.
Change-Id: I5e5c89ec184a0a2de63e244b034c55a3d97af9dc
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Call relevant Contiki uIP functions to setup the internal
structures in the uIP stack.
Change-Id: If64df1543d66d0ff378c12f371aa2c06fb2fde0a
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
The uip_ds6_nbr_get_ll() returns const addr but we need to
overwrite the addr so cast is needed here.
The const pointer returned by nbr-table.c:nbr_table_get_lladdr(),
which is called by uip_ds6_nbr_get_ll(), actually points to
neighbor cache which is dynamic and will never be stored in read
only memory, and thus is safe to cast to non-const.
Change-Id: Ifb47e4cb75054b0a9717304dc1d0bc497fee1e87
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
This mega patch changes how Contiki uses buffers. In standard
Contiki there is only couple of static and global buffers.
This makes the stack non-reentrant and only usable in one
thread. This patch replaces the global buffer with buffer
supplied by caller (net_buf.h). The Contiki stack is still not
fully re-entrant after this (packet reassembly needs more TLC)
but it is a good start.
Change-Id: I63abc230b36b14f33f687d3ef64cffb0f3a69f5d
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
The network context defines a network connection.
Change-Id: I29a186be6c9de9d824f10b6442fa1dfd3711d24d
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Functions to receive data from apps and transmit it to network, and
receive from network and pass data to apps.
Change-Id: I1b1b8c041e6c5e20294081d2cd403636e9909cdc
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
We need to make sure that the structs that are cast to received
network buffer are packed. We also need to enable __may_alias__
attribute for these structs in order to avoid "dereferencing
type-punned pointer" warnings.
Change-Id: Iad65612fd176ed41d66c6fa05c50151001a406eb
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Variable called "initialized" is only needed if the nameserver
pool size is bigger than 1 (UIP_NAMESERVER_POOL_SIZE > 1).
Change-Id: I1bce30bd783f76e56f12b8e76b29c932ab5765af
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
The function start_periodic_tcp_timer(void) is only needed if one
has UIP_TCP or UIP_CONF_IP_FORWARD defined.
Change-Id: I5185bfbdb998ec3d6985681a85c26e094406c404
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Real timer implementation needs function prototypes.
This is just to satisfy the compiler. Needs more TLC.
Change-Id: I39baa7cfe69d28aa1f330089e22144df286c0a0d
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
We do not need RIME so commenting out the callback call.
Change-Id: I09cd078a3741c6a8e5f4f8fd6387203e6107f218
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Comment out the psock.h include if TCP is not used.
Change-Id: I83e537b410b867a5ea30fb60c012521df351d05f
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Base is from Contiki git tree at git://github.com/contiki-os/contiki.git
commit 6ac939bc58ea76aa37e9b86af55ad51cfc3434e9
This one does not do anything useful yet. It sets the baseline for
subsequent patches.
Change-Id: I7078c938dd59188beceaf47721afaa521d8bde1a
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
conn was never set in struct flush_data passed to flush_cb.
Change-Id: I2a16479bf7660a96f705d1194245da02ee6eeff5
Signed-off-by: Szymon Janc <szymon.janc@tieto.com>
Add BT_GATT_CEP and BT_GATT_LONG_DESCRIPTOR so which can be used by
a task to declare long attributes.
Change-Id: I37a0bb1851b60f3cdfa7e2f00ade70d5c344abbf
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This introduce a new callback called flush to bt_gatt_attr to indicate
when and attribute can cache data, the data is automatically flushed if
regular write request happens and in case of prepare write it checks if
flush is supported otherwise return an error, then upon receiving an
execute write it perform flush over the entire database and respond
with result:
< ACL Data TX: Handle 42 flags 0x00 dlen 6
ATT: Execute Write Request (0x18) len 1
Flags: Immediately write all pending values (0x01)
> ACL Data RX: Handle 42 flags 0x02 dlen 5
ATT: Execute Write Response (0x19) len 0
Change-Id: I2c47f962858b8a741bf40509a648fe2cd6755691
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>