It’s time to debug the SIM7600 module and see if that can work. Here’s the board we’re using.
Here are the important things to know for setup that took me a while to figure out:
- This shield needs to be plugged in to an external power source to work
- Cellular antenna attaches to Main
- Leave the jumpers as is
- Press Boot for 1 second to start the modem
- The blue ‘Net’ LED should be blinking once every second once it’s connected
- Even though SIM7600 is said to have auto-baud, it actually is not. The baud is 115200.
Boot is connected to Arduino pin 12:
After figuring out all the above info, and hard coding the messages in as a String to be sent (instead of individual chars from reading the Serial Monitor), was finally receiving data from the module on the Arduino:
However this good news did not last for long as the Arduino is using SoftwareSerial, which isn’t very reliable after speeds of 19200 baud. Below you can see the garbled messages happening.
Time to switch back to the ESP32 to see if their Hardware Serial improves things. It does! And here you can see we are on Hologram:
The Hologram SIMCOMM library has a sequence of AT commands to send to the modem module. Their library is for SIM800 or SIM900 series, but there’s no reason that we can’t find a way to make it work with SIM7600. Following the Hologram init sequence in this function:
bool HologramSIMCOM::_connectNetwork()
Here are the commands being sent:
- AT+CGATT? = check gprs status
- AT+CIPMUX=1; = set connection mode to multi
- AT+CSTT=\"hologram\"; = set apn
- AT+CIICR; = bring up wireless connection
- AT+CIFSR; = get local ip address
The sequence fails at:
- AT+CIPMUX=1;
Which is to set the connection mode to multi. The subsequent AT commands after that also fail.
What could cause this? Do we already need to send the device key that Hologram provides for each sim? Not quite. This is only needed when sending messages. Here you can see where the device key is added in to the message in this function:
bool HologramSIMCOM::send(String data, const String topics)
What is the actual AT command for sending the message? First, a TCP connection needs to start, then we send how long the message is, then we send the data:
The process is pretty close, but why it is failing at AT+CIPMUX=1; remains unknown for now. This is where it is stuck on my end.
It would be worthwhile to test with a “regular” SIM to see if this module is functioning properly. For me, even the ATD command is not working (to place a simple voice call), it says NO CARRIER. I don’t have a regular sim that I’m willing to sacrifice and test, but maybe Tobi and Leo do.
Testing the sms command, it worked!
AT+CMGS=\"phone number here\"; Testing 123456 Eja 1234 0x1A
First sms message received from Buoy A! It’s not completely reliable just yet, as with some experimentation the module has been getting stuck. Well, there’s a reason why it has been getting stuck:
Sorry about that Hologram! The debugging chart in Hologram’s dashboard has been interesting. It shows some start / end timestamps of 0 byte data transmissions to the network.
Well, now after the whole day spent on this now, the pressure is back on to get back to mechanical design, fabrication, and assembly.
At least we know now, the SIM7600 is functional, and it might be interesting to look into getting a sim card for any local demos.
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.