Xinyuan-LilyGO / LilyGO-T-SIM7000G

LilyGO T-SIM7000G
https://pt.aliexpress.com/item/4000542688096.html
283 stars 123 forks source link

T-SIMCAM+SIM7000E just gives me errors on start (first time use) #245

Open RogerParkinson opened 9 months ago

RogerParkinson commented 9 months ago

I'm doing something wrong here but no idea what. I have a T-SIMCAM board with a PCIE-SIM (SIM7000E) plugged into it. Initially I flashed a program to the T-SIMCAM and got it sending pictures across a WIFI link. All good, everything working. Next I want to try the SIM7000 so I tried flashing the TinyGSM_Allfunctions. I have a valid SIM card in the slot (and it works on my phone). I had to edit the sample at line 116 because my compiler doesn't like 'while (result != "OK")' I am using Arduino IDE 1.8.16 Then I flashed the board. On my serial monitor all I see is this:

[642] Wait...
ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0x8 (TG1WDT_SYS_RST),boot:0x2a (SPI_FAST_FLASH_BOOT)
Saved PC:0x40377b55
SPIWP:0xee
mode:DIO, clock div:1
load:0x3fce3808,len:0x44c
load:0x403c9700,len:0xbe4
load:0x403cc700,len:0x2a68
entry 0x403c98d4
E (28) gpio: gpio_set_level(226): GPIO output gpio_num error

it repeats over and over. None of the LEDs light up (except the blue power LED on the T-SIMCAM board). Based on the 'Wait...' in the log I figure it is failing at the SerialAT.begin... on line 101. It looks like my modem is just dead on arrival (this is the first attempt to use it). Any ideas? Did I screw up something? Also, the SIMCAM came with a couple of tiny screws that look like they are supposed to screw the SIM7000 onto a pair of brass posts, but they are too narrow for the holes in the posts. It looks like the SIM7000 is making contact, ie the contacts it plugs into seem firm. It does want to flip up but I can hold it down with a finger anyway, which makes no difference to the above behaviour. I'm puzzled about the screws through. Thanks for any help Roger

RogerParkinson commented 9 months ago

I made some progress. First, the question about the screws was dumb. There is a second set of larger screws in the T_SIMCAM package and those fit just fine. I'm still puzzled about the smaller screws but not important. More important is that I realised the T_SIMCAM pins are very different from the other modules the T_PCIE SIM7000 plugs into. Not unreasonable but I did not expect that. This means the samples in this repo need changing to handle the different pins. I was using examples/Arduino_TinyGSM/AllFunctions/AllFunctions.ino and it doesn't work because the pin defs are wrong for T_SIMCAM. In the sample we have:

#define PIN_TX      27
#define PIN_RX      26
#define PWR_PIN     4

but what works better is:

#define PIN_TX      45
#define PIN_RX      46
#define PWR_PIN     48

With that change I am getting OK responses back from the modem. I'm not yet certain about two other definitions: PIN_DTR and LED_PIN. There are other pins referring to SD_MISO etc but I don't have an SD card reader on this device so I will ignore those. For now I am seeing a red status light on the modem and a blinking netlight. I need to work through the output on the serial monitor to see what it is telling me about the tests but there are a lot of OK responses. ... and yes, it is working. Not the GPS actually, that gives errors, but I was not planning to use the GPS so it's fine. The issue, then, was getting the pins right for the T_SIMCAM.