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
]]>