Last active
May 5, 2018 14:50
-
-
Save joakim/61b407bab95ed6b2b8126bf748e2df74 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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!"); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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:
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?