ESP8266 Developer Zone The Official ESP8266 Forum 2017-12-11T17:56:19+08:00 https://bbs.espressif.com:443/feed.php?f=16&t=8573 2017-12-11T17:56:19+08:00 2017-12-11T17:56:19+08:00 https://bbs.espressif.com:443/viewtopic.php?t=8573&p=18660#p18660 <![CDATA[Re: server and client - AT commands]]> I think you should set IP first, then start a server.

Statistics: Posted by Her Mary — Mon Dec 11, 2017 5:56 pm


]]>
2017-11-29T17:24:20+08:00 2017-11-29T17:24:20+08:00 https://bbs.espressif.com:443/viewtopic.php?t=8573&p=18452#p18452 <![CDATA[server and client - AT commands]]>
I'm working on an IOT device (using atmega1824p) and wanted to use AT commands.
It works as a client.. However, I also wanted it to use as a server (e.g. when I need to create/update ssid and password). I'm using ISR to get back replies.

Below is the flow:
1. initwifi -> 2. setCWMode=3 -> 3. APJoin with SSID and password (set CWDHCP=1,1) -> 4. setMux=1 -> 5. set softAP-> 6. create server (AT+CIPSERVER) -> 7. set IP (e.g. 192.168.4.1)

Is the flow right? If I want to check if there is a Ap is already joined (so i dont need to APJoin each time), after i set CWHDCP at 3., i do a query for getIP (AT+CIFSSR)?

For replies, i'm using interrupt (ISR). when I know im at the access point, I check ISR for '+IPD:connect_id,data', do a CIPSEND to connect_id for webpage? Is there a proper process.

I had the above working. but sometimes, i fail at set IP, anyone have anyidea? once i fail setting IP, i can't seem to receive ISR as a webserver (I do check for sei())

Any help is appreciated.

Statistics: Posted by weeyoung — Wed Nov 29, 2017 5:24 pm


]]>