Giter VIP home page Giter VIP logo

lilygo-t-sim7080g's Introduction

✨ LilyGO T-SIM7080G ✨

English | 中文

News

  • SIM7080G supports NB-IoT and Cat-M in global frequency bands, but does not support 2G/3G/4G. Please confirm that the SIM card used supports NB-IoT or Cat-M before use.
  • The SIM card must be inserted first before starting the SIM7080. If the SIM card is inserted after the SIM7080 is turned on, the modem will not be able to detect the SIM card.

1️⃣ Examples preview


examples 
├─AllFunction                   # Full function test example
├─BLE5_extended_scan            # Official BLE5 Example
├─BLE5_multi_advertising        # Official BLE5 Example
├─BLE5_periodic_advertising     # Official BLE5 Example    
├─BLE5_periodic_sync            # Official BLE5 Example
├─BIGIOT_Gnss_Upload            # Upload positioning coordinates to BIGIOT IOT,Timed wake-up consumes about 1.2mA
├─MinimalCameraExample          # Example of camera use
├─MinimalModemGPSExample        # SIM7080G GPS example
├─MinimalModemNBIOTExample      # SIM7080G NBIOT example
├─MinimalModemPowerSaveMode     # SIM7080G power maintenance example
├─MinimalModemSleepMode         # SIM7080G sleep example
├─MinimalModemUpgrade           # Upgrade SIM7080 built-in firmware
├─MinimalPowersExample          # Example of PMU
├─MinimalPowersCurrentExample   # Example of PMU charge current debug
├─MinimalSDCardExample          # Example of using SDCard
├─ModemMqttPulishExample        # MQTT Pulish Example            
├─ModemMqttsExample             # MQTTS Example    
├─ModemMqttSubscribeExample     # MQTT Subscribe Example     
├─SIM7080G-ATT-NB-IOT-AWS-MQTT  # MQTTS AWS By @bootcampiot
├─SIM7080G-ATT-NB-IOT-HTTP-HTTPS # HTTP/HTTPS  By @bootcampiot
└─SIM7080G-ATT-NB-IOT-SSL-Mosquitto # MQTTS Mosquitto By @bootcampiot

2️⃣ Quick Start

PlatformIO

  1. Install VisualStudioCode and Python
  2. Search for the PlatformIO plugin in the VisualStudioCode extension and install it.
  3. After the installation is complete, you need to restart VisualStudioCode
  4. After restarting VisualStudioCode, select File in the upper left corner of VisualStudioCode -> Open Folder -> select the LilyGo-T-SIM7080G directory
  5. Click on the platformio.ini file, and in the platformio column, cancel the sample line that needs to be used, please make sure that only one line is valid
  6. Click the (✔) symbol in the lower left corner to compile
  7. Connect the board to the computer USB
  8. Click (→) to upload firmware
  9. Click (plug symbol) to monitor serial output

ArduinoIDE

  1. Install ArduinoIDE
  2. Copy all the folders in the LilyGo-T-SIM7080G/lib directory to <C:\Users\UserName\Documents\Arduino\libraries>. If there is no libraries directory, please create a new one. Please note that you are not copying the lib directory, but copying the folders in the lib directory
  3. Open Arduino IDE -> Tools
  • Board -> ESP32S3 Dev Module
  • USB CDC On Boot -> Enable ## Note that you need to change Enable to Disable when USB is not connected, so USB CDC will not prevent the board from starting
  • CPU Frequency -> 240MHz
  • USB DFU On Boot -> Disable
  • Flash Mode -> QIO 80MHz
  • Flash Size -> 16MB(128Mb)
  • USB Firmware MSC On Boot -> Disable
  • PSRAM -> OPI PSRAM
  • Partition Scheme -> 16M Flash(3MB APP/9.9MB FATFS)
  • USB Mode -> Hardware CDC and JTAG
  • Upload Mode -> UART0/Hardware CDC
  • Upload Speed -> 921600
  1. Insert USB into the PC and click Upload <If the upload fails, see Tips>

3️⃣ Tips

  1. T-SIM7080 has two USB ports, the USB-C port is used to upload sketches and Serial output, and Micro-USB is used for SIM7080G firmware version upgrade
  2. ⚠ SIM7080G cannot connect to cellular network and GPS positioning at the same time
  3. Board integrated PMU (Power management chip), with short circuit and overload protection. By default,PWRKEYneeds to be pressed for 6 seconds to turn off the board power supply, and pressPWRKEYfor 128 milliseconds to turn on the power supply. If you need to modify the power off pressing time, please refer toMinimalPowersExample
  4. If the charging function is required, thePMU TS Pindetection function needs to be turned off. By default, there is no NTC sensor on the board, so the TS Pin detection needs to be disabled before the charging function can be used normally. If theTS Pindetection function is not turned off, the PMU charging indicator will flash after the battery is inserted, and charging will be disabled
  5. The board VSYS is the internal 5V boost output of the PMU, which can only be output but not input. Please do not connect an external power supply load greater than 500mA
  6. The DC5 power supply voltage can be adjusted, and the maximum output current should not exceed 1A 5.DC1 is the core power supply voltage, and the default output is 3.3V. Please do not adjust the DC1 voltage through software
  7. When the sketch cannot be uploaded, please press and hold the BOOT button on the board, and then insert the USB. At this time, you should be able to see the port in the device manager of the computer, and then click Upload Sketch again
  8. When the power supply channel of the ESP32S3 is closed incorrectly, please insert USB, and then press and hold the BOOT button of the board, and then press and hold the PWRKEY button. At this time, the board enters the download mode, and the sketch can be uploaded normally
  9. If the power supply of the board cannot be turned on when the battery is connected, please check that the mechanical switch beside the USB is turned toON, and then press the board PWR for 2 seconds. At this time, the board should start to work
  10. The range of solar input voltage is 4.4~6V. Please select an appropriate solar panel and set the maximum charging current as 500mA
  11. If the camera is not connected, all IO ports are available. If the camera is used, the board has only GPIO45 and GPIO46 is idle
  12. T-SIM7080G uses Octal SPI PSRAM, so GPIO35~GPIO37 is unavailable. Please do not use these IOs
  13. Please understand the risks to be faced before changing the voltage of peripherals, otherwise do not try to change the voltage of cameras and other on-board devices, which may cause permanent damage
  14. Please do not turn off the BLDO1 power supply, otherwise ESP32S3 and SIM7080G cannot communicate normally
  15. Please check the Operating Instructions for updating the built-in firmware of the modem. Generally, upgrading the firmware is not recommended
  16. The board uses USB as the JTAG upload port. When printing serial port information on USB_CDC_ON_BOOT configuration needs to be turned on. If the port cannot be found when uploading the program or the USB has been used for other functions, the port does not appear. Please enter the upload mode manually.
    1. Connect the board via the USB cable
    2. Press and hold the BOOT button , While still pressing the BOOT button, press RST
    3. Release the RST
    4. Release the BOOT button
    5. Upload sketch

4️⃣ Where to buy:

  1. AliExpress
  2. LilyGo Store

5️⃣ Pins:

Camera PWDN Reset XCLK SDA SCL VSYNC HREF PCLK
GPIO N/A 18 8 2 1 16 17 12
Camera D9 D8 D7 D6 D5 D4 D3 D2
GPIO 9 10 11 13 21 48 47 14
  • If you do not use a camera, you can freely allocate IO ports here. Assuming you need to allocate I2C, please use the display to call Wire and pass the required IO ports, such as
    int sda = 13;  // You can also use other IO ports
    int scl = 21;  // You can also use other IO ports
    Wire.begin(sda,scl)
    
Modem PWR RXD TXD RI DTR
GPIO 41 4 5 3 42
PMU SDA SCL IRQ
GPIO 15 7 6
SDCard CMD CLK DATA
GPIO 39 38 40

Power domain

Modem Camera ESP32S3 SDCard Level conversion
DC3/BLDO2(GPS) ALDO1/ALDO2/ALDO4 DC1 ALDO3 BLDO1

lilygo-t-sim7080g's People

Contributors

bfreak avatar bootcampiot avatar lewisxhe avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

lilygo-t-sim7080g's Issues

Use of camera connector

Good day,

Apparently there is a camera connector, I would like a link to what camera could be connected, and I would be more interested to connect i.e. an OLED screen . I could solder connect an i2c screen but using the existing connector would be more convenient.

Using 7080G with Hologram.io

Maybe this is common knowledge, I'm not sure because I'm new to this. But I finally got this module to work with Hologram.io by doing the following:

In the example MinimalModemNBIOTExample.ino

You have to first register the APN information BEFORE trying to connect so make sure this code happens first below

//If you do not know APN, please consult the operator or comment out this code //comment start const char *apn = "hologram"; modem.sendAT("+CNCFG=0,1,\"", apn, "\""); if (modem.waitResponse() != 1) { Serial.println("Config apn Failed!"); return; } //comment end ..

simcom 7080 link quality variance from board to board

I have a batch of 6 board where 4 are working fine and 2 of them are having issues to connect to the network.

when they connect ... I see a poor signal (AT+CSQ is reporting 19,99 which means belo -100dBm ... very low signal)
the other boards (in the same spot of my room, using the exact same antenna from the lilygo kit) work fine with a signal of about -70dBm

I tried to swap the antenna with one of a working board but the result is the same, very poor signal.

==
I do not see anything special on the schematic (just to 0-ohm resistor to the uFL connector) and the PCB seems done very well to me, with a proper shielding on the RF antenna connection.

  1. is this an issue on the SIMCOM firmware?
  2. is there anyone seeing the same variability of RF signal from board to board ?

Set charging current limit has no effect

Hi Lewis!

Thank you for your good work in developing the AXP libraries. I would love to get the LilyGo SIM7080G module up and running exactly as it was possible when using the SIM800L with the AXP192

The ESP32 with SIM800 and AXP192 is showing perfect operation:

-> 100mA is set and in total ca. 180mA seen on LabPSU (must be 100mA charging current and rest accounts for the ESP to keep everything below 250mA.

But when using the same battery with the SIM7080G and also set 100mA for charging current, the drawn power is always seen as 500mA (except in the end when it is nearly charged, the drawn current drops.)

I also tried to set precharge current and termination current to 0mA -> without success.

Issue could not get resolved by switching off unused powerlines as per below:

Modem 2700~3400mV VDD
PMU.setDC3Voltage(3000);
PMU.enableDC3();

Modem GPS Power
PMU.setBLDO2Voltage(3300);
PMU.enableBLDO2();

DC1 is left untouched

switched off unused powerlines
PMU.disableDC2();
PMU.disableDC4();
PMU.disableDC5();

PMU.disableALDO1(); // CAM 
PMU.disableALDO2(); // CAM
PMU.disableALDO3(); // SDCARD
PMU.disableALDO4(); // CAM
PMU.disableBLDO1(); // ???

PMU.disableCPUSLDO(); // ???
PMU.disableDLDO1(); // ???
PMU.disableDLDO2(); // ???

The current is set to be limited to 100mA via
PMU.setChargerConstantCurr(XPOWERS_AXP2101_CHG_CUR_100MA)

Confirmed via:
uint8_t val = PMU.getChargerConstantCurr();

But still the drawn current is seen as ca. 500 mA when the battery is NOT charged.
When a full charged battery is connected, the current of the entire ESP32S3 is seen at 70mA total.

Lewis, could you please confirm if the charging current in xpowers_axp2101_chg_curr_t are working for you?

Many thanks, greetings! Peer

No ">" prompt following +CASEND after wakeup from sleep (DRX)

My project is based on MinimalModemNBIOTExample. I am transmitting a ~28 byte UDP datagram every 60s and I want the modem to sleep. I am using DRX as opposed to eDRX or PSM due to future requirements.I added some UDP code (as that is not supported by TinyGSM), set +SCLKC=1 and I'm controlling DTR. The code was compiled with (-DARDUINO_USB_CDC_ON_BOOT=0) and the board is connected to a wall power supply. No UART connection.

In the setup function I acquire NB-IOT, register and open a UDP connection.

Here is my loop function and a modifed TinyGsmSim7080::modemSend :

 int16_t modemSend(const void* buff, size_t len, uint8_t mux) {

    while(waitResponse(5,GF(">")) != 1) {
      sendAT(GF("+CASEND="), mux, ',', (uint16_t)len);
    }

    stream.write(reinterpret_cast<const uint8_t*>(buff), len);
    stream.flush();

    // OK after posting data
    if (waitResponse() != 1) { return 0; }

    return len;
  }

void loop()
{
    static int cnt = 0;
    long t0 = millis();
    // pull DTR low in case we were sleeping
    digitalWrite(BOARD_MODEM_DTR_PIN, LOW);
    // send UDP datagram
    modem.modemSend(msg.c_str(), msg.length(), 0);
    // get to rrc idle asap
    modem.sendAT("+CRAI=1");
    modem.waitResponse(5);
    // we can go back to sleep now
    digitalWrite(BOARD_MODEM_DTR_PIN, HIGH);
    Serial.printf("\n\r--------------  SLEEP AFTER %d --------------\n\r", millis() - t0);
    delay(60000);
}

When I call +CASEND immediately after wakeup there is no ">" prompt in the modem serial stream. I added retries in the modemSend method and with a timeout of 5ms it takes 3 tries to get a ">" prompt. This results in an awake time of ~24ms instead of an ideal ~15ms. When increasing the waitResponse timeout to 50ms I would expect the number of tries to go down but it remains between 1 and 3 tries for an awake time of 65-117ms.

Another workaround is to add a 300ms delay after pulling DTR low but the impact on awake time is unacceptable.

Am I doing anything wrong or have others come across this issue?

Log :

AT+CPSI?
+CPSI: LTE NB-IOT,Online,310-260,0xF300,7573966,450,EUTRAN-BAND4,2038,0,0,-11,-98,-87,13
OK

AT+CSCLK=1
OK
AT+CACLOSE=0

AT+CACID=0
OK

AT+CAOPEN=0,0,"UDP","<IP>",<PORT>
OK

AT+CASEND=0,26
>012345678 UDP test Count 0 
OK
AT+CRAI=1
OK

--------------  SLEEP AFTER 21 ms --------------
AT+CASEND=0,26
AT+CASEND=0,26
AT+CASEND=0,26
>012345678 UDP test Count 1 
OK
AT+CRAI=1
OK
--------------  SLEEP AFTER 32 ms --------------
AT+CASEND=0,26
AT+CASEND=0,26
AT+CASEND=0,26
>012345678 UDP test Count 2 
OK
AT+CRAI=1
OK
--------------  SLEEP AFTER 32 ms --------------
.....

GPS example not working properly

I'm using the T-SIM7080G board with nothig attached to the external gpio, only the board itself with the usbc cable.

I'm testing the tiny gsm example "as is" (fixed the define for the PMU which was changed recently)

I'm facing the same issue described here:
Xinyuan-LilyGO/LilyGO-T-SIM7000G#98

===
In my case (7080, example from this repo as-is)

  1. I'm in open air
  2. I run the example once and I got almost immediate GPS link (!)
  3. reset the board .. does not get a link anymore.
    :-(

I've re-flashed the board with the same example code a couple of times ... but nothing.

The code seems to loop forever searching on the "AT+CGNSINF".

===
any idea how to debug this?
is there anything written permanently in the simcom device which stops the GPS for finding the link the second time we run the example?

===
was the example tested with the current mainline?

LilyGo-T-SIM7080G won't turn-on with battery only

Dear community,

I am facing an issue with LilyGo-T-SIM7080G when connected to battery as only power source.
When battery is connected I am not able to turn-on the board.
I've tried ready this:

"If the power supply of the board cannot be turned on when the battery is connected, please check that the mechanical switch beside the USB is turned to ON, and then press the board PWR for 2 seconds. At this time, the board should start to work".

This does not help at all. Board does not want to turn on.

However, whenever I turn-on the board using USB-C power, and later unplug power from USB-C, board will stay on using battery power source. Whenever I turn off the board and try to start with only battery source connected, board will not turn-on. I always need to "jump start" using usb-c power.

I would appreciate your support.
Thank you.

MQTT Subscription fails when payload > 1024 characters

I'm connecting to AWS IoT Core to pub/sub to the MQTT broker and it all works fine until I attempt to subscribe to a topic that receives a payload larger than 1024 characters. The payload never arrives and all subsequent payloads (ones less than 1024 characters) fail to be received. I've tried setting #define TINY_GSM_RX_BUFFER 2048 and modem.sendAT("+SMCONF="MESSAGE", 2048"), but neither has resolved the issue.

The 7080g documentation doesn't indicate there's a character limit for subscribe, but mentions the max payload size for publish is 1024 characters.

So my question is, is it possible to subscribe to a topic that has payloads of larger than 1024 characters or do I need to send multiple payloads?

issue on PMU ADC on/off after XPowers library update

There was an update to the XPowers library in commit :
Update XPowersLib

before this update I was used to measure the battery level in my loop by turning on/off "manually" the ADC with the calls:
// Enable internal ADC detection
PMU.enableBattDetection();
PMU.enableVbusVoltageMeasure();
PMU.enableBattVoltageMeasure();
PMU.enableSystemVoltageMeasure();

and the counter part:
PMU.disableBattDetection();
PMU.disableVbusVoltageMeasure();
PMU.disableBattVoltageMeasure();
PMU.disableSystemVoltageMeasure();

Basically I was turning on ADC, do the measure, turn off ADC, like this:

loop()
{
(...)
pmuSetAdcON();
vbat = PMU.getBattVoltage();
vbus = PMU.getVbusVoltage();
pmuSetAdcOFF();
(...)
}

===
ISSUE: after the library update this does not work anymore.
It work correctly the very first time in the loop, but all the next probe event (in the same loop) are always reporting the same meaure .. not updating with the correct values.

This was working just fine before the update ..

any idea about fixing this use case?

thanks

I can't connect to the GPRS network

I'm trying to test the MinimalModemNBIOT example but for some reason after I correctly configured the APN, the only message I get is the one below.

OK
AT+CGREG?

+CGREG: 0,2
I am powering the board directly from the usb of my laptop. I tried the GPS test and it worked correctly but when I try to test the GPRS test it can't connect, I already tried with different operators and sim cards and the result is the same.
WhatsApp Image 2023-08-26 at 2 33 37 PM

hw flow control ?

Seeing the board schematic (not just RXD/TXD connected between esp and sim7080 but also DTR and RI) I would guess hardware flow control is possible.
However, I can't seem to find the right settings and they're not (I think) in any of the examples.

How should we set them ?

Turn on BLE 5.0

Hi, do you have the example code (platformio) to turn on BLE 5.0 on this module?

ATT NBIOT Card Registration Issue

Hi, I inserted an ATT NBIOT SIM card on 7080G and program the example code "MinimalModemNBIOTExample" through Platformio, whereas, the console port I saw continuously repeat the messages as below:

OK
AT+CGREG?

+CGREG: 0,2

OK
.AT+CEREG?

+CEREG: 0,2

OK
AT+CGREG?

+CGREG: 0,2
........

These messages keep repeating and won't stop, is it normal ? The Blue LED close to CHD keeps blink as well, what does it mean?

In addition, according to ATT NBIOT doc, ATT NB-IoT devices should be setup to use APN "m2mNB16.com.attz", where shall I put it inside the code, line 53 in the code says the APN there is for GPRS.

deviceCert and devicePrivateKey convert error

Hi, I am trying to use rootCA, device cert and private key to register on AWS MQTT. Below is part of my code running on Platformio.

writeCaFiles(3, "rootCA.crt", AWS_CA, strlen_P(AWS_CA));
writeCaFiles(3, "deviceCert.crt", AWS_CRT, strlen_P(AWS_CRT));
writeCaFiles(3, "devicePrivateKey.key", AWS_PSK, strlen_P(AWS_PSK));

modem.sendAT("+CSSLCFG=\"CONVERT\",2,\"rootCA.crt\"");
if (modem.waitResponse() != 1)
{
    Serial.println("Convert rootCA.crt failed!");
}

modem.sendAT("+CSSLCFG=\"CONVERT\",1,\"deviceCert.crt\"");
if (modem.waitResponse() != 1)
{
    Serial.println("Convert deviceCert.crt failed!");
}
modem.sendAT("+CSSLCFG=\"CONVERT\",1,\"devicePrivateKey.key\"");
if (modem.waitResponse() != 1)
{
    Serial.println("Convert devicePrivateKey.key failed!");
}

I can see three certs were well downloaded
OK
Writing:1680 overage:0
Wirte done!!!
AT+CFSTERM

Whereas the covert process showed OK only to rootCA certs but failed on deviceCert and devicePrivateKey, any idea about these errors?

AT+CSSLCFG="CONVERT",2,"rootCA.crt"
OK

AT+CSSLCFG="CONVERT",1,"deviceCert.crt"
ERROR
Convert deviceCert.crt failed!

AT+CSSLCFG="CONVERT",1,"devicePrivateKey.key"
ERROR
Convert devicePrivateKey.key failed!

ESP32 does not come out of deep_sleep when running on battery

I'm testing the LilyGo-T-SIM7080 for deep_sleep mode and it seems that there is an issue.

I'm using a simple loop

void loop()
{
esp_sleep_enable_timer_wakeup(5 * ONESEC_USECS);
LOG_MSGLN("Entering deep sleep\n");
esp_deep_sleep_start();
}

  1. if I power the device using the USB connector I can see the device going in deep_sleep and rebooting every 5 secs
  2. if I power the device from battery I can see the first boot, then it goes in deep sleep ... but it will never come back.

it seems to me that there is some issue with the PMU not providing 3.3v when going in deep sleep and running from battery.

note: my LiPo battery is fully charged at 4.1v

EDIT: the issue shows up only if I use an instrument to measure current from the battery. If I connect the battery without ammeter in the middle everything seems to work fine.

`_modem.getModemName()` returns ` AT+GMM SIMCOM SIM7080`

AT+GMM is prepended because the parsing logic is wrong in TinyGsmClientSIM70xx.h

AT Debug output:

>> AT+GMM
<< AT+GMM
<< SIMCOM_SIM7080

The following code can be used as a workaround:

_modem.sendAT("+GMM");
_modem.waitResponse("AT+GMM");
_modem.stream.readStringUntil('\n');
String model = _modem.stream.readStringUntil('\n');
model.trim();
model.replace("_", " ");

Use Bluetooth as console port

Hi, Lewis,

I know it is not supported to upload firmware to this module through Bluetooth but do you have the example code to use Bluetooth as console port?

Thanks,

Jun

External battery stopped working

I put in the external battery, I turned on the side switch, pressed PWR for 2 secs and I was able to take a photo to document this.
Then after I tried to put the device with the battery in the box, the device stopped working. There was a smell of burning, although the box is made of plastic and there was no shorting at all.
Now the board doesn't power from the battery anymore.
How do I figure out if this is recoverable?
Thanks

BL as console port

Hi, I saw there 4 of BLE5 example codes there, I am considering to connect SIM7080G module through the Bluetooth connectivity as console port to upload my compiled image, and monitor the printout info on my Macbook instead of serial USB cable, can you advise which example is best for my case ? I am using Platformio as the dev tools.

Thanks,

Jun

MQTT Publish Issues

Hi,

I found ModemMqttPulishExample the snprintf format below was not aligned with the parameters definition of SMPUB in SIMCOM MQTT application documentation, username, clientID and data_channel are not required here.

// AT+SMPUB=<topic>,<content length>,<qos>,<retain><CR>message is enteredQuit edit mode if messagel ength equals to <contentlength>
snprintf(buffer, 1024, "+SMPUB=\"v1/%s/things/%s/data/%d\",%d,1,1", username, clientID, data_channel, payload.length());

I am trying to construct below SMPUB to publish topic "device_connect" to AWS IOT Core, but saw "ERROR" response and no data arrived at AWS IOT Core.

snprintf(buffer, 1024, "+SMPUB="%s",%d,1,1", pub_topic.c_str(), payload_rtcMem.length());
(output is AT+SMPUB="$aws/things/xxxxxxxxx/event_type/device_connect",339,1,1)
modem.sendAT(buffer);
modem.stream.write(payload_rtcMem.c_str(), payload_rtcMem.length());

{payload}

ERROR

What are the pins for SDA and SCL ?

What re the pins for SDA and SLA if we don't use camera ?

We found below list in the readme but not quite understood what it means.


Camera | PWDN | Reset | XCLK | SDA | SCL | VSYNC | HREF | PCLK
GPIO | N/A | 18 | 8 | 2 | 1 | 16 | 17 | 12
Camera | D9 | D8 | D7 | D6 | D5 | D4 | D3 | D2
GPIO | 9 | 10 | 11 | 13 | 21 | 48 | 47 | 14

Wake up esp from modem after exiting PSM

Hello, I try to use PSM mode and wake-up esp using RI pin (gpio 03 in esp). Unfortunately signal from a modem come randomly. Modem wakes up from PSM and status led turn on regulary.
How to properly wake up the esp from the modem after exiting PSM mode?
My modem configuration:

AT+CFGRI=1
AT+CURCCFG="QUALCOMM",1
AT+CURCCFG="SMS",1
AT+CURCCFG="SYS",1
AT+CURCCFG="TCPIP",0
AT+CURCCFG="NETWORK",0
AT+CPSMSTATUS=1
AT+CPSMS=1,,,"10100010","00000011"

please clarify 24/7 operation with solar and PMU

It is not clear to me how the device can sustain 24.7 (i.e. continuous) working conditions using the batter and a solar panel.

If I understand correctly the behavior of the PMU if we enter the condition where there is no sun for a long time and the battery goes to the minimum level the device will shut down.

at this point how do we return to functionality ?

  • the PMU will not turn ON if we do not press the BOOT button
  • the battery is not charging if the PMU is not turned ON
  • if the battery is low ... none of the above will work.

===
Suppose this is a remote sensor .. how do we guarantee that the device will turn ON when the sun comes back?

what am I missing?
:-)

how to set the PMU dfault state

I;m using T7080 on a prject that does not need to send data very often and so I disable the modem all the time.

I disable the modem via PMU call, do the sensing part and put the ESP32 in deep sleep.

When the ESP32 is waking up ... the PMU always turn on the modem power, and I need to turn it off immediately.
This is sort of ok .. but I would like to avoid the current spike I get due to the modem turning on for few ms before I shut it down.

is it possible to set the PMU "default state" so that I decide which of the power rails are set?

thanks

Couldn't upload a sketch

I bought a new board but I failed to get started with it. First I installed the USB driver on Windows 11 PRO in safe mode because the drivers were not signed and then I tried to upload a sketch to the ESP32 but every time I tried I failed, also I tried any combination of USB-serial ports with different speeds and boot/rest buttons. I have to mention that AT commands are working.
Does anyone know what is a problem?

Screenshot 2024-04-06 190727

USB/Serial drivers:
Screenshot 2024-04-06 191806

AT commands:
Screenshot 2024-04-06 192117

Output from a PlatformIO on the monitor panel when I directly connected to TX/RX pins through the USB-Serial dongle on the VBox Ubuntu OS:

Screenshot 2024-04-07 110556

PMU failure after some time

I have n.5 units that I was testing in 24/7 mode and one unit failed today.

it was charging the battery (which is now full) but when I checked the board it was "warm" and it is not powering up anymore.
even if I press the power-on button I do not see the 3.3v coming up ... and I do have now 5v from USB (I removed the battery)

how to debug this? how to check if the pmu is dead?

thanks

LilyGo-T-SIM7080G power consumption in deep sleep

What about your measurement?
It is very high.

At switch-on (PMU is still off) the current drawn is already 240uA.
Pressing button PWRKEY to start my ESP32s3 firmware, which simply goes into deep sleep turning off all unused PMU outputs, the current draw increases to 1.2mA.
Thanks.

firmware.map

LilyGo-T-SIM7080G-master/.pio/build/t-camera-sim7080/firmware.map: No such file or directory
collect2.exe: error: ld returned 1 exit status
*** [.pio\build\t-camera-sim7080\firmware.elf] Error 1

The battery has stopped working

Hi, after several days of testing a code and battery life, it turns out that this morning the battery-only power supply stopped working and I don't understand why.

I'm compiling with these options!

image

I've taken measurements with the multimeter and I can see that the PMU is getting 4.1V.

I've measured all the resistors in the schematic and they give the correct value.

When I run the code connected to the usb cable it works correctly, but as soon as I remove it the device switches off.

The power button works correctly, because when it is powered by usb I press it for X seconds and the device turns off.

I run the following code MinimalPowersExample to see if the PMU is OK and it returns the following result.

image

Can someone help me, thanks

how to setup PMU to use PWRON as ENABLE signal ?

I added a request also on the repo for XPowers library. From the spec of AXP2101 PMU it is possible to use the PWRON pin as an EN signal, without the need of pressing the button.

please help in understanding how to configure registers so that the board can be powered on this way, meaning simply using a voltage level for on/off operation for use cases where there is no "human intervention" (like a solar powered device in the field)

thanks

Power button multi usage

Good day,

I would like to keep using the power button on / off functionality, and also use the button to i.e. turn on an oled screen. Per example 4s press to turn off, 2s press to turn on, and short press to catch specific code. I see there is interrupt available but if my use case is possible, could I have a short code example ?

Can not connect to serial monitor in arduino

Hi,

While i can upload a sketch, by holding boot btn, i can not get serial output:
Port monitor error: command 'open' failed: Invalid serial port. Could not connect to COM5 serial port.
on Windows 10!
Arduino IDE: 2.1.0
image

When in upload mode i see this in the serial monitor (COM5):

16:58:35.414 -> ESP-ROM:esp32s3-20210327
16:58:35.414 -> Build:Mar 27 2021
16:58:35.414 -> rst:0x15 (USB_UART_CHIP_RESET),boot:0x20 (DOWNLOAD(USB/UART0))
16:58:35.414 -> Saved PC:0x40041a7c
16:58:35.414 -> waiting for download
17:01:21.247 -> ESP-ROM:esp32s3-20210327

Any help would be appreciated!

Thanks, W.

EnableGPS failed after sending AT command

Hi Team,

I am facing an issue with MinimalModemGPSExample.ino example.

When trying to change GNSS accuracy to Only High Accuracy If I change to code inside #if 0 block into:

#if 1
    /*
    ! GNSS Work Mode Set
     <gps mode> GPS work mode.
        1 Start GPS NMEA out.
    <glo mode> GLONASS work mode.
        0 Stop GLONASS NMEA out.
        1 Start GLONASS NMEA out.
    <bd mode> BEIDOU work mode.
        0 Stop BEIDOU NMEA out.
        1 Start BEIDOU NMEA out.
    <gal mode> GALILEAN work mode.
        0 Stop GALILEAN NMEA out.
        1 Start GALILEAN NMEA out.
    <qzss mode> QZSS work mode.
        0 Stop QZSS NMEA out.
        1 Start QZSS NMEA out.*/

    //GNSS Work Mode Set GPS+BEIDOU
    modem.sendAT("+CGNSMOD=1,1,0,0,0");
    modem.waitResponse();


    /*
    GNSS Command,For more parameters, see <SIM7070_SIM7080_SIM7090 Series_AT Command Manual> 212 page.
    <minInterval> range: 1000-60000 ms
     minInterval is the minimum time interval in milliseconds that must elapse between position reports. default value is 1000.
    <minDistance> range: 0-1000
     Minimum distance in meters that must be traversed between position reports. Setting this interval to 0 will be a pure time-based tracking/batching.
    <accuracy>:
        0  Accuracy is not specified, use default.
        1  Low Accuracy for location is acceptable.
        2 Medium Accuracy for location is acceptable.
        3 Only High Accuracy for location is acceptable.
    */
    // minInterval = 1000,minDistance = 0,accuracy = 0
    modem.sendAT("+SGNSCMD=2,1000,0,3");
    modem.waitResponse();

    /*
    // Turn off GNSS.
    modem.sendAT("+SGNSCMD=0");
    modem.waitResponse();
    */
    
#endif
    delay(500);

    // GPS function needs to be enabled for the first use
   while(1) {
      if (modem.enableGPS() == false) {
          Serial.print("Modem enable gps function failed!!");
          delay(5000);
      } else {
        break
      }
    }

Then modem.enableGPS() often failed. I added the code to retry to enableGPS but sometimes it works and even if it works it takes long time to wait.

Is there any suggestion to fix this problem?

Thanks in advance!

Device not in Verizon's DMD. Unable to activate.

The product specs says that this device is certified to be on the Verizon cellular network but the device IMEI is not in Verizon's DMD (Device Management Database). Device manufacturers need to upload the IMEIs of certified devices so that they can be activated on the Verizon cellular network.

Here are the details for how to do that. See Section 4: https://opendevelopment.verizonwireless.com/content/dam/opendevelopment/pdf/OpenAccessReq/OD_Certification_Process_v33.pdf

Manually selecting an operator fails

Both with CAT-M and NB-IOT, if I select an operator, for example like that:

> AT+COPS=?
+COPS: (1,"F SFR","SFR","20810",9),(2,"F-Bouygues Telecom","BYTEL","20820",7),,(0,1,2,3,4),(0,1,2)

> AT+COPS=1,2,20810
ERROR
> AT+COPS=1,0,"F SFR",7
ERROR

It always fails with ERROR.

Only AT+COPS=0 works.

The problem is that I would like to select the operator because I need to exclude one (which is blocking my IoT provider).

Please let me know how I can select the operator.

Twilio NB-IOT sim card not registering

Having trouble getting the MinimalModemNBIOTExample project to work.

I have made sure to activate this sim card within my Twilio account. I have changed the APN to iot.nb according to Twilio's docs.

const char *apn = "iot.nb";

My console initalizes everything properly, but my CGREG and CEREG start out 0,2 for a few tries. Then both are 0,0 for as long as I allow it to run.

This is my first SIM card project. Where do I need to start troubleshooting?

CONSOLE:

Modem started!AT+CPIN?
AT+CPIN?
+CPIN: READY

OK
AT+CNMP=2
AT+CNMP=2
OK
AT+CMNB=2
AT+CMNB=2
OK
AT+CMNB?
AT+CMNB?
+CMNB: 2

OK
AT+CNMP?
AT+CNMP?
+CNMP: 2

OK
getNetworkMode:2 getPreferredMode:2
AT+CEREG?
AT+CEREG?
+CEREG: 0,2

OK
AT+CGREG?
AT+CGREG?
+CGREG: 0,2

OK
.AT+CEREG?

SMS Ready
AT
AT+CEREG?
+CEREG: 0,2

OK
ATE0
AT
OK
AT+CMEE=0
ATE0
OK
AT+CLTS=1

OK
AT+CBATCHK=1

OK
AT+CPIN?

OK

+CPIN: READY

OK
AT+CGREG?

+CGREG: 0,2

OK
.AT+CEREG?

+CEREG: 0,0

OK
AT+CGREG?

+CGREG: 0,0

OK
.AT+CEREG?

+CEREG: 0,0

^^^^ LAST MESSAGE REPEATS FOREVER

No external power supply possible

Am I correct in the assumption that it is not possible to power the board with an external power supply other than the USB port? There is no pin assigned to VBUS on the header and DC1, DC5 and VSYS pins are only outputs, rights?

3D cad files

Hello,
Is it possible to share the 3D cad files of this board?
Thank you!

I2C conflict between PMU and I2C Sensor

Hi,

I found an I2C conflict between PMU and I2C sensor. If I give Wire.begin(sda,scl) for MPU6050 sensor ahead of PMU.begin(Wire, AXP2101_SLAVE_ADDRESS, I2C_SDA, I2C_SCL), it reported PMU failed to initialize, if I put Wire.begin(sda,scl) after PMU.begin(), it reports MPU6050 failed to find.


int sda = 13; // You can also use other IO ports
int scl = 21; // You can also use other IO ports
Wire.begin(sda,scl)

USB connection error

After the board was active for a few days, constantly connected to USB and on battery, the board stopped responding to the serial connection.
At the moment the LED lights up when connected to USB and is also recognized on the PC, but the serial connection does not work.
I've already carried out tests on other computers with different operating systems, but even when connected, it doesn't respond to USB.

AWS MQTT Access

Hi, do you have examples to access AWS MQTT through the RootCA, device cert and private key ?

where to get IIC pin

I would like to connect an external I2C device but it is not clear to me where we can get the same IIC_SDA IIC_SCLK that is used for the PMU. Which pin should we use for electrical connection to the system I2C bus?

`AT+COPS=?` => `ERROR`

I have played with the Lilygo and the examples today to test LTE-M / NB-IOT in France, but after a while and many unsuccessful attempts, the modem is now unable to scan any networks:

AT+COPS=?
ERROR

Tries with another SIM card, same issue.

Is there a way to "reset" the board or to fix that ?

Thanks.

PWRKEY PIN

Hi,

What is the PWRKEY pin ? 7080G pinout tells GPIO41 for PWR, is it correct one?

I expect to set the PSM mode and wake up the modem by pulling LOW from HIGH, but I read the status of that PIN is always LOW.

Thanks,

Jun

RTC_GPIO for SDA and SCL

Hi,

I want to wake up 7080G from deep sleep by a I2C device (MPU6050), per the description of deep sleep on ESP32, MPU6050 INI PIN used to wake up shall be RTC_GPIO, can you tell what are the RTC_GPIO pins on LilyGo-T-SIM7080G ?

Thanks,

Jun

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.