Author |
Topic  |
antonka
Pulcino

Austria
12 Posts |
Posted - 08/04/2021 : 01:54:13
|
The Wroom 32 and Wroom 32D Modules are fine. 4MB Versions are fine. 8 and 16Mb work as well but are not nescessary.
Never use S2 for this porject. They only support 2 Serial Channels. |
 |
|
Fox
Pulcino

Italy
27 Posts |
|
antonka
Pulcino

Austria
12 Posts |
Posted - 12/04/2021 : 15:44:38
|
az-delivery is known for good quality and you will not have any problems as the software works fine for a standard setup. Just be careful with the MAX3232 PCBs. I had many of them not working. And you need a good step down converter for the ESP to get it working on 12V. A Linear Regulator is no good solution as they waste to much energy. I did my first atempt like this: http://www.kaser.at/img/Version-1.pdf - sorry its in german... |
 |
|
Fox
Pulcino

Italy
27 Posts |
Posted - 13/04/2021 : 12:54:44
|
Thanks to AlphaLima for sharing the project
My esp works well at home, hope the same on air :-) I have only change on config.h the bound rate for my old garmin gps to test it
@antonka I have use a fixed DC>DC step down converter 12->3.3 v to power ESP32 and TTL>RS232 converter, that is the same to your, now all work good.
|
Edited by - Fox on 13/04/2021 12:55:56 |
 |
|
fabe
Pulcino

Belgium
12 Posts |
Posted - 11/11/2021 : 21:45:59
|
Hello, Thanks to AlphaLima for sharing the project. Are there other PCB projects (with or without components). If so, can we buy them. Thanks in advance. |
Fabien |
 |
|
antonka
Pulcino

Austria
12 Posts |
Posted - 26/11/2021 : 09:23:42
|
I made 3 fully assembled PCBs for the project. - one with RJ45 für FLARM and RJ11 for FLARM-PLug, COM0 and COM2. - one with RJ45 für FLARM and RJ11 for FLARM-PLug, COM0 and COM2+ELT - one with 4 RJ45
for COM1 ( FLARM in my case ) i use a MAX3222 to be able to switch the TX line on/off. - Via software, switch or solder point.
http://www.kaser.at/img/Version-3.pdf http://www.kaser.at/img/Version-4.pdf
If you want to supply the ELT with GPS info you have to use my Software. Otherwise you can use the Standard Firmware with a "brownout" workaround. - you get that from me.... - dont use BT. never worked stable for me. If you get it working, let me know.
|
 |
|
antonka
Pulcino

Austria
12 Posts |
Posted - 28/12/2021 : 18:52:22
|
in the meantime I changed 2 more things in the wifi initialisation: I set a channel. And I reduce wifi power so the squelch of the radio can stay low!
int channel = 1;
uint32_t brown_reg_temp = READ_PERI_REG(RTC_CNTL_BROWN_OUT_REG); //save WatchDog register
WRITE_PERI_REG(RTC_CNTL_BROWN_OUT_REG, 0); //disable brownout detector
//AP mode (phone connects directly to ESP) (no router) WiFi.mode(WIFI_AP);
WiFi.softAP(ssid, pw, channel); // configure ssid and password for softAP delay(2000); // VERY IMPORTANT WiFi.softAPConfig(ip, ip, netmask); // configure ip address for softAP WiFi.setTxPower(WIFI_POWER_2dBm); // MINUS_1dBm, 2, 5 7 8_5 11 13 15 17...
WRITE_PERI_REG(RTC_CNTL_BROWN_OUT_REG, brown_reg_temp); //enable brownout detector
|
 |
|
Marco from Hangar 5
Pterodattilo
    
Netherlands
892 Posts |
Posted - 25/07/2023 : 12:15:43
|
After 5 years trying to make Wifi work in my Glider, I have given up on it after finding out that connecting my new Galaxy A34 with multiple Bt adapters is possible after all. (see new topic 'Lxnav Powermouse + S80 + Soartronic Bt')
During my first gliding vacation earlier this year I had heaps of problems with the wifi connection, it dropped all the time when flying above cities and villages where of course hundreds of wifi transmitters are broadcasting their availability and internet connectivity.. Today's phones give priority over wifi with internet than the wifi for RS232 data transmission, so the onboard wifi network is dropped all the time. I could re-connect but was quite cumbersome and highly anoying.
Sure, when using wifi on a stand alone device like an Oudi or vertica, it probably works fine, but with smartphones like I do for about 15 years now.. its a pain.
Note that this is a Smartphone issue, the wifi serial bridge is just fine, So, if someone is looking for a highly configurable wifi serial bridge made by Alphalima, with 3 comports (so 3 devices can be connected), USB Power supply (5V/1.5 amps), red and blue wire leads for power, please drop me a private message.. You will only need to pay shipping costs (about €10 within Europe). First come first served, paypal accepted or IBAN. |
Marco BU (PH-588) Mini Nimbus HS7, s/n 039 http://www.zweef.nl/ Zweefvliegcentrum Noordkop, NETHERLANDS |
 |
|
ElEsido
New Entry
Switzerland
2 Posts |
Posted - 21/03/2024 : 23:07:33
|
Hello All
I've been trying to implement this on and off over the last years and never quite succeeded - I am determined to get it done this time but I've hit some road blocks - could somebody help me, please?
Firstly, I've tried a NODE MCU ESP32S and I couldn't get anything uploaded to them (not even Blink). So I tried Wemos Llin32 V 1.0.0 and uploading Blink worked there. As did uploading the serial-wifi sketch.
Regarding the Sketch: I have the following code which says "version 2" - I must admit that over the years I forgot where I downloaded this, but this appears to be different than what AlphaLima had put on Github. Does anybody know if this the latest code, or if the Github version by AlphaLima is the better source?
bool debug = false;
#define VERSION "2.00"
// For AP mode:
String ssid; // You will connect your phone to this Access Point
String pw; // and this is the password
IPAddress ip(192, 168, 4, 1); // From RoboRemo app, connect to this IP
IPAddress netmask(255, 255, 255, 0);
// You must connect the phone to this AP, then:
// menu -> connect -> Internet(TCP) -> 192.168.4.1:8880 for UART0
// -> 192.168.4.1:8881 for UART1
// -> 192.168.4.1:8882 for UART2
#define NUM_COM 3 // total number of COM Ports
#define DEBUG_COM 0 // debug output to COM0
/************************* COM Port 0 *******************************/
#define UART_BAUD0 19200 // Baudrate UART0
#define SERIAL_PARAM0 SERIAL_8N1 // Data/Parity/Stop UART0
#define SERIAL0_RXPIN 21 // receive Pin UART0
#define SERIAL0_TXPIN 1 // transmit Pin UART0
#define SERIAL0_TCP_PORT 2000 // Wifi Port UART0
/************************* COM Port 1 *******************************/
#define UART_BAUD1 19200 // Baudrate UART1
#define SERIAL_PARAM1 SERIAL_8N1 // Data/Parity/Stop UART1
#define SERIAL1_RXPIN 16 // receive Pin UART1
#define SERIAL1_TXPIN 17 // transmit Pin UART1
#define SERIAL1_TCP_PORT 4352 // Wifi Port UART1
/************************* COM Port 2 *******************************/
#define UART_BAUD2 19200 // Baudrate UART2
#define SERIAL_PARAM2 SERIAL_8N1 // Data/Parity/Stop UART2
#define SERIAL2_RXPIN 15 // receive Pin UART2
#define SERIAL2_TXPIN 4 // transmit Pin UART2
#define SERIAL2_TCP_PORT 4353 // Wifi Port UART2
#define bufferSize 1024
//////////////////////////////////////////////////////////////////////////
// ESP32 WiFi <-> 3x UART Bridge
// originally by AlphaLima
// www.LK8000.com
// Disclaimer: Don't use for life support systems
// or any other situations where system failure may affect
// user or environmental safety.
#include <esp_wifi.h>
#include <WiFi.h>
#include <WebServer.h>
#include <WiFiClient.h>
#include <WebConfig.h>
#include <SPIFFS.h>
HardwareSerial Serial_one(1);
HardwareSerial Serial_two(2);
HardwareSerial* COM[NUM_COM] = {&Serial, &Serial_one , &Serial_two};
#define MAX_NMEA_CLIENTS 4
WiFiServer server_0;
WiFiServer server_1;
WiFiServer server_2;
WiFiServer *server[NUM_COM]={&server_0,&server_1,&server_2};
WiFiClient TCPClient[NUM_COM][MAX_NMEA_CLIENTS];
int com0_br, com1_br, com2_br, com0_tcp, com1_tcp, com2_tcp, tx_power;
uint8_t buf1[NUM_COM][bufferSize];
uint16_t i1[NUM_COM]={0,0,0};
uint8_t buf2[NUM_COM][bufferSize];
uint16_t i2[NUM_COM]={0,0,0};
uint8_t BTbuf[bufferSize];
uint16_t iBT =0;
String params = "["
"{"
"'name':'ssid',"
"'label':'Name of WLAN',"
"'type':"+String(INPUTTEXT)+","
"'default':'HB-3280-HS'"
"},"
"{"
"'name':'pwd',"
"'label':'WLAN Password',"
"'type':"+String(INPUTTEXT)+","
"'default':'Flightcomputer'"
"},"
"{"
"'name':'com0_br',"
"'label':'COM0 Baudrate',"
"'type':"+String(INPUTNUMBER)+","
"'min':40,'max':115000,"
"'default':'19200'"
"},"
"{"
"'name':'com0_tcp_port',"
"'label':'COM0 TCP Port',"
"'type':"+String(INPUTNUMBER)+","
"'min':40,'max':65000,"
"'default':'4352'"
"},"
"{"
"'name':'com1_br',"
"'label':'COM1 Baudrate',"
"'type':"+String(INPUTNUMBER)+","
"'min':40,'max':115000,"
"'default':'19200'"
"},"
"{"
"'name':'com1_tcp_port',"
"'label':'COM1 TCP Port',"
"'type':"+String(INPUTNUMBER)+","
"'min':40,'max':65000,"
"'default':'4353'"
"},"
"{"
"'name':'com2_br',"
"'label':'COM2 Baudrate',"
"'type':"+String(INPUTNUMBER)+","
"'min':40,'max':115000,"
"'default':'19200'"
"},"
"{"
"'name':'com2_tcp_port',"
"'label':'COM2 TCP Port',"
"'type':"+String(INPUTNUMBER)+","
"'min':40,'max':65000,"
"'default':'2000'"
"},"
"{"
"'name':'tx_power',"
"'label':'Tx Power',"
"'type':"+String(INPUTRANGE)+","
"'min':40,'max':80,"
"'default':'50'"
"},"
"{"
"'name':'debug_on',"
"'label':'Debug on',"
"'type':"+String(INPUTCHECKBOX)+","
"'default':'0'"
"}"
"]";
WebConfig conf;
// Set web server port number to 80
WebServer web(80); // Object of WebServer(HTTP port, 80 is defult)
void setup() {
delay(500);
SPIFFS.begin(true);
conf.setDescription(params);
conf.readConfig();
assign_values();
server_0 = WiFiServer(com0_tcp);
server_1 = WiFiServer(com1_tcp);
server_2 = WiFiServer(com2_tcp);
COM[0]->begin(com0_br, SERIAL_PARAM0, SERIAL0_RXPIN, SERIAL0_TXPIN);
COM[1]->begin(com1_br, SERIAL_PARAM1, SERIAL1_RXPIN, SERIAL1_TXPIN);
COM[2]->begin(com2_br, SERIAL_PARAM2, SERIAL2_RXPIN, SERIAL2_TXPIN);
if(debug) COM[DEBUG_COM]->println("\n\nLK8000 WiFi serial bridge V1.00");
if(debug) COM[DEBUG_COM]->println("Open ESP Access Point mode");
//AP mode (phone connects directly to ESP) (no router)
WiFi.mode(WIFI_AP);
if (conf.values[0] != "") {
COM[DEBUG_COM]->printf("ssid, pw: %s -%s\n",ssid.c_str(), pw.c_str());
}
WiFi.softAP(ssid.c_str(), pw.c_str()); // configure ssid and password for softAP
delay(2000);
WiFi.softAPConfig(ip, ip, netmask); // configure ip address for softAP
COM[0]->println("Starting TCP Server 1");
if(debug) COM[DEBUG_COM]->println("Starting TCP Server 1");
server[0]->begin(); // start TCP server
server[0]->setNoDelay(true);
COM[1]->println("Starting TCP Server 2");
if(debug) COM[DEBUG_COM]->println("Starting TCP Server 2");
server[1]->begin(); // start TCP server
server[1]->setNoDelay(true);
COM[2]->println("Starting TCP Server 3");
if(debug) COM[DEBUG_COM]->println("Starting TCP Server 3");
server[2]->begin(); // start TCP server
server[2]->setNoDelay(true);
esp_err_t esp_wifi_set_max_tx_power((uint8_t) tx_power); //min 40, max 80
web.on("/", handle_root);
web.begin();
if(debug) COM[DEBUG_COM]->println("Starting Web Server"); ;
delay(100);
}
void loop()
{
for(int num= 0; num < NUM_COM ; num++)
{
if (server[num]->hasClient())
{
for(byte i = 0; i < MAX_NMEA_CLIENTS; i++){
//find free/disconnected spot
if (!TCPClient[num][i] || !TCPClient[num][i].connected()){
if(TCPClient[num][i]) TCPClient[num][i].stop();
TCPClient[num][i] = server[num]->available();
if(debug) COM[DEBUG_COM]->print("New client for COM");
if(debug) COM[DEBUG_COM]->print(num);
if(debug) COM[DEBUG_COM]->println(i);
continue;
}
}
//no free/disconnected spot so reject
WiFiClient TmpserverClient = server[num]->available();
TmpserverClient.stop();
}
}
for(int num= 0; num < NUM_COM ; num++)
{
if(COM[num] != NULL)
{
for(byte cln = 0; cln < MAX_NMEA_CLIENTS; cln++)
{
if(TCPClient[num][cln])
{
while(TCPClient[num][cln].available())
{
buf1[num][i1[num]] = TCPClient[num][cln].read(); // read char from client (LK8000 app)
if(i1[num]<bufferSize-1) i1[num]++;
}
COM[num]->write(buf1[num], i1[num]); // now send to UART(num):
i1[num] = 0;
}
}
if(COM[num]->available())
{
while(COM[num]->available())
{
buf2[num][i2[num]] = COM[num]->read(); // read char from UART(num)
if(i2[num]<bufferSize-1) i2[num]++;
}
// now send to WiFi:
for(byte cln = 0; cln < MAX_NMEA_CLIENTS; cln++)
{
if(TCPClient[num][cln])
TCPClient[num][cln].write(buf2[num], i2[num]);
}
i2[num] = 0;
}
}
}
web.handleClient();
}
// Handle root url (/)
void handle_root() {
conf.handleFormRequest(&web);
if (web.hasArg("SAVE")) {
uint8_t cnt = conf.getCount();
COM[DEBUG_COM]->printf("*********** Konfiguration ************, %i elements\n", cnt);
for (uint8_t i = 0; i<cnt; i++) {
COM[DEBUG_COM]->print(conf.getName(i));
COM[DEBUG_COM]->print(" = ");
COM[DEBUG_COM]->println(conf.values[i]);
}
conf.writeConfig();
}
}
// Handle root url (/)
void assign_values() {
ssid = conf.getString("ssid");
pw = conf.getString("pwd");
com0_br = conf.getInt("com0_br");
com0_tcp = conf.getInt("com0_tcp_port");
com1_br = conf.getInt("com1_br");
com1_tcp = conf.getInt("com1_tcp_port");
com2_br = conf.getInt("com2_br");
com2_tcp = conf.getInt("com2_tcp_port");
tx_power = conf.getInt("tx_power");
debug = conf.getBool("debug");
}
This code generates an Wifi network to which I can connect my cell phone. I a test setup with two FDTI232's and a and MAX 3232 and an associated power supply wtih some caps (as suggested in the thread about this project on the German Segelflugforum which unfortunately is inaccessible in the meantime). I wanted to test that with some instances of YAT (Yet Another Terminal) but I am completely lost and I couldn't establish a connection. Could somebody walk me through a test process, please?
Lastly, I have been working on a PCB and I'm not sure if I thought of everything. I am no electronic engineer - at all - would somebody with the skills mind taking a look, please? Happy to share all files, I've made it in Eagle. Connections are the PDA port of an LX8080 that provides PWR and a 3.3v signal; and a serial connection to the radio with a 12V signal level. Images: https://www.swisstransfer.com/d/51e8a42a-33d3-402a-b870-986be942d161 Eagle Files: https://www.swisstransfer.com/d/63539391-4cfb-44e2-ba62-6836768d02c3 (Both links are valid until 20 April 2024 - happy to re-share later.
Thanks so much for any help with this! Kind regards Sam (ElEsido) |
 |
|
Fox
Pulcino

Italy
27 Posts |
Posted - 04/05/2024 : 08:43:05
|
I'm using the az-delivery esp32 board with ttl>rs232 converter all powered at 3.3v connected to android phone or Kobo glo
Every now and then I lose the signal. "Failed to connect. Network unreachable" "no data" every now and then it reconnects on its own, other times I have to restart everything
What can it be? What tests can you do? I only use two input channels uart0 ( flarm) and uart1 ( LX) thanks
|
Edited by - Fox on 12/05/2024 19:25:03 |
 |
|
Topic  |
|
|
|