Fix: Vider le buffer série avant chaque commande AT dans sara.py
Évite de lire des URCs résiduelles (ex: +USECMNG, AT+USECPRF) émises par le modem SARA pendant son initialisation au démarrage. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -46,6 +46,9 @@ try:
|
||||
timeout = timeout
|
||||
)
|
||||
|
||||
# Flush any leftover data from previous commands or modem boot URCs
|
||||
ser.reset_input_buffer()
|
||||
|
||||
ser.write((command + '\r').encode('utf-8'))
|
||||
|
||||
#ser.write(b'ATI\r') #General Information
|
||||
|
||||
Reference in New Issue
Block a user