summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2017-02-15Zephyr 1.7.0-rc1v1.7.0-rc1Anas Nashif
Change-Id: I72d1bce15dcd96db12f7c53042c026d06aa2fa72 Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-02-15Merge "Merge net branch into master"Anas Nashif
2017-02-15sensor: fix typo in sensor.hBogdan Davidoaia
Change-Id: I3610d4dcd38d38af6ce546f9340a811b733c5ffb Signed-off-by: Bogdan Davidoaia <bogdan.davidoaia@linaro.org>
2017-02-15Merge net branch into masterJukka Rissanen
Main changes: - MQTT fixes - echo-server and echo-client fixes in net samples - Fix build errors in net when using ISSM's llvm/icx compiler ---------------------------------------------------------------- Flavio Santes (4): net/mqtt: Add support for QEMU x86 net/mqtt: Use uint32_t for Remaining Length encoding/decoding net/mqtt: Add payload size validation net/mqtt: Remove length computations for some msg fields Jorge Ramirez-Ortiz (1): net/mqtt: Add support for IBM BlueMix Watson topic format Jukka Rissanen (3): samples: net: Remove obsolete prj_slip.conf from echo-* samples: net: Remove the README file samples: net: Add README.rst to echo apps Tomasz Bursztyka (2): net: Fix a const specifier issue net: Remove duplicate const specifier include/net/mqtt_types.h | 4 +- include/net/net_if.h | 2 +- include/net/net_l2.h | 4 +- samples/net/README | 89 ------------------ samples/net/echo_client/README.rst | 98 ++++++++++++++++++++ samples/net/echo_client/prj_slip.conf | 26 ------ samples/net/echo_server/README.rst | 102 +++++++++++++++++++++ samples/net/mqtt_publisher/README.rst | 6 ++ .../prj_qemu_x86.conf} | 31 ++++--- samples/net/mqtt_publisher/src/config.h | 2 + samples/net/mqtt_publisher/src/main.c | 58 ++++++++++-- samples/net/mqtt_publisher/testcase.ini | 2 +- subsys/net/lib/mqtt/mqtt_pkt.c | 27 +++--- tests/net/lib/mqtt_packet/src/mqtt_packet.c | 67 ++++++++++---- 14 files changed, 346 insertions(+), 172 deletions(-) delete mode 100644 samples/net/README create mode 100644 samples/net/echo_client/README.rst delete mode 100644 samples/net/echo_client/prj_slip.conf create mode 100644 samples/net/echo_server/README.rst rename samples/net/{echo_server/prj_slip.conf => mqtt_publisher/prj_qemu_x86.conf} (63%) Change-Id: I56bf74032f37f4aa09046c036e8b0f22dd926c54 Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2017-02-15net: Remove duplicate const specifierTomasz Bursztyka
Jira: ZEP-1723 Change-Id: I0b305f7104a7a6248852846542b6894c86bfc1d8 Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
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 payload size validationFlavio Santes
Validate payload size before starting to decodify MQTT messages. Change-Id: I02653b5e41f930ca75de8f0395b2a7df315e12c5 Signed-off-by: Flavio Santes <flavio.santes@intel.com>
2017-02-15net/mqtt: Use uint32_t for Remaining Length encoding/decodingFlavio Santes
This patch updates the Remaining Length field from uint16_t to uint32_t. The MQTT std specifies that this field must be unsigned 4 bytes length. Change-Id: I319d0745c673faece4bbd4db29b1bafad78ac199 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-15net: Fix a const specifier issueTomasz Bursztyka
Duplicate const specifier, it should be the pointed data that is const. Jira: ZEP-1723 Change-Id: I194abb0fc9ad564c6d53e4727bd63c8099d4eb2e Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.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-15doc: boards: Move nRF5x DK board doc from the wiki to gitCarles Cufi
This includes: * Moving the Nordic nRF5x Segger J-Link page (temporarily placed inside one of the board folders) * Moving the nrf52_pca10040 doc * Moving the nrf51_pca10028 doc * Moving the nrf52840_pca10056 doc Change-Id: I051eb51cee8166ae6472eb696ffeb0625a0424c7 Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2017-02-15tests: gen_isr_table: disable for cortex-m0Anas Nashif
Change-Id: Ic4c3ee2d319e60af166786b856384ee421526b81 Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-02-14tests: filter out tinytile, it is the same as arduino 101Anas Nashif
Change-Id: Ifef85247e6bdb4e6a1de8f5d0fc8cf3c935bd280 Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-02-15arc: add _tsc_read for 64-bit timestampChuck Jordan
This implementation of _tsc_read returns a 64-bit value that is derived from the 64-bit tick count multiplied by hwcycles per tick, and then it adds the current value from the 32-bit timer. This produces a 64-bit time. There is a bunch of math here, which could be avoided if the CPU is built with Real-Time-Clock option. EM Starter Kit SOCs don't have this. I don't think Arduino 101 does either. See ZEP-1559 Change-Id: I9f846d170246556ac40fe2f45809e457c6375d8c Signed-off-by: Chuck Jordan <cjordan@synopsys.com>
2017-02-15arc: enable gen_isr_tables mechanismAndrew Boie
Change-Id: I5897e110f554377796bfe38dd5c0f8652c29e5be Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-02-15gen_isr_tables: apply offset to irq parameterAndrew Boie
The interrupts would be placed at incorrect offsets on systems where some interrupt vectors are reserved for exceptions, such as ARC. Change-Id: I5b1f00eb9e8aecb84ae66e3d0461a734ffb5fbe6 Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-02-15tests: gen_isr_table: actually run the IRQAndrew Boie
So far, only implemented on ARM. It's not possible to do this on Nios II and RISC-V. Change-Id: I84c8d99cd163dff46de4bc4a7ae40768daf8e4ce Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-02-15riscv32: enable gen_isr_tables mechanismAndrew Boie
Change-Id: Ia09d9a4d3412424dcbb25db829059a0714d81214 Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-02-15gen_isr_tables: make vector offset a hidden optionAndrew Boie
If this is set incorrectly things will break all over the place. Needs a default defined per-arch and left alone. Change-Id: I3f8c842937a240297ee21589a22a7a9e51dbdfad Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-02-15Merge "Merge remote-tracking branch 'origin/core'"Anas Nashif
2017-02-15crypto: include tinycrypt only when enabledAnas Nashif
Change-Id: Iea978586a529539255351fb05c7c76ca30baf8ce Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-02-15ipm: fix Makefile to include drivers correctlyAnas Nashif
Change-Id: I606e7b4c5aebc5429e5e8288a5ed916569c7fa0a Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-02-15ataes132a: Adds a driver to support ATAES132A deviceJuan Manuel Cruz Alcaraz
Adds a driver for Atmel Crypto Authorization solution ATAES132A crypto device. The driver supports the following functionality. - AES CCM encryption, decryption and authentication - AES ECB block operation. The driver requires an I2C device to access crypto device registers. Jira: ZEP-1387 Change-Id: I60aa8f3b069b703d4f83d866d28391625bb9ac13 Signed-off-by: Juan Manuel Cruz Alcaraz <juan.m.cruz.alcaraz@intel.com>
2017-02-15qemu_cortex_m3: fixed network connectivityRichard Peters
The wrong UART was set on for the qemu_cortex_m3 slip (uart pipe) device Change-Id: If6d6af0f32ef02ccc559cd1fff90ea499cc378c4 Signed-off-by: Richard Peters <mail@richardpeters.de>
2017-02-15tests: kernel: import obj_tracing test to unified kernelJithu Joseph
obj_tracing test from legacy modified to use unified APIs directly. Jira: ZEP-932 Change-Id: Ib5d300334e527b842668be076c94c40b65d7cbe4 Signed-off-by: Jithu Joseph <jithu.joseph@intel.com>
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-15drivers/crypto: TinyCrypt shim driverJithu Joseph
Shim layer interfacing between crypto APIs and TinyCrypt library. Currently facilitates only a subset of TinyCrypt features/algorithms. Jira: ZEP-509 Change-Id: I7fe6b9d86df016d92d717378d08a1ab09caafb31 Signed-off-by: Jithu Joseph <jithu.joseph@intel.com>
2017-02-15include/crypto: Crypto abstraction headerJithu Joseph
Adds crypto API interface for interaction between applications and crypto drivers. Encryption/Decryption APIs are defined here. Jira: ZEP-328 Change-Id: I1a534ae2a69c7e1c416fa78a2822c37040b225f6 Signed-off-by: Jithu Joseph <jithu.joseph@intel.com>
2017-02-15drivers gpio: Fix disabling of interrupts for QMSI shimsIván Briano
When a GPIO pin is configured, the shim driver will first read the current values in the controller registers to keep the other pins from changing their configuration. After that it sets the bits for the corresponding pin accordingly. When the flag to enable interrupts is passed to the function, the corresponding bits are all set properly, but no changes are made if interrupts are not requested. This makes it impossible to disable interrupts for a given pin once they've been enabled. Fix it by always resetting the interrupt enabled bit when they have not been requested. Other values can be left untouched as they won't have any effect. Jira: ZEP-1717 Change-Id: I30e97bb06d966291e23d0c66ddf39bce615c287b Signed-off-by: Iván Briano <ivan.briano@intel.com>
2017-02-15flash/nrf5: fix invalid write accessJorge Ramirez-Ortiz
Requesting a flash_write with a length of 0 results in a flash position being written. Instead we should return 0 unless there is some other input parameter that is invalid. Change-Id: Ife6e6e2314bbee2bde7d0b69db3122ca00c361e0 Signed-off-by: Jorge Ramirez-Ortiz <jorge.ramirez-ortiz@linaro.org>
2017-02-14toolchain.gccarmemb: set DTC for building targets that use devicetreesKumar Gala
We default DTC to /usr/bin/dtc so we can build targets that are using devicetree and not using the zephyr SDK (which provides a version of dtc). Change-Id: I84c3e3181eda75b4da715e16bbde2e67f28785e7 Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2017-02-14Merge "Merge net branch into master"Anas Nashif
2017-02-14tests: kernel: remove unsupported testsSharron LIU
Remove tests that assert due to invocation from ISR which is not supported. Change-Id: Ib2313b8f75db0140aa475281bd76ba0414d6a481 Signed-off-by: Sharron LIU <sharron.liu@intel.com>
2017-02-14Merge net branch into masterJukka Rissanen
Main changes: - DHCPv4 fixes - FRDM-K64F ethernet IPv6 workaround - FRDM-K64F detect ethernet cable connect - MQTT documentation fix - Add HTTPS sample application - HTTP fixes - ZoAP fixes ---------------------------------------------------------------- Anas Nashif (1): net: remove obsolete CONFIG_NET_YAIP Flavio Santes (5): net/dns: Update QEMU prj file net/mqtt: Fix inline doc for MQTT net/http: Add QEMU support to the HTTP server sample app net/http: Improve network configuration routines ext/lib/mbedtls: Add the TLS configuration file Jorge Ramirez-Ortiz (1): net/mqtt: Add BT support to MQTT publisher sample Marcus Shawcroft (4): eth/mcux: Add basic PHY support. net/dhcpv4: Fix event/state mismatch net/dhcpv4: Remove unused dhcpv4 offer state net/dhcpv4: Ensure udp header checksum is computed correctly Paul Sokolovsky (1): eth/mcux: Add temporary workaround to unbreak IPv6 ND features. Richard Peters (1): samples: net: Add .conf file for qemu_cortex_m3 in echo_* Sergio Rodriguez (2): libc/include: Adding time.h samples/net/http: Add HTTP over TLS sample application Vinicius Costa Gomes (5): iot/zoap: Improve zoap.h documentation samples/zoap-server: Update docs with information about libcoap iot/zoap: Fix handling of 16-bytes block-wise transfers iot/zoap: Fix header indentation iot/zoap: Add missing const modifier to header file boards/arm/frdm_k64f/doc/frdm_k64f.rst | 10 +- drivers/ethernet/Kconfig.mcux | 7 + drivers/ethernet/eth_mcux.c | 204 +++++++-- .../crypto/mbedtls/configs/config-mini-tls1_2.h | 91 ++++ include/net/dhcpv4.h | 1 - include/net/mqtt.h | 390 ++++++++-------- include/net/zoap.h | 425 ++++++++++++++---- lib/libc/minimal/include/time.h | 10 + samples/net/dns_client/prj_qemu_x86.conf | 4 +- samples/net/echo_client/prj_qemu_cortex_m3.conf | 26 ++ samples/net/echo_server/prj_qemu_cortex_m3.conf | 27 ++ samples/net/http_server/README.rst | 57 ++- samples/net/http_server/prj_qemu_x86.conf | 34 ++ samples/net/http_server/src/Makefile | 5 + samples/net/http_server/src/config.h | 4 + samples/net/http_server/src/http_server.c | 26 ++ samples/net/http_server/src/http_server.h | 4 + samples/net/http_server/src/https_server.c | 406 +++++++++++++++++ samples/net/http_server/src/main.c | 106 ++--- samples/net/http_server/src/ssl_utils.c | 295 ++++++++++++ samples/net/http_server/src/ssl_utils.h | 37 ++ samples/net/http_server/src/test_certs.h | 92 ++++ samples/net/http_server/testcase.ini | 2 +- samples/net/leds_demo/prj_802154.conf | 1 - samples/net/mqtt_publisher/prj_96b_nitrogen.conf | 65 +++ samples/net/mqtt_publisher/src/Makefile | 4 + samples/net/mqtt_publisher/src/main.c | 59 ++- samples/net/mqtt_publisher/testcase.ini | 5 + samples/net/zoap_server/README.rst | 28 +- samples/net/zoap_server/prj_cc2520.conf | 1 - samples/net/zperf/prj_frdm_k64f_prof.conf | 1 - samples/net/zperf/prj_qemu_x86.conf | 1 - subsys/net/ip/dhcpv4.c | 6 +- subsys/net/ip/net_shell.c | 2 - subsys/net/lib/mqtt/mqtt.c | 110 ++--- subsys/net/lib/mqtt/mqtt_pkt.c | 287 ++++++------ subsys/net/lib/mqtt/mqtt_pkt.h | 495 +++++++++++---------- subsys/net/lib/zoap/zoap.c | 32 +- 38 files changed, 2506 insertions(+), 854 deletions(-) create mode 100644 ext/lib/crypto/mbedtls/configs/config-mini-tls1_2.h create mode 100644 lib/libc/minimal/include/time.h create mode 100644 samples/net/echo_client/prj_qemu_cortex_m3.conf create mode 100644 samples/net/echo_server/prj_qemu_cortex_m3.conf create mode 100644 samples/net/http_server/prj_qemu_x86.conf create mode 100644 samples/net/http_server/src/https_server.c create mode 100644 samples/net/http_server/src/ssl_utils.c create mode 100644 samples/net/http_server/src/ssl_utils.h create mode 100644 samples/net/http_server/src/test_certs.h create mode 100644 samples/net/mqtt_publisher/prj_96b_nitrogen.conf Change-Id: Ic5d4766a98db84599f2238e0104c6bc37cbf34bd Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.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-14libc/include: Adding time.hSergio Rodriguez
Dummy time.h to fulfill the compilations requirements of certain libraries i.e. mbedTLS Change-Id: I07e66dbf07337b935dabe9eecdf1be3850bbf394 Signed-off-by: Sergio Rodriguez <sergio.sf.rodriguez@intel.com>
2017-02-14eth/mcux: Add temporary workaround to unbreak IPv6 ND features.Paul Sokolovsky
This is a workaround for lack of driver API support for multicast management. So, instead we want to receive all multicast frames "by default", or otherwise basic IPv6 features, like address resolution, don't work. On Kinetis Ethernet controller, that translates to enabling promiscuous mode. The real fix depends on ZEP-1673. Change-Id: I98a27584be65bdc405de005383eb30bad2a7fcfc Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
2017-02-14ext/lib/mbedtls: Add the TLS configuration fileFlavio Santes
This patch adds the TLS configuration file required by mbed. Change-Id: I8d99f27e028775de153a69cdd6706b8e2d0a3d9b 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-14net/dhcpv4: Ensure udp header checksum is computed correctlyMarcus Shawcroft
The dhcpv4 client code builds ip and udp packets from scratch rather than using the network stack to do the heavy lifting (why ?). When it computes the udp checksum of each packet it builds it neglects to clear any preexisting detritus from the checksum field. The result of this is that some packets will be built with correct checksums and some will be built with incorrect checksums. This is the underlying reason that the dhcp client often taken many retransmissions and elapsed time before in order to acquire an IP address. Change-Id: Iebd1ed34e06f7f2e53d45f6d1555e22f48490287 Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
2017-02-14net/dhcpv4: Remove unused dhcpv4 offer stateMarcus Shawcroft
The offer state is unused, remove it. Change-Id: I9d6217dae291bb90c57c77ce439809bf7e9a9177 Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
2017-02-14net/dhcpv4: Fix event/state mismatchMarcus Shawcroft
Fix long standing issue where a dhcpv4 message type is compared against a dhcpv4 state machine state name rather than a message type. The issue probably arizes due to the similarity in names between messages and states. By accident, the relevant message types and states happen to share the same numbers, hence the implementation works, but is ill defined. Change-Id: I5c028de4336ff42f6696e28b3492c932c58b5a05 Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
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-14eth/mcux: Add basic PHY support.Marcus Shawcroft
Add basic PHY management sufficient to detect link up, link down and auto negotiated link speed / duplex. The PHY driver is implemented as a state machine that executed in the system work queue. The implementation is non blocking, using the MII interrupt to capture the completion of read and write events. This PHY management should be fairly generic. In the future, it may be beneficial to pull this code out as a standalone PHY driver for use with other ethernet drivers. JIRA: ZEP-1674 Change-Id: I3dcb5c14982ef4b40591fcf10d84840b8a2558e5 Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
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>