Add conditional compilation and move code to support
building a non-connectable Bluetooth shell application.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Trying to always include mesh support resulted in the app not fitting
on some boards (e.g. nrf51_pca10028). Put the mesh-specific
configuration in a separate configuration file instead.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Add a command for getting and setting the model publication. We also
have to adjust the app's configuration, since both the Model
Publication Set and Status messages are segmented messages, meaning we
need two TX and RX segment contexts.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Add a basic shell skeleton for Mesh, containing basic command for
initialization, provisioning and reset.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
The conf file name must be of the form prj_<board>.conf for it to be
automatically chosen for a given board.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
The needed options to QEMU_EXTRA_FLAGS now get set from a single
central place, so applications don't need to do it anymore.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Introducing CMake is an important step in a larger effort to make
Zephyr easy to use for application developers working on different
platforms with different development environment needs.
Simplified, this change retains Kconfig as-is, and replaces all
Makefiles with CMakeLists.txt. The DSL-like Make language that KBuild
offers is replaced by a set of CMake extentions. These extentions have
either provided simple one-to-one translations of KBuild features or
introduced new concepts that replace KBuild concepts.
This is a breaking change for existing test infrastructure and build
scripts that are maintained out-of-tree. But for FW itself, no porting
should be necessary.
For users that just want to continue their work with minimal
disruption the following should suffice:
Install CMake 3.8.2+
Port any out-of-tree Makefiles to CMake.
Learn the absolute minimum about the new command line interface:
$ cd samples/hello_world
$ mkdir build && cd build
$ cmake -DBOARD=nrf52_pca10040 ..
$ cd build
$ make
PR: zephyrproject-rtos#4692
docs: http://docs.zephyrproject.org/getting_started/getting_started.html
Signed-off-by: Sebastian Boe <sebastian.boe@nordicsemi.no>
The API name space for Bluetooth is bt_* and BT_* so it makes sense to
align the Kconfig name space with this. The additional benefit is that
this also makes the names shorter. It is also in line with what Linux
uses for Bluetooth Kconfig entries.
Some Bluetooth-related Networking Kconfig defines are renamed as well
in order to be consistent, such as NET_L2_BLUETOOTH.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
When an app uses a construct such as:
obj-y = main.o ../../../../samples/bluetooth/gatt/hrs.o
in its makefile, it causes said object module to be built in the
source tree, not in the object tree.
When building massively parallel, this usually resuls on the files
getting corrupted, leading to bugs such as:
https://jira.zephyrproject.org/browse/ZEP-2316https://jira.zephyrproject.org/browse/ZEP-2317
src/../../../../samples/bluetooth/gatt/.gap.o.cmd:3: warning: NUL character seen; rest of line ignored
src/../../../../samples/bluetooth/gatt/.gap.o.cmd:4: warning: NUL character seen; rest of line ignored
src/../../../../samples/bluetooth/gatt/.gap.o.cmd:5: *** missing separator. Stop.
as multiple build are trying to touch the same file in the source tree
and of course, race and causes a build bug.
We have known about this issue for a long time, but it requires
modifications in the build system that there is no time to tackle.
A suggested workaround is to include the source files into a local .c
file, so this is what this patch does, to remove the random noise.
Signed-off-by: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
Where possible, replace the use of filter with newly added keywords.
This will speed things up and in some cases add more coverage due to bad
filters.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This will prepare test cases and samples with metadata and information
that will be consumed by the sanitycheck script which will be changed to
parse YAML files instead of ini.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
GAP is mandatory service and now that the db can only be build
dynamically there is no reason to keep the applications registering it.
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Remove existing commands supported by CONFIG_BLUETOOTH_SHELL and make
sure all .conf select it.
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
It is possible to remove the forward declaration of l2cap_alloc_buf as
the recv pointer can be compared directly with chan pointer avoiding
using l2cap_ops directly.
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
The TX and RX pool needs to be split otherwise the TX code path may
consume all buffers causing the RX thread to deadlock which will
possible deadlock the TX thread as well in case it needs more credits.
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
If the channel is already in use don't attempt to connect it a second
time.
Change-Id: I87bdaeadbe866b59c1a7975002699d9ef7a90c61
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Convert code to use u{8,16,32,64}_t and s{8,16,32,64}_t instead of C99
integer types.
Jira: ZEP-2051
Change-Id: I6c676bc6c5e850a8725785554cd535e32067f33e
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
This is a start to move away from the C99 {u}int{8,16,32,64}_t types to
Zephyr defined u{8,16,32,64}_t and s{8,16,32,64}_t. This allows Zephyr
to define the sized types in a consistent manor across all the
architectures we support and not conflict with what various compilers
and libc might do with regards to the C99 types.
We introduce <zephyr/types.h> as part of this and have it include
<stdint.h> for now until we transition all the code away from the C99
types.
We go with u{8,16,32,64}_t and s{8,16,32,64}_t as there are some
existing variables defined u8 & u16 as well as to be consistent with
Zephyr naming conventions.
Jira: ZEP-2051
Change-Id: I451fed0623b029d65866622e478225dfab2c0ca8
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
The BR/EDR configuration doesn't fit e.g. the Arduino 101 anymore.
Limit it to Qemu for the time being, which is anyway the primary
target where the functionality is being tested.
Change-Id: I9a34c82157d56079e43acabe29eeadd6d99e03fe
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Implement the controller's ability to drop duplicate advertising reports
when instructed by the Host.
Jira: ZEP-1246
Change-Id: I2d1b7abf1ed950dde705e5df30a858c595f3834c
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Added conn-update command to btshell module to test
bt_conn_le_param_update Bluetooth API.
Change-id: I205df9ffc12a0ab062de5a779ab96bc91cbd9259
Signed-off-by: Vinayak Chettimada <vinayak.kariappa.chettimada@nordicsemi.no>
Reordered the commands in btshell to represent the logical
order of use. Moved advertise and scan before connect
command.
Change-id: Id64509e39848109a6df7ddb1306b6bd221b65c40
Signed-off-by: Vinayak Chettimada <vinayak.kariappa.chettimada@nordicsemi.no>
Add proper logging for errors in the same go.
Change-Id: I8bd4fa8d5b143e51024496bfba0056525ad35964
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Separate out data element structure header into type and size fields
Change-Id: I869ee1ea82db1f6d669bb905055135b7d63f3fa2
Signed-off-by: Kaustav Dey Biswas <kaustav.d.biswas@intel.com>
Parameters and data must be permament for time of the operation.
Change-Id: Idd4eee948e62c2c80648116a339558042059f801
Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
Instead of passing exact value allow to use 'ind' for enabling
indications instead of notifications.
Change-Id: I24306a321ed90b4bcb6300846218ff7214b39bc4
Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
Don't echo data from received callback as this can cause
deadlock. Just dump incoming data instead.
Change-Id: Iedbbafd0406ad46ba2c9d26fd8a70fff59de8143
Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
argc needs to be check before accessing argv.
Change-Id: I9cb70906a388b96df4e192dd4f31eafdab25127f
Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
Adds to BT shell app functionality to trigger to be found on remote
A2SRC UUID. Implements user callback to read resolved response data
and uses existing SDP client API to read attributes values.
> HCI Event: Number of Completed Packets (0x13) plen 5
Num handles: 1
Handle: 77
Count: 1
> ACL Data RX: Handle 77 flags 0x02 dlen 48
Channel: 64 len 44 [PSM 1 mode 0] {chan 0}
SDP: Service Search Attribute Response (0x07) tid 2 len 39
Attribute bytes: 36
Continuation state: 0
Combined attribute bytes: 89
Attribute list: [len 84] {position 0}
Attribute: Service Record Handle (0x0000) [len 2]
0x00010005
Attribute: Service Class ID List (0x0001) [len 2]
UUID (3) with 2 bytes [0 extra bits] len 3
Audio Source (0x110a)
Attribute: Protocol Descriptor List (0x0004) [len 2]
Sequence (6) with 6 bytes [8 extra bits] len 8
UUID (3) with 2 bytes [0 extra bits] len 3
L2CAP (0x0100)
Unsigned Integer (1) with 2 bytes [0 extra bits] len 3
0x0019
Sequence (6) with 6 bytes [8 extra bits] len 8
UUID (3) with 2 bytes [0 extra bits] len 3
AVDTP (0x0019)
Unsigned Integer (1) with 2 bytes [0 extra bits] len 3
0x0102
Attribute: Browse Group List (0x0005) [len 2]
UUID (3) with 2 bytes [0 extra bits] len 3
Public Browse Root (0x1002)
Attribute: Bluetooth Profile Descriptor List (0x0009) [len 2]
Sequence (6) with 6 bytes [8 extra bits] len 8
UUID (3) with 2 bytes [0 extra bits] len 3
Advanced Audio Distribution (0x110d)
Unsigned Integer (1) with 2 bytes [0 extra bits] len 3
0x0102
Attribute: Unknown (0x0100) [len 2]
Advanced Audio [len 15]
Attribute: Unknown (0x0311) [len 2]
0x0001
< ACL Data TX: Handle 77 flags 0x00 dlen 12
L2CAP: Disconnection Request (0x06) ident 10 len 4
Destination CID: 65
Change-Id: I8938d9eebda31f3d252ff49adc1a96abfcbc5751
Signed-off-by: Arkadiusz Lichwa <arkadiusz.lichwa@tieto.com>
Makes use ProfileDescriptorList atribute API to get remote Hands-Free
profile version.
Jira: ZEP-1112
Change-Id: I3752691057e15c3a9a681dd3277ac160096792e9
Signed-off-by: Arkadiusz Lichwa <arkadiusz.lichwa@tieto.com>
Adds pool memory for storing SDP client query results and introduces
command allowing add HFPAG UUID to be resolved when connection to peer
is already set. When resolved data arrives, UUID callback handler
tries to identify RFCOMM protocol specific information, in this case
remote HFPAG Server Channel Number, stored in Protocol's Descriptor List
attribute data.
> HCI Event: Number of Completed Packets (0x13) plen
Num handles: 1
Handle: 77
Count: 1
> ACL Data RX: Handle 77 flags 0x02 dlen 55
Channel: 64 len 51 [PSM 1 mode 0] {chan 0}
SDP: Service Search Attribute Response (0x07) tid 2 len 46
Attribute bytes: 43
Continuation state: 0
Combined attribute bytes: 96
Attribute list: [len 91] {position 0}
Attribute: Service Record Handle (0x0000) [len 2]
0x00010003
Attribute: Service Class ID List (0x0001) [len 2]
UUID (3) with 2 bytes [0 extra bits] len 3
Handsfree Audio Gateway (0x111f)
UUID (3) with 2 bytes [0 extra bits] len 3
Generic Audio (0x1203)
Attribute: Protocol Descriptor List (0x0004) [len 2]
Sequence (6) with 3 bytes [8 extra bits] len 5
UUID (3) with 2 bytes [0 extra bits] len 3
L2CAP (0x0100)
Sequence (6) with 5 bytes [8 extra bits] len 7
UUID (3) with 2 bytes [0 extra bits] len 3
RFCOMM (0x0003)
Unsigned Integer (1) with 1 byte [0 extra bits] len 2
0x03
Attribute: Browse Group List (0x0005) [len 2]
UUID (3) with 2 bytes [0 extra bits] len 3
Public Browse Root (0x1002)
Attribute: Bluetooth Profile Descriptor List (0x0009) [len 2]
Sequence (6) with 6 bytes [8 extra bits] len 8
UUID (3) with 2 bytes [0 extra bits] len 3
Handsfree (0x111e)
Unsigned Integer (1) with 2 bytes [0 extra bits] len 3
0x0106
Attribute: Unknown (0x0100) [len 2]
Handsfree Gateway [len 18]
Attribute: Unknown (0x0301) [len 2]
0x01
Attribute: Unknown (0x0311) [len 2]
0x0027
< ACL Data TX: Handle 77 flags 0x00 dlen 12
L2CAP: Disconnection Request (0x06) ident 5 len 4
Destination CID: 64
Source CID: 64
> HCI Event: Number of Completed Packets (0x13) plen 5
Num handles: 1
Handle: 77
Count: 1
> ACL Data RX: Handle 77 flags 0x02 dlen 12
L2CAP: Disconnection Response (0x07) ident 5 len 4
Destination CID: 64
Source CID: 64
Jira: ZEP-1112
Change-Id: Ibda606fabe367ca3d0353f77c7093da8c4f175c8
Signed-off-by: Arkadiusz Lichwa <arkadiusz.lichwa@tieto.com>
Instead of using a hard-coded string, make the sample use the Kconfig
variable for the device name.
Change-Id: Ib09f594e1cba221f9064318572bd90d38bd2733a
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>