Skip to content

Instantly share code, notes, and snippets.

@joakim
Last active May 5, 2018 14:50
Show Gist options
  • Save joakim/61b407bab95ed6b2b8126bf748e2df74 to your computer and use it in GitHub Desktop.
Save joakim/61b407bab95ed6b2b8126bf748e2df74 to your computer and use it in GitHub Desktop.
const PWRKEY = B4;
const TX = B6;
const RX = B7;
// Turn on the SIM7000 module
pinMode(PWRKEY, 'output');
digitalPulse(PWRKEY, 0, 100);
// Set up serial port (UART)
Serial1.setup(115200, {
tx: TX,
rx: RX,
bytesize: 8,
stopbits: 1,
parity: null,
errors: true,
});
// Output received data
Serial1.on('data', (data) => {
console.log('Received:', data);
});
// Report framing errors
Serial1.on('framing', () => {
console.log("Framing error!");
});
@joakim
Copy link
Author

joakim commented May 5, 2018

If I then run Serial1.write('AT\r\n'), I get no data back. Any received data should get picked up by the .on('data') event and logged to the IDE's console.

I also tried using Espruino's standard AT module, with the same result (data is sent, but nothing is received).

Well, at one point there was a flood of framing errors in the serial console:

Framing error!
Received: "\x00"
Framing error!
Received: "\x00"
Framing error!
Received: "\x00"
…

But this went away on its own. Maybe it was caused by a poor cable connection or interference.

Now there's just no response from SIM7000. What could be the cause?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment