Closed Sonic-Amiga closed 1 year ago
And here comes the first problem. I've found a generated C++ code, and right in the beginning it says:
logger_logger = new logger::Logger(115200, 512);
logger_logger->set_uart_selection(logger::UART_SELECTION_UART0);
logger_logger->pre_setup();
logger_logger->set_component_source("logger");
App.register_component(logger_logger);
which is obviously wrong, since i want UART2. Anyways UART0 pins are occupied by other functions (LED and button). But the framework doesn't let me select it! According to original ESPHome docs, i write in my UML:
logger:
hardware_uart: "UART2"
And the python script swears at me:
Failed config
logger: [source wr02-basic.yml:18]
Unknown value 'UART2', did you mean 'UART0'?.
hardware_uart: UART2
Something unsupported/unimplemented ?
The current version considers "UART0" as the default UART port. To choose other ports you have to use SERIAL# instead of UART#. This will be fixed in the future (feature/libretiny-prerelease branch, you can test it already if you want).
The "default" port, however, is chosen based on the available pins. Since your board has the TX2/RX2 on the back, and it's not programmed into the pinout diagrams, LT considers it as unavailable, and chooses UART1 as the default output port. This should be fixed as soon as I add the correct pinout.
TL;DR use generic-rtl8710bn-2mb-788k instead. It has all the pins available.
Just found out SERIAL2, tried this setting, the same result. Well, going generic...
board: generic-rtl8710bn-2mb-788k hardware_uart: "SERIAL2"
Worked, i am getting signs of life. But it crashes at "Starting wifi scan", i guess that's another story: https://github.com/kuba2k2/libretiny/issues/146
After finally learning to flash these things (https://github.com/libretiny-eu/ltchiptool/issues/5) i proceeded to building esphome for my device. And it doesn't boot up. I made this minimalist .yml for testing:
And... Here goes nothing! I get no new IP on wifi; no AP, nothing. Silence. The boot log says only this:
I guess this means the application isn't alive. Shouldn't it say at least "Hi" on the debug log ? Note i've cranked up all the debug options. Or am i just doing something stupid ?
I am flashing the device using "python -m esphome upload wr02-basic.yml", so it shouldn't be wrong file chosen.