Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lorawan upstream downlink #2

Open
wants to merge 27 commits into
base: lorawan-upstream
Choose a base branch
from

Conversation

KubaFYI
Copy link

@KubaFYI KubaFYI commented Jun 11, 2020

Introduce ability to read downlink messages by the app.

Signed-off-by: Kuba Sanak contact@kuba.fyi

Mani-Sadhasivam and others added 22 commits March 25, 2020 19:55
For using this driver with LoRaWAN, following changes were done:

- Removed the use of counter and adapted system timer APIs for tick
  counting. This is required because most of the counter drivers run at
  very low tick rate like 1Hz and will not work with loramac-node
  library.
- Removed the use of counter and adapted timer APIs for alarm
  functionality.
- Added few more function definitions and callbacks required by the
  stack

Signed-off-by: Manivannan Sadhasivam <mani@kernel.org>
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>
Add LoRaWAN API for Zephyr. Only config, join and send methods are
implemented.

Signed-off-by: Manivannan Sadhasivam <mani@kernel.org>
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>
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>
system_max_rs_error is used to negotiate overall timing error for Rx
in the loramac-node library. Hence, add support for configuring this
from sample application.

Signed-off-by: Kuba Sanak <contact@kuba.fyi>
Signed-off-by: Manivannan Sadhasivam <mani@kernel.org>
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>
Add CODEOWNERS entry for LoRaWAN

Signed-off-by: Manivannan Sadhasivam <mani@kernel.org>
Update loramac-node repo to support LoRaWAN.

Signed-off-by: Manivannan Sadhasivam <mani@kernel.org>
For using this driver with LoRaWAN, following changes were done:

- Removed the use of counter and adapted system timer APIs for tick
  counting. This is required because most of the counter drivers run at
  very low tick rate like 1Hz and will not work with loramac-node
  library.
- Removed the use of counter and adapted timer APIs for alarm
  functionality.
- Added few more function definitions and callbacks required by the
  stack

Signed-off-by: Manivannan Sadhasivam <mani@kernel.org>
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>
Add LoRaWAN API for Zephyr. Only config, join and send methods are
implemented.

Signed-off-by: Manivannan Sadhasivam <mani@kernel.org>
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>
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>
system_max_rs_error is used to negotiate overall timing error for Rx
in the loramac-node library. Hence, add support for configuring this
from sample application.

Signed-off-by: Kuba Sanak <contact@kuba.fyi>
Signed-off-by: Manivannan Sadhasivam <mani@kernel.org>
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>
Add CODEOWNERS entry for LoRaWAN

Signed-off-by: Manivannan Sadhasivam <mani@kernel.org>
Update loramac-node repo to support LoRaWAN.

Signed-off-by: Manivannan Sadhasivam <mani@kernel.org>
Currently only the latest downlink message can be read - using Zephyr
ring buffer generates hard faults when sending a message after DL
have been received for 2nd/3rd times...

Signed-off-by: Kuba Sanak <contact@kuba.fyi>
crashes). Also added board overlay file for Feather M).
Signed-off-by: Kuba Sanak <contact@kuba.fyi>
@KubaFYI KubaFYI requested a review from Mani-Sadhasivam as a code owner June 11, 2020 13:19
KubaFYI added 4 commits June 11, 2020 15:00
Signed-off-by: Kuba Sanak <contact@kuba.fyi>
This reverts commit 61aff64.

Signed-off-by: Kuba Sanak <contact@kuba.fyi>
Signed-off-by: Kuba Sanak <contact@kuba.fyi>
Signed-off-by: Kuba Sanak <contact@kuba.fyi>
@KubaFYI KubaFYI force-pushed the lorawan-upstream-downlink branch from 78a6c3d to 61295ac Compare June 11, 2020 14:42
Signed-off-by: Kuba Sanak <contact@kuba.fyi>
@KubaFYI KubaFYI force-pushed the lorawan-upstream-downlink branch from 61295ac to 078ff36 Compare June 11, 2020 15:03
Mani-Sadhasivam pushed a commit that referenced this pull request Jun 29, 2020
This makes the gatt metrics also available for
gatt write-without-rsp-cb so it now prints the rate of each write:

uart:~$ gatt write-without-response-cb 1e ff 10 10
Write #1: 16 bytes (0 bps)
Write #2: 32 bytes (3445948416 bps)
Write zephyrproject-rtos#3: 48 bytes (2596929536 bps)
Write zephyrproject-rtos#4: 64 bytes (6400 bps)
Write zephyrproject-rtos#5: 80 bytes (8533 bps)
Write zephyrproject-rtos#6: 96 bytes (10666 bps)
Write zephyrproject-rtos#7: 112 bytes (8533 bps)
Write zephyrproject-rtos#8: 128 bytes (9955 bps)
Write zephyrproject-rtos#9: 144 bytes (11377 bps)
Write zephyrproject-rtos#10: 160 bytes (7680 bps)
Write zephyrproject-rtos#11: 176 bytes (8533 bps)
Write zephyrproject-rtos#12: 192 bytes (9386 bps)
Write Complete (err 0)
Write zephyrproject-rtos#13: 208 bytes (8533 bps)
Write zephyrproject-rtos#14: 224 bytes (9244 bps)
Write zephyrproject-rtos#15: 240 bytes (9955 bps)
Write zephyrproject-rtos#16: 256 bytes (8000 bps)

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
@Mani-Sadhasivam Mani-Sadhasivam force-pushed the lorawan-upstream branch 5 times, most recently from d9f8bbc to 388736e Compare July 8, 2020 15:15
@Mani-Sadhasivam Mani-Sadhasivam force-pushed the lorawan-upstream branch 3 times, most recently from 926aeca to 438f1f6 Compare September 21, 2020 06:34
@Mani-Sadhasivam Mani-Sadhasivam force-pushed the lorawan-upstream branch 6 times, most recently from 39ac1a4 to 2e22205 Compare October 7, 2020 14:06
@Mani-Sadhasivam
Copy link
Owner

@KubaFYI Now that the lorawan PR got merged into mainline, can you please rebase and post this as a PR to mainline?

@KubaFYI
Copy link
Author

KubaFYI commented Oct 16, 2020

@KubaFYI Now that the lorawan PR got merged into mainline, can you please rebase and post this as a PR to mainline?

Yup, that was my plan and I'm doing it today.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants