auto: update RTK rover/base + config (2026-04-30 13:43:06)
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
#!/usr/bin/env python3
|
||||
import serial, time
|
||||
|
||||
PORT="/dev/serial/by-id/usb-1a86_USB_Serial-if00-port0"
|
||||
BAUD=9600
|
||||
|
||||
def send(ser, cmd, wait=0.4):
|
||||
ser.write((cmd+"\r\n").encode())
|
||||
ser.flush()
|
||||
time.sleep(wait)
|
||||
rx = ser.read(2000).decode(errors="ignore")
|
||||
print(f"[{cmd}] {rx.strip()}")
|
||||
return rx
|
||||
|
||||
ser=serial.Serial(PORT, BAUD, timeout=0.5)
|
||||
ser.reset_input_buffer()
|
||||
ser.reset_output_buffer()
|
||||
|
||||
# AT-Mode sauber betreten
|
||||
time.sleep(1.5)
|
||||
ser.write(b"+++\r\n"); ser.flush()
|
||||
time.sleep(0.8)
|
||||
print(ser.read(200).decode(errors="ignore").strip())
|
||||
|
||||
# Konfig setzen
|
||||
send(ser, "AT+MODE0")
|
||||
send(ser, "AT+SLEEP2")
|
||||
send(ser, "AT+LEVEL7") # mehr Durchsatz-Reserve [oai_citation:4‡DX-LR03-433T30D Serial port application guide .pdf](sediment://file_000000005c3c7243bef470aff82f39f0)
|
||||
send(ser, "AT+CR2") # 4/6 default [oai_citation:5‡DX-LR03-433T30D Serial port application guide .pdf](sediment://file_000000005c3c7243bef470aff82f39f0)
|
||||
send(ser, "AT+CRC1") # LoRa CRC on [oai_citation:6‡DX-LR03-433T30D Serial port application guide .pdf](sediment://file_000000005c3c7243bef470aff82f39f0)
|
||||
send(ser, "AT+POWE5") # max power [oai_citation:7‡DX-LR03-433T30D Serial port application guide .pdf](sediment://file_000000005c3c7243bef470aff82f39f0)
|
||||
|
||||
# Anzeigen + Reset (damit es wirklich aktiv wird)
|
||||
send(ser, "AT+HELP", wait=0.8)
|
||||
send(ser, "AT+RESET", wait=0.6)
|
||||
|
||||
ser.close()
|
||||
print("done")
|
||||
Reference in New Issue
Block a user