E22 can now reach 33dBm of output power

master
Marcel 1 week ago
parent 21e298820f
commit 5fee5d7eec
  1. 6
      CHANGELOG.md
  2. 13
      Documentation/HOWTO-change-firmware-and-compile-it_MeesElectronics.md
  3. 12
      Radio.cpp

@ -11,6 +11,12 @@ All notable changes to this project will be documented in this file.
Fixed : for any bug fixes.
Security : in case of vulnerabilities.
### 2025-04-04
#### Fixed
RXEN switches to low before transmitting, and now the E22 module can output 33 dBm. The maximum power is reached when SX1268 is set to 22 dBm.
### 2025-03-30
#### Fixed

@ -423,12 +423,23 @@ with this:
### Radio.cpp
Add the following statement to the function **sx126x::enableTCXO()**.
Add the following statement to the function **sx126x::enableTCXO()**:
// Board added by Mees Electronics
#elif BOARD_MODEL == BOARD_MEES_ESP32_S3
uint8_t buf[4] = {MODE_TCXO_1_8V_6X, 0x00, 0x00, 0xFF};
Add the following statement to the function **int sx126x::endPacket()** just after `setPacketParams(_preambleLength, _implicitHeaderMode, _payloadLength, _crcMode);`:
// Added by Mees Electronics: RXEN on E22 module back to low
#if BOARD_MODEL == BOARD_MEES_ESP32_S3 && BOARD_VARIANT == MODEL_F2
if (_rxen != -1) {
digitalWrite(_rxen, LOW);
}
#endif
The E22 module has an RXEN and a TXEN input. Both must be used and both cannot be logic 1 at the same time. RXEN must be controlled by the firmware while TXEN can be controlled by either the firmware or the DIO2 pin, by using the DIO2_AS_RF_SWITCH function in the firmware. My current solution is to control TXEN by the DIO2 pin. If you forget to control the TXEN line, the maximum output will be 22 dBm instead of 33 dBm. It would be better to alter the code to make it more universal (like with the *sx128x* code), but for now it works.
### Makefile
Change the following section:

@ -439,6 +439,13 @@ int sx126x::endPacket()
{
setPacketParams(_preambleLength, _implicitHeaderMode, _payloadLength, _crcMode);
// Added by Mees Electronics: RXEN on E22 module back to low
#if BOARD_MODEL == BOARD_MEES_ESP32_S3 && BOARD_VARIANT == MODEL_F2
if (_rxen != -1) {
digitalWrite(_rxen, LOW);
}
#endif
// put in single TX mode
uint8_t timeout[3] = {0};
executeOpcode(OP_TX_6X, timeout, 3);
@ -745,6 +752,11 @@ void sx126x::setTxPower(int level, int outputPin) {
_txp = level;
// Added by Mees Electronics: E22 transceiver can go to +33dBm, but only needs 9dBm drive. Set any higher and it might blow the finals!
//#if BOARD_MODEL == BOARD_MEES_ESP32_S3 && BOARD_VARIANT == MODEL_F2
//if (level > 9) { level = 9; }
//#endif
writeRegister(REG_OCP_6X, OCP_TUNED); // 160mA limit, overcurrent protection
uint8_t tx_buf[2];

Loading…
Cancel
Save