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

Rn2483 driver In Progress, Configuration Mostly Complete #2

Open
wants to merge 27 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 17 commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
7a6e6a0
Driver boilerplate added and it does in fact compile.
linguini1 Oct 17, 2024
d4af532
Driver boilerplate added and it does in fact compile.
linguini1 Oct 17, 2024
6188c63
Add RN2483 driver to RP2040 bringup for easier integration.
linguini1 Oct 17, 2024
924b41c
Add TODO for configuring radio
linguini1 Oct 17, 2024
5234ae1
Initial Commit. Able to set configuration settings for the RN2483 dev…
JustinDMorrison Nov 5, 2024
766f423
Deleted file that was not needed
JustinDMorrison Nov 9, 2024
b8245ca
Made most changes Matteo Suggested. Added read_response and check_res…
JustinDMorrison Nov 9, 2024
edd2f0a
Removed rn2483_radio_set_cmd function after seperating it into sepera…
JustinDMorrison Nov 9, 2024
5f082f8
Mostly working receive implementation.
linguini1 Nov 10, 2024
df9afd0
Added get and set defines for each parameter
JustinDMorrison Nov 10, 2024
123dd82
Added most of ioctl functionality. Added get and set commands for eac…
JustinDMorrison Nov 10, 2024
f6763be
Fixed some build errors from previous commit. Build successful now.
JustinDMorrison Nov 10, 2024
4059953
Removed magic numbers buffer lengths. Defined buffer lengths are 1 lo…
JustinDMorrison Nov 11, 2024
00d5cb1
Changed ioctl.h to use lowercase hex as seen in other files. I don't …
JustinDMorrison Nov 11, 2024
3bbad8c
Forgot that the \r\n characters were at the end of each message, so a…
JustinDMorrison Nov 11, 2024
fc1c4c8
Made rn2483_set_config function static like other functions.
JustinDMorrison Nov 11, 2024
302fa98
Fixed bug in dummy read, it wouldn't read enough into the buffer. Add…
JustinDMorrison Nov 11, 2024
28bdfd5
Added some text to debug messages. Used sizeof() on the readbuffer as…
JustinDMorrison Nov 12, 2024
b629953
Made most of requested changes. Changed read_response to return size_…
JustinDMorrison Nov 12, 2024
c789fd7
I forgot two semicolons
JustinDMorrison Nov 12, 2024
812a64a
Changed rn2483_read_response to ssize_t to allow errors to be properl…
JustinDMorrison Nov 12, 2024
1c1239a
Added descriptions for each radio paramter. Aligned comments to make …
JustinDMorrison Nov 15, 2024
7c50d43
Merge branch 'rn2483-receive' into rn2483-driver
linguini1 Dec 22, 2024
0f5c4c0
Cleaned up configuration functions.
linguini1 Dec 22, 2024
8c4ed87
Updated polling code.
linguini1 Dec 22, 2024
e3db6e6
Slightly better working version of the receive implementation, althou…
linguini1 Dec 22, 2024
eb786f8
Receive implementation fully receives all bytes, but cat on the devic…
linguini1 Dec 22, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
474 changes: 232 additions & 242 deletions boards/arm/rp2040/common/src/rp2040_common_bringup.c

Large diffs are not rendered by default.

81 changes: 81 additions & 0 deletions drivers/wireless/lpwan/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -84,4 +84,85 @@ config LPWAN_SX127X_FSKOOK

endif # WL_SX127X

config LPWAN_RN2483
bool "LoRa RN2483 transceiver support"
default n
select STANDARD_SERIAL
---help---
This option adds driver support for the RN2483 LoRa transceiver chip.
Currently only bare radio functionality is supported, not the LoRaWAN
functionality.

if LPWAN_RN2483

config LPWAN_RN2483_FREQ
int "Frequency"
default 433050000
---help---
The frequency used for transmitting and receiving in Hz.

config LPWAN_RN2483_SYNC
hex "Synchronization word"
default 0x43
---help---
The synchronization word used for communication.

config LPWAN_RN2483_PRLEN
int "Preamble length"
default 6
range 0 65535
---help---
The preamble length used for communication.

config LPWAN_RN2483_BW
int "Bandwidth"
default 500
range 0 500
---help---
The radio bandwidth used for transmitting and receiving in kHz.
Only 125, 250 and 500 are valid values.

config LPWAN_RN2483_SPREAD
int "Spread factor"
default 7
range 7 12
---help---
The spread factor used for communication.

config LPWAN_RN2483_LORA
bool "Use LoRa modulation"
default y
---help---
Use LoRa modulation for communication. If disabled, FSK is used.

config LPWAN_RN2483_POWER
int "Transmit power"
default 15
range -3 15
---help---
The power used for transmission.

config LPWAN_RN2483_CR
int "Coding rate"
default 15
range 5 8
---help---
The coding rate used for radio communication. This number represents
the denominator in a fraction where the numerator is 4.
Ex: 4/5, 4/6, ...

config LPWAN_RN2483_IQI
bool "Invert QI"
default n
---help---
Whether or not to invert IQ in communication.

config LPWAN_RN2483_CRC
bool "Cyclic redundancy check"
default y
---help---
Whether or not to perform a cyclic redundancy check on packets.

endif # LPWAN_RN2483

endif # DRIVERS_LPWAN
1 change: 1 addition & 0 deletions drivers/wireless/lpwan/Make.defs
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,6 @@
ifeq ($(CONFIG_DRIVERS_LPWAN),y)

include wireless/lpwan/sx127x/Make.defs
include wireless/lpwan/rn2483/Make.defs

endif # CONFIG_DRIVERS_LPWAN
22 changes: 22 additions & 0 deletions drivers/wireless/lpwan/rn2483/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# ##############################################################################
# drivers/wireless/lpwan/rn2483/CMakeLists.txt
#
# Licensed to the Apache Software Foundation (ASF) under one or more contributor
# license agreements. See the NOTICE file distributed with this work for
# additional information regarding copyright ownership. The ASF licenses this
# file to you under the Apache License, Version 2.0 (the "License"); you may not
# use this file except in compliance with the License. You may obtain a copy of
# the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations under
# the License.
#
# ##############################################################################
if(CONFIG_LPWAN_RN2483)
target_sources(drivers PRIVATE rn2483.c)
endif()
33 changes: 33 additions & 0 deletions drivers/wireless/lpwan/rn2483/Make.defs
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
############################################################################
# drivers/wireless/lpwan/rn2483/Make.defs
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership. The
# ASF licenses this file to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance with the
# License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
############################################################################

# Include RN2483 drivers into the build

ifeq ($(CONFIG_LPWAN_RN2483),y)

CSRCS += rn2483.c

# Include RN2483 build support

DEPPATH += --dep-path wireless$(DELIM)lpwan$(DELIM)rn2483
VPATH += :wireless$(DELIM)lpwan$(DELIM)rn2483
CFLAGS += ${INCDIR_PREFIX}$(TOPDIR)$(DELIM)drivers$(DELIM)wireless$(DELIM)lpwan$(DELIM)rn2483

endif # CONFIG_LPWAN_RN2483
Loading
Loading