Home › Forums › The libraries hosted on the site › EByte LoRa e32 UART devices sx1262/sx1268 › LoRa_E32.h with ESP32
Tagged: configuration, e32, esp32
- This topic has 16 replies, 1 voice, and was last updated 3 years, 10 months ago by
Renzo Mischianti.
-
AuthorPosts
-
-
13 May 2021 at 20:39 #12147
Liam
Hi Renzo,
Firstly thank you for all your work putting this library together.
I have just ordered two E32 modules, however I am unable to compile the example sketches for the ESP32 Dev V1, I get the error ‘SoftwareSerial.h no such file or directory’, however I am able to compile for Arduino boards.
I would appreciate any assistance or advice.
-
13 May 2021 at 21:47 #12148
Hi Liam,
esp32 not use SoftwareSerial, but redefine the pin for the hardware serial, check the constructor on this articleEbyte LoRa E32 device for Arduino, esp32 or esp8266: WOR (wake on radio) and new ESP32 shield – 8
LoRa_E32 e32ttl(&Serial2, 15, 21, 19); // RX AUX M0 M1 //LoRa_E32 e32ttl(&Serial2, 22, 4, 18, 21, 19, UART_BPS_RATE_9600); // esp32 RX <-- e22 TX, esp32 TX --> e22 RX AUX M0 M1 // -------------------------------------
You can get more information to configure the parameter here
Ebyte LoRa E32 device for Arduino, esp32 or esp8266: library – Part 2
If you have other difficult write here.
Bye Renzo
-
13 May 2021 at 23:02 #12150
Liam
Thanks for the help!
-
18 June 2021 at 11:07 #12764
liam
Hi Renzo.
I have been experimenting with your library, I have a question about ‘Get configuration’.
I am using an E32-868T30D with ESP32 Devkit, constructor
LoRa_E32 e32ttl100(&Serial2, 15, 21, 19); // RX AUX M0 M
In the documentation you say “To get the correct information I add some #define to change the device type (same #define manage more other device, I create only one for type for simplicity).”
So for my modules it would be #define E32_TTL_1W and #define FREQUENCY_868.
Where do I define the device and frequency? I have tried at the beginning of the Get Configuration code but I still get the output for 433MHz module. I’m sure I am making a mistake.
Thanks in advance
Liam -
19 June 2021 at 10:09 #12765
Hi,
You must define It before the include of library.
Or inside h file.
Bye Renzo -
29 June 2021 at 14:45 #13041
Asmi Romli
Hello. I tried to compile the example given under LoRa_E32 buat all of them failed almost at the same point, during initiating:
LoRa_E32 e32ttl100(2, 3); // e32 TX e32 RX
The error message like this:
Arduino: 1.8.13 (Windows 7), Board: “AI Thinker ESP32-CAM, 240MHz (WiFi/BT), QIO, 80MHz”
sendReceiveTransparentTransmissionMessage:30:24: error: invalid conversion from ‘int’ to ‘HardwareSerial*’ [-fpermissive]
LoRa_E32 e32ttl100(2, 3); // Config without connect AUX and M0 M1
^
In file included from D:\Users\user\Documents\Arduino\libraries\LoRa_E32\examples\sendReceiveTransparentTransmissionMessage\sendReceiveTransparentTransmissionMessage.ino:17:0:
D:\Users\user\Documents\Arduino\libraries\LoRa_E32/LoRa_E32.h:192:3: note: initializing argument 1 of ‘LoRa_E32::LoRa_E32(HardwareSerial*, byte, UART_BPS_RATE)’
LoRa_E32(HardwareSerial* serial, byte auxPin, UART_BPS_RATE bpsRate = UART_BPS_RATE_9600);
^
exit status 1
invalid conversion from ‘int’ to ‘HardwareSerial*’ [-fpermissive]This report would have more information with
“Show verbose output during compilation”
option enabled in File -> Preferences.-
29 June 2021 at 15:05 #13042
Hi Asmi,
you select Arduino conf for esp32.Please check the tutorial.
Ebyte LoRa E32 device for Arduino, esp32 or esp8266: WOR (wake on radio) and new ESP32 shield – 8
Bye Renzo
-
1 July 2021 at 17:15 #13118
Asmi Romli
Thanks for your response. I can compile when I use hardware serial &Serial1, &Serial2 and &Serial3. A bit confuse since normally we note Serial0 (U0RX, U0TX), Serial1 (U1RX, U1TX) and Serial2 (U2RX, U2TX). Another thing is how to configure if I want to used GPIO12 for RX and GPIO13 for TX (thru SoftwareSerial I guess).
-
1 July 2021 at 19:49 #13121
Hi,
you can refer this article to learn all the constructorsEbyte LoRa E32 device for Arduino, esp32 or esp8266: library – Part 2
The second constructor is what you need. SoftwareSerial is not needed for esp32.
LoRa_E32(byte txE32pin, byte rxE32pin, HardwareSerial* serial, UART_BPS_RATE bpsRate = UART_BPS_RATE_9600, uint32_t serialConfig = SERIAL_8N1); LoRa_E32(byte txE32pin, byte rxE32pin, HardwareSerial* serial, byte auxPin, UART_BPS_RATE bpsRate = UART_BPS_RATE_9600, uint32_t serialConfig = SERIAL_8N1); LoRa_E32(byte txE32pin, byte rxE32pin, HardwareSerial* serial, byte auxPin, byte m0Pin, byte m1Pin, UART_BPS_RATE bpsRate = UART_BPS_RATE_9600, uint32_t serialConfig = SERIAL_8N1); Breaking change on esp32 constructor
Bye Renzo
-
6 July 2021 at 05:02 #13220
Asmi Romli
I use U0RXD and U0TXD on ESP32-CAM as serial channel. GPIO15 as AUX. I want to use GPIO12 & 13 as M0 and M1 respectively. Both this GPIOs already pulled to high using 47K resistor. Will it affect the communication with LoRa? Does I have to set them as Output or not?
-
6 July 2021 at 07:56 #13222
Hi Asmi,
if you use standard Serial to comunicate you must configure the E32 like so:// ---------- esp32 pins -------------- LoRa_E32 e32ttl(&Serial, 15, 12, 13); // RX AUX M0 M1
and after you must test if the pull-up resistor create problems.
You can take every examples on library, you must only change the constructor.
Bye Renzo
-
-
8 July 2021 at 03:07 #13280
Asmi Romli
I found that one of M1 or M0 make the system unstable when connected. Not sure why only one. Maybe can try to connect thru transistor.
I found that even thou M0 and M1 not connected (or they are tied to GND or 3V3) changing parameters like address and channel still successful. Now I wonder whats the function of M0 and M1? I guess we have to set both to HIGH (mode 3) in order to program it.
Thanks for your kind respond.
-
8 July 2021 at 07:39 #13281
Hi Asmi,
try to remove the resistor, or change the value of these.
M0 and M1 are connected together with a little resistor, so if pull-up are too hight ot too low the device doesn’t go low or hight.
Bye Renzo -
10 July 2021 at 03:39 #13364
Asmi Romli
The soldered 47K resistor is so small. Not sure which one. No label and no schematic. Maybe need to use magnifying glass.
Using the above-mentioned configuration setting by Mischianti, I found that AUX pin is a must in order to make the configuration read give status of 1. Otherwise status number 12 is given, regardless of M1 and M0 connection. So I think M1 and M0 only function to set in which mode it should be. Any comment?
-
10 July 2021 at 08:24 #13367
Hi,
No no, not remove the resistor of the e32, only the 2 added by you.
And yes M0 and M1 are used to switch modalityEbyte LoRa E32 device for Arduino, esp32 or esp8266: configuration – Part 3
Bye Renzo
-
-
11 July 2021 at 17:05 #13376
Asmi Romli
Oh.. I didn’t add any additional resistors. The 47k resistor already on the esp32-cam board. 47k connected to pin gpio12, 13 and 15 which i use to connect to m0, m1 and aux. anyway, i will try to connect other free pin..
-
16 July 2021 at 15:13 #13656
Sorry your reply was in spam.
Change pin and use pin without internal resistor.
Bye Renzo
-
-
-
AuthorPosts
- You must be logged in to reply to this topic.