[Coco] Basic09 procedure to access the ESP8266 wifi modem
L. Curtis Boyle
curtisboyle at sasktel.net
Fri Jan 15 23:17:45 EST 2021
I presume you are passing “/t2” or some such in “modem” when calling this routine? I don’t have an ESP8266 to know how it works, but hopefully someone else can help with that aspect of it.
L. Curtis Boyle
curtisboyle at sasktel.net
> On Jan 15, 2021, at 10:07 PM, Doug Fraser <zathrasldf at outlook.com> wrote:
>
> I have an ESP8266 for use as a WiFi modem using a modified DCModrm pak, for RS-232 pak. There is a Hayes command to access the NTP time server so one can set the system time. As I use primarily Nitros9, I've tried the following procedure in Basic09, but it just prints the command to the screen and exits, when its supposed to set the timezone and return the time for eventually setting the system time. For any Nitros9 gurus out there, what am I missing?
>
> PROCEDURE netime
> (* Variables
> PARAM modem,timezone:STRING[4]
> DIM path:BYTE
> DIM atcommand,ntptime:STRING
>
> (* Prep the Hayes at&t command
> atcommand="at&t "+chr$(34)+timezone+chr$(34)
>
> (* Open path to serial port
> OPEN #path,modem:UPDATE
>
> (* set up timezone
> WRITE #path,atcommand
>
> (* ask for time
> atcommand="at&t"
> WRITE #path,atcommand
>
> READ #path,ntptime
> CLOSE #path
> PRINT ntptime
>
> Any help would be greatly appreciated.
> Doug
More information about the Coco
mailing list