diff --git a/.gitignore b/.gitignore index 0e64537..84733b0 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,8 @@ build .vscode -bin \ No newline at end of file +bin +src +platformio.ini +lib +.gitignore +.pio \ No newline at end of file diff --git a/README.MD b/README.MD index b544e29..b03bebc 100644 --- a/README.MD +++ b/README.MD @@ -1,54 +1,20 @@ -

🌟LilyGo T-Call SIM800L🌟

+

🌟LilyGo T-Call SIM800 Series🌟

-## **English | [中文](docs/cn.md)** +![](image/Product.jpg) +

Product 📷:

-AXP192 is the power supply used on the SIM800L board. It is an upgraded version of the IP5306 version. The following points are upgraded: -1. Change the power IC to AXP192 PMU management, support coulomb counter and high-precision voltage and current detection function, please refer to [X-Power official website](http://www.x-powers.com/en.php/Info/product_detail/article_id/29) -2. SIM800L **RI** Pin leads to ESP32, can wake up from receiving voice or data calls, and receiving messages -3. SIM800L **DTR** Pin leads to ESP32, which can wake up SIM800L from sleep state -4. The old and new versions are fully compatible and can be used as general examples. You don't need to care about the control of the AXP192 power chip, you can replace the new board on your original code without programming the AXP192, and provide AXP192 control example code - -## Examples for SIM800L IP5306 Version [Click me view PINOUT](./image/SIM800L_IP.jpg) - -- Loboris Micropython: [/examples/MicroPython_LoBo](/examples/MicroPython_LoBo) -- Arduino + TinyGSM library: [/examples/Arduino_TinyGSM](/examples/Arduino_TinyGSM) -- Arduino + SIM800 library: [/examples/Arduino_sim800](/examples/Arduino_sim800) -- Arduino OTA update over GSM: [/examples/Arduino_GSM_OTA](/examples/Arduino_GSM_OTA) -- Arduino Deepsleep: [/examples/Arduino_Deepsleep](/examples/Arduino_Deepsleep) -- ESP-IDF: https://github.com/espressif/esp-idf/tree/master/examples/protocols/pppos_client -- Platformio Arduino_Thingsboard :[/examples/Platformio_Arduino_Thingsboard](/examples/Arduino_Deepsleep) - - -## Examples for SIM800L AXP192 Version [Click me view PINOUT](./image/SIM800L_AXP.jpg) - -- Arduino + TinyGSM library: [/examples/Arduino_TinyGSM_AXP192](/examples/Arduino_TinyGSM_AXP192) - +| Examples | Product Link | Schematic | Status | Recommended level | +| :---------------------------------------: | :----------------------------------------------------------------: | :---------------------------------------------------------: | :------: | :---------------: | +| [SIM800L IP5306](./doc/SIM800L_IP5306.MD) | [Product link](https://www.aliexpress.com/item/33045221960.html) | [Schematic](./schematic/LilyGo-SIM800L-IP5306-20190610.pdf) | ✅ | ⭐ | +| [SIM800L AXP192](./doc/SIM800L_AXP192.MD) | [Product link](https://www.aliexpress.com/item/4000959701330.html) | [Schematic](./schematic/LilyGo-SIM800L-PMU-20200409.pdf) | ✅ | ⭐⭐⭐ | +| [SIM800C AXP192](./doc/SIM800C_AXP192.MD) | [Product link]() | [Schematic](./schematic/LilyGo-SIM800C-20200630.pdf) | **Soon** | ⭐⭐⭐ | ## Datasheet - [SIM800 AT Command](./datasheet/sim800_series_at_command_manual_v1.01.pdf) - [SIM800 Hardware Design](./datasheet/SIM800_Hardware%20Design_V1.08.pdf) - [AXP192](http://www.x-powers.com/en.php/Info/product_detail/article_id/29) - [IP5306](./datasheet/IP5306%20REG%20V1.4.pdf) -- [IP5306 Version Schematic](./datasheet/TTGO_T-Call_SIM800_v1.3_schematic.pdf) -- [AXP192 Version Schematic](./datasheet/LilyGo-SIM800L-PMU-20200409.pdf) - -## Pin definition -| Name | [IP5306 Version](https://www.aliexpress.com/item/33045221960.html) | [AXP192 Version](https://www.aliexpress.com/item/4000959701330.html) | -| :----------: | :----------------------------------------------------------------: | :------------------------------------------------------------------: | -| SIM800_TX | 26 | 26 | -| SIM800_RX | 27 | 27 | -| SIM800_PWKEY | 4 | 4 | -| SIM800_RST | 5 | 5 | -| SIM800_POWER | 23 | 23 | -| SIM800_DTR | ❌ | 32 | -| SIM800_RI | ❌ | 33 | -| SDA | 21 | 21 | -| SCL | 22 | 22 | -| AXP IRQ | ❌ | 35 | -| LED | ❌ | 13 | - - diff --git a/doc/SIM800C_AXP192.MD b/doc/SIM800C_AXP192.MD new file mode 100644 index 0000000..c563830 --- /dev/null +++ b/doc/SIM800C_AXP192.MD @@ -0,0 +1,40 @@ +# Product + +Update later + +# Note +- For the first time, please remember to define the board model you use at the beginning of the sketch + + +# Introduction +AXP192 is the power supply used on the SIM800L board. It is an upgraded version of the IP5306 version. The following points are upgraded: +1. Change the power IC to AXP192 PMU management, support coulomb counter and high-precision voltage and current detection function, please refer to [X-Power official website](http://www.x-powers.com/en.php/Info/product_detail/article_id/29) +2. SIM800L **RI** Pin leads to ESP32, can wake up from receiving voice or data calls, and receiving messages +3. SIM800L **DTR** Pin leads to ESP32, which can wake up SIM800L from sleep state +4. The old and new versions are fully compatible and can be used as general examples. You don't need to care about the control of the AXP192 power chip, you can replace the new board on your original code without programming the AXP192, and provide AXP192 control example code + + +## Examples for SIM800L & SIM800C +- Arduino + TinyGSM library: [/examples/Arduino_TinyGSM](/examples/Arduino_TinyGSM) + + + +## Pin definition +| Name | SIM800C | +| :----------: | :-----: | +| MODEM TX | 26 | +| MODEM RX | 27 | +| MODEM PWRKEY | 4 | +| MODEM RST | NC | +| MODEM POWER | 25 | +| MODEM DTR | 32 | +| MODEM RI | 33 | +| PMU SDA | 21 | +| PMU SCL | 22 | +| PMU IRQ | 35 | +| User LED | 12 | + + +# Sleep current +![](../image/SIM800C_AXP192_SLEEP.jpg) + diff --git a/doc/SIM800L_AXP192.MD b/doc/SIM800L_AXP192.MD new file mode 100644 index 0000000..d261ddb --- /dev/null +++ b/doc/SIM800L_AXP192.MD @@ -0,0 +1,35 @@ +# Product + +![](../image/SIM800L_AXP192.jpg) + +# Note +- For the first time, please remember to define the board model you use at the beginning of the sketch + +# Introduction +AXP192 is the power supply used on the SIM800L board. It is an upgraded version of the IP5306 version. The following points are upgraded: +1. Change the power IC to AXP192 PMU management, support coulomb counter and high-precision voltage and current detection function, please refer to [X-Power official website](http://www.x-powers.com/en.php/Info/product_detail/article_id/29) +2. SIM800L **RI** Pin leads to ESP32, can wake up from receiving voice or data calls, and receiving messages +3. SIM800L **DTR** Pin leads to ESP32, which can wake up SIM800L from sleep state +4. The old and new versions are fully compatible and can be used as general examples. You don't need to care about the control of the AXP192 power chip, you can replace the new board on your original code without programming the AXP192, and provide AXP192 control example code + + +## Examples for SIM800L & SIM800C +- Arduino + TinyGSM library: [/examples/Arduino_TinyGSM](/examples/Arduino_TinyGSM) + +## Pin definition +| Name | SIM800L | +| :----------: | :-----: | +| MODEM TX | 26 | +| MODEM RX | 27 | +| MODEM PWRKEY | 4 | +| MODEM RST | 5 | +| MODEM POWER | 23 | +| MODEM DTR | 32 | +| MODEM RI | 33 | +| PMU SDA | 21 | +| PMU SCL | 22 | +| PMU IRQ | 35 | +| User LED | 13 | + +## Sleep current +![](../image/SIM800L_AXP192_SLEEP.jpg) diff --git a/doc/SIM800L_IP5306.MD b/doc/SIM800L_IP5306.MD new file mode 100644 index 0000000..6bfe946 --- /dev/null +++ b/doc/SIM800L_IP5306.MD @@ -0,0 +1,29 @@ +# Product + +![](../image/SIM800L_IP5306.jpg) + + +## Examples for SIM800L IP5306 Version + +- Loboris Micropython: [/examples/MicroPython_LoBo](/examples/MicroPython_LoBo) +- Arduino + TinyGSM library: [/examples/Arduino_TinyGSM](/examples/Arduino_TinyGSM) +- Arduino OTA update over GSM: [/examples/Arduino_GSM_OTA](/examples/Arduino_GSM_OTA) +- ESP-IDF: https://github.com/espressif/esp-idf/tree/master/examples/protocols/pppos_client +- Platformio Arduino_Thingsboard :[/examples/Platformio_Arduino_Thingsboard](/examples/Arduino_Deepsleep) + +## Pin definition +| Name | Pins | +| :------------: | :---: | +| MODEM TX | 26 | +| MODEM RX | 27 | +| MODEM PWRKEY | 4 | +| MODEM RST | 5 | +| MODEM POWER | 23 | +| MODEM DTR | ❌ | +| MODEM RI | ❌ | +| POWER Chip SDA | 21 | +| POWER Chip SCL | 22 | +| LED | ❌ | + +## Sleep current +![](../image/SIM800L_IP5306_SLEEP.jpg) diff --git a/docs/cn.md b/docs/cn.md deleted file mode 100644 index 95101c5..0000000 --- a/docs/cn.md +++ /dev/null @@ -1,52 +0,0 @@ - -

🌟LilyGo T-Call SIM800L🌟

- -## **[English](../README.MD) | 中文** - - -AXP192为SIM800L板子上使用的电源,它是IP5306版本的升级版本,升级以下几点: -1. 更改电源IC为AXP192 PMU管理,支持库仑计和高精度电压电流检测功能,详情请查阅 [X-Power官网](http://www.x-powers.com/en.php/Info/product_detail/article_id/29) -2. SIM800L **RI** Pin引出到ESP32 ,可以从接受语音或数据呼叫,接收到消息中唤醒 -3. SIM800L **DTR** Pin引出到ESP32 ,可以使SIM800L从睡眠状态中唤醒 -4. 新旧版本完全兼容,可以通用示例,你完全可以不需要关心AXP192电源芯片的控制,无需对AXP192进行编程也可以在你原有代码上替换新板,提供AXP192控制示例代码 - - -## SIM800L IP5306 版本示例 [点击我查看引脚图](../image/SIM800L_IP.jpg) - -- Loboris Micropython: [/examples/MicroPython_LoBo](/examples/MicroPython_LoBo) -- Arduino + TinyGSM library: [/examples/Arduino_TinyGSM](/examples/Arduino_TinyGSM) -- Arduino + SIM800 library: [/examples/Arduino_sim800](/examples/Arduino_sim800) -- Arduino OTA update over GSM: [/examples/Arduino_GSM_OTA](/examples/Arduino_GSM_OTA) -- Arduino Deepsleep: [/examples/Arduino_Deepsleep](/examples/Arduino_Deepsleep) -- ESP-IDF: https://github.com/espressif/esp-idf/tree/master/examples/protocols/pppos_client - -## SIM800L AXP192 版本示例 [点击我查看引脚图](../image/SIM800L_AXP.jpg) -- Arduino + TinyGSM library: [/examples/Arduino_TinyGSM_AXP192](/examples/Arduino_TinyGSM_AXP192) - -## 数据手册 -- [SIM800 AT Command](../datasheet/sim800_series_at_command_manual_v1.01.pdf) -- [SIM800 Hardware Design](../datasheet/SIM800_Hardware%20Design_V1.08.pdf) -- [AXP192](http://www.x-powers.com/en.php/Info/product_detail/article_id/29) -- [IP5306](../datasheet/IP5306%20REG%20V1.4.pdf) -- [IP5306 Version Schematic](../datasheet/TTGO_T-Call_SIM800_v1.3_schematic.pdf) -- [AXP192 Version Schematic](../datasheet/LilyGo-SIM800L-PMU-20200409.pdf) - - -## 引脚定义 -| Name | [IP5306 Version](https://www.aliexpress.com/item/33045221960.html) | AXP192 Version | -| :----------: | :----------------------------------------------------------------: | :------------: | -| SIM800_TX | 26 | 26 | -| SIM800_RX | 27 | 27 | -| SIM800_PWKEY | 4 | 4 | -| SIM800_RST | 5 | 5 | -| SIM800_POWER | 23 | 23 | -| SIM800_DTR | ❌ | 32 | -| SIM800_RI | ❌ | 33 | -| SDA | 21 | 21 | -| SCL | 22 | 22 | -| AXP IRQ | ❌ | 35 | -| LED | ❌ | 13 | - - - - diff --git a/examples/Arduino_Deepsleep/Arduino_Deepsleep.ino b/examples/Arduino_Deepsleep/Arduino_Deepsleep.ino deleted file mode 100644 index 0655091..0000000 --- a/examples/Arduino_Deepsleep/Arduino_Deepsleep.ino +++ /dev/null @@ -1,65 +0,0 @@ -#include -#include -#include -#include - -#define UART_TX 27 -#define UART_RX 26 -#define SIMCARD_RST 5 -#define SIMCARD_PWKEY 4 -#define SIM800_POWER_ON 23 - -#define UART_BANUD_RATE 9600 - -#define I2C_SDA 21 -#define I2C_SCL 22 - -#define IP5306_ADDR 0X75 -#define IP5306_REG_SYS_CTL0 0x00 - -HardwareSerial hwSerial(1); -SIM800 gprs(hwSerial, SIMCARD_PWKEY, SIMCARD_RST, SIM800_POWER_ON); - -bool setPowerBoostKeepOn(int en) -{ - Wire.beginTransmission(IP5306_ADDR); - Wire.write(IP5306_REG_SYS_CTL0); - if (en) - Wire.write(0x37); // Set bit1: 1 enable 0 disable boost keep on - else - Wire.write(0x35); // 0x37 is default reg value - return Wire.endTransmission() == 0; -} - - -void setup() -{ - Serial.begin(115200); - - Wire.begin(I2C_SDA, I2C_SCL); - bool isOk = setPowerBoostKeepOn(1); - String info = "IP5306 KeepOn " + String((isOk ? "PASS" : "FAIL")); - Serial.println(info); - - - hwSerial.begin(UART_BANUD_RATE, SERIAL_8N1, UART_RX, UART_TX); - - if (gprs.preInit()) { - Serial.println("SIM800 Begin PASS"); - } else { - Serial.println("SIM800 Begin FAIL"); - } - Serial.println("enter deepsleep now"); - - delay(3000); - - esp_sleep_enable_ext0_wakeup(GPIO_NUM_33, HIGH); - - esp_deep_sleep_start(); -} - -void loop() -{ -} - - diff --git a/examples/Arduino_Deepsleep/README.MD b/examples/Arduino_Deepsleep/README.MD deleted file mode 100644 index 311e632..0000000 --- a/examples/Arduino_Deepsleep/README.MD +++ /dev/null @@ -1,8 +0,0 @@ - -## Install the following dependency library files: -[SIM800_Library](https://github.com/lewisxhe/SIM800_Library) - -#### description: -Use battery test when esp32 is in deep sleep state, current is about 1.1mA - -![](../../datasheet/deepsleep.jpg) \ No newline at end of file diff --git a/examples/Arduino_TinyGSM/Arduino_TinyGSM.ino b/examples/Arduino_TinyGSM/Arduino_TinyGSM.ino index 40654d7..b66b495 100644 --- a/examples/Arduino_TinyGSM/Arduino_TinyGSM.ino +++ b/examples/Arduino_TinyGSM/Arduino_TinyGSM.ino @@ -1,27 +1,22 @@ -/************************************************************** - * - * This sketch connects to a website and downloads a page. - * It can be used to perform HTTP/RESTful API calls. - * - * TinyGSM Getting Started guide: - * https://tiny.cc/tinygsm-readme - * - **************************************************************/ -// Your GPRS credentials (leave empty, if missing) -const char apn[] = ""; // Your APN -const char gprsUser[] = ""; // User -const char gprsPass[] = ""; // Password -const char simPIN[] = ""; // SIM card PIN code, if any -// TTGO T-Call pin definitions -#define MODEM_RST 5 -#define MODEM_PWKEY 4 -#define MODEM_POWER_ON 23 -#define MODEM_TX 27 -#define MODEM_RX 26 -#define I2C_SDA 21 -#define I2C_SCL 22 + +// Please select the corresponding model + +// #define SIM800L_IP5306_VERSION_20190610 +// #define SIM800L_AXP192_VERSION_20200327 +// #define SIM800C_AXP192_VERSION_20200609 + + +// #define TEST_RING_RI_PIN //Note will cancel the phone call test + +// #define ENABLE_SPI_SDCARD //Uncomment will test external SD card + +// Define the serial console for debug prints, if needed +// #define DUMP_AT_COMMANDS +// #define TINY_GSM_DEBUG SerialMon + +#include "utilities.h" // Set serial for debug console (to the Serial Monitor, default speed 115200) #define SerialMon Serial @@ -29,132 +24,306 @@ const char simPIN[] = ""; // SIM card PIN code, if any #define SerialAT Serial1 // Configure TinyGSM library -#define TINY_GSM_MODEM_SIM800 // Modem is SIM800 -#define TINY_GSM_RX_BUFFER 1024 // Set RX buffer to 1Kb +#define TINY_GSM_MODEM_SIM800 // Modem is SIM800 +#define TINY_GSM_RX_BUFFER 1024 // Set RX buffer to 1Kb -// Define the serial console for debug prints, if needed -//#define TINY_GSM_DEBUG SerialMon -//#define DUMP_AT_COMMANDS - -#include #include -#include "utilities.h" #ifdef DUMP_AT_COMMANDS - #include - StreamDebugger debugger(SerialAT, SerialMon); - TinyGsm modem(debugger); +#include +StreamDebugger debugger(SerialAT, SerialMon); +TinyGsm modem(debugger); #else - TinyGsm modem(SerialAT); +TinyGsm modem(SerialAT); #endif +#define uS_TO_S_FACTOR 1000000ULL /* Conversion factor for micro seconds to seconds */ +#define TIME_TO_SLEEP 60 /* Time ESP32 will go to sleep (in seconds) */ + // Server details const char server[] = "vsh.pp.ua"; const char resource[] = "/TinyGSM/logo.txt"; +// Your GPRS credentials (leave empty, if missing) +const char apn[] = ""; // Your APN +const char gprsUser[] = ""; // User +const char gprsPass[] = ""; // Password +const char simPIN[] = ""; // SIM card PIN code, if any TinyGsmClient client(modem); const int port = 80; -void setup() { - // Set console baud rate - SerialMon.begin(115200); - delay(10); +/* +This is just to demonstrate how to use SPI device externally. +Here we use SD card as a demonstration. In order to maintain versatility, +I chose three boards with free pins as SPI pins +*/ +#ifdef ENABLE_SPI_SDCARD - // Keep power when running from battery - Wire.begin(I2C_SDA, I2C_SCL); - bool isOk = setPowerBoostKeepOn(1); - SerialMon.println(String("IP5306 KeepOn ") + (isOk ? "OK" : "FAIL")); +#include "FS.h" +#include "SD.h" +#include - // Set-up modem reset, enable, power pins - pinMode(MODEM_PWKEY, OUTPUT); - pinMode(MODEM_RST, OUTPUT); - pinMode(MODEM_POWER_ON, OUTPUT); +SPIClass SPI1(HSPI); - digitalWrite(MODEM_PWKEY, LOW); - digitalWrite(MODEM_RST, HIGH); - digitalWrite(MODEM_POWER_ON, HIGH); +#define MY_CS 33 +#define MY_SCLK 25 +#define MY_MISO 27 +#define MY_MOSI 26 - // Set GSM module baud rate and UART pins - SerialAT.begin(115200, SERIAL_8N1, MODEM_RX, MODEM_TX); - delay(3000); - - // Restart takes quite some time - // To skip it, call init() instead of restart() - SerialMon.println("Initializing modem..."); - modem.restart(); - // Or, use modem.init() if you don't need the complete restart - - String modemInfo = modem.getModemInfo(); - SerialMon.print("Modem: "); - SerialMon.println(modemInfo); - - // Unlock your SIM card with a PIN if needed - if (strlen(simPIN) && modem.getSimStatus() != 3 ) { - modem.simUnlock(simPIN); - } -} - -void loop() { - SerialMon.print("Waiting for network..."); - if (!modem.waitForNetwork(240000L)) { - SerialMon.println(" fail"); - delay(10000); - return; - } - SerialMon.println(" OK"); - - if (modem.isNetworkConnected()) { - SerialMon.println("Network connected"); - } - - SerialMon.print(F("Connecting to APN: ")); - SerialMon.print(apn); - if (!modem.gprsConnect(apn, gprsUser, gprsPass)) { - SerialMon.println(" fail"); - delay(10000); - return; - } - SerialMon.println(" OK"); - - SerialMon.print("Connecting to "); - SerialMon.print(server); - if (!client.connect(server, port)) { - SerialMon.println(" fail"); - delay(10000); - return; - } - SerialMon.println(" OK"); - - // Make a HTTP GET request: - SerialMon.println("Performing HTTP GET request..."); - client.print(String("GET ") + resource + " HTTP/1.1\r\n"); - client.print(String("Host: ") + server + "\r\n"); - client.print("Connection: close\r\n\r\n"); - client.println(); - - unsigned long timeout = millis(); - while (client.connected() && millis() - timeout < 10000L) { - // Print available data - while (client.available()) { - char c = client.read(); - SerialMon.print(c); - timeout = millis(); +void setupSDCard() +{ + SPI1.begin(MY_SCLK, MY_MISO, MY_MOSI, MY_CS); + //Assuming use of SPI SD card + if (!SD.begin(MY_CS, SPI1)) { + Serial.println("Card Mount Failed"); + } else { + Serial.println("SDCard Mount PASS"); + String size = String((uint32_t)(SD.cardSize() / 1024 / 1024)) + "MB"; + Serial.println(size); } - } - SerialMon.println(); +} +#else +#define setupSDCard() +#endif - // Shutdown - client.stop(); - SerialMon.println(F("Server disconnected")); +void setupModem() +{ +#ifdef MODEM_RST + // Keep reset high + pinMode(MODEM_RST, OUTPUT); + digitalWrite(MODEM_RST, HIGH); +#endif - modem.gprsDisconnect(); - SerialMon.println(F("GPRS disconnected")); + pinMode(MODEM_PWRKEY, OUTPUT); + pinMode(MODEM_POWER_ON, OUTPUT); - // Do nothing forevermore - while (true) { + // Turn on the Modem power first + digitalWrite(MODEM_POWER_ON, HIGH); + + // Pull down PWRKEY for more than 1 second according to manual requirements + digitalWrite(MODEM_PWRKEY, HIGH); + delay(100); + digitalWrite(MODEM_PWRKEY, LOW); delay(1000); - } + digitalWrite(MODEM_PWRKEY, HIGH); + + // Initialize the indicator as an output + pinMode(LED_GPIO, OUTPUT); + digitalWrite(LED_GPIO, LED_OFF); +} + +void turnOffNetlight() +{ + SerialMon.println("Turning off SIM800 Red LED..."); + modem.sendAT("+CNETLIGHT=0"); +} + +void turnOnNetlight() +{ + SerialMon.println("Turning on SIM800 Red LED..."); + modem.sendAT("+CNETLIGHT=1"); +} + +void setup() +{ + // Set console baud rate + SerialMon.begin(115200); + + delay(10); + + // Start power management + if (setupPMU() == false) { + Serial.println("Setting power error"); + } + + setupSDCard(); + + // Some start operations + setupModem(); + + // Set GSM module baud rate and UART pins + SerialAT.begin(115200, SERIAL_8N1, MODEM_RX, MODEM_TX); +} + +void loop() +{ + // Restart takes quite some time + // To skip it, call init() instead of restart() + SerialMon.println("Initializing modem..."); + modem.restart(); + + // Turn off network status lights to reduce current consumption + turnOffNetlight(); + + // The status light cannot be turned off, only physically removed + //turnOffStatuslight(); + + // Or, use modem.init() if you don't need the complete restart + String modemInfo = modem.getModemInfo(); + SerialMon.print("Modem: "); + SerialMon.println(modemInfo); + + // Unlock your SIM card with a PIN if needed + if (strlen(simPIN) && modem.getSimStatus() != 3 ) { + modem.simUnlock(simPIN); + } + + SerialMon.print("Waiting for network..."); + if (!modem.waitForNetwork(240000L)) { + SerialMon.println(" fail"); + delay(10000); + return; + } + SerialMon.println(" OK"); + + // When the network connection is successful, turn on the indicator + digitalWrite(LED_GPIO, LED_ON); + + if (modem.isNetworkConnected()) { + SerialMon.println("Network connected"); + } + + SerialMon.print(F("Connecting to APN: ")); + SerialMon.print(apn); + if (!modem.gprsConnect(apn, gprsUser, gprsPass)) { + SerialMon.println(" fail"); + delay(10000); + return; + } + SerialMon.println(" OK"); + + SerialMon.print("Connecting to "); + SerialMon.print(server); + if (!client.connect(server, port)) { + SerialMon.println(" fail"); + delay(10000); + return; + } + SerialMon.println(" OK"); + + // Make a HTTP GET request: + SerialMon.println("Performing HTTP GET request..."); + client.print(String("GET ") + resource + " HTTP/1.1\r\n"); + client.print(String("Host: ") + server + "\r\n"); + client.print("Connection: close\r\n\r\n"); + client.println(); + + unsigned long timeout = millis(); + while (client.connected() && millis() - timeout < 10000L) { + // Print available data + while (client.available()) { + char c = client.read(); + SerialMon.print(c); + timeout = millis(); + } + } + SerialMon.println(); + + // Shutdown + client.stop(); + SerialMon.println(F("Server disconnected")); + + modem.gprsDisconnect(); + SerialMon.println(F("GPRS disconnected")); + + + // DTR is used to wake up the sleeping Modem + // DTR is used to wake up the sleeping Modem + // DTR is used to wake up the sleeping Modem +#ifdef MODEM_DTR + bool res; + + modem.sleepEnable(); + + delay(100); + + // test modem response , res == 0 , modem is sleep + res = modem.testAT(); + Serial.print("SIM800 Test AT result -> "); + Serial.println(res); + + delay(1000); + + Serial.println("Use DTR Pin Wakeup"); + pinMode(MODEM_DTR, OUTPUT); + //Set DTR Pin low , wakeup modem . + digitalWrite(MODEM_DTR, LOW); + + + // test modem response , res == 1 , modem is wakeup + res = modem.testAT(); + Serial.print("SIM800 Test AT result -> "); + Serial.println(res); + +#endif + + +#ifdef TEST_RING_RI_PIN +#ifdef MODEM_RI + // Swap the audio channels + SerialAT.print("AT+CHFA=1\r\n"); + delay(2); + + //Set ringer sound level + SerialAT.print("AT+CRSL=100\r\n"); + delay(2); + + //Set loud speaker volume level + SerialAT.print("AT+CLVL=100\r\n"); + delay(2); + + // Calling line identification presentation + SerialAT.print("AT+CLIP=1\r\n"); + delay(2); + + //Set RI Pin input + pinMode(MODEM_RI, INPUT); + + Serial.println("Wait for call in"); + //When is no calling ,RI pin is high level + while (digitalRead(MODEM_RI)) { + Serial.print('.'); + delay(500); + } + Serial.println("call in "); + + //Wait 10 seconds for the bell to ring + delay(10000); + + //Accept call + SerialAT.println("ATA"); + + + delay(10000); + + // Wait ten seconds, then hang up the call + SerialAT.println("ATH"); +#endif //MODEM_RI +#endif //TEST_RING_RI_PIN + + // Make the LED blink three times before going to sleep + int i = 3; + while (i--) { + digitalWrite(LED_GPIO, LED_ON); + delay(500); + digitalWrite(LED_GPIO, LED_OFF); + delay(500); + } + + //After all off + modem.poweroff(); + + SerialMon.println(F("Poweroff")); + + esp_sleep_enable_timer_wakeup(TIME_TO_SLEEP * uS_TO_S_FACTOR); + + esp_deep_sleep_start(); + + /* + The sleep current using AXP192 power management is about 500uA, + and the IP5306 consumes about 1mA + */ } diff --git a/examples/Arduino_TinyGSM/README.MD b/examples/Arduino_TinyGSM/README.MD index e55597e..a62685b 100644 --- a/examples/Arduino_TinyGSM/README.MD +++ b/examples/Arduino_TinyGSM/README.MD @@ -1,4 +1,4 @@ ## Install the following dependency library files: -[TinyGSM](https://github.com/vshymanskyy/TinyGSM) - +- [TinyGSM](https://github.com/vshymanskyy/TinyGSM) +- [AXP202X_Library](https://github.com/lewisxhe/AXP202X_Library) diff --git a/examples/Arduino_TinyGSM/utilities.h b/examples/Arduino_TinyGSM/utilities.h index f204e18..333c953 100644 --- a/examples/Arduino_TinyGSM/utilities.h +++ b/examples/Arduino_TinyGSM/utilities.h @@ -1,14 +1,121 @@ + + + +#include + +#if defined(SIM800L_IP5306_VERSION_20190610) + +#define MODEM_RST 5 +#define MODEM_PWRKEY 4 +#define MODEM_POWER_ON 23 +#define MODEM_TX 27 +#define MODEM_RX 26 + +#define I2C_SDA 21 +#define I2C_SCL 22 +#define LED_GPIO 13 +#define LED_ON HIGH +#define LED_OFF LOW + #define IP5306_ADDR 0x75 #define IP5306_REG_SYS_CTL0 0x00 -bool setPowerBoostKeepOn(int en) +// setPowerBoostKeepOn +bool setupPMU() { - Wire.beginTransmission(IP5306_ADDR); - Wire.write(IP5306_REG_SYS_CTL0); - if (en) { - Wire.write(0x37); // Set bit1: 1 enable 0 disable boost keep on - } else { - Wire.write(0x35); // 0x37 is default reg value - } - return Wire.endTransmission() == 0; + bool en = true; + Wire.beginTransmission(IP5306_ADDR); + Wire.write(IP5306_REG_SYS_CTL0); + if (en) { + Wire.write(0x37); // Set bit1: 1 enable 0 disable boost keep on + } else { + Wire.write(0x35); // 0x37 is default reg value + } + return Wire.endTransmission() == 0; } + + +#elif defined(SIM800L_AXP192_VERSION_20200327) + +#define MODEM_RST 5 +#define MODEM_PWRKEY 4 +#define MODEM_POWER_ON 23 +#define MODEM_TX 27 +#define MODEM_RX 26 +#define MODEM_DTR 32 +#define MODEM_RI 33 + +#define I2C_SDA 21 +#define I2C_SCL 22 +#define LED_GPIO 13 +#define LED_ON HIGH +#define LED_OFF LOW + + +#elif defined(SIM800C_AXP192_VERSION_20200609) +// pin definitions +#define MODEM_PWRKEY 4 +#define MODEM_POWER_ON 25 +#define MODEM_TX 27 +#define MODEM_RX 26 +#define MODEM_DTR 32 +#define MODEM_RI 33 + +#define I2C_SDA 21 +#define I2C_SCL 22 +#define LED_GPIO 12 +#define LED_ON LOW +#define LED_OFF HIGH + +#else +#error "Please select the corresponding model" +#endif + + +#if defined(SIM800L_AXP192_VERSION_20200327) || defined(SIM800C_AXP192_VERSION_20200609) +#include //https://github.com/lewisxhe/AXP202X_Library + +AXP20X_Class axp; + +bool setupPMU() +{ +// For more information about the use of AXP192, please refer to AXP202X_Library https://github.com/lewisxhe/AXP202X_Library + Wire.begin(I2C_SDA, I2C_SCL); + int ret = axp.begin(Wire, AXP192_SLAVE_ADDRESS); + + if (ret == AXP_FAIL) { + Serial.println("AXP Power begin failed"); + return false; + } + + //! Turn off unused power + axp.setPowerOutPut(AXP192_DCDC1, AXP202_OFF); + axp.setPowerOutPut(AXP192_LDO2, AXP202_OFF); + axp.setPowerOutPut(AXP192_LDO3, AXP202_OFF); + axp.setPowerOutPut(AXP192_DCDC2, AXP202_OFF); + axp.setPowerOutPut(AXP192_EXTEN, AXP202_OFF); + + //! Do not turn off DC3, it is powered by esp32 + // axp.setPowerOutPut(AXP192_DCDC3, AXP202_ON); + + // Set the charging indicator to turn off + // Turn it off to save current consumption + // axp.setChgLEDMode(AXP20X_LED_OFF); + + // Set the charging indicator to flash once per second + // axp.setChgLEDMode(AXP20X_LED_BLINK_1HZ); + + + //! Use axp192 adc get voltage info + axp.adc1Enable(AXP202_VBUS_VOL_ADC1 | AXP202_VBUS_CUR_ADC1 | AXP202_BATT_CUR_ADC1 | AXP202_BATT_VOL_ADC1, true); + + float vbus_v = axp.getVbusVoltage(); + float vbus_c = axp.getVbusCurrent(); + float batt_v = axp.getBattVoltage(); + // axp.getBattPercentage(); // axp192 is not support percentage + Serial.printf("VBUS:%.2f mV %.2f mA ,BATTERY: %.2f\n", vbus_v, vbus_c, batt_v); + + return true; +} + +#endif \ No newline at end of file diff --git a/examples/Arduino_TinyGSM_AXP192/Arduino_TinyGSM_AXP192.ino b/examples/Arduino_TinyGSM_AXP192/Arduino_TinyGSM_AXP192.ino deleted file mode 100644 index 2efb4ec..0000000 --- a/examples/Arduino_TinyGSM_AXP192/Arduino_TinyGSM_AXP192.ino +++ /dev/null @@ -1,266 +0,0 @@ -// Your GPRS credentials (leave empty, if missing) -const char apn[] = ""; // Your APN -const char gprsUser[] = ""; // User -const char gprsPass[] = ""; // Password -const char simPIN[] = ""; // SIM card PIN code, if any - -// TTGO T-Call pin definitions -#define MODEM_RST 5 -#define MODEM_PWKEY 4 -#define MODEM_POWER_ON 23 -#define MODEM_TX 27 -#define MODEM_RX 26 -#define MODEM_DTR 32 -#define MODEM_RI 33 - - -#define I2C_SDA 21 -#define I2C_SCL 22 -#define LED_GPIO 13 - -// Set serial for debug console (to the Serial Monitor, default speed 115200) -#define SerialMon Serial -// Set serial for AT commands (to the module) -#define SerialAT Serial1 - -// Configure TinyGSM library -#define TINY_GSM_MODEM_SIM800 // Modem is SIM800 -#define TINY_GSM_RX_BUFFER 1024 // Set RX buffer to 1Kb - -// Define the serial console for debug prints, if needed -//#define TINY_GSM_DEBUG SerialMon -//#define DUMP_AT_COMMANDS - -// #define TEST_RING_RI_PIN //Note will cancel the phone call test - - -#include -#include //https://github.com/vshymanskyy/TinyGSM -#include //https://github.com/lewisxhe/AXP202X_Library - -#ifdef DUMP_AT_COMMANDS -#include -StreamDebugger debugger(SerialAT, SerialMon); -TinyGsm modem(debugger); -#else -TinyGsm modem(SerialAT); -#endif - -#define uS_TO_S_FACTOR 1000000ULL /* Conversion factor for micro seconds to seconds */ -#define TIME_TO_SLEEP 30 /* Time ESP32 will go to sleep (in seconds) */ - - -// Server details -const char server[] = "vsh.pp.ua"; -const char resource[] = "/TinyGSM/logo.txt"; - -AXP20X_Class axp; -TinyGsmClient client(modem); -const int port = 80; - - -void setup() -{ - // Set console baud rate - SerialMon.begin(115200); - delay(10); - - // Keep power when running from battery - Wire.begin(I2C_SDA, I2C_SCL); - - int ret = axp.begin(Wire, AXP192_SLAVE_ADDRESS); - - if (ret == AXP_FAIL) { - Serial.println("AXP Power begin failed"); - while (1); - } - - //! Turn off unused power - axp.setPowerOutPut(AXP192_DCDC1, AXP202_OFF); - axp.setPowerOutPut(AXP192_LDO2, AXP202_OFF); - axp.setPowerOutPut(AXP192_LDO3, AXP202_OFF); - axp.setPowerOutPut(AXP192_DCDC2, AXP202_OFF); - axp.setPowerOutPut(AXP192_EXTEN, AXP202_OFF); - - //! Do not turn off DC3, it is powered by esp32 - // axp.setPowerOutPut(AXP192_DCDC3, AXP202_ON); - - //Set the charging indicator to turn off - // axp.setChgLEDMode(AXP20X_LED_OFF); - - // Set the charging indicator to flash once per second - axp.setChgLEDMode(AXP20X_LED_BLINK_1HZ); - - - //! Use axp192 adc get voltage info - axp.adc1Enable(AXP202_VBUS_VOL_ADC1 | AXP202_VBUS_CUR_ADC1 | AXP202_BATT_CUR_ADC1 | AXP202_BATT_VOL_ADC1, true); - - float vbus_v = axp.getVbusVoltage(); - float vbus_c = axp.getVbusCurrent(); - float batt_v = axp.getBattVoltage(); - // axp.getBattPercentage(); // axp192 is not support percentage - Serial.printf("VBUS:%.2f mV %.2f mA ,BATTERY: %.2f\n", vbus_v, vbus_c, batt_v); - - - // Set-up modem reset, enable, power pins - pinMode(MODEM_PWKEY, OUTPUT); - pinMode(MODEM_RST, OUTPUT); - pinMode(MODEM_POWER_ON, OUTPUT); - pinMode(LED_GPIO, OUTPUT); - - digitalWrite(LED_GPIO, LOW); - digitalWrite(MODEM_PWKEY, LOW); - digitalWrite(MODEM_RST, HIGH); - digitalWrite(MODEM_POWER_ON, HIGH); - - // Set GSM module baud rate and UART pins - SerialAT.begin(115200, SERIAL_8N1, MODEM_RX, MODEM_TX); - delay(3000); - - // Restart takes quite some time - // To skip it, call init() instead of restart() - SerialMon.println("Initializing modem..."); - modem.restart(); - // Or, use modem.init() if you don't need the complete restart - - String modemInfo = modem.getModemInfo(); - SerialMon.print("Modem: "); - SerialMon.println(modemInfo); - - // Unlock your SIM card with a PIN if needed - if (strlen(simPIN) && modem.getSimStatus() != 3 ) { - modem.simUnlock(simPIN); - } -} - -void loop() -{ - bool res; - - SerialMon.print("Waiting for network..."); - if (!modem.waitForNetwork(240000L)) { - SerialMon.println(" fail"); - delay(10000); - return; - } - SerialMon.println(" OK"); - - // When the network connection is successful, turn on the indicator - digitalWrite(LED_GPIO, HIGH); - - if (modem.isNetworkConnected()) { - SerialMon.println("Network connected"); - } - - SerialMon.print(F("Connecting to APN: ")); - SerialMon.print(apn); - if (!modem.gprsConnect(apn, gprsUser, gprsPass)) { - SerialMon.println(" fail"); - delay(10000); - return; - } - SerialMon.println(" OK"); - - SerialMon.print("Connecting to "); - SerialMon.print(server); - if (!client.connect(server, port)) { - SerialMon.println(" fail"); - delay(10000); - return; - } - SerialMon.println(" OK"); - - // Make a HTTP GET request: - SerialMon.println("Performing HTTP GET request..."); - client.print(String("GET ") + resource + " HTTP/1.1\r\n"); - client.print(String("Host: ") + server + "\r\n"); - client.print("Connection: close\r\n\r\n"); - client.println(); - - unsigned long timeout = millis(); - while (client.connected() && millis() - timeout < 10000L) { - // Print available data - while (client.available()) { - char c = client.read(); - SerialMon.print(c); - timeout = millis(); - } - } - SerialMon.println(); - - client.stop(); - SerialMon.println(F("Server disconnected")); - - modem.gprsDisconnect(); - SerialMon.println(F("GPRS disconnected")); - - modem.sleepEnable(); - - delay(100); - - // test modem response , res == 0 , modem is sleep - res = modem.testAT(); - Serial.print("SIM800 Test AT result -> "); - Serial.println(res); - - delay(1000); - - Serial.println("Use DTR Pin Wakeup"); - pinMode(MODEM_DTR, OUTPUT); - //Set DTR Pin low , wakeup modem . - digitalWrite(MODEM_DTR, LOW); - - - // test modem response , res == 1 , modem is wakeup - res = modem.testAT(); - Serial.print("SIM800 Test AT result -> "); - Serial.println(res); - - -#ifdef TEST_RING_RI_PIN - // Swap the audio channels - SerialAT.print("AT+CHFA=1\r\n"); - delay(2); - - //Set ringer sound level - SerialAT.print("AT+CRSL=100\r\n"); - delay(2); - - //Set loud speaker volume level - SerialAT.print("AT+CLVL=100\r\n"); - delay(2); - - // Calling line identification presentation - SerialAT.print("AT+CLIP=1\r\n"); - delay(2); - - //Set RI Pin input - pinMode(MODEM_RI, INPUT); - - Serial.println("Wait for call in"); - //When is no calling ,RI pin is high level - while (digitalRead(MODEM_RI)) { - Serial.print('.'); - delay(500); - } - Serial.println("call in "); - - //Wait 10 seconds for the bell to ring - delay(10000); - - //Accept call - SerialAT.println("ATA"); - - //Let the call go on for 10 seconds and then shut down - delay(10000); -#endif - - SerialMon.println(F("Poweroff")); - modem.poweroff(); - - esp_sleep_enable_timer_wakeup(TIME_TO_SLEEP * uS_TO_S_FACTOR); - // esp_sleep_enable_ext1_wakeup(GPIO_SEL_33, ESP_EXT1_WAKEUP_ANY_HIGH); - - esp_deep_sleep_start(); - -} diff --git a/examples/Arduino_TinyGSM_AXP192/README.MD b/examples/Arduino_TinyGSM_AXP192/README.MD deleted file mode 100644 index a62685b..0000000 --- a/examples/Arduino_TinyGSM_AXP192/README.MD +++ /dev/null @@ -1,4 +0,0 @@ - -## Install the following dependency library files: -- [TinyGSM](https://github.com/vshymanskyy/TinyGSM) -- [AXP202X_Library](https://github.com/lewisxhe/AXP202X_Library) diff --git a/examples/Arduino_TinyGSM_AXP192/platformio.ini b/examples/Arduino_TinyGSM_AXP192/platformio.ini deleted file mode 100644 index cd2df19..0000000 --- a/examples/Arduino_TinyGSM_AXP192/platformio.ini +++ /dev/null @@ -1,27 +0,0 @@ -; PlatformIO Project Configuration File -; -; Build options: build flags, source filter -; Upload options: custom upload port, speed and extra flags -; Library options: dependencies, extra library storages -; Advanced options: extra scripting -; -; Please visit documentation for the other options and examples -; https://docs.platformio.org/page/projectconf.html - -[env:esp32dev] -platform = espressif32 -board = esp32dev -framework = arduino - -upload_port = COM157 -monitor_port = COM157 - -monitor_speed = 115200 -upload_speed = 2000000 - -lib_deps = - AXP202X_Library - TinyGSM - - - diff --git a/examples/Arduino_sim800/Arduino_sim800.ino b/examples/Arduino_sim800/Arduino_sim800.ino deleted file mode 100644 index 1c8054c..0000000 --- a/examples/Arduino_sim800/Arduino_sim800.ino +++ /dev/null @@ -1,145 +0,0 @@ -#include -#include -#include -#include -#include - -#define T_CALL - -#if defined(T_CALL) -#define UART_TX 27 -#define UART_RX 26 -#define SIMCARD_RST 5 -#define SIMCARD_PWKEY 4 -#define SIM800_POWER_ON 23 -#else -#define UART_TX 33 -#define UART_RX 34 -#define SIMCARD_RST 14 -#define SIMCARD_PWKEY 15 -#define SIM800_POWER_ON 4 -#endif - -#define UART_BANUD_RATE 9600 - -#define I2C_SDA 21 -#define I2C_SCL 22 - -#define IP5306_ADDR 0X75 -#define IP5306_REG_SYS_CTL0 0x00 - -HardwareSerial hwSerial(1); -GPRS gprs(hwSerial, SIMCARD_PWKEY, SIMCARD_RST, SIM800_POWER_ON); - -bool setPowerBoostKeepOn(int en) -{ - Wire.beginTransmission(IP5306_ADDR); - Wire.write(IP5306_REG_SYS_CTL0); - if (en) - Wire.write(0x37); // Set bit1: 1 enable 0 disable boost keep on - else - Wire.write(0x35); // 0x37 is default reg value - return Wire.endTransmission() == 0; -} - -void wifi_test() -{ - WiFi.mode(WIFI_STA); - WiFi.disconnect(); - int n = WiFi.scanNetworks(); - if (n == 0) { - Serial.println("no networks found"); - return; - } - Serial.println("Found " + String(n) + " networks"); -} - -void setup() -{ - Serial.begin(115200); - -#if defined(T_CALL) - Wire.begin(I2C_SDA, I2C_SCL); - bool isOk = setPowerBoostKeepOn(1); - String info = "IP5306 KeepOn " + String((isOk ? "PASS" : "FAIL")); - Serial.println(info); -#endif - - hwSerial.begin(UART_BANUD_RATE, SERIAL_8N1, UART_RX, UART_TX); - Serial.println("Setup Complete!"); - - wifi_test(); - - if (gprs.preInit()) { - Serial.println("SIM800 Begin PASS"); - } else { - Serial.println("SIM800 Begin FAIL"); - } - - Serial.println("Test motor ..."); - int i = 3; - while (i--) { - hwSerial.print("AT+SPWM=0,1000,1\r\n"); - delay(2000); - hwSerial.print("AT+SPWM=0,0,0\r\n"); - } - - delay(200); - - if (0 != gprs.init()) { - Serial.println("Not checked out to SIM card..."); - while (1); - } - - // Switch audio channels - hwSerial.print("AT+CHFA=1\r\n"); - delay(2); - hwSerial.print("AT+CRSL=100\r\n"); - delay(2); - hwSerial.print("AT+CLVL=100\r\n"); - delay(2); - hwSerial.print("AT+CLIP=1\r\n"); - delay(2); - Serial.println("Init success"); -} - -bool isCallIn = false; -void loop() -{ - if (hwSerial.available()) { - const char *s = hwSerial.readStringUntil('\n').c_str(); - if (strstr(s, "OK" ) != NULL) { - Serial.println("SIM OK"); - } else if (strstr(s, "+CPIN: NOT READY") != NULL) { - Serial.println("SIM +CPIN: NOT READY"); - } else if (strstr(s, "+CPIN: READY") != NULL) { - Serial.println("SIM +CPIN: READY"); - } else if (strstr(s, "+CLIP:") != NULL) { - Serial.printf("SIM %s\n", s); - } else if (strstr(s, "RING") != NULL) { - delay(200); - hwSerial.write("ATA\r\n"); - Serial.println("SIM RING"); - } else if (strstr(s, "Call Ready") != NULL) { - Serial.println("SIM Call Ready"); - } else if (strstr(s, "SMS Ready") != NULL) { - Serial.println("SIM SMS Ready"); - } else if (strstr(s, "NO CARRIER") != NULL) { - Serial.println("SIM NO CARRIER"); - } else if (strstr(s, "NO DIALTONE") != NULL) { - Serial.println("SIM NO DIALTONE"); - } else if (strstr(s, "BUSY") != NULL) { - Serial.println("SIM BUSY"); - } else { - Serial.print(s); - } - Serial.println("=========="); - } - - if (Serial.available()) { - String r = Serial.readString(); - hwSerial.write(r.c_str()); - } -} - - diff --git a/examples/Arduino_sim800/README.MD b/examples/Arduino_sim800/README.MD deleted file mode 100644 index 612bbdb..0000000 --- a/examples/Arduino_sim800/README.MD +++ /dev/null @@ -1,3 +0,0 @@ - -## Install the following dependency library files: -[SIM800_Library](https://github.com/lewisxhe/SIM800_Library) diff --git a/image/Product.jpg b/image/Product.jpg new file mode 100644 index 0000000..9f3b037 Binary files /dev/null and b/image/Product.jpg differ diff --git a/image/SIM800C_AXP192_SLEEP.jpg b/image/SIM800C_AXP192_SLEEP.jpg new file mode 100644 index 0000000..7225bee Binary files /dev/null and b/image/SIM800C_AXP192_SLEEP.jpg differ diff --git a/image/SIM800L_AXP.jpg b/image/SIM800L_AXP192.jpg similarity index 100% rename from image/SIM800L_AXP.jpg rename to image/SIM800L_AXP192.jpg diff --git a/image/SIM800L_AXP192_SLEEP.jpg b/image/SIM800L_AXP192_SLEEP.jpg new file mode 100644 index 0000000..62d3819 Binary files /dev/null and b/image/SIM800L_AXP192_SLEEP.jpg differ diff --git a/image/SIM800L_IP.jpg b/image/SIM800L_IP5306.jpg similarity index 100% rename from image/SIM800L_IP.jpg rename to image/SIM800L_IP5306.jpg diff --git a/image/deepsleep.jpg b/image/SIM800L_IP5306_SLEEP.jpg similarity index 100% rename from image/deepsleep.jpg rename to image/SIM800L_IP5306_SLEEP.jpg diff --git a/image/board.jpg b/image/board.jpg deleted file mode 100644 index aa5f053..0000000 Binary files a/image/board.jpg and /dev/null differ diff --git a/schematic/LilyGo-SIM800C-20200630.pdf b/schematic/LilyGo-SIM800C-20200630.pdf new file mode 100644 index 0000000..2a26728 Binary files /dev/null and b/schematic/LilyGo-SIM800C-20200630.pdf differ diff --git a/datasheet/TTGO_T-Call_SIM800_v1.3_schematic.pdf b/schematic/LilyGo-SIM800L-IP5306-20190610.pdf similarity index 100% rename from datasheet/TTGO_T-Call_SIM800_v1.3_schematic.pdf rename to schematic/LilyGo-SIM800L-IP5306-20190610.pdf diff --git a/datasheet/LilyGo-SIM800L-PMU-20200409.pdf b/schematic/LilyGo-SIM800L-PMU-20200409.pdf similarity index 100% rename from datasheet/LilyGo-SIM800L-PMU-20200409.pdf rename to schematic/LilyGo-SIM800L-PMU-20200409.pdf