Closed Elmi77 closed 3 years ago
I have a very similar issue: sometimes it connects to network, sometimes it does not. Yesterday I tried to reset the modem with the ResetModem.ino script and it failed too. Then I tried this morning and it was working again (without changing anything). I tried different antennas too, but the results are the same. I'm testing with:
Any feedback on this @lewisxhe ?
Please use AT Debug to view the current network mode:
AT+CNMP=? Return to current mode AT+CNMP=2 set to automatic mode
AT+CMNB=? Check whether it is CAT-M or NB-IoT AT+CMNB=3 Select CAT-M and NB-IoT
If you use the automatic mode, its network access speed will be relatively slow, you can wait patiently.
If your country still has 2G network, then you can try to use AT+CNMP=13
Also, you need to configure APN. In China, I don’t need to fill in it. I don’t know for other countries!
@lewisxhe OK, the problem is somewhat different: no matter what modes I use, it works only sometimes. So when it is working, it works with network mode 51 and preferred mode 3. So it is verified the SIM is fine and the network/preferred modes are correct.
But that works only randomly, when it fails, it also fails with these settings. What I noticed: In case of a failure, the signal quality (call to modem.getSignalQuality()) is 99 and the GSM time (call to modem.getGSMDateTime(DATE_TIME)) is somewhere at 0 o'clock.
As getGSMDateTime() can be called before setting network or preferred mode, the reason for the failure seems to be at some earlier stage of initialisation. So playing around with these modes will not help.
@lewisxhe to clarify this, this is my initialisation sequence (pseudocode, based on what is shown in your examples):
pinMode(PWR_PIN, OUTPUT); digitalWrite(PWR_PIN,HIGH); delay(600); digitalWrite(PWR_PIN,LOW); delay(10000); modem.init() modem.sendAT("+SGPIO=0,4,1,1"); delay(600); modem.enableGPS() modem.getGSMDateTime(DATE_TIME); modem.setNetworkMode(2); modem.setPreferredMode(3); modem.getSignalQuality(); modem.waitForNetwork()
When it fails, getGSMDateTime() returns an invalid time, getSignalQuality() returns 99 and waitForNetwork() is never successful.
When it works (with the same SIM-card and settings as before), getGSMDateTime() returns the current time, getSignalQuality() returns something in range 25..27 and waitForNetwork() is successful after a few seconds.
This lets me think there is something wrong or missing with the initialisation of the SIM7000G - or it is a design problem with the hardware at all.
@lewisxhe so I did some more tests:
Result: the board always behave the same. So there is either some initialisation missing which is not dosumented anywhere or there is a design problem with the boards in general. For me it looks like the HF-part/mobile network antenna part is wrong. Or in other words: this company is selling unusable crap which can't work as specified.
Sorry, I did not see your comment. If your board does not work properly, please contact customer service for processing. This test code is not only tested by me, but also by many users. Maybe your hardware has been damaged.
What customer service? You sell these boards via eBay without any service or warranty!
Btw: two boards (different hardware releases) show the same problem. So this does not seem to be a unique problem of my board only but more a general error of your hardware.
As long as it is purchased in our LilyGo store, there is after-sales service. Moreover, our board has been around for a long time. It has been verified that only a few hardware is defective, but this is unpredictable.
I have a problem with the SIM7000G registering to the network. Randomly it works, but in 90% of the time it fails.
I'm using code which is quite similar to your example here. No pin is set, the SIM-card is working (verified this with an other device). When - before trying to register to the network - I check the signal quality via getSignalQuality() and it is at 99, the following call to waitForNetwork() first needs a very long time and then fails.
But sometimes it works: then getSignalQuality() returns values around 27 and waiting for the network needs only a few seconds. I could not find out when this happens. Sometimes it helps to vary the parameters for setPreferredMode() and setNetworkMode(), sometimes this has no influence,
I have both versions of the LilyGo SIM700G board and both show the same behaviour. I also tried three different antennae, the result is still the same, I can't get the board working properly.