Commit graph

44861 commits

Author SHA1 Message Date
Oliver Hitz
0c70877ceb net: IPv4 bcast address recognized as multicast
Modified net_ipv4_is_addr_mcast() to not wrongly classify an IPv4
broadcast address as a multicast address.

Signed-off-by: Oliver Hitz <oliver@net-track.ch>
2020-10-09 10:26:38 +03:00
Christopher Friedt
310d149d8b boards: cc1352r_sensortag: add support for TI CC1352R SensorTag
The TI CC1352R SensorTag (LPSTK-CC1352R) is a development kit that
features the CC1352R SoC.

Signed-off-by: Christopher Friedt <chrisfriedt@gmail.com>
2020-10-08 16:08:36 -04:00
Frank Li
e3b5ddac65 dts: boards: mm_swiftio: enable more devices
Enable i2c/spi/uart devices for mm_swiftio.

Signed-off-by: Frank Li <lgl88911@163.com>
2020-10-08 14:23:01 -05:00
Vinayak Kariappa Chettimada
c440c0d92f Bluetooth: controller: Initialize close to locality of reference
Initialize auto variables close to locality of reference.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2020-10-08 17:29:08 +02:00
Jakub Rzeszutko
c195529615 shell: documentation update
Updating documentation with dictionary commands description.

Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordicsemi.no>
2020-10-08 10:12:25 -04:00
Jakub Rzeszutko
f812e9463d shell: shell example update
Updating shell example to present usage of dictionary commands.

Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordicsemi.no>
2020-10-08 10:12:25 -04:00
Jakub Rzeszutko
a8e45c4f1e shell: dictionary commands feature
Adding dictionary commands concept. It simplifies creation of multiple
commands that are handled by a one function handler.

This is a special kind of static commands. Dictionary commands can be
used every time you want to use a pair: (string <-> corresponding data)
in a command handler. The string is usually a verbal description
of a given data. The idea is to use the string as a command syntax that
can be prompted by the shell and corresponding data can be used to
process the command.

Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordicsemi.no>
2020-10-08 10:12:25 -04:00
Robert Lubos
b932edc772 net: lwm2m: Fix bootstrap finish response code
LwM2M engine did not set response code for the Bootstrap-finish message,
hence it replied with the code copied from the request which is not
correct. Fix this by setting correct code for the Bootstrap-finish
reply.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2020-10-08 16:31:56 +03:00
Andreas Sandberg
cfb6257327 lorawan: Cleanup error handling code
The error handling code currently has a couple of issues:

 * It relies on ordered lists and upstream not changing any constants.

 * Converted messages are not stored in constant memory which means
   that log_strdup is needed whenever they are printed.

This change also factors out error handling to a separate file,
lw_priv.{c,h}, to facilitate reuse in a future secure element and
state storage implementation.

Signed-off-by: Andreas Sandberg <andreas@sandberg.pp.se>
2020-10-08 12:15:38 +02:00
Manivannan Sadhasivam
0e0339ba76 CODEOWNERS: Add entry for LoRaWAN
Add CODEOWNERS entry for LoRaWAN

Signed-off-by: Manivannan Sadhasivam <mani@kernel.org>
2020-10-08 12:15:38 +02:00
Kuba Sanak
9c976a2cad lorawan: Rework error handling code
For consistency with other parts of Zephyr, the public APIs available
in lorawan subsystem now returns error codes from the set defined in
errno.h.

Signed-off-by: Kuba Sanak <contact@kuba.fyi>
[mani: reworked the code and commit a bit for upstream]
Signed-off-by: Manivannan Sadhasivam <mani@kernel.org>
2020-10-08 12:15:38 +02:00
Kuba Sanak
b44dcf88d9 lorawan: Add support for SystemMaxRxError
SystemMaxRxError is used to negotiate overall timing error for Rx
in the loramac-node library. Hence, add support for configuring this
parameter from Kconfig.

Signed-off-by: Kuba Sanak <contact@kuba.fyi>
Signed-off-by: Manivannan Sadhasivam <mani@kernel.org>
2020-10-08 12:15:38 +02:00
Manivannan Sadhasivam
0ea457e0dc samples: lorawan: Add Class-A LoRaWAN sample application
This sample application shows how to configure an end node in Class-A
mode and to send data to network server via gateway.

Signed-off-by: Manivannan Sadhasivam <mani@kernel.org>
2020-10-08 12:15:38 +02:00
Manivannan Sadhasivam
3ce8540f3a lorawan: Add initial support for LoRaWAN
Add initial support for LoRaWAN based on Semtech's loramac-node
library. Current implementation only supports OTAA config and
sending data to LoRaWAN server like ThingsNetwork.

While at it, this commit also moves the "loramac-node" library
definition from drivers/lora to subsys/lorawan. This is required
because, subsys/lorawan gets processed before drivers/lora and
that creates issue while building.

Signed-off-by: Manivannan Sadhasivam <mani@kernel.org>
2020-10-08 12:15:38 +02:00
Manivannan Sadhasivam
88e3ea02ff include: Add LoRaWAN API
Add LoRaWAN API for Zephyr. Only config, join and send methods are
implemented.

Signed-off-by: Manivannan Sadhasivam <mani@kernel.org>
2020-10-08 12:15:38 +02:00
Kuba Sanak
52a8020398 drivers: lora: Add CheckRfFrequency callback to SX1276 driver
CheckRfFrequency was not assigned correctly to the Radio. This lead
to the system hang when the loramac library tries to call a relevant
Radio method when processing a join-accept message

Signed-off-by: Kuba Sanak <contact@kuba.fyi>
Signed-off-by: Manivannan Sadhasivam <mani@kernel.org>
2020-10-08 12:15:38 +02:00
Manivannan Sadhasivam
4d1d1bb330 drivers: lora: Add missing function definitions & callbacks for LoRaWAN
For preparing the radio drivers (specifically SX1276) for LoRaWAN
support, let's add missing function definitions and callbacks required
by the stack.

Signed-off-by: Manivannan Sadhasivam <mani@kernel.org>
2020-10-08 12:15:38 +02:00
Manivannan Sadhasivam
47a262f28b drivers: lora: hal_common: Offload calling TimerIrqHandler to work queue
Since TimerIrqHandler() API does SPI transactions, it is not advised to
call from an IRQ context. Hence, offload it to a work queue.

Reported-by: Andreas Sandberg <andreas@sandberg.pp.se>
Signed-off-by: Manivannan Sadhasivam <mani@kernel.org>
2020-10-08 12:15:38 +02:00
Manivannan Sadhasivam
0668e2b795 drivers: lora: Only create loramac-node library if not done before
The loramac-node library definition will also be created by
'subsys/lorawan' for the LoRaWAN support. Hence, just add the source
files if the previous declaration of the library is found else create
a new one.

Signed-off-by: Manivannan Sadhasivam <mani@kernel.org>
2020-10-08 12:15:38 +02:00
Jeremy LOCHE
3caba2d527 boards: nucleo_l432kc: configure serial pins from DT
usart1, usart2 pinmuxes are now configured from DT pinctrl.

Signed-off-by: Jeremy LOCHE <lochejeremy@gmail.com>
2020-10-08 05:05:20 -05:00
Jeremy LOCHE
a76d091a45 boards: stm32mp157c_dk2: configure serial pins from DT
usart3, uart7 pinmuxes are now configured from DT pinctrl.

Signed-off-by: Jeremy LOCHE <lochejeremy@gmail.com>
2020-10-08 05:05:20 -05:00
Jeremy LOCHE
da323092fc boards: 96b_avenger96: configure serial pins from DT
uart4, uart7 pinmuxes are now configured from DT pinctrl.

Signed-off-by: Jeremy LOCHE <lochejeremy@gmail.com>
2020-10-08 05:05:20 -05:00
Jeremy LOCHE
21c88b985c boards: nucleo_f411re: configure serial pins from DT
usart1, usart2 pinmuxes are now configured from DT pinctrl.

Signed-off-by: Jeremy LOCHE <lochejeremy@gmail.com>
2020-10-08 05:05:20 -05:00
Jeremy LOCHE
e5d3ee18cb boards: nucleo_l152re: configure serial pins from DT
usart2 pinmuxes are now configured from DT pinctrl.

Signed-off-by: Jeremy LOCHE <lochejeremy@gmail.com>
2020-10-08 05:05:20 -05:00
Jeremy LOCHE
281580ab9a boards: 96b_carbon: configure serial pins from DT
usart1, usart2, usart6 pinmuxes are now configured from DT pinctrl.

Signed-off-by: Jeremy LOCHE <lochejeremy@gmail.com>
2020-10-08 05:05:20 -05:00
Jeremy LOCHE
979f39ac95 boards: nucleo_f303re: configure serial pins from DT
usart2 pinmuxes are now configured from DT pinctrl.

Signed-off-by: Jeremy LOCHE <lochejeremy@gmail.com>
2020-10-08 05:05:20 -05:00
Jeremy LOCHE
837a111d4e boards: nucleo_l496zg: configure serial pins from DT
usart2, lpuart1 pinmuxes are now configured from DT pinctrl.

Signed-off-by: Jeremy LOCHE <lochejeremy@gmail.com>
2020-10-08 05:05:20 -05:00
Jeremy LOCHE
73ad1184df boards: nucleo_f446re: configure serial pins from DT
usart1, usart2 pinmuxes are now configured from DT pinctrl.

Signed-off-by: Jeremy LOCHE <lochejeremy@gmail.com>
2020-10-08 05:05:20 -05:00
Jeremy LOCHE
3ac7283af4 boards: nucleo_wb55rg: configure serial pins from DT
usart1, lpuart1 pinmuxes are now configured from DT pinctrl.

Signed-off-by: Jeremy LOCHE <lochejeremy@gmail.com>
2020-10-08 05:05:20 -05:00
Jeremy LOCHE
b18f9b2f6e boards: nucleo_f412zg: configure serial pins from DT
usart3, usart6 pinmuxes are now configured from DT pinctrl.

Signed-off-by: Jeremy LOCHE <lochejeremy@gmail.com>
2020-10-08 05:05:20 -05:00
Jeremy LOCHE
4eca6010d3 boards: stm32g0316_disco: configure serial pins from DT
usart1 pinmuxes are now configured from DT pinctrl.

Signed-off-by: Jeremy LOCHE <lochejeremy@gmail.com>
2020-10-08 05:05:20 -05:00
Jeremy LOCHE
22d719fe60 boards: olimex_stm32_e407: configure serial pins from DT
usart1, usart3, usart6 pinmuxes are now configured from DT pinctrl.

Signed-off-by: Jeremy LOCHE <lochejeremy@gmail.com>
2020-10-08 05:05:20 -05:00
Jeremy LOCHE
437dc2e15e boards: nucleo_f429zi: configure serial pins from DT
usart3, usart6 pinmuxes are now configured from DT pinctrl.

Signed-off-by: Jeremy LOCHE <lochejeremy@gmail.com>
2020-10-08 05:05:20 -05:00
Jeremy LOCHE
d2cfd9fe58 boards: adafruit_feather_stm32f405: configure serial pins from DT
usart3 pinmuxes are now configured from DT pinctrl.

Signed-off-by: Jeremy LOCHE <lochejeremy@gmail.com>
2020-10-08 05:05:20 -05:00
Jeremy LOCHE
f72144cad3 boards: stm32373c_eval: configure serial pins from DT
usart2 pinmuxes are now configured from DT pinctrl.

Signed-off-by: Jeremy LOCHE <lochejeremy@gmail.com>
2020-10-08 05:05:20 -05:00
Jeremy LOCHE
5970fc2831 boards: nucleo_f030r8: configure serial pins from DT
usart1, usart2 pinmuxes are now configured from DT pinctrl.

Signed-off-by: Jeremy LOCHE <lochejeremy@gmail.com>
2020-10-08 05:05:20 -05:00
Jeremy LOCHE
5e4a6b2f66 boards: steval_fcu001v1: configure serial pins from DT
usart1 pinmuxes are now configured from DT pinctrl.

Signed-off-by: Jeremy LOCHE <lochejeremy@gmail.com>
2020-10-08 05:05:20 -05:00
Jeremy LOCHE
110d15179a boards: mikroe_mini_m4_for_stm32: configure serial pins from DT
usart2 pinmuxes are now configured from DT pinctrl.

Signed-off-by: Jeremy LOCHE <lochejeremy@gmail.com>
2020-10-08 05:05:20 -05:00
Jeremy LOCHE
4be9c02847 boards: stm32l1_disco: configure serial pins from DT
usart1, usart2, usart3 pinmuxes are now configured from DT pinctrl.

Signed-off-by: Jeremy LOCHE <lochejeremy@gmail.com>
2020-10-08 05:05:20 -05:00
Jeremy LOCHE
ca97beab32 boards: stm32f0_disco: configure serial pins from DT
usart1, usart2 pinmuxes are now configured from DT pinctrl.

Signed-off-by: Jeremy LOCHE <lochejeremy@gmail.com>
2020-10-08 05:05:20 -05:00
Jeremy LOCHE
b06dc131dc boards: b_l072z_lrwan1: configure serial pins from DT
usart1, usart2 pinmuxes are now configured from DT pinctrl.

Signed-off-by: Jeremy LOCHE <lochejeremy@gmail.com>
2020-10-08 05:05:20 -05:00
Jeremy LOCHE
99f5a08354 boards: stm32f469i_disco: configure serial pins from DT
usart3, usart6 pinmuxes are now configured from DT pinctrl.

Signed-off-by: Jeremy LOCHE <lochejeremy@gmail.com>
2020-10-08 05:05:20 -05:00
Jeremy LOCHE
b0a91aa6b7 boards: stm32f769i_disco: configure serial pins from DT
usart1, usart6 pinmuxes are now configured from DT pinctrl.

Signed-off-by: Jeremy LOCHE <lochejeremy@gmail.com>
2020-10-08 05:05:20 -05:00
Jeremy LOCHE
8f01cfccdd boards: stm32f3_disco: configure serial pins from DT
usart1, usart2 pinmuxes are now configured from DT pinctrl.

Signed-off-by: Jeremy LOCHE <lochejeremy@gmail.com>
2020-10-08 05:05:20 -05:00
Jeremy LOCHE
c0fc2649fe boards: sensortile_box: configure serial pins from DT
usart1, usart2 pinmuxes are now configured from DT pinctrl.

Signed-off-by: Jeremy LOCHE <lochejeremy@gmail.com>
2020-10-08 05:05:20 -05:00
Jeremy LOCHE
839203930f boards: b_l4s5i_iot01a: configure serial pins from DT
usart1, uart4 pinmuxes are now configured from DT pinctrl.

Signed-off-by: Jeremy LOCHE <lochejeremy@gmail.com>
2020-10-08 05:05:20 -05:00
Jeremy LOCHE
5f61d2ce6f boards: 96b_argonkey: configure serial pins from DT
usart1 pinmuxes are now configured from DT pinctrl.

Signed-off-by: Jeremy LOCHE <lochejeremy@gmail.com>
2020-10-08 05:05:20 -05:00
Jeremy LOCHE
f6b0242084 boards: stm32f4_disco: configure serial pins from DT
usart1, usart2 pinmuxes are now configured from DT pinctrl.

Signed-off-by: Jeremy LOCHE <lochejeremy@gmail.com>
2020-10-08 05:05:20 -05:00
Jeremy LOCHE
9f79a69665 boards: nucleo_f103rb: configure serial pins from DT
usart1, usart2, usart3 pinmuxes are now configured from DT pinctrl.

Signed-off-by: Jeremy LOCHE <lochejeremy@gmail.com>
2020-10-08 05:05:20 -05:00
Jeremy LOCHE
320fe732d6 boards: nucleo_g071rb: configure serial pins from DT
usart2 pinmuxes are now configured from DT pinctrl.

Signed-off-by: Jeremy LOCHE <lochejeremy@gmail.com>
2020-10-08 05:05:20 -05:00