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>
Return code from command handler is not needed and was already ignored.
Change-Id: Ief073ccfe2ccd316b6d4eec5168fb564e96786ee
Signed-off-by: Szymon Janc <szymon.janc@tieto.com>
This makes code looks similar to POSIX style parameter handling.
Also code is easier to read and doesn't require tricks like
'p += strlen(p) + 1' for next parameter.
Change-Id: I013e714ba81681da38e320fb69851c7b5a75bb52
Signed-off-by: Szymon Janc <szymon.janc@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>
Adds above commands to the shell app.
Connection is made based on given address and type eg:
btshell> connect 00:00:00:00:00:00 public
In callback we get local connection id which is in fact,
the number of array entry in which the pointer to the corresponding
bt_conn has been written.
To disconnect, just provide the id eg:
btshell> disconnect 0
Change-Id: I24f7ec2de7f84c53ab847ded28a1821753c2a60d
Signed-off-by: Mariusz Skamra <mariusz.skamra@tieto.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>
This allows to easily checks if all samples builds with supported
configurations. Also tester application is (unlike other samples)
build with all Bluetooth debugs enabled.
Change-Id: Ia151b97d14c75b0509243e2c1dc8d26211f70e83
Signed-off-by: Szymon Janc <szymon.janc@tieto.com>
Always prefix UUIDS for characteristics with service name.
Change-Id: Ic435fa725e6bc8918af631632156b071121cd0e0
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This makes use of new guidelines to document Bluetooth UUID API.
Change-Id: Ib4c96f97709610b762f6e839294a4db3ac447e73
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@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>
According to section 3.7 of Documentation/kbuild/makefiles.txt, using
EXTRA_CFLAGS in Makefiles is "still supported but their usage is
deprecated."
Change-Id: I585a9f84e8239a59b0f5b29eed0dc70efa253522
Signed-off-by: Szymon Janc <szymon.janc@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>
For consistency, when including public header files, use <> rather
than "".
Change-Id: Id780388759c33d865f49c9e0faf9cde2251ca869
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>
This fix a build issue after last rename of TIMO -> ZEPHYR in build
system variables.
Change-Id: Iba9fb2ae13df0c66c7c1031b3a27795a9ead0e97
Signed-off-by: Szymon Janc <szymon.janc@tieto.com>
Add build test for beacon app for following targets: pentium4 and
ti_lm3s6965.
Change-Id: I4b8949b4f21d3554465bbf8c229462c026db5e29
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
This commit sends a draft of the topics that will be included
as a section for Kbuild documentation.
It also includes content for the Kconfig Structure section.
The intention of this draft is to start gathering comments on
the content sent and the initial menu of topics.
Change-Id: I11f62b015ef0fc722f5e0a089ec83cb0a08b3889
Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@linux.intel.com>
export TMP if you want the out of tree tests to write
to something else other then /tmp
Change-Id: I77b1dffe5fa5e61db66a8d754370a0cd47511ab4
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit fix an error with the clean targets.
The package directory does not exist anymore.
Change-Id: I415085cb35eda9a1f30d6b53a5529e1fb2a8447a
Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@linux.intel.com>
Kconfig creates a header file per each Kconfig symbol that changes
in between configuration changes and rebuilds.
This commit creates the files in the output directory specified by the
O environment variable.
Change-Id: I01b3482e9497f70961268505865788385b41ca8f
Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@linux.intel.com>
File name had wrong extension.
Change-Id: I9b8f57d21b2a497bf53e159a62dfee24a4c5de21
Reported-by: Rick Demers <richard.demers@windriver.com>
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
The type of the handler variable was missing, causing compile failures.
Change-Id: I33c0f8d2893de0c6ad14f33ecb03b106c87cf758
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
Some files were left in bsp/ after a failed rebase.
Change-Id: I26d34387d751ddd831b2dfef5c8cb6a1a8904b3c
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
As the macros ALIGN_STRUCT(x) and PACK_STRUCT are no longer used, it is safe
to remove them. (Their replacement macros are __aligned(x) and __packed.)
Change-Id: If52302b6fba91ac707af828396592ecc3016934d
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
Simple tests to verify whether the microkernel timer system works
alongside the nanokernel timeouts and timers system.
Once the timer test is started, the nanokernel fifo timeout test is
started in parallel: each other's timeout times should not be affected
by the other. Also, a fiber is started, pending on a nanokernel timer,
and awakens in the middle of the microkernel timers expiring.
Change-Id: I05b307e58ac942961a4163cbe845a9bb732ecfb7
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
Test the nano_xxx_fifo_wait_timeout() APIs.
First, the task waits with a timeout and times out. Then it wait with a
timeout, but gets the data in time.
Then, multiple timeout tests are done for the fibers, to test the ordering
of queueing/dequeueing when timeout occurs, first on one fifo, then on
multiple fifos.
Finally, multiple fibers pend on one fifo, and they all get the
data in time, except the last one: this tests that the timeout is
recomputed correctly when timeouts are aborted.
NOTE: The timeout APIs test is contained within its own file so that it
is easily reusable by a microkernel test that verifies that nano
timeouts and microkernel timers can coexist.
Change-Id: I5aae2d89651914fb6c39d8d09a56c7fa54533453
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
Test the nano_xxx_lifo_wait_timeout() APIs.
First, the task waits with a timeout and times out. Then it wait with a
timeout, but gets the data in time.
Then, multiple timeout tests are done for the fibers, to test the ordering
of queueing/dequeueing when timeout occurs, first on one lifo, then on
multiple lifos.
Finally, multiple fibers pend on one lifo, and they all get the
data in time, except the last one: this tests that the timeout is
recomputed correctly when timeouts are aborted.
Change-Id: Ida951fda746539253b9a165f48be6931d6bee05c
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
Test the nano_xxx_sem_wait_timeout() APIs.
First, the task waits with a timeout and times out. Then it wait with a
timeout, but gets the semaphore in time.
Then, multiple timeout tests are done for the fibers, to test the
ordering of queueing/dequeueing when timeout occurs, first on one
semaphore, then on multiple semaphores.
Finally, multiple fibers pend on one semaphore, and they all get the
semaphore in time, except the last one: this tests that the timeout is
recomputed correctly when timeouts are aborted.
Change-Id: I73c174e6f15f38377a14573cb7f531e5e6ca4c07
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
The test verifies that delayed fibers are started in the right order,
and that cancelling delayed fibers recomputes correctly the timeouts in
the queue. Also test the fiber_sleep() API.
Change-Id: Ic3169a90b434a81c96e7c5d3c74c39431c988f39
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>