summaryrefslogtreecommitdiff
path: root/samples
AgeCommit message (Collapse)Author
2017-02-15samples: net: Add README.rst to echo appsJukka Rissanen
Add a README.rst file to both echo-server and echo-client sample applications. Jira: ZEP-1539 Change-Id: I1ee1d02a3de0295697117f448d8e13f5b161e11b Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2017-02-15net/mqtt: Add support for IBM BlueMix Watson topic formatJorge Ramirez-Ortiz
Change-Id: I044180d9f76a307c1cf4423a9b1d3ee6c540cbc7 Signed-off-by: Jorge Ramirez-Ortiz <jorge.ramirez-ortiz@linaro.org>
2017-02-15net/mqtt: Remove length computations for some msg fieldsFlavio Santes
Currently, for the following MQTT msg fields: - client_id - will_topic - user_name - topic their length is computed inside the routine that receives the MQTT msg. Although this simplifies development, also imposes one restriction: data must be null-terminated. Sometimes, data is received from other sources and not generated by the application, so the null-terminated constraint may be considered problematic for the user. This patch removes the assumption that string fields are null-terminated. Current data structures are already prepared to handle this case, so no API change is required. Change-Id: I5a147a5b21e0da49541cbe62baac363c8737cd3e Signed-off-by: Flavio Santes <flavio.santes@intel.com>
2017-02-15net/mqtt: Add support for QEMU x86Flavio Santes
Add the QEMU x86 prj file to the MQTT publisher application. Change-Id: I1ba8c3a3bf818d8f6dee7ea94021a83ba5277e5f Signed-off-by: Flavio Santes <flavio.santes@intel.com>
2017-02-15samples: net: Remove the README fileJukka Rissanen
This README file is no longer needed as we have separate README files in various sub-directories. Change-Id: I38d1c4208e373aa7aa23373149ef1b89fbcda094 Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2017-02-15samples: net: Remove obsolete prj_slip.conf from echo-*Jukka Rissanen
This config file is not needed. Change-Id: Ib601605805d6c5c0173424b2e282a50a6a1076d6 Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2017-02-15Merge "Merge remote-tracking branch 'origin/core'"Anas Nashif
2017-02-15samples/drivers/crypto: crypto sample appJithu Joseph
A sample application to illustrate the usage of crypto APIs. This shows the usage of AES - CTR, CBC and CCM based encryption and decryption. origin: original Change-Id: I17e4d966a70169b71a754c9cdc3f713a5d0c3ac0 Signed-off-by: Jithu Joseph <jithu.joseph@intel.com>
2017-02-14samples/net/http: Add HTTP over TLS sample applicationSergio Rodriguez
Add the HTTPS (HTTP over TLS) server sample application on top of the current HTTP Parser Library and mbedTLS. This code uses TLS to stablish a secure connection and HTTP parser to identify the request and the proper response. Jira: ZEP-799 Change-Id: Ifbbcd0347bec47d12158440e50a82dc2966334d3 Signed-off-by: Sergio Rodriguez <sergio.sf.rodriguez@intel.com> Signed-off-by: Flavio Santes <flavio.santes@intel.com>
2017-02-14net/mqtt: Add BT support to MQTT publisher sampleJorge Ramirez-Ortiz
Change-Id: I56d54c3550a530bf250210e939840e7c7e89c5d9 Signed-off-by: Jorge Ramirez-Ortiz <jorge.ramirez-ortiz@linaro.org>
2017-02-14samples: net: Add .conf file for qemu_cortex_m3 in echo_*Richard Peters
Added conf files for qemu_cortex_m3, until a better solution than CONF_FILE=prj_$(BOARD).conf exists in the makefile. Change-Id: I1edc4f37bb3c49ecb65abf7c93b3c9f4608d601e Signed-off-by: Richard Peters <mail@richardpeters.de>
2017-02-14net/http: Improve network configuration routinesFlavio Santes
Modify the network setup routine to accept the following parameters: - network context - accept callback - server IP address - server port This change will allow us to reuse this routine for TLS. Change-Id: I1fdbaa908783c69f87863cbc597b42f39358762c Signed-off-by: Flavio Santes <flavio.santes@intel.com>
2017-02-14net/http: Add QEMU support to the HTTP server sample appFlavio Santes
This patch adds the QEMU prj file for the HTTP server sample app. Change-Id: I0b910b5ec9970a7ffe9621e19d9544d899c22132 Signed-off-by: Flavio Santes <flavio.santes@intel.com>
2017-02-14net/dns: Update QEMU prj fileFlavio Santes
Update the IPv4 addresses to 192.0.2.x. Change-Id: I0eafccfaf691cfd2ffb896e18d3fdcf091837edc Signed-off-by: Flavio Santes <flavio.santes@intel.com>
2017-02-14samples/zoap-server: Update docs with information about libcoapVinicius Costa Gomes
Add information about how to run libcoap's[1] implementation of the ETSI testcases against zoap-server. Jira: ZEP-1538 [1] https://github.com/obgm/libcoap (branch develop) Change-Id: I6aa5989575cc15630371aa0761bee98fb6fe1b80 Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
2017-02-14net: remove obsolete CONFIG_NET_YAIPAnas Nashif
Change-Id: Ie8ef79e7d7a6f229af3771b7786af3db89c5e458 Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-02-14samples: webusb: fix variable type mismatchesJithu Joseph
This was reported by ISSM compiler. Jira: ZEP-1179 Change-Id: Ib54d43bbfae4c7819b1e2b82d2931bfe1201ecce Signed-off-by: Jithu Joseph <jithu.joseph@intel.com>
2017-02-13REVERTME: cpp_synchronization: disable on XtensaAndrew Boie
Issue: ZEP-1703 Change-Id: I30af7baa78b0d2ed4dd1ac7236c318c47289fa5e Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-02-11tests: net: whitelist boards for telnet serverAnas Nashif
Change-Id: I141cb9e680584b9b26926eae288ae7a2a85633f8 Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-02-11samples: bmi160: use correct device nameKuo-Lang Tseng
Binding of the device failed due to incorrect device name. Update to use the correct device name. Jira: ZEP-1704 Change-Id: I6ca23a439357592c9c974ca746bccc35e77d996d Signed-off-by: Kuo-Lang Tseng <kuo-lang.tseng@intel.com>
2017-02-11misc: fix more variable type mismatchesJithu Joseph
These were reported by ISSM compiler. Jira: ZEP-1179 Change-Id: Ic625749309773611c0c6ba2905e9420e98947dae Signed-off-by: Jithu Joseph <jithu.joseph@intel.com>
2017-02-10arduino_101: bmi160: use new device nameAnas Nashif
Use new device name for SPI device Jira: ZEP-1704 Change-Id: Iec39468bbef54423af2b3a681dd4ae1eee866d1e Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-02-09samples/dhcpv4_client: Switch from private net_sprint_ipv4_addr to public ↵Marcus Shawcroft
net_addr_ntop Change-Id: I894c22548aeea4dcb42e457266e7e140acdace0f Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
2017-02-09samples/dhcpv4_client: Increase number of DATA buffers.Marcus Shawcroft
Change-Id: I0116613cb63070d08c4cb6ad7a5864d09a014c68 Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
2017-02-09samples/dhcpv4_client: Reduce default debug to dhcpv4Marcus Shawcroft
Turn down the default logging verbosity on the dhcpv4 frdm_k64f config to focus on the dhcpv4 implementation. Change-Id: Ifb450181add653951517a7b128b11657ec2bab62 Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
2017-02-09samples/mbedtls_dtls_client: Fix wild write in entropy_sourceMarcus Shawcroft
The example entropy_source implementation should write entropy to the output buffer rather than to the context pointer which in this example happens to be NULL. Take the opportunity to reorganize the entropy_source to use all of the entropy provided by a call to sys_rand32_get() rather than just 1/4 of it. The entropy_source() callback from mbedtls is given a maximum amount of entropy to return, rather than a minimum amount. Hence it makes more sense to deliver exactly one chunk (32 bits) of entropy from the call to sys_rand32_get() per call and let the mbedtls entropy handler worry about how much entropy we actually need to collect (ie the threshold). Change-Id: I57ed438de5cb1223619fde0fb8039d6eca284646 Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
2017-02-09samples/mbedtls_dtls_server: Use k_uptime_get_32()Marcus Shawcroft
The kernel provides an API call to get the least signficant 32 bits of system time, use it rather than reaching under the hood. Change-Id: I98fabdcadfd0a4fe5ae10226dabf4e6d31e88df6 Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
2017-02-09samples/mbedtls_dtls_client: Use k_uptime_get_32()Marcus Shawcroft
The kernel provides an API call to get the least signficant 32 bits of system time, use it rather than reaching under the hood. Change-Id: I9c303ef949f7670f2a2d9691c342e496873e96e6 Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
2017-02-09net: samples: Unref the buf if app data length is zeroRavi kumar Veeramally
Core stack is not removing the network buffer if app data length is zero. So memory leak happening here. Change-Id: I3d354b5e7008396ca7cb977631036871998165b4 Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
2017-02-09net: samples: Unref net_buf using net_nbuf_unrefRavi kumar Veeramally
Using net_buf_unref() technically works but debugging the network buffer allocations is more difficult if done like that. Change-Id: Ib8e3f8b412c2f8388315c2f63cae4392f814ea2f Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
2017-02-08Merge "Merge net branch into master"Anas Nashif
2017-02-08Merge bluetooth branch into masterJohan Hedberg
- Use k_poll to consolidate all TX threads into a single one - Reuse HCI command buffers for storing their response - Improvements to SDP client support - New "volatile subscription" flag to GATT API - Various smaller fixes & cleanups here and there ---------------------------------------------------------------- Arkadiusz Lichwa (8): Bluetooth: SDP: Get ProtocolDescriptorList attribute internals Bluetooth: shell: Add SDP client support Bluetooth: uuid: Fix assigned UDP uuid value Bluetooth: SDP: Add API to get ProfileDescriptorList attribute Bluetooth: shell: Add getting ProfileDescriptorList attribute Bluetooth: SDP: Add API to get SupportedFeature attribute Bluetooth: shell: Use SupportedFeature attribute API Bluetooth: shell: Add support to retrieve A2SRC record Arun Jagadish (2): Bluetooth: AVDTP: Remove buffer pool Bluetooth: AVDTP: Add AVDTP Discover Function Definition Carles Cufi (1): Bluetooth: hci_core: Use nRF5x FICR address Jaganath Kanakkassery (2): Bluetooth: RFCOMM: Fix session timer during acl disc Bluetooth: RFCOMM: Use common tx pool for control packets Johan Hedberg (15): Bluetooth: Fix trivial coding style issue Bluetooth: Fix checking for invalid public address Bluetooth: Fix using correct variable type for interrupt mask Bluetooth: Fix buffer leak when HCI driver send() fails Bluetooth: drivers/h4: Add support for discarding certain events Bluetooth: Add convenience macros for common header sizes Bluetooth: Kconfig: Merge headroom reserve variables into a single one Bluetooth: Controller: Redesign response buffer allocation for commands Bluetooth: Reuse HCI command buffers for the command response Bluetooth: conn: Use delayed work for LE connection timeout Bluetooth: Merge bt_conn TX threads into a single one with k_poll Bluetooth: Merge HCI command and connection TX threads Bluetooth: samples: Add missing README.rst files Bluetooth: Controller: Use LL_ASSERT instead of BT_ASSERT Bluetooth: Fix incorrect checks for command buffer user data Jonathan Gelie (3): Bluetooth: GATT: introduce volatile subscription flag Bluetooth: GATT: set subscribe value to zero for unsubscription Bluetooth: GATT: fixing unsubscription Luiz Augusto von Dentz (1): Bluetooth: GATT: Fix not removing subscriptions safely Sathish Narasimman (5): Bluetooth: HFP HF: Service level connection completed Bluetooth: HFP HF: Enable extended AG Error Result Code Bluetooth: HFP HF: Indicate disconnect to application Bluetooth: HFP HF: Disconnect rfcomm on SLC error Bluetooth: HFP HF: Remove unused variable 'buf' Szymon Janc (5): Bluetooth: Use assert when getting net buf with K_FOREVER Bluetooth: Remove some dead code Bluetooth: L2CAP: Remove dead code Bluetooth: SDP: Make bt_sdp_create_pdu static Bluetooth: L2CAP: Make l2cap_br_send_conn_rsp return void drivers/bluetooth/hci/Kconfig | 13 +- drivers/bluetooth/hci/h4.c | 93 +++- drivers/bluetooth/hci/h5.c | 47 +- drivers/bluetooth/hci/spi.c | 13 +- drivers/bluetooth/nble/gatt.c | 76 +-- include/bluetooth/buf.h | 13 +- include/bluetooth/gatt.h | 18 +- include/bluetooth/hci.h | 9 +- include/bluetooth/l2cap.h | 20 +- include/bluetooth/sdp.h | 51 ++- include/bluetooth/uuid.h | 2 +- samples/bluetooth/handsfree/README.rst | 23 + samples/bluetooth/hci_uart/src/main.c | 11 +- samples/bluetooth/hci_usb/src/main.c | 11 +- samples/bluetooth/peripheral_sc_only/README.rst | 26 ++ subsys/bluetooth/controller/hci/hci.c | 153 ++++--- subsys/bluetooth/controller/hci/hci_driver.c | 23 +- subsys/bluetooth/controller/hci/hci_internal.h | 2 +- subsys/bluetooth/controller/ll/ctrl.c | 2 +- subsys/bluetooth/host/Kconfig | 10 +- subsys/bluetooth/host/at.c | 2 +- subsys/bluetooth/host/at.h | 3 +- subsys/bluetooth/host/avdtp.c | 81 +++- subsys/bluetooth/host/avdtp_internal.h | 7 - subsys/bluetooth/host/conn.c | 178 ++++---- subsys/bluetooth/host/conn_internal.h | 15 +- subsys/bluetooth/host/gatt.c | 142 +++--- subsys/bluetooth/host/hci_core.c | 285 ++++++++---- subsys/bluetooth/host/hci_core.h | 6 + subsys/bluetooth/host/hci_ecc.c | 6 +- subsys/bluetooth/host/hci_raw.c | 12 + subsys/bluetooth/host/hfp_hf.c | 50 +- subsys/bluetooth/host/l2cap.c | 35 -- subsys/bluetooth/host/l2cap_br.c | 49 +- subsys/bluetooth/host/l2cap_internal.h | 7 +- subsys/bluetooth/host/rfcomm.c | 31 +- subsys/bluetooth/host/rfcomm_internal.h | 5 +- subsys/bluetooth/host/sdp.c | 584 +++++++++++++++++++++++- tests/bluetooth/shell/src/main.c | 172 +++++++ 39 files changed, 1700 insertions(+), 586 deletions(-) create mode 100644 samples/bluetooth/handsfree/README.rst create mode 100644 samples/bluetooth/peripheral_sc_only/README.rst Change-Id: I7589dbad8b97477c72d1b856121593bcf6d11339 Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2017-02-08mbedtls: add arduino 101 configuration to ssl client sampleJuan Manuel Cruz
Jira: ZEP-748 Change-Id: Ied8c521f80b8f1d4b22497a059ee5c948449613f Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@intel.com>
2017-02-08samples: net: irc_bot: add testcase.iniMichael Scott
Change-Id: I61b6373572254cbb63a8170eb2dfd8381a0973a2 Signed-off-by: Michael Scott <michael.scott@linaro.org>
2017-02-08samples: net: irc_bot: fix size_t related build warningsMichael Scott
size_t has different types depending on the arch selected for building. Correct format identifier is %zu in this case. Change-Id: I4388fcd8c5eb8bcd5997bb921bd80b4c2175b24c Signed-off-by: Michael Scott <michael.scott@linaro.org>
2017-02-08samples: net: irc_bot: fix build breakMichael Scott
Fix build break introduced in commit 6b013c4721c5 ("net: nbuf: Add timeout to net_buf getters") Change-Id: Iaa521c6a49ae740eaee5276936442ab8aa4c47ba Signed-off-by: Michael Scott <michael.scott@linaro.org>
2017-02-08net: nbuf: Add timeout to net_buf gettersJukka Rissanen
This commit changes the net_buf getter functions in nbuf.h by adding a timeout parameter. These function prototypes are changed to accept a timeout parameter. net_nbuf_get_rx() net_nbuf_get_tx() net_nbuf_get_data() net_nbuf_get_reserve_rx() net_nbuf_get_reserve_tx() net_nbuf_get_reserve_data() net_nbuf_copy() net_nbuf_copy_all() net_nbuf_push() net_nbuf_append() net_nbuf_write() net_nbuf_insert() Following convinience functions have not been changed net_nbuf_append_u8 net_nbuf_append_be16 net_nbuf_append_be32 net_nbuf_insert_u8 net_nbuf_insert_be16 net_nbuf_insert_be32 net_nbuf_write_u8 net_nbuf_write_be16 net_nbuf_write_be32 so they call the base function using K_FOREVER. Use the base function if you want to have a timeout when net_buf is allocated. Change-Id: I20bb602ffb73069e5a02668fce60575141586c0f Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2017-02-08drivers/net/ieee802154: Change configuration prefixWojciech Bober
This commit changes Kconfig prefix for ieee802154 drivers to IEEE802154_*. This is done for consistency with config prefixes used in other subsystems. Change-Id: Ibbb4d96d2b748f4f13135bde85304ec34c5a90a6 Signed-off-by: Wojciech Bober <wojciech.bober@nordicsemi.no>
2017-02-08samples: net: Fix invalid memory access for TCPJukka Rissanen
Set protocol family value only after the buf is verified to be non-null. Change-Id: I0ce7bab3539087d0f522b4bb3024f46a7eb3c15f Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2017-02-08samples/net/http: Add the HTTP client sample applicationFlavio Santes
This patch adds a basic HTTP client sample application. The following HTTP 1.1 methods are supported: GET, HEAD, OPTIONS and POST. This sample application does not define an API for HTTP, for more information see ZEP-346. Jira: ZEP-827 Change-Id: Iee63a53f2ef424964f040eba20326d648249fc24 Signed-off-by: Flavio Santes <flavio.santes@intel.com>
2017-02-08samples: power: Remove mention of specific versions in READMERamesh Thomas
The README was referring to a specific version of the boot loader. Since the boot loader version is expected to change in future and Zephyr code would also correspond to that version, it is better to not mention any specific version. Instead, the requirement is to use the latest version of the boot loader. Change-Id: I04082eec4af16426f6456702c521e8f61bd4e0df Signed-off-by: Ramesh Thomas <ramesh.thomas@intel.com>
2017-02-07Bluetooth: samples: Add missing README.rst filesJohan Hedberg
Add missing README.rst files to the last two samples. Jira: ZEP-1540 Change-Id: I8dfa6489c6c65872594d4416870e2a41e701595d Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2017-02-05Bluetooth: Reuse HCI command buffers for the command responseJohan Hedberg
Reduce the pressure on the common RX buffer pool by reusing HCI command buffers also for the Command Status or Command Complete response to them. This also implies removing the existing Kconfig variable for the command buffer sizes since the size is also dependent on maximum Command Complete event sizes. Instead, reuse the RX buffer size also for HCI Command buffers. Change-Id: I006b287d64a0c9ca40de741aa9a424a49a927385 Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2017-02-05Bluetooth: Kconfig: Merge headroom reserve variables into a single oneJohan Hedberg
A subsequent patch will start reusing HCI command buffers for receiving the response, so the distinction of received vs sent data headroom would just make the code unnecessarily complex. Instead, just merge these two variable into a single one. Change-Id: I31d846331939f1a2270df7ed0c75112825e16493 Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2017-02-04samples: bmi160: reduce polling mode sampling frequencyBaohong Liu
Reduce the accelerometer sampling frequency for polling mode. So, cpu has more time to fetch the sample. Also add some waiting time for the new frequency setting to take effect. Jira: ZEP-1532 Change-Id: If5c1d8a2b5f30b232a212f2775306ca397b9f80c Signed-off-by: Baohong Liu <baohong.liu@intel.com> Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-02-04samples: spi_flash: remove an unnecessary config symbolBaohong Liu
Remove CONFIG_GPIO from the prj config file. It is redundant. Change-Id: Ife4301e7ce480a9002cadcddfd5eaa569900a391 Signed-off-by: Baohong Liu <baohong.liu@intel.com>
2017-02-03samples: net: zperf: Set the proper UDP payloadJukka Rissanen
Use a static buffer for sending UDP payload instead of reading values from memory. Change-Id: I037db5cd9b8784966d481c36e8cbe92d19760475 Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2017-02-03samples: net: zperf: Fix compiler warningsJukka Rissanen
Compiler was giving "Unused variables" warnings if IPv6 was enabled and IPv4 was not, and vice versa. Change-Id: I3b17534bb8bdef207512ea5b618e138edb420871 Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2017-02-03samples: net: zperf: Fix udp.upload commandJukka Rissanen
The IP address and port number were incorrectly parsed if user used udp.upload command. Change-Id: Ib37d481012af5e186a1e342c92d10ddef9fe35b1 Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2017-02-03samples: net: zperf: Initialize address family properlyJukka Rissanen
The IP address family was not set correctly when setting up the connection. This lead to connectivity error in udp.upload command. Change-Id: I598ff2675f97e10e2033763a497f7583c94f3840 Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>