tinygo.org/x/drivers@v0.27.1-0.20240509133757-7dbca2a54349/espat/commands.go (about) 1 package espat 2 3 // Basic AT commands 4 const ( 5 // Test that the device is working. 6 Test = "" 7 8 // Restart module 9 Restart = "+RST" 10 11 // Version show info about the current software version. 12 Version = "+GMR" 13 14 // Enter deep-sleep mode 15 Sleep = "+GSLP" 16 17 // Configure echo. 18 EchoConfig = "E" 19 20 // EchoConfigOn 21 EchoConfigOn = EchoConfig + "1" 22 23 // EchoConfigOff 24 EchoConfigOff = EchoConfig + "0" 25 26 // Configure UART 27 UARTConfig = "+UART" 28 ) 29 30 // WiFi commands. 31 const ( 32 // WiFi mode (sta/AP/sta+AP) 33 WifiMode = "+CWMODE" 34 35 // Connect to an access point. 36 ConnectAP = "+CWJAP" 37 38 // List available AP's 39 ListAP = "+CWLAP" 40 41 // Disconnect from the current AP 42 Disconnect = "+CWQAP" 43 44 // Set softAP configuration. This also activates the ESP8266/ESP32 to act as an access point. 45 // On the ESP8266 the settings will not be saved in flash memory, so they will be forgotten on next reset. 46 // On the ESP32 the settings WILL be saved in flash memory, so they will be used on next reset. 47 SoftAPConfigCurrent = "+CWSAP" 48 49 // Set softAP configuration. This also activates the ESP8266/ESP32 to act as an access point. 50 // On the ESP8266 the settings will not be saved in flash memory, so they will be forgotten on next reset. 51 // On the ESP32 the settings WILL be saved in flash memory, so they will be used on next reset. 52 SoftAPConfigFlash = "+CWSAP" 53 54 // List station IP's connected to softAP 55 ListConnectedIP = "+CWLIF" 56 57 // Enable/disable DHCP 58 DHCPConfig = "+CWDHCP" 59 60 // Set MAC address of station 61 SetStationMACAddress = "+CIPSTAMAC" 62 63 // Set MAC address of softAP 64 SetAPMACAddress = "+CIPAPMAC" 65 66 // Set IP address of ESP8266/ESP32 station 67 SetStationIP = "+CIPSTA" 68 69 // Set IP address of ESP8266/ESP32 when acting as access point. 70 // On the ESP8266 the IP address will not be saved in flash memory, so it will be forgotten on next reset. 71 // On the ESP32 the IP address WILL be saved in flash memory, so it will be used on next reset. 72 SetSoftAPIPCurrent = "+CIPAP" 73 74 // Set IP address of ESP8266/ESP32 when acting as access point. 75 // On the ESP8266 the IP address will not be saved in flash memory, so it will be forgotten on next reset. 76 // On the ESP32 the IP address WILL be saved in flash memory, so it will be used on next reset. 77 SetSoftAPIPFlash = "+CIPAP" 78 ) 79 80 // TCP/IP commands 81 const ( 82 // Get connection status 83 TCPStatus = "+CIPSTATUS" 84 85 // Establish TCP connection or register UDP port 86 TCPConnect = "+CIPSTART" 87 88 // DNS Lookup 89 TCPDNSLookup = "+CIPDOMAIN" 90 91 // Send Data 92 TCPSend = "+CIPSEND" 93 94 // Close TCP/UDP connection 95 TCPClose = "+CIPCLOSE" 96 97 // Get local IP address 98 GetLocalIP = "+CIFSR" 99 100 // Set multiple connections mode 101 TCPMultiple = "+CIPMUX" 102 103 // Configure as server 104 ServerConfig = "+CIPSERVER" 105 106 // Set transmission mode 107 TransmissionMode = "+CIPMODE" 108 109 // Set timeout when ESP8266/ESP32 runs as TCP server 110 SetServerTimeout = "+CIPSTO" 111 )