zephyr
zephyr copied to clipboard
drivers: lora: reyax rylr module
writing a driver that implements the lora api for reyax lora rylr series modules using the zephyr modem utilities.
Note: the bulk of this driver is implemented in drivers/lora/rylrxxx.c which must be opened manually (marked by "Large diffs are not rendered by default" warning)
I tested with two modules: one connected to my board and the other connected to my PC via uart adapter.
I built the samples/hello_world project
west build -b cy8ckit_062s4 --pristine -- -DSHIELD=reyax_lora -DCONFIG_LOG=y -DCONFIG_SHELL=y -DCONFIG_LORA_SHELL=y
west flash
in the zephyr shell, I sent:
uart:~$ lora config pre-len 7
uart:~$ lora config freq 865100000
uart:~$ lora send HELLO
on the serial console in my PC, I saw:
+RCV=1,5,HELLO,-41,36
then I ran this command in the zephyr terminal:
uart:~$ lora recv
and I sent this command to the PC-connected module:
AT+SEND=0,3,sup
I saw this output in zephyr terminal:
00000000: 73 75 70 |sup |
RSSI: 208 dBm, SNR:38 dBm
Signed-off-by: David Ullmann [email protected]
Hi, new modems should not use the old modem libraries like modem_cmd_handler and modem_iface_uart. See https://github.com/zephyrproject-rtos/zephyr/tree/main/include/zephyr/modem and https://github.com/zephyrproject-rtos/zephyr/blob/main/drivers/gnss/gnss_quectel_lcx6g.c :)
@JordanYates and @bjarki-trackunit, thank you for taking a look earlier! I have addressed your comments and updated the PR
@Mani-Sadhasivam @ifyall @galak @nashif could you take a look at your earliest convenience? thanks!
@cfriedt could you take a look when you get a chance?
@JordanYates just wanted to follow up on this!
@DaWei8823 - def want to build the driver in CI as Jordan suggested. The sample application sounds like a good spot.
Only thing missing now is to ensure this driver is built by CI in some form. Ideally
samples/drivers/lora/sendandsamples/drivers/lora/receive
@JordanYates, can you please point me to some resources for adding a CI job that would do something like west build -b cy8ckit_062s4 --pristine -- -DSHIELD=reyax_lora -DCONFIG_LOG=y -DCONFIG_SHELL=y -DCONFIG_LORA_SHELL=y
Only thing missing now is to ensure this driver is built by CI in some form. Ideally
samples/drivers/lora/sendandsamples/drivers/lora/receive@JordanYates, can you please point me to some resources for adding a CI job that would do something like
west build -b cy8ckit_062s4 --pristine -- -DSHIELD=reyax_lora -DCONFIG_LOG=y -DCONFIG_SHELL=y -DCONFIG_LORA_SHELL=y
Something like this: https://github.com/zephyrproject-rtos/zephyr/blob/main/tests/drivers/build_all/rtc/testcase.yaml
sample.driver.lora.rylr.send:
extra_args: SHIELD=the_shield
platform_allow: the_platform
You should be able to validate whether it works locally with zephyr/scripts/twister --all -T zephyr/samples/drivers/lora/send. You might need to move the depends_on: lora part from common, I'm not sure how depends_on interacts with shields.
@cfriedt, @JordanYates I've made the requested changes. Thanks for your comments! Please take a look when you can
@JordanYates, just following up on this
Please add an entry in the release notes mentioning this new driver
@aescolar done
@cfriedt can this be merged now that's it's been approved?
@cfriedt can this be merged now that's it's been approved?
@DaWei8823 - it needs a rebase unfortunately because there are merge conflicts. But given all of the approvals, it should be quick after that.
@kartben done
@aescolar @nashif there was no change besides minor formatting/comments since assignee @JordanYates approved last so it should be ready to go. Thanks!
@kartben ack, should go with the next batch