Closed giacomo892 closed 4 years ago
Hello Giacomo
In the config.h
Find these lines:
//=================================================================================================
// S E L E C T E S P B O A R D V A R I A N T
//=================================================================================================
//#define ESP32_Variant 1 // ESP32 Dev Module - Use Partition Scheme: "Minimal SPIFFS(1.9MB APP...)"
//#define ESP32_Variant 2 // Wemos® LOLIN ESP32-WROOM-32_OLED_Dual_26p
//#define ESP32_Variant 3 // Dragonlink V3 slim with internal ESP32 - contributed by Noircogi
#define ESP32_Variant 4 // Heltec Wifi Kit 32 - Use Partition Scheme: "Minimal SPIFFS(Large APPS ith OTA)" - contributed by Noircogi
//#define ESP8266_Variant 1 // NodeMCU ESP 12F - choose "NodeMCU 1.0(ESP-12E)" board in the IDE
#define ESP8266_Variant 2 // ESP-F Use me for RFD900X TX-MOD - use generic ESP8266 board on IDE
Now for NodeMCU ESP-12F change these two lines like this:
#define ESP8266_Variant 1 // NodeMCU ESP 12F - choose "NodeMCU 1.0(ESP-12E)" board in the IDE
//#define ESP8266_Variant 2 // ESP-F Use me for RFD900X TX-MOD - use generic ESP8266 board on IDE
Thanks for the reply!
I tried this and:
#define ESP8266_Variant 1 // NodeMCU ESP 12F - choose "NodeMCU 1.0(ESP-12E)" board in the IDE
//#define ESP8266_Variant 2 // ESP-F Use me for RFD900X TX-MOD - use generic ESP8266 board on IDE
And I am getting this now:
Processing esp12e (platform: espressif8266; board: esp12e; framework: arduino)
----------------------------------------------------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/espressif8266/esp12e.html
PLATFORM: Espressif 8266 2.4.0 > Espressif ESP8266 ESP-12E
HARDWARE: ESP8266 80MHz, 80KB RAM, 4MB Flash
PACKAGES:
- framework-arduinoespressif8266 3.20603.200130 (2.6.3)
- tool-esptool 1.413.0 (4.13)
- tool-esptoolpy 1.20800.0 (2.8.0)
- toolchain-xtensa 2.40802.191122 (4.8.2)
LDF: Library Dependency Finder -> http://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 38 compatible libraries
Scanning dependencies...
Dependency Graph
|-- <c_library_v2-master>
|-- <ESP8266WebServer> 1.0
| |-- <ESP8266WiFi> 1.0
|-- <Wire> 1.0
|-- <My_Patched_ESP32_SD_Library>
| |-- <SPI> 1.0
|-- <CircularBuffer> 1.2.0
|-- <SPI> 1.0
|-- <ESP8266WiFi> 1.0
|-- <EEPROM> 1.0
|-- <Adafruit SSD1306> 2.2.0
| |-- <Adafruit GFX Library> 1.5.6
| | |-- <SPI> 1.0
| |-- <SPI> 1.0
| |-- <Wire> 1.0
|-- <EspSoftwareSerial> 6.7.1
|-- <Update> 1.0
Building in release mode
Compiling .pio/build/esp12e/src/main.cpp.o
Compiling .pio/build/esp12e/libb8b/ESP8266WiFi/ESP8266WiFiSTA.cpp.o
Compiling .pio/build/esp12e/libb8b/ESP8266WiFi/ESP8266WiFiScan.cpp.o
Compiling .pio/build/esp12e/libb8b/ESP8266WiFi/WiFiClient.cpp.o
In file included from src/main.cpp:142:0:
include/config.h:246:0: warning: "GCS_Mavlink_IO" redefined [enabled by default]
#define GCS_Mavlink_IO 2 // WiFi Only
^
include/config.h:65:0: note: this is the location of the previous definition
#define GCS_Mavlink_IO 3 // WiFi AND Bluetooth simultaneously - ESP32 only
^
In file included from lib/c_library_v2-master/ardupilotmega/../mavlink_helpers.h:13:0,
from lib/c_library_v2-master/ardupilotmega/../protocol.h:75,
from lib/c_library_v2-master/ardupilotmega/ardupilotmega.h:30,
from lib/c_library_v2-master/ardupilotmega/mavlink.h:32,
from src/main.cpp:146:
lib/c_library_v2-master/ardupilotmega/../mavlink_sha256.h:77:0: warning: "F" redefined [enabled by default]
#define F m->counter[5]
^
In file included from /Users/giacomo/.platformio/packages/framework-arduinoespressif8266/cores/esp8266/Arduino.h:242:0,
from src/main.cpp:1:
/Users/giacomo/.platformio/packages/framework-arduinoespressif8266/cores/esp8266/WString.h:39:0: note: this is the location of the previous definition
#define F(string_literal) (FPSTR(PSTR(string_literal)))
^
Compiling .pio/build/esp12e/libb8b/ESP8266WiFi/WiFiClientSecureAxTLS.cpp.o
Compiling .pio/build/esp12e/libb8b/ESP8266WiFi/WiFiClientSecureBearSSL.cpp.o
Compiling .pio/build/esp12e/libb8b/ESP8266WiFi/WiFiServer.cpp.o
src/main.cpp: In function 'void Write_To_FC(uint32_t)':
src/main.cpp:1240:17: warning: unused variable 'msgSent' [-Wunused-variable]
bool msgSent = Send_TCP(&G2Fmsg); // to FC
^
src/main.cpp:1247:17: warning: unused variable 'msgRead' [-Wunused-variable]
bool msgRead = Send_UDP(&G2Fmsg); // to FC
^
src/main.cpp: In function 'void Send_From_RingBuf_To_GCS()':
src/main.cpp:1313:16: warning: unused variable 'sentOK' [-Wunused-variable]
bool sentOK = Send_TCP(&R2Gmsg); // to GCS
^
src/main.cpp: In function 'void RefreshHTMLButtons()':
src/main.cpp:5575:17: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
set.trmode1 = "checked";
^
src/main.cpp:5576:17: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
set.trmode2 = "";
^
src/main.cpp:5577:17: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
set.trmode3 = "";
^
src/main.cpp:5580:17: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
set.trmode1 = "";
^
src/main.cpp:5581:17: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
set.trmode2 = "checked";
^
src/main.cpp:5582:17: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
set.trmode3 = "";
^
src/main.cpp:5585:17: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
set.trmode1 = "";
^
src/main.cpp:5586:17: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
set.trmode2 = "";
^
src/main.cpp:5587:17: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
set.trmode3 = "checked";
^
src/main.cpp:5591:16: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
set.fc_io0 = "checked";
^
src/main.cpp:5592:16: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
set.fc_io1 = "";
^
src/main.cpp:5593:16: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
set.fc_io2 = "";
^
src/main.cpp:5594:16: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
set.fc_io3 = "";
^
src/main.cpp:5597:16: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
set.fc_io0 = "";
^
src/main.cpp:5598:16: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
set.fc_io1 = "checked";
^
src/main.cpp:5599:16: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
set.fc_io2 = "";
^
src/main.cpp:5600:16: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
set.fc_io3 = "";
^
src/main.cpp:5603:16: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
set.fc_io0 = "";
^
src/main.cpp:5604:16: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
set.fc_io1 = "";
^
src/main.cpp:5605:16: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
set.fc_io2 = "checked";
^
src/main.cpp:5606:16: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
set.fc_io3 = "";
^
src/main.cpp:5609:16: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
set.fc_io0 = "";
^
src/main.cpp:5610:16: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
set.fc_io1 = "";
^
src/main.cpp:5611:16: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
set.fc_io2 = "";
^
src/main.cpp:5612:16: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
set.fc_io3 = "checked";
^
src/main.cpp:5625:16: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
set.gs_io0 = "";
^
src/main.cpp:5626:16: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
set.gs_io1 = "checked";
^
src/main.cpp:5627:16: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
set.gs_io2 = "";
^
src/main.cpp:5628:16: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
set.gs_io3 = "";
^
src/main.cpp:5629:16: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
set.gs_io9 = "";
^
src/main.cpp:5632:16: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
set.gs_io0 = "";
^
src/main.cpp:5633:16: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
set.gs_io1 = "";
^
src/main.cpp:5634:16: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
set.gs_io2 = "checked";
^
src/main.cpp:5635:16: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
set.gs_io3 = "";
^
src/main.cpp:5636:16: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
set.gs_io9 = "";
^
src/main.cpp:5639:16: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
set.gs_io0 = "";
^
src/main.cpp:5640:16: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
set.gs_io1 = "";
^
src/main.cpp:5641:16: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
set.gs_io2 = "";
^
src/main.cpp:5642:16: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
set.gs_io3 = "checked";
^
src/main.cpp:5643:16: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
set.gs_io9 = "";
^
src/main.cpp:5646:18: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
set.gs_io0 = "";
^
src/main.cpp:5647:18: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
set.gs_io1 = "";
^
src/main.cpp:5648:18: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
set.gs_io2 = "";
^
src/main.cpp:5649:18: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
set.gs_io3 = "";
^
src/main.cpp:5650:18: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
set.gs_io9 = "checked";
^
src/main.cpp:5654:16: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
set.gs_sd0 = "checked";
^
src/main.cpp:5655:16: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
set.gs_sd1 = "";
^
src/main.cpp:5658:16: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
set.gs_sd0 = "";
^
src/main.cpp:5659:16: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
set.gs_sd1 = "checked";
^
src/main.cpp:5663:17: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
set.wfmode1 = "checked";
^
src/main.cpp:5664:17: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
set.wfmode2 = "";
^
src/main.cpp:5665:17: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
set.wfmode3 = "";
^
src/main.cpp:5668:17: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
set.wfmode1 = "";
^
src/main.cpp:5669:17: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
set.wfmode2 = "checked";
^
src/main.cpp:5670:17: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
set.wfmode3 = "";
^
src/main.cpp:5673:17: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
set.wfmode1 = "";
^
src/main.cpp:5674:17: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
set.wfmode2 = "";
^
src/main.cpp:5675:17: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
set.wfmode3 = "checked";
^
src/main.cpp:5679:18: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
set.wfproto1 = "checked";
^
src/main.cpp:5680:18: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
set.wfproto2 = "";
^
src/main.cpp:5683:18: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
set.wfproto1 = "";
^
src/main.cpp:5684:18: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
set.wfproto2 = "checked";
^
src/main.cpp:5688:17: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
set.btmode1 = "checked";
^
src/main.cpp:5689:17: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
set.btmode2 = "";
^
src/main.cpp:5692:17: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
set.btmode1 = "";
^
src/main.cpp:5693:17: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
set.btmode2 = "checked";
^
Compiling .pio/build/esp12e/libb8b/ESP8266WiFi/WiFiServerSecureAxTLS.cpp.o
Compiling .pio/build/esp12e/libb8b/ESP8266WiFi/WiFiServerSecureBearSSL.cpp.o
Compiling .pio/build/esp12e/libb8b/ESP8266WiFi/WiFiUdp.cpp.o
Compiling .pio/build/esp12e/lib73e/ESP8266WebServer/detail/mimetable.cpp.o
Archiving .pio/build/esp12e/lib73e/libESP8266WebServer.a
Indexing .pio/build/esp12e/lib73e/libESP8266WebServer.a
Compiling .pio/build/esp12e/lib0c7/Wire/Wire.cpp.o
Compiling .pio/build/esp12e/libc51/SPI/SPI.cpp.o
Archiving .pio/build/esp12e/lib0c7/libWire.a
Indexing .pio/build/esp12e/lib0c7/libWire.a
Compiling .pio/build/esp12e/libaf9/My_Patched_ESP32_SD_Library/SD.cpp.o
lib/My_Patched_ESP32_SD_Library/src/SD.cpp:15:21: fatal error: vfs_api.h: No such file or directory
*****************************************************************
* Looking for vfs_api.h dependency? Check our library registry!
*
* CLI > platformio lib search "header:vfs_api.h"
* Web > https://platformio.org/lib/search?query=header:vfs_api.h
*
*****************************************************************
#include "vfs_api.h"
^
compilation terminated.
*** [.pio/build/esp12e/libaf9/My_Patched_ESP32_SD_Library/SD.cpp.o] Error 1
In file included from src/main.cpp:142:0:
include/config.h: At global scope:
include/config.h:571:23: warning: 'dt_tm' defined but not used [-Wunused-variable]
static DateTime_t dt_tm;
^
================================================ [FAILED] Took 8.94 seconds ================================================
Ok, there are a few things you need to do.
1) I updated the code on GitHub with a few exclusions because you don't need the SD functionality.
2) There are some files that come from the ESP32-IDF for the OTA functionality. See if you can install the ESP32-IDF.
https://docs.espressif.com/projects/esp-idf/en/latest/esp32/get-started/#step-2-get-esp-idf
Hi. I've added esp-idf to my path when compiling within platformio:
echo $PATH
/Users/giacomo/esp-idf/components/esptool_py/esptool:/Users/giacomo/esp-idf/components/espcoredump:/Users/giacomo/esp-idf/components/partition_table/:/Users/giacomo/.espressif/tools/xtensa-esp32-elf/esp-2019r2-8.2.0/xtensa-esp32-elf/bin:/Users/giacomo/.espressif/tools/xtensa-esp32s2-elf/esp-2019r2-8.2.0/xtensa-esp32s2-elf/bin:/Users/giacomo/.espressif/tools/esp32ulp-elf/2.28.51-esp-20191205/esp32ulp-elf-binutils/bin:/Users/giacomo/.espressif/tools/esp32s2ulp-elf/2.28.51-esp-20191205/esp32s2ulp-elf-binutils/bin:/Users/giacomo/.espressif/tools/openocd-esp32/v0.10.0-esp32-20200309/openocd-esp32/bin:/Users/giacomo/.espressif/python_env/idf4.2_py2.7_env/bin:/Users/giacomo/esp-idf/tools:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
I still get the same errors are it wasn't there:
Processing esp12e (platform: espressif8266; board: esp12e; framework: arduino)
----------------------------------------------------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/espressif8266/esp12e.html
PLATFORM: Espressif 8266 2.4.0 > Espressif ESP8266 ESP-12E
HARDWARE: ESP8266 80MHz, 80KB RAM, 4MB Flash
PACKAGES:
- framework-arduinoespressif8266 3.20603.200130 (2.6.3)
- tool-esptool 1.413.0 (4.13)
- tool-esptoolpy 1.20800.0 (2.8.0)
- toolchain-xtensa 2.40802.191122 (4.8.2)
LDF: Library Dependency Finder -> http://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 38 compatible libraries
Scanning dependencies...
Dependency Graph
|-- <ESP8266WebServer> 1.0
| |-- <ESP8266WiFi> 1.0
|-- <ESP8266WiFi> 1.0
|-- <My_Patched_ESP32_SD_Library>
| |-- <SPI> 1.0
|-- <CircularBuffer> 1.2.0
|-- <SPI> 1.0
|-- <c_library_v2-master>
|-- <Wire> 1.0
|-- <EEPROM> 1.0
|-- <Adafruit SSD1306> 2.2.0
| |-- <Adafruit GFX Library> 1.5.6
| | |-- <SPI> 1.0
| |-- <SPI> 1.0
| |-- <Wire> 1.0
|-- <EspSoftwareSerial> 6.7.1
|-- <Update> 1.0
Building in release mode
Compiling .pio/build/esp12e/libaf9/My_Patched_ESP32_SD_Library/SD.cpp.o
Compiling .pio/build/esp12e/libaf9/My_Patched_ESP32_SD_Library/sd_diskio.cpp.o
lib/My_Patched_ESP32_SD_Library/src/SD.cpp:15:21: fatal error: vfs_api.h: No such file or directory
*****************************************************************
* Looking for vfs_api.h dependency? Check our library registry!
*
* CLI > platformio lib search "header:vfs_api.h"
* Web > https://platformio.org/lib/search?query=header:vfs_api.h
*
*****************************************************************
#include "vfs_api.h"
^
compilation terminated.
lib/My_Patched_ESP32_SD_Library/src/sd_diskio.cpp:16:24: fatal error: diskio.h: No such file or directory
****************************************************************
* Looking for diskio.h dependency? Check our library registry!
*
* CLI > platformio lib search "header:diskio.h"
* Web > https://platformio.org/lib/search?query=header:diskio.h
*
****************************************************************
#include "diskio.h"
^
compilation terminated.
Compiling .pio/build/esp12e/lib542/Update/Updater.cpp.o
*** [.pio/build/esp12e/libaf9/My_Patched_ESP32_SD_Library/SD.cpp.o] Error 1
Compiling .pio/build/esp12e/FrameworkArduino/Esp-frag.cpp.o
*** [.pio/build/esp12e/libaf9/My_Patched_ESP32_SD_Library/sd_diskio.cpp.o] Error 1
In file included from lib/Update/src/Updater.cpp:1:0:
lib/Update/src/Update.h:7:27: fatal error: esp_partition.h: No such file or directory
***********************************************************************
* Looking for esp_partition.h dependency? Check our library registry!
*
* CLI > platformio lib search "header:esp_partition.h"
* Web > https://platformio.org/lib/search?query=header:esp_partition.h
*
***********************************************************************
#include "esp_partition.h"
^
compilation terminated.
*** [.pio/build/esp12e/lib542/Update/Updater.cpp.o] Error 1
================================================ [FAILED] Took 3.33 seconds =============================
Cannot we drop every of those dependencies for the ESP8266?
Just to keep you updated, i've tried your last commit and still I am not able to build the project. Thanks for your work
Hi Giacomo, I compiled a long reply when I posted the fix on GitHub, but I see it is missing from this thread. Strange. Anyway...
I have tightened up on the exclusions on SD functionality. The issue is that other people need the libraries, and PIO always compiles all libraries in the lib folder. So please use the latest version (2.58.5), but remove these libraries
My_Patched_ESP32_SD_Library - remove for esp8266 on PIO Update - remove for esp8266 on PIO
The ESP8266 uses "Updater.h", and it is on the PIO path for the ESP8266 boards.
Hope this helps.
Hi! Thanks! It actually compiles now! Uploading it and I get:
esptool.py --port /dev/tty.usbserial-A50285BI write_flash 0x0000 firmware.bin
esptool.py v2.5.1-dev
Serial port /dev/tty.usbserial-A50285BI
Connecting....
Detecting chip type... ESP8266
Chip is ESP8266EX
Features: WiFi
MAC: bc:dd:c2:25:aa:22
Uploading stub...
Running stub...
Stub running...
Configuring flash size...
Auto-detected Flash size: 4MB
Compressed 369440 bytes to 261347...
Wrote 369440 bytes (261347 compressed) at 0x00000000 in 36.6 seconds (effective 80.7 kbit/s)...
A fatal error occurred: Timed out waiting for packet header
The board doesn't boot and I don't get any WiFi AP. Do you have a clue?
The binary image was completely flashed. Looks like a serial issue. Try reducing upload speed. On the Tools pulldown.
was NOT completely flashed.
Thanks. Still no way I can finish the flash and I'm pretty sure this ESP works fine. I'll try again later.
I should have said: In the platformio.ini
Try changing "upload_speed = 115200" to 57600
Also make sure you are designating the correct COM
upload_port = COM(40)
Use Device Manager in Windows to check.
(Excuse me if you know this already :) )
Picked another ESP from a box... and voilà it works! Flashed and running. Do you have a connection diagram for the ESP12E handy? Basically where do I have to connect passthrough out.. since mavlink in goes into the only serial available. Then i'll take care of updating the wiki, since lot of stuff have been discussed here
It's the same as the 12F
#if (ESP8266_Variant == 1) // NodeMCU 12F board
#define MavStatusLed D4 // D4 Board LED - Mav Status LED inverted logic - use 99 while debug
#define InvertMavLed true
#define BufStatusLed 99 // None
// D4 // TXD1 - Serial1 debug log out SHARED WITH BOARD LED
#define FC_Mav_rxPin D9 // RXD0 default
#define FC_Mav_txPin D10 // TXD0 default
#define Fr_rxPin D5 // GP10 SPort - Not used in single wire mode
#define Fr_txPin D6 // GPIO SPort - Use me in single wire mode
#if (defined SD_Support) || (defined OLED_Support)
#define SCL D1 // I2C OLED board
#define SDA D2 // I2C OLED board
#define i2cAddr 0x3C // I2C OLED board
#endif
int16_t wifi_rssi;
uint8_t startWiFiPin = D3;
uint8_t WiFiPinState = 0;
#endif
#if (ESP8266_Variant == 2) // ESP-F RFD900X TX-MOD - use generic esp8266
// GPIO as per node mcu
static const uint8_t D0 = 16; // SCL - optional
static const uint8_t D1 = 5; // SDA - optional
static const uint8_t D2 = 4; // SPort half-duplex
static const uint8_t D3 = 0; // Flash
static const uint8_t D4 = 2; // BoardLED & TXD1 optional debug out
static const uint8_t D5 = 14; // SPort rx (unused in half-duplex)
static const uint8_t D6 = 12; // P2-3 exposed dual row of pins
static const uint8_t D7 = 13; // CTS
static const uint8_t D8 = 15; // RTS
static const uint8_t D9 = 3; // RXD0
static const uint8_t D10 = 1; // TXD0
#define MavStatusLed D4 // D4 Board LED - Mav Status LED inverted logic - use 99 while debug
#define InvertMavLed true
#define BufStatusLed 99 // None
// D4 // TXD1 - Serial1 default debug log out SHARED WITH BOARD LED
#define FC_Mav_rxPin D9 // RXD0 default
#define FC_Mav_txPin D10 // TXD0 default
#define Fr_rxPin D5 // SPort - Not used in single wire mode
#define Fr_txPin D2 // SPort half-duplex inverted - Use me in single wire mode
#if (defined SD_Support) || (defined OLED_Support)
#define SCL D0 // I2C OLED board
#define SDA D1 // I2C OLED board
#define i2cAddr 0x3C // I2C OLED board
#endif
int16_t wifi_rssi;
uint8_t startWiFiPin = D8;
uint8_t WiFiPinState = 0;
#endif
I might be giving you the wrong information. Are you using a NodeMCU board? Can you post a picture.
I'm using a barebone ESP12F now:
I'll use MavlinkToPassthru with QLRS. Anything I should be aware of in the configuration?
I don't know much about QLRS. Check to see that RSSI is coming through, otherwise the LUA script will not connect.
Thanks for offering to update the wiki with this info :)
Those the messages sent out by the QRLS transmitter on the serial port:
MAVLINK_MSG_ID_RC_CHANNELS_RAW MAVLINK_MSG_ID_HEARTBEAT MAVLINK_MSG_ID_SYS_STATUS MAVLINK_MSG_ID_ATTITUDE MAVLINK_MSG_ID_GLOBAL_POSITION_INT MAVLINK_MSG_ID_GPS_RAW_INT MAVLINK_MSG_ID_VFR_HUD MAVLINK_MSG_ID_GPS_GLOBAL_ORIGIN MAVLINK_MSG_ID_HOME_POSITION MAVLINK_MSG_ID_COMMAND_INT MAVLINK_MSG_ID_RADIO_STATUS
I guess I can get the RSSI from a channel. Have I to configure which channel to use?
Yes, in Mission Planner parameters, rssi parameter
All good then, it is already set. Working fine on the OSD :)
Cool
I'm still confused on which pin to use for the passthrough to the radio. Found this on your repo and seems like it doesn't match what have you said here can you clarify?
IO4
If you look at the code, your board will be the same as this variant.:
#if (ESP8266_Variant == 2) // ESP-F RFD900X TX-MOD - use generic esp8266
// GPIO as per node mcu
static const uint8_t D0 = 16; // SCL - optional
static const uint8_t D1 = 5; // SDA - optional
static const uint8_t D2 = 4; // SPort half-duplex
static const uint8_t D3 = 0; // Flash
static const uint8_t D4 = 2; // BoardLED & TXD1 optional debug out
static const uint8_t D5 = 14; // SPort rx (unused in half-duplex)
static const uint8_t D6 = 12; // P2-3 exposed dual row of pins
static const uint8_t D7 = 13; // CTS
static const uint8_t D8 = 15; // RTS
static const uint8_t D9 = 3; // RXD0
static const uint8_t D10 = 1; // TXD0
#define MavStatusLed D4 // D4 Board LED - Mav Status LED inverted logic - use 99 while debug
#define InvertMavLed true
#define BufStatusLed 99 // None
// D4 // TXD1 - Serial1 default debug log out SHARED WITH BOARD LED
#define FC_Mav_rxPin D9 // RXD0 default
#define FC_Mav_txPin D10 // TXD0 default
#define Fr_rxPin D5 // SPort - Not used in single wire mode
#define Fr_txPin D2 // SPort half-duplex inverted - Use me in single wire mode
#if (defined SD_Support) || (defined OLED_Support)
#define SCL D0 // I2C OLED board
#define SDA D1 // I2C OLED board
#define i2cAddr 0x3C // I2C OLED board
#endif
int16_t wifi_rssi;
uint8_t startWiFiPin = D8;
uint8_t WiFiPinState = 0;
#endif
Oh. So for ESP12F I have to build the firmware using variant 2 :) Asking questions so the wiki will be more precise. ESP12F boards are so cheap and useful!
You can select it in the config.h here:
//=================================================================================================
// S E L E C T E S P B O A R D V A R I A N T
//=================================================================================================
//#define ESP32_Variant 1 // ESP32 Dev Module - Use Partition Scheme: "Minimal SPIFFS(1.9MB APP...)"
//#define ESP32_Variant 2 // Wemos® LOLIN ESP32-WROOM-32_OLED_Dual_26p
//#define ESP32_Variant 3 // Dragonlink V3 slim with internal ESP32 - contributed by Noircogi
#define ESP32_Variant 4 // Heltec Wifi Kit 32 - Use Partition Scheme: "Minimal SPIFFS(Large APPS ith OTA)" - contributed by Noircogi
//#define ESP8266_Variant 1 // NodeMCU ESP 12F - choose "NodeMCU 1.0(ESP-12E)" board in the IDE
#define ESP8266_Variant 2 // ESP-F Use me for RFD900X TX-MOD - use generic ESP8266 board on IDE
Then the LED and everything will work.
Or copy this variant, call it ESP8266_Variant 3, and name it Giacomo's 12-E blah blah
:) Just compiled the variant 2 and flashed it via OTA. Later will try the soldering job and i'll report if the telemetry works many thanks for the moment
glad to help
I got it working. I can use QGC on the desktop and YAAPU on the radio.
I don't have write access to wiki. can you amend that so I can add a little bit of guide?
Ok, I have amended the edit restriction on the WiKi for you. Thanks.
Is your rssi coming out at 69% See this patch by Hasi123. It basically inserts a fixed rssi if no other rssi is received.
v2.51 2020-01-18 Make default rssi 69% for SiK radios, like RFD900x. PR by Hasi123
Most long-range radios use the SiK firmware and insert a Mavlink message type #109 into the telemetry stream. However, there are two other RSSI message types, #35 and #65. Look them up here. Use Ctl/F and search for #35 etc.
You can debug RSSI by enabling #define Debug_Rssi in config.h, however your 12E barebones needs a trick to view serial debug messages. Select the debug port before compiling.
and connect a USB/TTL bridge RX to IO2 / TxD1 on the 12E, and also ground, obviously. Then use Putty or any other serial terminal to view the debug output.
I've sorted it out. Check the PR i've made and if you want you can integrate those changes in the next version.
Hey looks good! See my comment, if you want to tag your lines?
https://github.com/zs6buj/MavlinkToPassthru/wiki/ESP12F-and-PlatformIO Made a first stub. Can you review it?
Eccellente amico mio
With your permission I will make a small change to your PR and publish to v2.57. I must include your changes in the Arduino code and I also want to publish some style and functional improvements to the web interface. Probably tomorrow.
You are the project owner :) Do whatever it takes to make this firmware even better!
Thanks for your support and I guess we can close the issue now.
Plaftormio.ini :
config.h:
Trying the build the project (2.58.4) gives this result:
If you need more infos, I'm here.
Thanks for taking a look