nerves-networking / vintage_net_mobile

Mobile networking for VintageNet
Apache License 2.0
27 stars 11 forks source link

Refactor AT parser to be more general #50

Closed fhunleth closed 4 years ago

fhunleth commented 4 years ago

This adds a small Leex-generated lexer to support parsing more kinds of AT notifications. Errors also get handled now by returning error tuples. This avoids crashing the monitoring GenServers when a glitch happens when running the commands or there's a misformed notification that somehow gets reported by the modem. Previously when this happened, a GenServer would crash and the ppp session would be bounced. This seemed harsh.

fhunleth commented 4 years ago

That was quick. Thanks for testing!

Btw, I noticed that I totally forgot to add the negative AT command unit tests. I did simple testing manually. I'm going to add them and then I'll merge.