The previous enable/disable API implementations weren't actually what
their names implied, but simply gave the right result for the
initialization scenario when called after each other. Split these into
proper init/enable/disable APIs which do the exact thing that the
names imply.
Change-Id: I09a930d3607f4919ecd889ec3ee4ba8d7b12ee36
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
When choosing Bluetooth UART driver on arduino_101 select also
BLUETOOTH_NRF51_PM which enables the Nordic chip.
Change-Id: I22dcb60a676bb0e4cdfe995590803dbfbf87f23a
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
To avoid explicitly having to state this in every application's config
file simply set the defaults to the sanest values.
Change-Id: I2c2bbd2424a12ec9a36bbd6d0c9cd9a1d259e5e5
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
We need to check the timer expiration properly. The nano_timer_test()
will return user data to caller if the timer is expired.
The issue that is fixed by this commit started to appear after
the commit 9b2452047d which combined
nano_timers and nano_timeouts.
Change-Id: I9cf10e605f1c4767caa1aad9dcf29a159af55e28
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
User can activate debugging in REST by setting
CONFIG_NETWORK_IP_STACK_DEBUG_REST_ENGINE option in config file.
Change-Id: I1c1c62803c0fcc5fb3a37d3d76de94754b33506a
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
When initializing the CoAP engine, make sure that we
initialize the local IP address properly.
Change-Id: I8ddc670371c3a58095cd5db6b435c5b1793c268b
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Network context must be cleared when CoAP context using that
is removed.
Change-Id: Id8deb798919fccf025af67c18f3a246cfa46598f
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Print info about packet serialization if debugging is turned on.
Change-Id: I578ecb4e85ab34c74a960cbce9aa4f9bf5b9473d
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
The routine does not check prefixes properly which are not
multiple of 8.
Change-Id: I421456720541894eb4d9a2839361095a50587513
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
User can select various coap debugging options from Kconfig.
Change-Id: I97cc82278c230b9678f506063fed5683dc271c8a
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
This makes the fiber_sleep sleep indefinitely until fiber_wakeup is
called.
Change-Id: Id674c1f689376784599fc79c86d1c406474bb48f
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This is a complete new cc2520 driver for zephyr. Intention is to fit
better within Zephyr device driver model.
- It's (almost*) ready to be instanciated as many times as necessary
- It's fully interrupt based on SFD and FIFOP (no pin polling)
- It's nicer to other sub-systems (it sleeps, no busy-wait loop)
- It still loosely complies to old legacy radio device driver model
*: GPIO API needs to be fixed in order to accept multiple callbacks, as
well as enabling callbacks to retrieve private data.
Notes:
- Hardware filtering does not work yet as the net stack, above, needs to
provide the relevant information for it (src/dst ieee802154 extended
addresses, short addresses...)
- A embryo of generic functions (txpower, channel, addresses...)
have been implemented but don't belong yet to any radio device driver
model. Such new driver model will come afterwards (soon?)
- SPI API would need to be improved to avoid as much as possible memcpy
as well as spi_slave_select() call.
Change-Id: I1fd6dfff28fba3984f6006d394ea12f1e763ac18
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
ieee802154 is a more relevant name. Applying the change in
include/drivers as well.
Change-Id: I7f7188ed0421045d7667303c375eeb8af1298b97
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
SENSOR_ATTR_FULL_SCALE attribute now expects the value as radians per
second.
Change-Id: I8082a1f112f1ed8efb511de39e3a8e5ae3d3ed0c
Signed-off-by: Murtaza Alexandru <alexandru.murtaza@intel.com>
The ARC application collects temperature, humidity and pressure data from
a set of sensors connected to the Arduino 101 and sends it to the x86 core
through IPM. The collected data is also displayed on a Grove LCD.
The x86 application exposes the received sensor data as a simple Bluetooth
Environmental Sensing Service.
This version of the sample does not offer notifications when the sensor data
values change.
Change-Id: Iee456d5d2455c7ccb7c5923ef3c94ecb20b5cecb
Signed-off-by: Bogdan Davidoaia <bogdan.m.davidoaia@intel.com>
As for SECONDS() and MSEC, now sys_clock.h provides a USEC() macro.
Change-Id: I43e8b132d2deeb862d8cfda1f785115f339d6ddb
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Corrects response 'result' protocol field to right endianess when
responding to LE L2CAP connection request on error case.
Change-Id: I066bad2f0f3173739676e918f42d425581084dbe
Signed-off-by: Arkadiusz Lichwa <arkadiusz.lichwa@tieto.com>
Clarify the name of the option and add a dependency to Arduino 101
which is the only known board that is currently known to need it.
Change-Id: Ibfb96cba202f34464b45b922da599da70c038d12
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Fix coding style so line length does not exceed 80 chars.
Change-Id: Iddebdf55593736cfa288a03a750cc927665f9065
Signed-off-by: Bogdan Davidoaia <bogdan.m.davidoaia@intel.com>
Remove those kconfig options that are SoC specific, and
should not be configurable via kconfig.
Change-Id: Ib483419be5199b52cf281b4b106cd8a3be95b7be
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
The "initlevel" section is being metioned twice. It does not affect
the final size calculation, but just remove it just for reader's
sanity.
Change-Id: I0e7d6e82c730631d2c83ca09dde0f675805840f3
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
The configuration option CONFIG_RTC_IRQ_PRI does not longer exist, and have
to use the specific QMSI driver IRQ priority
Change-Id: I8074c6d8e095596d03e51a94f26a73c3a9ff91b7
Signed-off-by: Sergio Rodriguez <sergio.sf.rodriguez@intel.com>
This is needed especially for nble. If bluetooth is not enabled we
cannot send another commands to tester.
Change-Id: I17e639301bba6efd127f2c743b8942c1b493f9da
Signed-off-by: Grzegorz Kolodziejczyk <grzegorz.kolodziejczyk@tieto.com>
This function is needed to get next attribute of passed to function
attribute.
Change-Id: Iefe2015f2d6bcb650012b1f9d5b1ea98e8fa8f48
Signed-off-by: Grzegorz Kolodziejczyk <grzegorz.kolodziejczyk@tieto.com>
When Nordic BLE chip is flashed with HCI firmware use H:4 UART driver
and enable chip the same way we enable for NBLE.
Change-Id: Ie14734266803088feadb0d0eb20c49c3615f0267
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
The nble nRF51 firmware cannot handle situations where it receives
data before it is ready. The RPC calls otoh cannot be blocking.
Combine this with the fact that bt_enable(NULL) is supposed to be
blocking means we cannot support this mode of operation with nble.
Change-Id: Ib9c2c322b44b04bc48be243c2ba1c1bc4becb8ea
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Remove UART default configuration to make it default UART_0. This
makes default working fine with Nordic BLE chip using H:4 driver.
Change-Id: Icb6d9f068b586bbf04694bc77ed968211de94c8a
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Refactoring Power Management related code to special file nrf51_pm
making it possible to reuse the functions for H:4 UART driver when
Nordic BLE is flashed with HCI firmware.
Change-Id: If389c1f4af13fa786e5866129624527cec0928e0
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
The config option handles enabling, disabling and power management
operations with Nordic nRF51 BLE chip.
Change-Id: I816062a7fb17c9e57c234113a2cecdebceb407b6
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Move NBLE code to the place where other Bluetooth drivers code resides.
Change-Id: Ibcf9ffb016e9b842bed66a61dff5c101b1573aaa
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Keep a single bt_storage_* name space for current and future storage
APIs.
Change-Id: If158eb7408cce7c06cd8f98d78a061b9f9585265
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
It's likely that other files besides hci_core.c will be needing to
read/write the storage. Export it therefore through hci_core.h (same
time adding a missing 'const' to the declaration).
Change-Id: I7c08bc0d69c752bef68f9da9e4aee1acfa00de72
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
If the wanted address is already programmed to the controller there's
no need to send a HCI command to change it.
Change-Id: Ib73d09cc5b20cd6820e603f0828f000f8310a89e
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
In many cases when we want to access the 'val' member of bt_addr_le_t
it's in situations where the type needed is actually bt_addr_t. To
avoid unnecessary typecasts in these places simply embed bt_addr_t
inside bt_addr_le_t.
Change-Id: I7eecf129bee1dcf085abc83ec2f32e1a10b0b5aa
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Add initial support for the Privacy Feature, including the ability to
manage a local IRK and to use Resolvable Random Addresses.
Change-Id: I1c70aea67078dd2a5d07f3b797c37746ebe9ab61
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Update RPC headers and change compatible_firmware version 0404.
Change-Id: Ie9920d302f3787c07181bc6aa519a96556463a79
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Move NBLE pin handling to the driver from gap.c.
Change-Id: I4b7fd408c623971d19da12784c656c5c605852a5
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Allow to connect Nordic Devkit or dongle to qemu. Simple
configuration for the current NBLE firmware is following:
Connect Nordic board to PC, ttyACMX gets created.
$ socat -x /dev/ttyACMX,raw,b1000000 unix-listen:/tmp/bt-server-bredr
Build app with prj_nble.conf and run with make qemu
Change-Id: I354644b465ad09ab0ca62fbd97f15d9bb3c87d6a
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
UART0 is connected to Nordic BLE chip, copy the configuration from
arduino_101 where there is the same chip.
Change-Id: Ic9fe30f4562d261920c0cfd359ea34be4e7e2476
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Enable GPIO and select UART0 for Nordic BLE chip.
Change-Id: Ic1bf82a8b97fcc231eb857ee0bd05381a24a2d25
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
This will be needed to implement local privacy support.
Change-Id: I6222a7d396d47929d6f8946793bbf3f49eaae179
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
There will be other uses, so rename this to bt_addr_le_is_bonded and
export it through hci_core.h.
Change-Id: Ia033a215255f2ec2e513c785dd1b9862faaf5ac8
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Implement bt_gatt_attr_read_cpf() for NBLE.
Change-Id: Ia99db05a3f67bef3c1617df37fd371a8b1e8beb6
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
CONFIG_BLUETOOTH_DEBUG_DRIVER provides too low level information to be
useful for samples. Remove it from default settings.
Change-Id: I9d99f9953d4e6b839eeb51ed393e4aed1eeeb01b
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
If the local controller doesn't have a public address we need to
generate a static random address and use that as our Identity Address.
Change-Id: I3db261b630c670d285c6bfacbe090184cccb5e8c
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Add initial skeleton for the persistent storage API.
Change-Id: I7a6cc283aa88e7d861af18a6f0db2ed8c71e44a0
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Store the Identity Address and Random Address in their own variables.
If the controller doesn't have a public address a static random
address is set as the Identity Address. Also keep properly track of
which address was used for advertising and initiating connections so
that the connection object contains the right information.
Change-Id: I3e9dc2036b330c19c2725b180fd061da2df8a0fa
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Remove those kconfig options that are SoC specific, and
should not be configurable via kconfig.
Change-Id: Ib7e0b81b2df1a0225fc244fea3035416d0a4f282
Signed-off-by: Daniel Leung <daniel.leung@intel.com>