Commit Graph

93 Commits

Author SHA1 Message Date
Jonathan Bennett
676319a9ca
Implement chunked SPI transfer for ch341 (#3847)
This seems to fix the ch341 quirk where large packets fail to send. As it can be problematic for other radios, we gate it behind "ch341_quirk" in the config.
2024-05-10 04:36:20 -05:00
Jonathan Bennett
3f45c2d4f0
Fix another LOG_DEBUG message that should be LOG_ERROR (#3607) 2024-04-12 14:14:56 -05:00
Jonathan Bennett
8bb562c5fa
Add spiTransfer function to Native to support Linux-managed CS (#3524)
* Add spiTransfer function to Native to support Linux-managed CS

* Trunk

---------

Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
2024-04-01 18:31:36 -05:00
GUVWAF
585805c3b9
Add original hop limit to header to determine hops used (#3321)
* Set `hop_start` in header to determine how many hops each packet traveled

* Set hopLimit of response according to hops used by request

* Identify neighbors based on `hopStart` and `hopLimit`

* NeighborInfo: get all packets and assume a default broadcast interval

* Add fail-safe in case node in between is running modified firmware

* Add `viaMQTT` and `hopsAway` to NodeInfo

* Replace `HOP_RELIABLE` with hopStart for repeated packet

---------

Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
2024-03-08 07:13:57 -06:00
GUVWAF
8f6a2836b8
Mark packets received via MQTT and add option to ignore them (#3117)
* Mark packets received via MQTT and add option to ignore them

* Don't send packets received via MQTT back into MQTT
Generate implicit ACK for packets we as an MQTT gateway sent

---------

Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
2024-01-20 14:22:09 -06:00
luzpaz
003047baaf
Fix various typos (#2607)
* Fix various typos

Found via `codespell -q 3 -L acount,clen,dout`

* Trunk reformatting

---------

Co-authored-by: code8buster <communismisgreat@national.shitposting.agency>
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
2023-07-14 16:25:20 -05:00
Thomas Göttgens
1dfa8f2d9e
RAK11310 (#2299)
* POC. Board definition JSON upcoming. Generic for now

* side-effect: RP2040 is building again.

* WIP Pico Targets

* current state of affairs

* ahem

* POC. Board definition JSON upcoming. Generic for now

* side-effect: RP2040 is building again.

* WIP Pico Targets

* current state of affairs

* ahem

* fmt

* update toolkit and fmt

* Add built in LED pin

* Use arduino pins

* init SPI bus on right pins.

* Use SPI1 and control chip select manually

* Use macro define for SPI selection. This needs to be defined in the ini file since portduino needs it inside the framework source

* Remove manual CS; works when not using setCS()

* Remove whoopsie debug line

* we are not ARDUINO_AVR_NANO_EVERY any more

* fix rp2040 compilation

* fix RadioLibHAL

* Use new arduino-pico core

* Use cortex-m0plus for BSEC2 library

* Forgot RAK11310 target for BSEC2 library

* That branch was merged

* RAK11310 is working too

---------

Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
Co-authored-by: GUVWAF <thijs@havinga.eu>
2023-05-23 16:19:36 -05:00
IhorNehrutsa
9c683f4c87
Fix LOG_DEBUG messages when no DEBUG_PORT. (#2485)
* Fix LOG_DEBUG messages when no DEBUG_PORT.

* Fix LOG_DEBUG messages when no DEBUG_PORT.

* Fix LOG_DEBUG messages when no DEBUG_PORT.

* Fix LOG_DEBUG messages when no DEBUG_PORT.
2023-05-13 05:33:14 -05:00
Thomas Göttgens
c1a1b450e3 RadioLib6 support 2023-05-08 14:40:10 +02:00
GUVWAF
95bbcd2cb7
Use LORA_DIO1 as RadioLib GPIO for SX127x chips (#2290)
* When channel is active, first try receiving that packet
Afterwards we'll try transmitting again

* Remove setStandby in startSend
Already done in isChannelActive()

* Set LORA_DIO1 as RadioLib GPIO for SX127x

* LORA_DIO1 for Heltec v1, overlaps with GPS_TX
Set to RADIOLIB_NC for now

* If receive was not successful, startReceive doesn't trigger the interrupt
So we have to go back to transmitting anyway

---------

Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
2023-02-20 07:40:44 -06:00
Thomas Göttgens
7aa4e94e45 Do not send when region unset 2023-01-30 17:25:21 +01:00
Thomas Göttgens
cdf379616c whatever makes trunk happy. 2023-01-21 21:23:24 +01:00
Thomas Göttgens
6fdb93cd16 re-add namespacing in protobufs. Let's see what i missed. Portduino likely ...
Checking in generated on purpose.
2023-01-21 21:23:24 +01:00
GUVWAF
bcf24b8187 Make Trunk happy 2023-01-21 13:01:19 +01:00
a_filonichev
a584cac827 fix rxGood counter 2023-01-20 23:41:05 +02:00
a_filonichev
3eaa054c68 Fix vulnerability with "h.from == 0"
// altered packed with "from == 0" can do Remote Node Administration without permission
2023-01-20 01:38:13 +02:00
Thomas Göttgens
8465467aa8 2nd batch 2023-01-07 14:57:00 +01:00
pavelb-techspark
30ae4c2a38
Add QueueStatus sending to the firmware (#1820)
* Yank mqtt service envelope queue

* trybuildfix mqtt system

* removed too much

* no excessive heap debugging on release builds

* send QueueStatus messages

The QueueStatus message is sent as a response to the attempt to queue
an outgoing MeshPacket and contains statuses of the last queue
attempt, TX Queue space and capacity and MeshPacket.id that was
queued.

When TX Queue changes status from completely full to at least
a single slot free a QueueStatus message is also sent to notify
that user can queue more messages.

Signed-off-by: Pavel Boldin <pavel.b@techspark.engineering>

* WIP: update protobufs

Signed-off-by: Pavel Boldin <pavel.b@techspark.engineering>

* update protobufs

* regen protos

Signed-off-by: Pavel Boldin <pavel.b@techspark.engineering>
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
Co-authored-by: Thomas Göttgens <tgoettgens@gmail.com>
Co-authored-by: Sacha Weatherstone <sachaw100@hotmail.com>
2023-01-04 23:56:52 +11:00
Ben Meadors
f1cdfd163d Replaced all of the logging with proper log levels 2022-12-30 10:27:07 -06:00
Ben Meadors
0b5cae5393 Log levels refactoring 2022-12-29 20:41:37 -06:00
Thomas Göttgens
edb674759f fixes critical error 8 does not reboot on nrf52 2022-12-09 11:15:49 +01:00
Thomas Göttgens
a00187b97f manual master merge 2022-12-06 16:56:38 +01:00
Thomas Göttgens
79eff42c3c Fix and Break radiolib 2022-11-14 10:53:16 +01:00
Thomas Göttgens
6934e0bce7
Fix assert 2022-11-06 18:36:17 +01:00
Ben Meadors
128d20b290
tx_enabled fix (#1699)
* Defaults

* Print
2022-09-17 12:18:32 -05:00
Sacha Weatherstone
60b4dbfdcd
More default inits. (#1689)
* More default inits.

* update protobufs

* Try checking has_device first

Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
2022-09-11 08:36:47 -05:00
Thomas Göttgens
f7b12f0695 Adapt to new protobufs - TODO: factory_reset rewire 2022-09-09 12:51:41 +02:00
majbthrd
aadaf332cf
add stm32wl5e platform and wio-e5 variant (#1631)
Co-authored-by: Peter Lawrence <12226419+majbthrd@users.noreply.github.com>
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
2022-08-15 07:54:45 -05:00
majbthrd
ade32b1827
lay groundwork for a possible future architecture (#1571)
* lay groundwork for a possible future architecture

* switch from feature opt-out to feature opt-in

* lay groundwork for a possible future architecture

* switch from feature opt-out to feature opt-in

* fix USE_RTC in variant.h for rak4631_epaper and t-echo

* ensure Screen.h is not included without configuration.h

Co-authored-by: Peter Lawrence <12226419+majbthrd@users.noreply.github.com>
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
2022-07-31 07:11:47 -05:00
Thomas Göttgens
b40abbf3ad Tryfix Portduino Radiolib 2022-06-16 12:22:01 +02:00
Thomas Göttgens
6b8afdadc2 New variant of Radiolib patch 2022-06-13 16:10:16 +02:00
GUVWAF
a1b07ed6aa
Introduce contention window (CW) (#1500)
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
2022-06-13 08:21:18 -05:00
Ben Meadors
0767c0b0e8
Converted to jgromes/RadioLib upstream and pegged to latest ref (#1472)
* Converted to jgromes/RadioLib upstream and pegged to latest ref
2022-05-29 19:30:20 -05:00
Jm Casler
c5f3cad0f9 Fixed missing brackets 2022-05-24 18:06:53 -07:00
Jm Casler
2631a9324e Update from radioConfig.preferences to config.lora 2022-05-23 22:06:38 -07:00
Jm Casler
94f7e7037d
Merge branch 'compression' into new-compression 2022-05-23 21:18:45 -07:00
Thomas Göttgens
53e9f4df46 Segemented config works for me (TM)
Small GPS Fix that cropped up while testing included.
2022-05-21 22:38:33 +02:00
Sacha Weatherstone
6b0ce6b729
Finish config transition 2022-05-07 20:31:21 +10:00
Jm Casler
4785367915 Temp work on compression 2022-04-25 08:02:51 -07:00
GUVWAF
a13157ebde Rename setRandomDelay() function 2022-04-23 18:57:45 +02:00
GUVWAF
c60d4c1ecc Implement listen-before-talk mechanism
- Function setRandomDelay() calls either startTransmitTimer() or startTransmitTimerSNR()
- After coming back from Rx/Tx-ing, call setRandomDelay()
- If channel is currently busy, call setRandomDelay()
2022-04-20 20:09:12 +02:00
Jm Casler
69ed477040 Disable TX if region is unset 2022-04-09 22:42:43 -07:00
Jm Casler
3816a2fbe0 Add weighted tx delay for flooding router 2022-03-14 17:47:01 -07:00
ernax78
1c63d2d334
Feature: add disable_tx setting #1065 (#1066)
* Feature: add disable_tx setting #1065
2022-01-06 12:01:45 -06:00
Jm Casler
9a87ec7353 Count tx airtime only after it's sent by the radio 2022-01-02 11:05:32 -08:00
Kevin Hester
17a1262382 pull in new epaper lib (which required importing configuration.h everywhere
for dumb reasons)
2021-06-27 10:56:28 -07:00
Kevin Hester
4c1b7d4840 pinelora WIP 2021-05-01 11:27:37 +08:00
Kevin Hester
babc1b3613 include file/lineno in critical error logs 2021-04-29 09:52:15 +08:00
Kevin Hester
ef612d0b58 Merge remote-tracking branch 'root/master' into dev1.2
# Conflicts:
#	src/plugins/Plugins.cpp
#	version.properties
2021-03-01 10:26:16 +08:00
Kevin Hester
aa8b86c6b2 multichannel send/rx kinda works 2021-02-23 11:43:30 +08:00