My code is working fine using ESP32 boards version 1.0.6, but after upgrading to version 2.0.0 I get the following error when initializing second hardware serial port,
using this code
Found a thread that said to initialize Serial2 object first.
But this just gave me another error
Downgrading to 1.0.6 and all is working again but I would like to use the latest version.
Jan
B4X:
E (64) uart: uart_set_pin(595): tx_io_num error
ESP_ERROR_CHECK failed: esp_err_t 0xffffffff (ESP_FAIL) at 0x4008ba60
file: "C:\Users\Jan\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.0\cores\esp32\esp32-hal-uart.c" line 135
func: uartBegin
expression: uart_set_pin(uart_nr, txPin, rxPin, UART_PIN_NO_CHANGE, UART_PIN_NO_CHANGE)
abort() was called at PC 0x4008ba63 on core 1
Backtrace:0x400e9001:0x3ffb25f00x4008ba71:0x3ffb2610 0x400915f1:0x3ffb2630 0x4008ba63:0x3ffb26b0 0x400df02a:0x3ffb26d0 0x400de4d1:0x3ffb2730 0x400d5dbd:0x3ffb2770 0x400d5e77:0x3ffb27a0 0x400d51ac:0x3ffb27c0 0x400d90d6:0x3ffb2800 0x400deddb:0x3ffb2820
ELF file SHA256: 0000000000000000
Rebooting...
using this code
B4X:
#if C
void SerialNative2(B4R::Object* unused)
{
::Serial2.begin(9600, SERIAL_8N1, 26, 35);;//<--use pin 26/35 as RX/TX
b4r_modgps::_serialnative->wrappedStream = &::Serial2;
}
#End If
Found a thread that said to initialize Serial2 object first.
B4X:
#if C
HardwareSerial Serial2(2); // Second Hardware Port
void SerialNative2(B4R::Object* unused)
{
::Serial2.begin(9600, SERIAL_8N1, 26, 35);;//<--use pin 26/35 as RX/TX
b4r_modgps::_serialnative->wrappedStream = &::Serial2;
}
#End If
But this just gave me another error
B4X:
Multiple libraries were found for "WiFi.h"
Used: C:\Users\Jan\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.0\libraries\WiFi
Not used: C:\Program Files (x86)\Arduino\libraries\WiFi
exit status 1
Downgrading to 1.0.6 and all is working again but I would like to use the latest version.
Jan