Gather client related code togerther so it can be placed under
single blocks of ifdefs.
Change-Id: I6f2f5a06c0308b885d01fc6af300b162baec0823
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
Gather SMP related code together so that it can be placed under
single blocks of ifdefs.
Change-Id: I3c2e71243b694e9984ae8e88025a6ead7969e020
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
This fix a regression that cause identity address to be passed to
LE Create Connection HCI command. This was affecting connecting to
iPhone. Regression was introduced in beaf30fda7de1476c742a
(Bluetooth: Simplify check_pending_conn function).
check_pending_conn now takes two addresses: ID and real address.
ID is used to find connection object and real is used in LE Create
Connection HCI command. If no IRK is present both addresses have
same value. This is to avoid double lookup of ID address for every
advertising report.
Change-Id: I6b86a698087889c4e6c2a1cbc9a688a804cfeb84
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
This reduces number of idefs cuts and make code much easier to read.
In case of SMP not supported (or connection support since SMP depends
on it) find_id_addr is simplified and will most likely be inlined by
compiler resulting in no-op.
Change-Id: Ib16d1508c5664fcb58f619b090a5d62b2ecfe8c5
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
Added -e option to echo-client and it will not quit but just
send data forever to the echo-server.
Change-Id: I9085220844b5bc45b2b7fffc46fb1b9e93235307
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
If we receive too long message in dummy radio driver,
then we need to discard the packet as we cannot handle
it anyway.
Change-Id: Ibed0ac5f1568dd791dec3e780c7f6c71914d02cd
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Made the test_15_4 application to run much faster when it is
running inside qemu (started with make qemu0).
Change-Id: I4455eca4f0426e8acc8b87d93eb80f4d179a1b48
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
The 802.15.4 monitor application had issues with connecting
pipes together and making sure the first byte from qemu is
not lost. Before starting real data connection we send five
null bytes and the discard them in receiving side.
Change-Id: I376ae4f79aaa1ea742640999ec5b3d9c57a1279a
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
It is now possible to loop echo-server and echo-client test
applications together when they are running in qemu.
Start echo-server with "make server" and echo-client using
"make client" in the corresponding samples directory.
Change-Id: Ic852735f7bebc93e42873e98427e282902b3ca03
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Dummy 802.15.4 has now some additional check to verify that we
are really sending correct amount of bytes.
Change-Id: I4d223c02e2628966e3b1a3cdcf7b560043d7d788
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
If the stack is sending network packets by itself, like when
sending router or neighbor solicitation messages, then remember
the original length of the message. This is important because
uIP stack will clear the length of the sent message after it
is sent.
After this change, the lower level drivers can use
the net_buf_datalen() to get the original length of the
buffer. The issue is seen because uIP stack is running in
different fiber than the network device driver.
Change-Id: I6078c5d716bba455a93be9be122e97cd24b8dc0e
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Print information about how much data we are losing if
null fragmentation is used.
Change-Id: I2f18d180a4c75768534de851c7cc27c3e70ca310
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Adding selection of 6LoWPAN compression method to Kconfig.
Possible values are:
* no compression
* IP header compression
Change-Id: I8721fa683f7488ec9ad0bf37f6637fa264c2038f
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
User can set the desired network id from Kconfig.
Change-Id: Iac9de1deb2b01bcfcb3382849d451dce1a05077a
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
When 802.15.4 code is receiving the network buffer, the uIP
stack might have zeroed the buf->len value. Restore it back
here so that other parts of the stack will get sane value.
Change-Id: I8fb3c1d3a3c9b0f41f3915d0f31d78afeccf68b6
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Gather connection and SMP related code togerther to that those can
be places under single blocks of ifdefs.
Change-Id: Ief418536e0e0f389fdde3bb3ac8b85bcfce9ac79
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
This allows for compile test if analysis code builds.
Change-Id: I500d727a06ef065fc65465140062ec47d31e79fa
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
This allows to monitor stack usage in timeout fiber. Since timeout
fiber migth not be even started (eg when there was no SMP command
sent or receive) analysis is done only when timeout fiber is stopped.
Change-Id: I0ff6c081b9077f8f8294386306a3fe0ed77099a8
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
This introduces simple API for analysing stack usage. Stack growth
direction is determined on build instead of runtime.
Change-Id: Iacb160d088cc0af57e2e9dedc72cbc5e31fd22f4
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
This will be used to poll Zephyr to send it's supported commmands.
Change-Id: I12cb93a238cd14589123d88e9d9ba4d580dd6d71
Signed-off-by: Mariusz Skamra <mariusz.skamra@tieto.com>
This is used to respond to the read request of characteristic
value.
Change-Id: Ia0518fae0d70e712621578a7938009345dbfaab4
Signed-off-by: Mariusz Skamra <mariusz.skamra@tieto.com>
This adds support to handle set attribute value.
Change-Id: I2631cc8744210cfd76add1be3d30e5a0f54b3a7e
Signed-off-by: Mariusz Skamra <mariusz.skamra@tieto.com>
This adds support for adding characteristic declaration and characteristic
value to the tester defined database of GATT attributes.
Change-Id: I108fc5a9bc5c7491fc354c71457d452baaedd868
Signed-off-by: Mariusz Skamra <mariusz.skamra@tieto.com>
This adds support for tester application to cover GATT Server
automated tests. BTP ptotocol commands are used do drive stack to
build attributes database specified by the external tester.
Two commands: to add a service and to start the GATT server are
implemented.
Change-Id: I236c3e4d8636e97926514b2099779cb4334e95cd
Signed-off-by: Mariusz Skamra <mariusz.skamra@tieto.com>
Add support for timing out SMP commands. Timer is restarted on sending
any SMP PDU and if reached 30 seconds pairing procedure shall be
considered to have failed.
This was affecting TC_PROT_BV_01_C and TC_PROT_BV_02_C SMP
qualification tests.
Stack size used by timeout fiber is based on observation:
smp timeout (real size 128): unused 16 usage 80 / 96 (83 %)
Change-Id: I87a16cc51046b6a2487a0a1a736035d64b011d09
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
This patch adds additional flag that is used for tracking if pairing
is in progress.
Change-Id: Ie21b8d9440ea4bc64dd552d49eaebfd4b569f176
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
Parent link metric was incorrectly printed.
Change-Id: I479820f850d8e9a5459667d58bc35c8174a77559
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
When enabled, probes will be sent periodically to keep
parent link estimates up to date.
Change-Id: Ia7f1fe7cd28bb487c64a41159fffdf3665e9e1df
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
User needs to be able to configure used OF as all RPL nodes
in DODAG need to use the same OF. Default OF is MRHOF RFC 6719.
Other alternative is OF0 RFC 6552.
Change-Id: I6d135a6a2c6880a919993e29b0985d4c686b8a9d
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Refines errors check when attempting to write over the boundary
of attribute room.
Change-Id: Ia27b86ce380a178b8e7834adf6da4009a6d60233
Signed-off-by: Arkadiusz Lichwa <arkadiusz.lichwa@tieto.com>
This patch is needed to be able to test zephyr against tests
which require Zephyr to be non-connectable.
This adds handler for the opcode 0x06 - Set Connectable command.
Based on connectable flag in current settings, the corresponding
advertising type is set after issuing Start Advertising command.
If connectable, Connectable undirected advertising type is set,
if non-connectable Non connectable undirected advertising type
is set.
Change-Id: I77865b67c4b717548095ac5e398a873d1b739d6a
Signed-off-by: Mariusz Skamra <mariusz.skamra@tieto.com>
This feature is needed to pass some tests which require termination
of ACL link.
Change-Id: Idab03c569172ea6deb3bc5cf6744e5e73bd5de3e
Signed-off-by: Mariusz Skamra <mariusz.skamra@tieto.com>
According to new tester API in case of success Current_settings
shall be returned.
Change-Id: I1caf05180bff4756b8e7271098611d23200af8ee
Signed-off-by: Mariusz Skamra <mariusz.skamra@tieto.com>
The etimer.c does not need to know about ctimer_process so
remove the extra variable.
Change-Id: I761a9d79c09876c5270e294dd008a8821705e9a2
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
The code did not mark net_buf to be freed in a case of error
when receiving data. This caused the system run out of network
buffers very fast. It is necessary to set uip_len variable to 0 so
that the upper stack can free the buffer in this case.
Change-Id: Id5e009affcb2ce916f21fcf60060efb1c6d1ec0c
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Allocate a net_buf when a network packet is about to be sent.
Earlier one statistically allocated buffer was used for sending
RPL packets but this did not work well enough and it cluttered
the RPL APIs with redundant net_buf parameter.
Change-Id: Ib4160167f8deac83c30852af2346acdf6c6f711b
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
When the timer is set, the caller needs to specify the function
that is called when timer expires.
Change-Id: Iae69986c6f32b789d708247b187d143e45d73828
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
The RPL support needs bigger stack than 600 bytes.
Change-Id: If61fb2b4874d32d6e02c8e510cccd45246332da5
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Print RPL statistics in the general IP statistics printing
function if CONFIG_RPL_STATS is defined.
Change-Id: Iefc3a1e5186b052e91b17309a6e9fdeb2fa70886
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Need to use pointer when printing link address.
Change-Id: Ied7fcbefc02034e0ddbe714716b883de33d1e724
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
For RDC (Radio Duty Cycling) we activate nullrdc driver
if 802.15.4 is not used.
Change-Id: I793b84ee8e81cdbc8315758f1b83f7ad3bd7555a
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
These commands are necessary to pass some of the GAP tests.
Change-Id: Ia599e7dc3dd06aa5ac4130e0d878fcddad7b37dd
Signed-off-by: Mariusz Skamra <mariusz.skamra@tieto.com>
Depending on selected Kconfig options some parts of public API
are disabled with #ifdefs. This should make it easy for user to
figure out which options should be enabled to specific API.
Change-Id: I4ae1bfd7bf535ea45869772c429ccd3d3d4c214e
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
This allows to reduce BT buffers used if connection
support is disabled.
Sample beacon application size reduced from 15212 to 14956 bytes.
Change-Id: I431ea5087706a06eaea76d572839c3afebfb963e
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>