<div dir="ltr">thanks for the heads up... will try and get it done soon</div><div class="gmail_extra"><br><div class="gmail_quote">2015-09-01 10:19 GMT+02:00 Damon Hart-Davis <span dir="ltr"><<a href="mailto:dhd@exnet.com" target="_blank">dhd@exnet.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Bo,<br>
<br>
Thank looks like a non-trivial parsing job.<br>
<br>
If you look at the CLI code in OpenTRV you can see it reading line by line from Serial, and then for some of the commands using strtok_r() to chop the line into parts.<br>
<br>
But you’ll have to be really clear what you are trying to do if you don’t want massive code bloat.<br>
<br>
Rgds<br>
<br>
Damon<br>
<br>
<br>
> On 28 Aug 2015, at 17:31, Bo Herrmannsen <<a href="mailto:bo.herrmannsen@gmail.com">bo.herrmannsen@gmail.com</a>> wrote:<br>
><br>
> Hi all<br>
><br>
> hope i once more can get a bit of help<br>
><br>
><br>
> i'm cooking up a GSM remote control for my car's preheater<br>
><br>
><br>
> wanting to set the time just to verify i got basic coms right and not let the money train run wild<br>
><br>
><br>
> AT+CLTS=1<br>
> and<br>
> AT+CCLK?<br>
> that returns something like ..<br>
> +CCLK: "15/02/21,22:32:25+12"<br>
> OK<br>
><br>
> how would i turn that in to variables?<br>
><br>
> i know i need to read it off a serial port and then split it up... but google is just not with me here<br>
><br>
> rgds bo<br>
> _______________________________________________<br>
> OpenTRV-dev mailing list<br>
> <a href="mailto:OpenTRV-dev@lists.opentrv.org.uk">OpenTRV-dev@lists.opentrv.org.uk</a><br>
> <a href="http://lists.opentrv.org.uk/listinfo/opentrv-dev" rel="noreferrer" target="_blank">http://lists.opentrv.org.uk/listinfo/opentrv-dev</a><br>
<br>
_______________________________________________<br>
OpenTRV-dev mailing list<br>
<a href="mailto:OpenTRV-dev@lists.opentrv.org.uk">OpenTRV-dev@lists.opentrv.org.uk</a><br>
<a href="http://lists.opentrv.org.uk/listinfo/opentrv-dev" rel="noreferrer" target="_blank">http://lists.opentrv.org.uk/listinfo/opentrv-dev</a><br>
</blockquote></div><br></div>