add a todo for sim800l response parsing
This commit is contained in:
parent
41e89028e9
commit
f7f0689f46
1 changed files with 6 additions and 0 deletions
|
@ -223,6 +223,12 @@ impl<UART: serial::Uart> Modem<UART> {
|
||||||
loop {
|
loop {
|
||||||
let reply = self.send_command(Command::tcp_receive(MAX_TCP_MANUAL_REPLY_SIZE))
|
let reply = self.send_command(Command::tcp_receive(MAX_TCP_MANUAL_REPLY_SIZE))
|
||||||
.map(|reply| {
|
.map(|reply| {
|
||||||
|
// TODO: parse the response properly
|
||||||
|
// 1. the first line is \r\n
|
||||||
|
// 2. next is the +CIPRXGET: 2,X,Y where X is the number of bytes read and Y is
|
||||||
|
// the number of bytes left to be read
|
||||||
|
// 3. immediately after this the payload is returned (with size X)
|
||||||
|
// 4. OK
|
||||||
reply
|
reply
|
||||||
.split("\r\n")
|
.split("\r\n")
|
||||||
.filter(|line| line.len() > 2 && !line.contains("+CIPRXGET: 2,"))
|
.filter(|line| line.len() > 2 && !line.contains("+CIPRXGET: 2,"))
|
||||||
|
|
Loading…
Add table
Reference in a new issue