Home
JAQForum Ver 20.06
Log In or Join  
Active Topics
Local Time 13:14 20 Apr 2024 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : ESP8266 AT support in MMBasic

     Page 3 of 3    
Author Message
lew247

Guru

Joined: 23/12/2015
Location: United Kingdom
Posts: 1676
Posted: 01:09pm 26 Jan 2022
Copy link to clipboard 
Print this post

I really don't understand why people don't acually check things before complaining.
Here it is just press the link to see the AT COMMAND SET  as used in the firmware as stated ON the github page

 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 8567
Posted: 01:21pm 26 Jan 2022
Copy link to clipboard 
Print this post

  Quote  I really don't understand why people don't actually check things before complaining.


That is the official list of all AT commands. What is implemented in a particular firmware depends on what is selected in the build
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 5705
Posted: 01:22pm 26 Jan 2022
Copy link to clipboard 
Print this post

Sorry, lew, I missed that on GitHub. Have bought a ticket to SpecSavers....
I probably didn't consider that a "User guide" might actually be the command list.

There's a lot more info in the binaries zips, but It's rather generic as the 8266 ones still contain the ESP32 commands and you have to work round them. :)
Edited 2022-01-26 23:32 by Mixtel90
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
lew247

Guru

Joined: 23/12/2015
Location: United Kingdom
Posts: 1676
Posted: 01:34pm 26 Jan 2022
Copy link to clipboard 
Print this post

Just to make it easier
  Quote  Basic AT Commands (INCLUDED in the firmware I linked)
   AT: Test AT startup.
   AT+RST: Restart a module.
   AT+GMR: Check version information.
   AT+CMD: List all AT commands and types supported in current firmware.
   AT+GSLP: Enter Deep-sleep mode.
   ATE: Configure AT commands echoing.
   AT+RESTORE: Restore factory default settings of the module.
   AT+UART_CUR: Current UART configuration, not saved in flash.
   AT+UART_DEF: Default UART configuration, saved in flash.
   AT+SLEEP: Set the sleep mode.
   AT+SYSRAM: Query current remaining heap size and minimum heap size.
   AT+SYSMSG: Query/Set System Prompt Information.
   AT+USERRAM: Operate user's free RAM.
   AT+SYSFLASH: Query/Set User Partitions in Flash.
   [ESP32 Only] AT+FS: Filesystem Operations.
   AT+RFPOWER: Query/Set RF TX Power.
   AT+SYSROLLBACK: Roll back to the previous firmware.
   AT+SYSTIMESTAMP: Query/Set local time stamp.
   AT+SYSLOG: Enable or disable the AT error code prompt.
   AT+SLEEPWKCFG: Query/Set the light-sleep wakeup source and awake GPIO.
   AT+SYSSTORE: Query/Set parameter store mode.
   AT+SYSREG: Read/write the register.
   [ESP32-S2 Only] AT+SYSTEMP Read ESP32-S2 internal temperature.
Wi-Fi AT Commands
   AT+CWMODE: Set the Wi-Fi mode (Station/SoftAP/Station+SoftAP).
   AT+CWSTATE: Query the Wi-Fi state and Wi-Fi information.
   AT+CWJAP: Connect to an AP.
   AT+CWRECONNCFG: Query/Set the Wi-Fi reconnecting configuration.
   AT+CWLAPOPT: Set the configuration for the command AT+CWLAP.
   AT+CWLAP: List available APs.
   AT+CWQAP: Disconnect from an AP.
   AT+CWSAP: Query/Set the configuration of an ESP SoftAP.
   AT+CWLIF: Obtain IP address of the station that connects to an ESP SoftAP.
   AT+CWQIF: Disconnect stations from an ESP SoftAP.
   AT+CWDHCP: Enable/disable DHCP.
   AT+CWDHCPS: Query/Set the IP addresses allocated by an ESP SoftAP DHCP server.
   AT+CWAUTOCONN: Connect to an AP automatically when powered on.
   AT+CWAPPROTO: Query/Set the 802.11 b/g/n protocol standard of SoftAP mode.
   AT+CWSTAPROTO: Query/Set the 802.11 b/g/n protocol standard of station mode.
   AT+CIPSTAMAC: Query/Set the MAC address of an ESP station.
   AT+CIPAPMAC: Query/Set the MAC address of an ESP SoftAP.
   AT+CIPSTA: Query/Set the IP address of an ESP station.
   AT+CIPAP: Query/Set the IP address of an ESP SoftAP.
   AT+CWSTARTSMART: Start SmartConfig.
   AT+CWSTOPSMART: Stop SmartConfig.
   AT+WPS: Enable the WPS function.
   AT+MDNS: Configure the mDNS function.
   [ESP32 Only] AT+CWJEAP: Connect to a WPA2 Enterprise AP.
   AT+CWHOSTNAME: Query/Set the host name of an ESP station.
   AT+CWCOUNTRY: Query/Set the Wi-Fi Country Code.
TCP/IP AT Commands
   AT+CIPV6: Enable/disable the network of Internet Protocol Version 6 (IPv6).
   AT+CIPSTATUS: Obtain the TCP/UDP/SSL connection status and information.
   AT+CIPDOMAIN: Resolve a Domain Name.
   AT+CIPSTART: Establish TCP connection, UDP transmission, or SSL connection.
   AT+CIPSTARTEX: Establish TCP connection, UDP transmission, or SSL connection with an automatically assigned ID.
   AT+CIPSEND: Send data in the normal transmission mode or Wi-Fi passthrough mode.
   AT+CIPSENDEX: Send data in the normal transmission mode in expanded ways.
   AT+CIPCLOSE: Close TCP/UDP/SSL connection.
   AT+CIFSR: Obtain the local IP address and MAC address.
   AT+CIPMUX: Enable/disable the multiple connections mode.
   AT+CIPSERVER: Delete/create a TCP/SSL server.
   AT+CIPSERVERMAXCONN: Query/Set the maximum connections allowed by a server.
   AT+CIPMODE: Query/Set the transmission mode.
   AT+SAVETRANSLINK: Set whether to enter Wi-Fi passthrough mode on power-up.
   AT+CIPSTO: Query/Set the local TCP Server Timeout.
   AT+CIPSNTPCFG: Query/Set the time zone and SNTP server.
   AT+CIPSNTPTIME: Query the SNTP time.
   AT+CIUPDATE: Upgrade the firmware through Wi-Fi.
   AT+CIPDINFO: Set "+IPD" message mode.
   AT+CIPSSLCCONF: Query/Set SSL clients.
   AT+CIPSSLCCN: Query/Set the Common Name of the SSL client.
   AT+CIPSSLCSNI: Query/Set SSL client Server Name Indication (SNI).
   AT+CIPSSLCALPN: Query/Set SSL client Application Layer Protocol Negotiation (ALPN).
   AT+CIPSSLCPSK: Query/Set SSL client Pre-shared Key (PSK).
   AT+CIPRECONNINTV: Query/Set the TCP/UDP/SSL reconnection interval for the Wi-Fi passthrough mode.
   AT+CIPRECVMODE: Query/Set socket receiving mode.
   AT+CIPRECVDATA: Obtain socket data in passive receiving mode.
   AT+CIPRECVLEN: Obtain socket data length in passive receiving mode.
   AT+PING: Ping the remote host.
   AT+CIPDNS: Query/Set DNS server information.
   AT+CIPTCPOPT: Query/Set the socket options.
MQTT AT Commands
   AT+MQTTUSERCFG: Set MQTT user configuration
   AT+MQTTCLIENTID: Set MQTT client ID
   AT+MQTTUSERNAME: Set MQTT username
   AT+MQTTPASSWORD: Set MQTT password
   AT+MQTTCONNCFG: Set configuration of MQTT connection
   AT+MQTTCONN: Connect to MQTT Brokers
   AT+MQTTPUB: Publish MQTT Messages in string
   AT+MQTTPUBRAW: Publish MQTT messages in binary
   AT+MQTTSUB: Subscribe to MQTT topics
   AT+MQTTUNSUB: Unsubscribe from MQTT topics
   AT+MQTTCLEAN: Close MQTT connections
HTTP AT Commands
   AT+HTTPCLIENT: Send HTTP Client Request
   AT+HTTPGETSIZE: Get HTTP Resource Size
   AT+HTTPCPOST: Post HTTP data of specified length
Web server AT Commands
   AT+WEBSERVER: Enable/disable Wi-Fi connection configuration via web server.
[ESP8266 Only] Signaling Test AT Commands
   AT+FACTPLCP: Send with long or short PLCP (Physical Layer Convergence Procedure)
[ESP32 Only] Bluetooth Low Energy AT Commands  ESP32 AT firmware supports Bluetooth Core Specification Version 5.0.
   [ESP32 Only] AT+BLEINIT: Bluetooth LE initialization.
   [ESP32 Only] AT+BLEADDR: Query/Set Bluetooth LE device address.
   [ESP32 Only] AT+BLENAME: Query/Set Bluetooth LE device name.
   [ESP32 Only] AT+BLESCANPARAM: Query/Set parameters of Bluetooth LE scanning.
   [ESP32 Only] AT+BLESCAN: Enable Bluetooth LE scanning.
   [ESP32 Only] AT+BLESCANRSPDATA: Set Bluetooth LE scan response.
   [ESP32 Only] AT+BLEADVPARAM: Query/Set parameters of Bluetooth LE advertising.
   [ESP32 Only] AT+BLEADVDATA: Set Bluetooth LE advertising data.
   [ESP32 Only] AT+BLEADVDATAEX: Automatically set Bluetooth LE advertising data.
   [ESP32 Only] AT+BLEADVSTART: Start Bluetooth LE advertising.
   [ESP32 Only] AT+BLEADVSTOP: Stop Bluetooth LE advertising.
   [ESP32 Only] AT+BLECONN: Establish Bluetooth LE connection.
   [ESP32 Only] AT+BLECONNPARAM: Query/Update parameters of Bluetooth LE connection.
   [ESP32 Only] AT+BLEDISCONN: End Bluetooth LE connection.
   [ESP32 Only] AT+BLEDATALEN: Set Bluetooth LE data packet length.
   [ESP32 Only] AT+BLECFGMTU: Set Bluetooth LE MTU length.
   [ESP32 Only] AT+BLEGATTSSRVCRE: Generic Attributes Server (GATTS) creates services.
   [ESP32 Only] AT+BLEGATTSSRVSTART: GATTS starts services.
   [ESP32 Only] AT+BLEGATTSSRVSTOP: GATTS Stops Services.
   [ESP32 Only] AT+BLEGATTSSRV: GATTS discovers services.
   [ESP32 Only] AT+BLEGATTSCHAR: GATTS discovers characteristics.
   [ESP32 Only] AT+BLEGATTSNTFY: Notify a client of the value of a characteristic value from the server.
   [ESP32 Only] AT+BLEGATTSIND: Indicate the characteristic value from the server to a client.
   [ESP32 Only] AT+BLEGATTSSETATTR: GATTS sets characteristics.
   [ESP32 Only] AT+BLEGATTCPRIMSRV: Generic Attributes Client (GATTC) discovers primary services.
   [ESP32 Only] AT+BLEGATTCINCLSRV: GATTC discovers included services.
   [ESP32 Only] AT+BLEGATTCCHAR: GATTC discovers characteristics.
   [ESP32 Only] AT+BLEGATTCRD: GATTC reads characteristics.
   [ESP32 Only] AT+BLEGATTCWR: GATTC writes characteristics.
   [ESP32 Only] AT+BLESPPCFG: Query/Set Bluetooth LE SPP parameters.
   [ESP32 Only] AT+BLESPP: Enter Bluetooth LE SPP mode.
   [ESP32 Only] AT+BLESECPARAM: Query/Set Bluetooth LE encryption parameters.
   [ESP32 Only] AT+BLEENC: Initiate Bluetooth LE encryption request.
   [ESP32 Only] AT+BLEENCRSP: Respond to the pairing request from the peer device.
   [ESP32 Only] AT+BLEKEYREPLY: Reply the key value to the peer device in the legacy connection stage.
   [ESP32 Only] AT+BLECONFREPLY: Reply the confirm value to the peer device in the legacy connection stage.
   [ESP32 Only] AT+BLEENCDEV: Query bonded Bluetooth LE encryption device list.
   [ESP32 Only] AT+BLEENCCLEAR: Clear Bluetooth LE encryption device list.
   [ESP32 Only] AT+BLESETKEY: Set Bluetooth LE static pair key.
   [ESP32 Only] AT+BLEHIDINIT: Bluetooth LE Human Interface Device (HID) profile initialization.
   [ESP32 Only] AT+BLEHIDKB: Send Bluetooth LE HID keyboard information.
   [ESP32 Only] AT+BLEHIDMUS: Send Bluetooth LE HID mouse information.
   [ESP32 Only] AT+BLEHIDCONSUMER: Send Bluetooth LE HID consumer information.
   [ESP32 Only] AT+BLUFI: Start or Stop BluFi.
   [ESP32 Only] AT+BLUFINAME: Query/Set BluFi device name.
[ESP32 Only] Classic Bluetooth AT Commands  ESP32 AT firmware supports Bluetooth Core Specification Version 5.0.
   [ESP32 Only] AT+BTINIT: Classic Bluetooth initialization.
   [ESP32 Only] AT+BTNAME: Query/Set Classic Bluetooth device name.
   [ESP32 Only] AT+BTSCANMODE: Set Classic Bluetooth scan mode.
   [ESP32 Only] AT+BTSTARTDISC: Start Classic Bluetooth discovery.
   [ESP32 Only] AT+BTSPPINIT: Classic Bluetooth SPP profile initialization.
   [ESP32 Only] AT+BTSPPCONN: Query/Establish SPP connection.
   [ESP32 Only] AT+BTSPPDISCONN: End SPP connection.
   [ESP32 Only] AT+BTSPPSTART: Start Classic Bluetooth SPP profile.
   [ESP32 Only] AT+BTSPPSEND: Send data to remote Classic Bluetooth SPP device.
   [ESP32 Only] AT+BTA2DPINIT: Classic Bluetooth A2DP profile initialization.
   [ESP32 Only] AT+BTA2DPCONN: Establish A2DP connection.
   [ESP32 Only] AT+BTA2DPDISCONN: End A2DP connection.
   [ESP32 Only] AT+BTA2DPSRC: Query/Set the audio file URL.
   [ESP32 Only] AT+BTA2DPCTRL: Control the audio play.
   [ESP32 Only] AT+BTSECPARAM: Query/Set the Classic Bluetooth security parameters.
   [ESP32 Only] AT+BTKEYREPLY: Input the Simple Pair Key.
   [ESP32 Only] AT+BTPINREPLY: Input the Legacy Pair PIN Code.
   [ESP32 Only] AT+BTSECCFM: Reply the confirm value to the peer device in the legacy connection stage.
   [ESP32 Only] AT+BTENCDEV: Query Classic Bluetooth encryption device list.
   [ESP32 Only] AT+BTENCCLEAR: Clear Classic Bluetooth encryption device list.
   [ESP32 Only] AT+BTCOD: Set class of devices.
   [ESP32 Only] AT+BTPOWER: Query/Set power of Classic Bluetooth.
[ESP32 Only] Ethernet AT Commands
   [ESP32 Only] AT+CIPETHMAC: Query/Set the MAC address of the ESP Ethernet.
   [ESP32 Only] AT+CIPETH: Query/Set the IP address of the ESP Ethernet.
[ESP32 & ESP32-S2 & ESP32-C3] Driver AT Commands
   AT+DRVADC: Read ADC channel value.
   AT+DRVPWMINIT: Initialize PWM driver.
   AT+DRVPWMDUTY: Set PWM duty.
   AT+DRVPWMFADE: Set PWM fade.
   AT+DRVI2CINIT: Initialize I2C master driver.
   AT+DRVI2CRD: Read I2C data.
   AT+DRVI2CWRDATA: Write I2C data.
   AT+DRVI2CWRBYTES: Write no more than 4 bytes I2C data.
   AT+DRVSPICONFGPIO: Configure SPI GPIO.
   AT+DRVSPIINIT: Initialize SPI master driver.
   AT+DRVSPIRD: Read SPI data.
   AT+DRVSPIWR: Write SPI data.
 
lew247

Guru

Joined: 23/12/2015
Location: United Kingdom
Posts: 1676
Posted: 05:26pm 26 Jan 2022
Copy link to clipboard 
Print this post

  Mixtel90 said  
There's a lot more info in the binaries zips, but It's rather generic as the 8266 ones still contain the ESP32 commands and you have to work round them. :)


The links I posted for the ESP8266 (this link) and ESP8266-12 binaries (this link)  are just one .bin file you flash
although if  you have the orginal 8266 with 512k then yes it will have to be compiled from link at the bottom of the post on the previous page  this link

Complete step by step instructions on how to Restore or Upgrade Firmware on ESP8266 (ESP-01) Module (for use with the 512K module where you have more than 1 binary to flash) Restore-or-Upgrade-Firmware-on-ESP8266-ESP-01-Modu.pdf


EDIT: If ANYONE has an ESP8266-01 the one with 8 pins and the 512K flash then could you please use this flasher along with the instructions in the PFD and when you get to the flash image load the binaries and then click the COMBINE button to make 1 binary you can then share with the forum to make it simpler to flash?



I would have done this myself but I cannot find an ESP8266 or flasher
Edited 2022-01-27 03:48 by lew247
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 3496
Posted: 07:01pm 26 Jan 2022
Copy link to clipboard 
Print this post

Hi Lew,

Tried your binary on a 1Mbyte ESP8266-01 (the 8 pin board) using a USB interface
Flashing was succesfull.
But after flashing I could not use the serial interface.
I knew I needed bot CR and LF, and tried 115200 and 9600 baud, but no response to AT commands.

I may try again later today.

Volhout
PicomiteVGA PETSCII ROBOTS
 
Pluto
Guru

Joined: 09/06/2017
Location: Finland
Posts: 328
Posted: 07:51pm 26 Jan 2022
Copy link to clipboard 
Print this post

I did also try the Cytron_ESP-01S_AT_Firmware_V2.2.0.bin that was referred to in an earlier post. ESP-01 module was successfully flashed and it reponded to some of the AT-commands that i tested. Unfortunately I was not able to get it to contact to my router.
AT+CWMODE=3 (Set the Wi-Fi mode: Station+SoftAP) ****Worked OK
AT+CWJAP="routername","password" (Connect to an AP) ****Did not connect

Flashed the module several times and tried the above AT commands several times....Without success.

Some months ago I was searching and testing numerous firmwares for ESP-01. Finally I found one which enables me to connect to the router and get time and date from the web. That was named Boantong AT firmware by AI-Thinker.
https://docs.ai-thinker.com/en/%E5%9B%BA%E4%BB%B6%E6%B1%87%E6%80%BB

It contains one version for 1MB and an other for 4MB. I used the 1MB version as the ESP-01 modules I have did not have enough memory for the larger.
Simple to load with flash_download_tool_3.9.2.exe. Only 1 bin-file to load to 0x0 of the module.

AT ver 1.7.1.0 (2019)
SDK ver 3.0.1 (2020)

The program that i tested with was from:
https://www.thebackshed.com/forum/ViewTopic.php?FID=16&TID=14292
I used a "normal" 28pin Micromite. Connects nicely to the router and retrieves the time and date.

Unfortunately I am not enough skilled in the art, so I cannot say what else this firmware is capable of. To me at least it seems promising when the module is able to connect to the router and able to retrieve the required data from the web.

I totally agree with Peter. The firmware options is a real jungle. I did spend quite many days searching and testing before I found a working option. (At least to me it seems to work).

/Fred
 
flasherror
Senior Member

Joined: 07/01/2019
Location: United States
Posts: 159
Posted: 08:00pm 26 Jan 2022
Copy link to clipboard 
Print this post

  Volhout said  Tried your binary on a 1Mbyte ESP8266-01 (the 8 pin board) using a USB interface
Flashing was succesfull.
But after flashing I could not use the serial interface.
I knew I needed bot CR and LF, and tried 115200 and 9600 baud, but no response to AT commands.


1. Do you have a reset button for the ESP-01 (on the carrier board)? Connect terminal program then press reset - you should see garbage (debug info sent at a weird baud rate) then "ready" if everything's working OK. This will confirm your ESP TX to USB pin/wiring works.

2. I believe older ESP AT firmware required commands to be UPPERCASE (and CR/LF terminated). I think newer firmware isn't as picky.

3. If you are using official Espressif AT firmware then note v2 firmware has changed the TX/RX pins which might mean your serial interface will be none functional since the wrong pins are being used for serial (this could explain why the module doesn't respond or you don't see anything sent from it). I documented this here: https://www.thebackshed.com/forum/ViewTopic.php?FID=16&TID=14494

I'd advise using the flash procedure I documented there because:
1. It uses official espressif firmware (not one compiled by some random person, who knows what else the code does?)
2. It changes TX/RX pins to the "standard" ones used by most modules.
3. It skips annoying tasks involved using the graphical flash utility
4. Procedure is command line based and ideal for flashing a bunch of ESPs

Also, ESP8266 modules with 512K flash are old and may not contain features that are in newer firmware.
Edited 2022-01-27 06:13 by flasherror
 
schroepfer
Newbie

Joined: 18/01/2022
Location: Germany
Posts: 1
Posted: 08:26am 28 Jan 2022
Copy link to clipboard 
Print this post

Cytron_ESP-01S_AT_Firmware_V2.2.0.bin works!
ESP-01 1MB, flashed with flash download tool 3.9.2

Tested in Arduino-Monitor:

AT

OK
AT+CWMODE=3

OK
AT+CWJAP="FRITZ2","xxxxxx"
WIFI DISCONNECT
WIFI CONNECTED
WIFI GOT IP

OK
AT+CWSTATE?
+CWSTATE:2,"FRITZ2"

OK
Edited 2022-01-28 18:27 by schroepfer
 
     Page 3 of 3    
Print this page


To reply to this topic, you need to log in.

© JAQ Software 2024