You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
61 lines
2.1 KiB
Plaintext
61 lines
2.1 KiB
Plaintext
|
|
// Turn Echo off
|
|
ATE0
|
|
|
|
// Get Wifi Info with ssid...
|
|
AT+CWJAP?
|
|
+CWJAP:"Oppo","6a:e3:01:e5:f0:f1",11,-54,0,1,3,0,1
|
|
|
|
// Set Wifi to Station Mode
|
|
AT+CWMODE=1
|
|
|
|
// Get Connection Status
|
|
AT+CWSTATE?
|
|
/*
|
|
<state>: current Wi-Fi state.
|
|
|
|
0: ESP32 station has not started any Wi-Fi connection.
|
|
|
|
1: ESP32 station has connected to an AP, but does not get an IPv4 address yet.
|
|
|
|
2: ESP32 station has connected to an AP, and got an IPv4 address.
|
|
|
|
3: ESP32 station is in Wi-Fi connecting or reconnecting state.
|
|
|
|
4: ESP32 station is in Wi-Fi disconnected state.
|
|
|
|
<”ssid”>: the SSID of the target AP.
|
|
|
|
*/
|
|
|
|
// Connect to a AP
|
|
AT+CWJAP="Oppo","qwerty124"
|
|
WIFI CONNECTED
|
|
WIFI GOT IP
|
|
|
|
// Get IP information
|
|
AT+CIPSTA?
|
|
+CIPSTA:ip:"192.168.54.135"
|
|
+CIPSTA:gateway:"192.168.54.6"
|
|
+CIPSTA:netmask:"255.255.255.0"
|
|
|
|
// Disable DHCP and set network parameters
|
|
AT+CIPSTA="192.168.54.138","192.168.54.6","255.255.255.0"
|
|
|
|
// Enable DHCP and get a new ip
|
|
AT+CWDHCP=1,1
|
|
|
|
|
|
// get Mac address
|
|
AT+CIPSTAMAC?
|
|
+CIPSTAMAC:"24:0a:c4:c5:ac:24"
|
|
|
|
|
|
https://circuitdigest.com/microcontroller-projects/interfacing-esp8266-with-stm32f103c8-stm32-to-create-a-webserver
|
|
|
|
|
|
|
|
AT+HTTPCLIENT=2,1,"http://192.168.1.200:26323/sensekittest","http://192.168.1.200:26323","/sensekit",1
|
|
|
|
|
|
esptool.py --chip auto --port /dev/ttyUSB0 --baud 115200 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq 40m --flash_size 16MB 0x8000 partition_table/partition-table.bin 0x10000 ota_data_initial.bin 0xf000 phy_multiple_init_data.bin 0x1000 bootloader/bootloader.bin 0x100000 esp-at.bin 0x20000 at_customize.bin 0x24000 customized_partitions/server_cert.bin 0x39000 customized_partitions/mqtt_key.bin 0x26000 customized_partitions/server_key.bin 0x28000 customized_partitions/server_ca.bin 0x2e000 customized_partitions/client_ca.bin 0x30000 customized_partitions/factory_param.bin 0x21000 customized_partitions/ble_data.bin 0x3B000 customized_partitions/mqtt_ca.bin 0x37000 customized_partitions/mqtt_cert.bin 0x2a000 customized_partitions/client_cert.bin 0x2c000 customized_partitions/client_key.bin |