Category
Hardware Compatibility
Hardware
Other
Firmware Version
2.7.23 alpha
Description
Title:
M5Stack Unit-C6L: SX_LNA_EN / PI4IO P5 may not be enabled, weak RX / no distant nodes
Body:
Hello,
I am testing the M5Stack Unit-C6L with Meshtastic and I may have found a possible RX path / LNA initialization issue.
Hardware:
Firmware:
- Target: m5stack-unitc6l
- Firmware: Meshtastic 2.7.23 alpha
- Region: EU_868
- Tested presets: LongFast and ShortSlow
- Frequency shown in log: 869.525 MHz
Problem:
Two identical Unit-C6L devices can communicate with each other at short distance, so the SX1262 radio is not completely dead.
However, the device does not seem to receive any local/distant Meshtastic nodes. With EU_868 / ShortSlow I still see:
num_packets_rx=0
num_packets_rx_bad=0
channel_utilization=0.000000
num_total_nodes=1
Radio init looks successful:
Set radio: region=EU_868, name=ShortSlow, config=5, ch=0, power=27
frequency: 869.525024
SX1262 init success
Set RX gain to boosted mode; result: 0
Possible cause:
According to the M5Stack Unit-C6L documentation, the PI4IOE5V6408 controls:
E0.P5 = SX_LNA_EN
E0.P6 = SX_ANT_SW
E0.P7 = SX_NRST
The documentation says LoRa initialization requires:
SX_NRST high
SX_ANT_SW high
SX_LNA_EN high
In the M5Stack Arduino example, all three pins are set high:
ioe.digitalWrite(7, true); // SX_NRST
ioe.digitalWrite(6, true); // SX_ANT_SW
ioe.digitalWrite(5, true); // SX_LNA_EN
But in the Meshtastic m5stack_unitc6l variant code, it looks like only P7 and P6 are configured/set:
// P7 LoRa Reset
// P6 RF Switch
// P5 LNA Enable
i2c_write_byte(... PI4IO_REG_IO_DIR, 0b11000000);
i2c_write_byte(... PI4IO_REG_OUT_SET, 0b10000000);
setbit(in_data, 6);
i2c_write_byte(... PI4IO_REG_OUT_SET, in_data);
I do not see P5 / SX_LNA_EN being configured as output or set high.
Expected behavior:
If SX_LNA_EN is required for proper RX performance, PI4IO P5 should probably be configured as output and set high during Unit-C6L LoRa initialization.
Possibly something like:
i2c_write_byte(... PI4IO_REG_IO_DIR, 0b11100000);
setbit(in_data, 5); // SX_LNA_EN HIGH
setbit(in_data, 6); // SX_ANT_SW HIGH
Question:
Can someone confirm whether SX_LNA_EN / PI4IO P5 should be enabled in the Meshtastic Unit-C6L variant?
This may explain why short-range communication between two nearby Unit-C6L devices works, but distant/local nodes are not received.
Additional notes:
- The device was flashed with Full Erase and Install.
- EU_868 is correctly set after configuration.
- The radio initializes successfully.
Relevant log output
Category
Hardware Compatibility
Hardware
Other
Is this bug report about any UI (https://meshtastic.org/docs/configuration/device-uis/) component firmware?
Firmware Version
2.7.23 alpha
Description
Title:
M5Stack Unit-C6L: SX_LNA_EN / PI4IO P5 may not be enabled, weak RX / no distant nodes
Body:
Hello,
I am testing the M5Stack Unit-C6L with Meshtastic and I may have found a possible RX path / LNA initialization issue.
Hardware:
Firmware:
Problem:
Two identical Unit-C6L devices can communicate with each other at short distance, so the SX1262 radio is not completely dead.
However, the device does not seem to receive any local/distant Meshtastic nodes. With EU_868 / ShortSlow I still see:
num_packets_rx=0
num_packets_rx_bad=0
channel_utilization=0.000000
num_total_nodes=1
Radio init looks successful:
Set radio: region=EU_868, name=ShortSlow, config=5, ch=0, power=27
frequency: 869.525024
SX1262 init success
Set RX gain to boosted mode; result: 0
Possible cause:
According to the M5Stack Unit-C6L documentation, the PI4IOE5V6408 controls:
E0.P5 = SX_LNA_EN
E0.P6 = SX_ANT_SW
E0.P7 = SX_NRST
The documentation says LoRa initialization requires:
SX_NRST high
SX_ANT_SW high
SX_LNA_EN high
In the M5Stack Arduino example, all three pins are set high:
ioe.digitalWrite(7, true); // SX_NRST
ioe.digitalWrite(6, true); // SX_ANT_SW
ioe.digitalWrite(5, true); // SX_LNA_EN
But in the Meshtastic m5stack_unitc6l variant code, it looks like only P7 and P6 are configured/set:
// P7 LoRa Reset
// P6 RF Switch
// P5 LNA Enable
i2c_write_byte(... PI4IO_REG_IO_DIR, 0b11000000);
i2c_write_byte(... PI4IO_REG_OUT_SET, 0b10000000);
setbit(in_data, 6);
i2c_write_byte(... PI4IO_REG_OUT_SET, in_data);
I do not see P5 / SX_LNA_EN being configured as output or set high.
Expected behavior:
If SX_LNA_EN is required for proper RX performance, PI4IO P5 should probably be configured as output and set high during Unit-C6L LoRa initialization.
Possibly something like:
i2c_write_byte(... PI4IO_REG_IO_DIR, 0b11100000);
setbit(in_data, 5); // SX_LNA_EN HIGH
setbit(in_data, 6); // SX_ANT_SW HIGH
Question:
Can someone confirm whether SX_LNA_EN / PI4IO P5 should be enabled in the Meshtastic Unit-C6L variant?
This may explain why short-range communication between two nearby Unit-C6L devices works, but distant/local nodes are not received.
Additional notes:
Relevant log output