Commit Graph

26 Commits

Author SHA1 Message Date
Vladan Popovic f0d474d062 use Duration::ZERO when reading times out 2022-06-22 14:34:09 +02:00
Vladan Popovic 10c61f5d78 read reply from tcp server 2022-06-21 02:30:00 +02:00
Vladan Popovic 55e5b0dc96 rename IterableRx to RxIter 2022-06-21 01:27:27 +02:00
Vladan Popovic 5a190e4890 move read_line to IterableRx, improve read_response 2022-06-21 00:37:15 +02:00
Vladan Popovic 626c47c58f read_line now returns String instead of Result<string>
maybe a worse interface than before ... will be revisited
2022-06-20 17:02:42 +02:00
Vladan Popovic a408544e4e fix timeout handling
was accumulative by mistake, now it's flat incremental
2022-06-20 16:57:23 +02:00
Vladan Popovic 172bdead14 do a basic AT probe instead of waiting on startup 2022-06-20 01:38:50 +02:00
Vladan Popovic fccbf98155 restore the received message (including \r\n in the end) 2022-06-20 00:44:51 +02:00
Vladan Popovic 858129cc82 remove unused modem methods 2022-06-20 00:13:47 +02:00
Vladan Popovic 84ab94df46 refactor sending data to remote server
works as expected now, but far from perfect
2022-06-20 00:12:55 +02:00
Vladan Popovic 4fefd547d1 remove \r\n from the end of the rx buffer
may be a bad idea and should be revisited
2022-06-20 00:10:20 +02:00
Vladan Popovic 835bf50b80 use saturating sub for timeouts, it overflowed at some point 2022-06-20 00:08:52 +02:00
Vladan Popovic f7070e02e7 remove prints in uart Iterator impl 2022-06-20 00:05:57 +02:00
Vladan Popovic fac3115a93 add tcp send/receive command modes 2022-06-20 00:03:44 +02:00
Vladan Popovic 08c5cabe6d implement iterator on reader (serial rx) 2022-06-19 03:18:21 +02:00
Vladan Popovic 792eef13ba implement non-blocking read with timeout
much better than before :)
2022-06-19 00:33:32 +02:00
Vladan Popovic 94b9ce312f connect to gprs and check if attached 2022-06-18 01:39:38 +02:00
Vladan Popovic 1cb8a90caf remove mut from examples in modem::init 2022-06-16 01:43:28 +02:00
Vladan Popovic 17b54fbe3a remove all unwraps :) 2022-06-16 01:39:16 +02:00
Vladan Popovic 43424ba997 implement commands and turn everything on
Turn the modem on by setting appropriate pins to high/low.

Implemented all commands from
https://github.com/pythings/Drivers/blob/master/SIM800L.py#L116-L143 in Rust.

Moved AP values to a config module. Maybe create a build environment for this
later on, we'll need to support multiple telecom providers for sure ...

Fix the write/read implementation for the Serial. Match on end and handle the
timeout properly for every command.
2022-06-16 01:09:31 +02:00
Vladan Popovic 737e29f108 RADI RADNJA!! 2022-06-16 01:05:31 +02:00
Vladan Popovic e3c3aa7391 implement modem on a Read/Write structure (rx, tx) 2022-06-12 12:02:59 +02:00
Vladan Popovic fbe132295e dummy gprs connect with error handling 2022-06-11 16:49:16 +02:00
Vladan Popovic 985ec56e2a print driven development 2022-06-11 16:08:11 +02:00
Vladan Popovic e0230679c2 Hello world! 2022-06-10 01:28:39 +02:00
Vladan Popovic 21d8e85292 . 2022-06-10 01:17:30 +02:00