CMM2: V5.07.00b11: json support with full ESP-01 example code
Author
Message
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 8068
Posted: 02:08pm 09 Aug 2021
open "com2:115200,4096" as #1 IF NOT Command(0, "AT",obuff(), 500) THEN END IF NOT Command(0, "AT+RST",obuff(), 10000,"WIFI GOT IP") THEN 'reset and check for valid connection PRINT "Set up WIFI on SSID: ",SSID$ IF NOT Command(0, "AT+CWMODE_DEF=1",obuff(), 5000) THEN END 'set device mode (1=client, 2=AP, 3=b IF NOT Command(0, "AT+CWLAP",obuff(), 30000) THEN END 'scan for WiFi hotspots longstring print inbuf() 'output the list of valid networks IF NOT Command(0, "AT+CWJAP_DEF="+SSID$+","+SSIDPassword$,obuff(), 20000,"WIFI GOT IP") THEN END IF NOT Command(0, "AT+CIFSR",obuff(), 5000) THEN END 'check IP address ENDIF print #1,"AT+CIFSR"+chr$(13)+chr$(10); pause 500 print input$(100,1)
IF NOT Command(0, "AT+CIPMUX=1",obuff(), 5000) THEN END IF NOT Command(0, "AT+CIPSERVER=1,80",obuff(), 5000) THEN END Print "Connected"