Skip to content

Parsing a string on a newline #1

Open
@evandavey

Description

@evandavey

How do I use this library to parse a response:

AT+CSGN\r\n
014532000023453\r\n
OK\r\n

I have tried

_parser.send("AT+CGSN") 
    && _parser.recv("AT+CGSN\r\n%s\r\nOK",_deviceStatus.imei);

and various other combinations and I can only get it to parse to the 0 then stop.

AT> AT+CGSN
AT<
AT= AT+CGSN
AT<
AT= 0
AT< 14532000023453
AT<
AT= OK

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions