feat: RAK/SX1303 HAL guard, UART onboard GPS, and operator docs#65
Open
iceice400 wants to merge 3 commits into
Open
feat: RAK/SX1303 HAL guard, UART onboard GPS, and operator docs#65iceice400 wants to merge 3 commits into
iceice400 wants to merge 3 commits into
Conversation
7 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Hardens concentrator startup for RAK/SenseCap Pi gateways (SX1302/SX1303), wires onboard UART GPS for the RAK Pi HAT, and documents the
sx1261_check_status/lgw_start()failure mode seen on bare-metal RAK V2 installs.HAL / radio
radio.sx1261_spi_pathwhenradio.carrier_typeisrakorsensecap_m1before SX1261 init (preventsgot:0x00 expected:0x22→lgw_start() failedon Pi-invisible SX1261 wiring)./dev/spidev0.0raises a clear error (raspi-config /spigroup hints).sx1302_get_model_id()when the HAL exposes it; startup logs e.g.Concentrator model ID: 0x12 (SX1303).meshpoint setuppersistsradio.carrier_typewhen a concentrator is detected.GPS / location
location.source: uartviaUartSource+ existingGpsReader(NMEA GGA on/dev/ttyAMA0).location.uart_path,location.uart_baud; API + Configuration → GPS UART fieldset.GpsReaderuses pyserial first for/dev/*device nodes.Docs
COMMON-ERRORS,CONFIGURATION,HARDWARE-MATRIX,CHANGELOG(Unreleased),READMEtroubleshooting for SX1261 and UART GPS.Why
Fleet/support logs from RAK V2 + SX1303 (
chip version 0x12) showed fatal startup when Advanced config setsx1261_spi_pathon hardware where the SX1261 is not Pi-reachable. Separately, v0.7.5 shippedgpsd+ skyplot but leftUartSourceas a placeholder despiteinstall.shalready enabling/dev/ttyAMA0for the RAK HAT GPS.Type
Testing
Unit tests (local):
All 46 tests in the above set pass locally; HAL tests use mocked
ctypes.CDLL.Manual on device (recommended before merge):
radio.sx1261_spi_path: ""andradio.carrier_type: rak→ service reachesApplication startup complete; journal showsSX1261 spi_path emptyor path cleared with warning.location.source: uart, outdoor sky view → Configuration → GPS shows live lat/lon and satellite count.sx1261_spi_path: "/dev/spidev0.1"on RAK → path cleared at startup, service still starts.Hardware:
0x12) reported in original issueImpact
Risks: Low for RX/TX path — SX1261 guard only skips/clears config; UART GPS is isolated to the location pipeline. New HAL calls are behind
hasattr(lib, "sx1302_get_model_id"). Upgrade requirespip install -r requirements.txtfor newpyserialdependency.Not in scope: HAL
lgw_gps_*/ PPS timestamp sync (follow-up issue).Operator notes (post-merge)
Skyplot az/el/SNR still requires
gpsd+ USB GPS; UART provides fix + satellite count from GGA.AI-assisted?
Implemented with AI assistance; unit tests run locally; hardware validation offered on RAK V2 + SX1303 SPI.