PostFrontal Forum
PostFrontal Forum
PF Home | International_Forum | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?


 All Forums
 LK8000 International Support
 Hardware
 Connecting FLARM, Vario, Radio via WiFi Interface
 New Topic  Reply to Topic
Previous Page
Author Previous Topic Topic Next Topic
Page: of 2

pieterd
Pulcino

19 Posts

Posted - 17/04/2020 :  15:40:29  Show Profile  Reply with Quote

On page 3 of config is a button for resetting and starting the com ports ... it is possible to automate this e.g. by the (temporary) loss of the WiFi signal? (version 7.1I)
Go to Top of Page

AlphaLima
Moderator

Germany
1904 Posts

Posted - 17/04/2020 :  15:56:41  Show Profile  Visit AlphaLima's Homepage  Reply with Quote
Thats how it already works!
Go to Top of Page

pieterd
Pulcino

19 Posts

Posted - 17/04/2020 :  21:15:20  Show Profile  Reply with Quote
OK. so if I interrupt the wifi signal and restore it again, the Flarm and the radio should reconnect automatically. I will try. Thanks !
Go to Top of Page

sasa
Pulcino

Croatia
48 Posts

Posted - 19/04/2020 :  19:43:50  Show Profile  Visit sasa's Homepage  Reply with Quote
In the picture that represents the recommended wiring diagram https://github.com/AlphaLima/ESP32-Serial-Bridge/blob/master/ESP32-SerialBridge.jpg on the RS232 side we only have Rx and Tx and no GND. Is it necessary to connect the GND of the connected device in addition to the Rx and TX terminals?

Edited by - sasa on 19/04/2020 19:44:35
Go to Top of Page

AlphaLima
Moderator

Germany
1904 Posts

Posted - 19/04/2020 :  20:42:50  Show Profile  Visit AlphaLima's Homepage  Reply with Quote
GND is needed as well, of course!
Go to Top of Page

sasa
Pulcino

Croatia
48 Posts

Posted - 02/05/2020 :  02:58:46  Show Profile  Visit sasa's Homepage  Reply with Quote
quote:
Originally posted by Alebu

Hi AL,
BT seams to be deactivated. It is quoted (//#define BLUETOOTH) in the config.h.

Settings were not as per your your latest message. Unfortunatelly nothing changes with the new settings :-(
In case it could help, here after the full message I get at each connection tentative:

rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0018,len:4
load:0x3fff001c,len:1216
ho 0 tail 12 room 4
load:0x40078000,len:9720
ho 0 tail 12 room 4
load:0x40080400,len:6352
entry 0x400806b8

Thanks a lot for your so kind support.
Alessandro


I have the same problem with ESP32-DEVKITV1 https://photos.app.goo.gl/3FgbX91iG9QCL7F8A
This is pin out for this ESP32-dev board: https://github.com/shridattdudhat/ESP32-DEVKITV1

The original program compiles, however when trying to connect my cellphone to the controller the controller resets. This is a thumbnail of a message from a serial monitor and a decoded back-trace: https://photos.app.goo.gl/V78iULZzPJrz4hGJ6 .

I'm using the ESP32 Arduino 1.0.4.
In an attempt to solve the problem I commented the lines:

// WiFi.mode (WIFI_AP);
// WiFi.softAPConfig (ip, ip, netmask); // configure ip address for softAP
and i added some lines to check def. IP-address:

  IPAddress myIP = WiFi.softAPIP ();
  Serial.print ("AP IP address:");
  Serial.println (MyIP);

Here's a thumbnail: https://photos.app.goo.gl/oyP6ijqNv1YdAoFa9
After that, the controller no longer reset after trying to connect.

After that I tried to keep WiFi.mode setting and comment only on this line:
// WiFi.softAPConfig (ip, ip, netmask); // configure ip address for softAP

this block now look like this:

  #ifdef MODE_AP 
   if(debug) COM[DEBUG_COM]->println("Open ESP Access Point mode");
  //AP mode (phone connects directly to ESP) (no router)
   WiFi.mode(WIFI_AP);
  // WiFi.softAPConfig(ip, ip, netmask); // configure ip address for softAP 
  WiFi.softAP(ssid, pw); // configure ssid and password for softAP
  IPAddress myIP = WiFi.softAPIP();
  Serial.print("AP IP address: ");
  Serial.println(myIP);
  #endif

and after that the controller did not reset https://photos.app.goo.gl/NtbJ1fK1EfsZ3RmW8
So I would conclude that something is wrong with this function
WiFi.softAPConfig(ip, ip, netmask);

In this configuration I can send messages form the LK8000 terminals to the PC (to Arduino serial monitor), but messages which I send from Arduino serial monitor can not appear on LK8000 terminal. https://photos.app.goo.gl/nxHQ1rQpdxhmpcUx6

When I adjust only speed for serial port 0, and didn't change def. Rx & Tx pins bidirectional communication with LK8000 terminal and Arduino serial monitor work.
https://photos.app.goo.gl/ZsLCGvpmFny7MUWc6
https://photos.app.goo.gl/jDfiPtRJSvwEp39h6

My esp32 dev board https://github.com/shridattdudhat/ESP32-DEVKITV1 has a different pin layout than yours.
How should I map serial ports to individual pins on my ESP-dev board?

What the definition means ?
#define MAX_NMEA_CLIENTS 4
I'm not sure how to use it ?
Go to Top of Page

AlphaLima
Moderator

Germany
1904 Posts

Posted - 02/05/2020 :  09:27:35  Show Profile  Visit AlphaLima's Homepage  Reply with Quote
Sounds like a power problem to me, make sure you have a good 5V supply with good cables. We had quite often problems with low cost china cables.

#define MAX_NMEA_CLIENTS 4
defines the max number of (smartphone) devices tha can connect simultaniously.

If you don't have the same hardware you must figure out the best pins yourself, I can't do testing without the hardware.
Or you buy a Node32s, which is proven to work (with this code) over a hundered times already.
There is a lot of low cost low quality devices on the market. Especially power generation can be critical.
AL

Edited by - AlphaLima on 02/05/2020 09:29:01
Go to Top of Page

sasa
Pulcino

Croatia
48 Posts

Posted - 02/05/2020 :  11:53:52  Show Profile  Visit sasa's Homepage  Reply with Quote
Have you tried compiling FW with ESP32 Arduino 1.0.4. ?

Does bidirectional message transfer work between the LK8000 terminal and the Arduino serial monitor when frmware for your HW compiles with debug = true ?
Go to Top of Page

sasa
Pulcino

Croatia
48 Posts

Posted - 02/05/2020 :  15:49:24  Show Profile  Visit sasa's Homepage  Reply with Quote
When i call
WiFi.softAP(ssid, pw);
before
WiFi.softAPConfig(ip, ip, netmask);
my controller didn't reset and all work as expected.
Go to Top of Page

jlder
Pulcino

France
32 Posts

Posted - 27/09/2020 :  23:45:41  Show Profile  Reply with Quote
Hello AlphaLima,

I just compiled and ran this sketch on an ESP32.
Beside having to push on the BOOT switch to allow connection and transfer to the ESP32,it seems to work.
I get the LK8000 WIFI ssid on my phone and can connect.
I need to wire the TTL/RS232 boards to verify if I can connect to FLARM and GPS.

Question, I couldn't see the BT on my phone and, looking at the code, I don't understand what the purpose of BT in this sketch.
Can you explain?
Edit: I did forget to include BT in the config file. Now I can see the BT. I have modifed the code to echo whatever is entered on one line TCP, BT, UART back on all lines. Purpose was to verify bilateral communication. I used serial bluetooth terminal and TCP terminal on my android phone to allow connection.

I also noticed that UART 0 is used to broadcast the messages when in debug. On my board, this is the UART port which is used to connect with the PC when connecting the USB interface.
Is this typical?
This means that if a device is connected to the UART 0, there is a conflict.

Regards,
JL

Edited by - jlder on 30/09/2020 22:07:10
Go to Top of Page

AlphaLima
Moderator

Germany
1904 Posts

Posted - 01/10/2020 :  11:21:00  Show Profile  Visit AlphaLima's Homepage  Reply with Quote
Hi JL,
Bluetooth does not work correctly in this setup due to resource limitations of the Arduino ESP32 librrary. Keep it disabled!
Yes you the debug informations on COM0, you can disable it bay changing
bool debug = true;
into
bool debug = false;
the file config.h

https://github.com/AlphaLima/ESP32-Serial-Bridge/blob/master/config.h#L10

Edited by - AlphaLima on 01/10/2020 16:06:35
Go to Top of Page

jlder
Pulcino

France
32 Posts

Posted - 05/10/2020 :  15:32:41  Show Profile  Reply with Quote
Thanks AL,
I have played a bit more with the ESP.
As said, I also changed the code to get an echo on all connected devices, including BT, and it works.
I am using this device : SP-Cow ESP-32S which I found on Amazon.
For noob like me, I found a good tutorial at : https://dronebotworkshop.com/esp32-intro/
For WIFI and BT to compile, it is necessary to use the setup that AL posted on github, in particular the partition scheme: minimal SPIFFS.

I was thinking about using BT to configure the board at startup (BT active only for a few seconds to wait for a connection). This would allow to change ssid/pswd and other configuration items. This could be useful for clubs with multiple gliders using same setup.

Go to Top of Page
Page: of 2 Previous Topic Topic Next Topic  
Previous Page
 New Topic  Reply to Topic
Jump To:
PostFrontal Forum © PostFrontal - La community del Volo a Vela Go To Top Of Page
This page was generated in 0.21 seconds. Snitz Forums 2000

Suggerimenti dello staff:

                                         

Note legali (italiano):
Privacy Policy Cookie Policy
Legal notice (english):
Privacy Policy Cookie Policy

PostFrontal S.A.S. di Giuliano Golfieri & c. - P.I. 05264240960