m5 stack is rubbish support for arduino, lorae220-433 on atoms3 lite and atom s3r fail on arduino but fine on ui flow
-
LoRa Communication Issue: Arduino Code vs UIFLOW
Problem Overview:I’m working with two M5Stack Atom S3 Lite devices with LoRa E220-433 modules.
UIFlow code works perfectly for sending and receiving messages between the devices, immediately and without issue.
However, when using Arduino IDE with a similar configuration, the sender sends data, but the receiver doesn’t get the messages.
Details:
Sender Code (Arduino IDE):The code sends messages via LoRa.
Serial Monitor shows confirmation of messages being sent.
Example output from sender Serial Monitor:
makefile
Copy code
DEBUG: Sent message via LoRa: Hello
DEBUG: Sent message via LoRa: Hello
Receiver Code (Arduino IDE):The code is set to the same address 0x0007 and channel 7 as the sender.
The receiver is initialized and waits for incoming data.
Serial Monitor shows initialization messages, but no incoming data is received.
vbnet
Copy code
DEBUG: LoRa Receiver setup starting...
DEBUG: LoRa module initialized.
DEBUG: LoRa module configured with Address 7 and Channel 7.
What Works (UIFlow):
When using UIFlow, the setup works immediately.
Sender and receiver exchange data perfectly via LoRa.
No issues when running the same setup via UIFlow.
Steps Taken to Resolve the Issue:
Configuration Check:Both sender and receiver are set to the same address (0x0007) and channel (7) in the Arduino IDE code.
Explicit configuration commands were added to ensure correct addressing and channeling for the LoRa modules.
Hardware Setup:Verified wiring for LoRa RX and TX pins between the M5Stack devices.
No issues with the physical connections, as UIFlow works perfectly.
Arduino Code Modifications:Multiple attempts were made to ensure correct serial communication via HardwareSerial.
Configured LoRa modules to match normal mode (M0 = 0, M1 = 0).
Debugging:Added comprehensive debugging messages for sending and receiving data.
Verified that sender is transmitting, but the receiver is not receiving data.
Expected Behavior:
Both the sender and receiver should communicate seamlessly with the same address and channel configuration.
Debugging output should show incoming data on the receiver side if communication is working correctly.
What I Need Help With:
Despite following proper setup and configuration steps, the receiver does not get data.
The same hardware setup works perfectly with UIFLOW, so the issue seems to be specific to the Arduino IDE setup.
Could someone from M5Stack or the community help identify any potential issues in the Arduino code or suggest a different approach?
Additional Information:
LoRa Module Model: E220-433
M5Stack Model: Atom S3 Lite
Sender Serial Monitor Output:
makefile
Copy code
DEBUG: Sent message via LoRa: Hello
DEBUG: Sent message via LoRa: Hello
Receiver Serial Monitor Output:
vbnet
Copy code
DEBUG: LoRa Receiver setup starting...
DEBUG: LoRa module initialized.
DEBUG: LoRa module configured with Address 7 and Channel 7.
Conclusion:
I’ve been unable to resolve the issue with Arduino code, but everything works seamlessly with UIFLOW. Looking for guidance from the community to figure out what’s going wrong in the Arduino setup. -
Hi @riztronic
We have fully tested the Arduino code running normally and without a problem!
You can get the newest code here:
https://github.com/m5stack/M5-LoRa-E220/blob/main/examples/P2P_TX_RX/P2P_TX_RX.ino
The test video is here:
https://www.dropbox.com/scl/fi/soim9m8aonp52850p5xqs/361e2e27700890d74db6e65082fd4d05.mov?rlkey=tay4leplto1qlrsl2zt9s549d&st=dff6d295&dl=0
The problem may be that your TX/RX pins are reversed