I want to communicate data with M5stack Core2 and COM.Sigfox.
-
Hello. I bought M5stack Core2 and COM.Sigfox. I want to use this for data communication.
I was able to register the module in the sigfox backend. But I can't communicate or call back.
When I use M5stack Basic and COM.Sigfox,I can do data communication and callbacks.
Is there something wrong with my sketch?#include <M5Core2.h> void setup() { M5.begin(true, false, true); Serial2.begin(9600, SERIAL_8N1, 13, 14); Serial.begin(9600); } void loop() { int val = 11223344; String msg = String(val, HEX); Serial.print( msg); Serial.println(" msg "); Serial2.print("AT$SF=" + msg); Serial.print("AT$SF=" + msg); Serial.println(" AT$SF= msg "); delay(15*1000); } -
Hello @takero
in this example sending a command uses
Serial2.write("AT$SF=00FFEE\r\n");instead ofprint(). In another example I foundprintln()was used.I have a feeling the COM.Sigfox module would like a
\r\nas a line end. (But that is just a guess as I don't have that module and cannot test myself.)Good luck!
Felix -
@felmue
Thank you for suggestion Felix. And Sorry for my late reply.
I triedSerial2.println("AT$SF=" + msg );.
orSerial2.println("AT$SF= + msg ");.and
Serial2.write("AT$SF= + msg ");.
orSerial2.write("AT$SF=" + msg );.But I couldn't communicate.
If you have new tips, I would love to try.Thank you.
-
-
@felmue Thank you.
I tried your sample. I succeeded in compiling.
But I can't write to core2 since yesterday.Displayed "A fatal error occurred: Failed to connect to ESP32: Timed out Waiting for packet header"
Both of the Core2 I have are like that. Did my Core 2 break?
I just wrote a sketch.Thank you.
-
Hello @takero
sorry to hear. It's very unlikely that both of your M5Core2 devices just broke like that. Some suggestions:
- Have you tried a different USB cable?
- Have you tried a different USB port?
- Have you tried closing and reopening your software?
- Have you tried to reboot your computer?
Thanks
Felix -
Thank you @felmue .I have tried your suggestion.
Have you tried a different USB cable? :Yes I did.
Have you tried a different USB port? :Yes I did.
Have you tried closing and reopening your software? :Yes I did.
Have you tried to reboot your computer? :Yes I did.However, I got an error. Isn't my Core 2 broken ?
I tried another sketch and the result was the same.
At that time, I connected the actual sensor.
DHT22 to GPIO72.
DS18B20 to GPIO26.
Analog sensor to GPIO36.
Is that not good?
Thank you. -
Hello @takero
until you have figured out the issue regarding flashing a sketch (any sketch) onto your M5Core2, I'd do the following:
- only connect the USB cable to your computer
- disconnect everything else
- try flashing a sketch
If that doesn't work, then maybe your M5Core2 has been damaged (still very unlikely though).
Thanks
Felix
-
@felmue
While I was writing to Core 2, I pressed the power button for a long time and the writing was successful.Thank you.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login