xreef / EByte_LoRa_E22_Series_Library

Arduino LoRa EBYTE E22 device library complete and tested with Arduino, esp8266, esp32, STM32 and Raspberry Pi Pico (rp2040 boards).. sx1262/sx1268
Other
104 stars 22 forks source link

NodeMCU wiring #25

Closed Kamoba closed 8 months ago

Kamoba commented 8 months ago

Hi,

Thank you for your great work.

I'm using E22-900T30S with NodeMCU V3, so I guess I should use the wiring and code for esp8266. Here is my wiring:

E22 esp8266
------------------
M0  D7
M1  D6
TX  PIN D2 (PullUP 4,7KΩ)
RX  PIN D3 (PullUP 4,7KΩ)
AUX     PIN D5 (PullUP 4,7KΩ)
VCC 3.3v
GND GND

To get started I use the esp8266_e22_getConfiguration code. But got error:

No response from device! (Check wiring)
12
----------------------------------------
HEAD : 0 0 0

AddH : 0
AddL : 0
NetID : 0

Chan : 0 -> 410MHz

SpeedParityBit     : 0 -> 8N1 (Default)
SpeedUARTDatte     : 0 -> 1200bps
SpeedAirDataRate   : 0 -> 0.3kbps

OptionSubPacketSett: 0 -> 240bytes (default)
OptionTranPower    : 0 -> 22dBm (Default)
OptionRSSIAmbientNo: 0 -> Disabled (default)

TransModeWORPeriod : 0 -> 500ms
TransModeTransContr: 0 -> WOR Receiver (default)
TransModeEnableLBT : 0 -> Disabled (default)
TransModeEnableRSSI: 0 -> Disabled (default)
TransModeEnabRepeat: 0 -> Disabled (default)
TransModeFixedTrans: 0 -> Transparent transmission (default)
----------------------------------------
No response from device! (Check wiring)
12
----------------------------------------
HEAD: 0 0 0
Model no.: 61
Version  : 72
Features : 65
----------------------------------------

Did I do something wrong? Or NodeMCU if supported use different wiring?

Thanks

Kamoba commented 8 months ago

Ok, I got success. The trick was :

M0  -->  GND
M1  -->  NC/VCC
RX  -->  TX2 (D7)
TX  -->  RX2 (D8)

Even I got Chan : 65 -> 475MHz while my config via the Ebyte software it was 915MHz. It's mean something wrong somewhere!

xreef commented 8 months ago

Hi, for the frequency you must set the specified define. You cancheck here. Bye Renzo

Kamoba commented 8 months ago

Hmm, I add this on top:

#define E22_30
#define FREQUENCY_915

But still got Chan : 63 -> 473MHz while now I have Ch: 63 and and Frequency: 913.125 MHz. On the setConfig script I changed pins and configuration.CHAN = 63; but got same thing. Also notice you have max POWER_22 which will set power to 22dBm, mine have 30dBm, POWER_30 not defined.

xreef commented 8 months ago

Hi, First of all remember that only the description is wrong. To put on work if the define not working insert them inside stateNaming.h file. Bye Renzo

Kamoba commented 8 months ago

Hi, I was scaring to transmit on a wrong frequency bands and got trouble. So thank you for taking the stress away.

After a few tries, I got it to work! So to summarize, I skip your configuration and use the configuration software provided by the manufacturer (RF_settings) then use your fixedTransmission example.

A suggestion, you should set variable CHANNEL on the example e22ttl.sendFixedMessage(0, DESTINATION_ADDL, CHANNEL, "Hello, world?"); I almost did not pay attention to it.

A last question could you please explain me what is corresponding AddL here on this image?

1 Transmit

You said: "Low address byte of module (the default 00H)", but still did not get, yes I know I'm a newbie.

Thanks!

xreef commented 8 months ago

Hi kamoba, ADDL and ADDH are the bytes that represent the adddress I use it separately for simplicity. Bye Renzo