connection gateway with nodes over wifi

123 views
Skip to first unread message

guyc

unread,
Apr 22, 2024, 11:18:01 AM4/22/24
to souliss
Hi all,

My system is built as follows: gateway: Arduino Mega with ENC28J60 Ethernet Shield.
Now I want to connect this to a 2nd system, also built with an Arduino Mega. Since I have no wired connection between the two and also no ethernet connection in the vicinity of the 2nd Arduino Mega, I want to connect this 2nd system via WiFi. Both are on the same LAN network though.
The Souliss documentation says that this is possible by connecting an esp1 to this node as wifi shield and defining it as an additional node. So the configuration would be : 
node 0 gaterway
node 1 esp1 
node 2 2nd arduino Mega .
 What I cannot find in the description is how to connect this esp1 to the Arduino Mega (pins?) in question.

many thanks


Dario Di Maio

unread,
Apr 22, 2024, 12:46:03 PM4/22/24
to sou...@googlegroups.com
Hi,

the ESP as WiFi transceiver has quite poor performances as the communication is over serial.

A better solution is to use a small travel router like the TPLink N300 to get wireless conmection to the Mega.

Regards,
Dario.

--
You received this message because you are subscribed to the Google Groups "souliss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to souliss+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/souliss/32c840fe-b683-4fd7-8e58-00f7ba98d61an%40googlegroups.com.

guyc

unread,
Apr 22, 2024, 3:15:21 PM4/22/24
to souliss
thanks
Does it mean I also have to install an  ENC28J60 Ethernet Shield at the second arduino mega and connect this to the rTPlink N300 ?

Op maandag 22 april 2024 om 18:46:03 UTC+2 schreef dari....@gmail.com:

Dario Di Maio

unread,
Apr 22, 2024, 3:42:10 PM4/22/24
to sou...@googlegroups.com
Yep right, but the ENC is poor in performances like the ESP.

If you want to go for a Mega I would suggest an ESO flashed with Souliss WiFi+Serial as Bridge for the Mega via Serial.

In this way the TCP/IP stack is not handled via Serial.

This probably could help, but you will go Serial RS232 point to point so that an external 232/485 transceiver is not required

guyc

unread,
Apr 23, 2024, 4:12:58 PM4/23/24
to souliss

Dario,

This I don't understand.  What is a ESO ?
Op maandag 22 april 2024 om 21:42:10 UTC+2 schreef dari....@gmail.com:

Dario Di Maio

unread,
Apr 24, 2024, 12:59:30 AM4/24/24
to sou...@googlegroups.com

guyc

unread,
Apr 24, 2024, 3:01:47 AM4/24/24
to souliss
This means I have to replace the arduino Mega with a ESP32 I suppose. Unfortunately I cannot do this because I have too much I/O for a ESP32.

I think I gone make it a try to do it as described in the wiki  : https://github.com/souliss/souliss/wiki/ESP8266-to-RS485. At the end the communication between the 2 modules I have will be not so much

Op woensdag 24 april 2024 om 06:59:30 UTC+2 schreef dari....@gmail.com:

Dario Di Maio

unread,
Apr 24, 2024, 4:51:17 AM4/24/24
to sou...@googlegroups.com
Yep that what I mean

guyc

unread,
Sep 23, 2024, 5:59:27 PM9/23/24
to souliss
I'm so far with my installation  using  the description on https://github.com/souliss/souliss/wiki/ESP8266-to-RS485  but it doesn't work. 
configuration :
Node 0 : ESP32 as gateway
Node 1: esp01 as bridge and directly connected with node 2 (arduino Mega) by RS232 ( TX2 mega <->RX esp01, RX2 mega<->TXesp01)
sketch in node O (gateway) :
     #include "SoulissFramework.h"
#include "bconf/MCU_ESP32.h"              // Load the code directly on the ESP32
#include "conf/Gateway_wPersistence.h"  
#include "conf/IPBroadcast.h"
#define WIFICONF_INSKETCH
#define WiFi_SSID               "my SSID"
#define WiFi_Password           "password"
   
#include <WiFi.h>
#include <EEPROM.h>

uint8_t ip_address[4]  = {192, 168, 43, 77};
uint8_t subnet_mask[4] = {255, 255, 255, 0};
uint8_t ip_gateway[4]  = {192, 168, 43, 1};
#define myvNet_address  ip_address[3]      
#include "Souliss.h"
void setup()
    Initialize();
    Souliss_SetIPAddress(ip_address, subnet_mask, ip_gateway);
    SetAsGateway(myvNet_address);                                   // Set this node as gateway for SoulissApp
    SetAddress(0xAB01, 0xFF00, 0x0000);
    SetAsPeerNode(0xD002, 1);
    RoutingTable(0xAB02, 0xD000, 0);
void loop()
{
    // Here we start to play
    EXECUTEFAST() {                    
        UPDATEFAST();  
       
        FAST_510ms() {
.....}
  FAST_GatewayComms();                                        
    }
} sketch in node1  (bridge) :
#include "SoulissFramework.h"
#include "bconf/MCU_ESP8266.h"              // Load the code directly on the ESP8266
#include "conf/SuperNode.h"                   // The main node is the Gateway, we have just one node
#include "conf/usart.h"                      // USART
#include "conf/IPBroadcast.h"

#define WIFICONF_INSKETCH
#define WiFi_SSID               "my SSID"
#define WiFi_Password           "password"
#include <ESP8266WiFi.h>
#include "Souliss.h"
void setup()
{  
    Initialize();
    GetIPAddress();                          
    SetAsGateway(myvNet_dhcp);       // Set this node as gateway for SoulissApp  

    SetAddress(0xAB02, 0xFF00, 0xAB01);
    SetAddress(0xD001, 0xFF00, 0x0000);
}
void loop()
{
   EXECUTEFAST() {                    
        UPDATEFAST();  

    FAST_BridgeComms();
}
}
sketch in node2  (peer) :
#include <SoulissFramework.h>
#include "bconf/StandardArduino.h"          // Use a standard Arduino
#include "conf/usart.h"
#define USARTDRIVER_INSKETCH
#define USART_TXENABLE          1
#define USART_TXENPIN           3
#define USARTDRIVER             Serial2
//#define USART_COLLISION   0
#include <SPI.h>
#include "Souliss.h"
void setup()
{
  Serial.begin(9600);
  Initialize();
    SetAddress(0xD002, 0xFF00, 0xD001);  
.....
}
void loop()
{
  EXECUTEFAST() {
    UPDATEFAST();
FAST_110ms() {
     ...
         }
      FAST_PeerComms();
 
      START_PeerJoin();
} } In the Souliss app, I can see and control the slots from the gateway. Also the bridge node (node1) with 0 slots. But not node 2.

The bridge node is online, because I can see his IP-address.

Op woensdag 24 april 2024 om 10:51:17 UTC+2 schreef dari....@gmail.com:

Dario Di Maio

unread,
Sep 24, 2024, 1:22:27 AM9/24/24
to sou...@googlegroups.com
Seems that you are missing to enable the usart on the bridge.

guyc

unread,
Sep 24, 2024, 3:09:00 AM9/24/24
to souliss
Dear Dario,
the mega (peer)and the bridge ( esp01) are cross connected. Not with a RS485 transceiver. How can I enable the uart ont the bridge ?

Op dinsdag 24 september 2024 om 07:22:27 UTC+2 schreef dari....@gmail.com:

Dario Di Maio

unread,
Sep 24, 2024, 6:32:56 AM9/24/24
to sou...@googlegroups.com
I replied from mobile and didn't catched the #include "conf/usart.h" in the bridge note, but now I see that is there.

Do you have a common 0VDC between the bridge and peer? Using RS232 you need a common ground path. What about LEDs? Do you see any blink on the RX side of the bridge?


guy caluwaerts

unread,
Sep 24, 2024, 6:49:04 AM9/24/24
to sou...@googlegroups.com


I have a ground connection between the esp and the mega.

No led's blink on esp and mega. 
mega pin 3 to EN-pin esp.

I tried also uart 3 but no result
Guy


Dario Di Maio

unread,
Sep 24, 2024, 7:49:59 AM9/24/24
to sou...@googlegroups.com
The enable (EN) is not required in RS232.

If you see no blinking on the RX of the bridge means that the node is not even starting to communicate.

I don't see anything apparently wrong, so I can only suggest to enable the debug on the gateway node and print on the serial console the traffic starting from zero (rebuild the typicals and so on)

# define VNET_DEBUG_INSKETCH
# define VNET_DEBUG   1



guy caluwaerts

unread,
Sep 24, 2024, 9:06:57 AM9/24/24
to sou...@googlegroups.com
this is what Irzeceive in the gateway :

vNet)<SETADDR><|0x4D>
(IP)<C0,A8,2B,4D,>
(vNet)<SETADDR><|0xAB01>
(vNet)<OUTPATH><|0x5>
(vNet)<NHBOR><|0x3>
(vNet)<MEDIA><|0x3>
(vNet)<OUT><DADDR><|0xAB02><|0xB|0x17|0xD002|0xAB01>


You received this message because you are subscribed to a topic in the Google Groups "souliss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/souliss/hdhHjWGYqS8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to souliss+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/souliss/CAB85T%3DTrbq4Usw0bCrn50TKhStppZQVitKYNKtd9oQQJoAYTgQ%40mail.gmail.com.

guy caluwaerts

unread,
Sep 24, 2024, 9:15:17 AM9/24/24
to sou...@googlegroups.com
see log in attachment

You received this message because you are subscribed to a topic in the Google Groups "souliss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/souliss/hdhHjWGYqS8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to souliss+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/souliss/CAB85T%3DTrbq4Usw0bCrn50TKhStppZQVitKYNKtd9oQQJoAYTgQ%40mail.gmail.com.
ScreenShot_24_09_2024_15_13_02.png

guy caluwaerts

unread,
Sep 24, 2024, 1:28:57 PM9/24/24
to 'guy caluwaerts' via souliss
# define VNET_DEBUG_INSKETCH
# define VNET_DEBUG   1
 included, but what and how do I print it to the serial monitor ?

guy caluwaerts

unread,
Sep 24, 2024, 1:41:23 PM9/24/24
to 'guy caluwaerts' via souliss
Rebooting...
h�� �܌���q
�Hǽ�}� !����Guru Meditation Error: Core  1 panic'ed (LoadProhibited). Exception was unhandled.

Core  1 register dump:
PC      : 0x400d7e53  PS      : 0x00060930  A0      : 0x800d49f7  A1      : 0x3ffb2210  
A2      : 0x00000000  A3      : 0x0001631d  A4      : 0x00000001  A5      : 0x3ffc33ae  
A6      : 0x0000000c  A7      : 0x00000000  A8      : 0x3ffc37fa  A9      : 0x00000020  
A10     : 0x00000000  A11     : 0x00000001  A12     : 0x3ffc4168  A13     : 0x00000001  
A14     : 0x3ffb2118  A15     : 0x3ffc43bc  SAR     : 0x00000000  EXCCAUSE: 0x0000001c  
EXCVADDR: 0x00000014  LBEG    : 0x400844a1  LEND    : 0x400844a9  LCOUNT  : 0x00000027  


Backtrace: 0x400d7e50:0x3ffb2210 0x400d49f4:0x3ffb2230 0x400d48db:0x3ffb2250 0x400da218:0x3ffb2270 0x4008e72a:0x3ffb2290




ELF file SHA256: 321199c15eda4983

(vNet)<MEDIA><|0x1>
(vNet)<OUT><DADDR><|0x474D><|0xB|0x17|0x474D|0x4D>
(vNet)<OUTPATH><|0x5>
(vNet)<NHBOR><|0x3>
(vNet)<MEDIA><|0x3>
(vNet)<OUT><DADDR><|0xAB02><|0xB|0x17|0xD002|0xAB01>
(vNet)<IN>(0x18)<|0xB|0x17|0x4D|0x474D|0x27|0x0|0x0|0x0|0x1>
(vNet)<OUTPATH><|0x1>
(vNet)<MEDIA><|0x1>
(vNet)<OUT><DADDR><|0x474D><|0x34|0x17|0x474D|0x4D>
(vNet)<IN>(0x18)<|0xB|0x17|0x4D|0x474D|0x25|0x0|0x0|0x0|0x2>
(vNet)<OUTPATH><|0x1>
(vNet)<MEDIA><|0x1>
(vNet)<OUT><DADDR><|0x474D><|0xD|0x17|0x474D|0x4D>
(vNet)<IN>(0x18)<|0xB|0x17|0x4D|0x474D|0x21|0x0|0x0|0x0|0x2>
(vNet)<OUTPATH><|0x1>
(vNet)<MEDIA><|0x1>
(vNet)<OUT><DADDR><|0x474D><|0x34|0x17|0x474D|0x4D>
(vNet)<OUTPATH><|0x5>
(vNet)<NHBOR><|0x3>
(vNet)<MEDIA><|0x3>
(vNet)<OUT><DADDR><|0xAB02><|0xB|0x17|0xD002|0xAB01>
(vNet)<IN>(0x18)<|0xB|0x17|0x4D|0x474D|0x8|0xF|0x0|0x0|0x0>
(vNet)<OUTPATH><|0x1>
(vNet)<MEDIA><|0x1>
(vNet)<OUT><DADDR><|0x474D><|0xB|0x17|0x474D|0x4D>
(vNet)<OUTPATH><|0x5>
(vNet)<NHBOR><|0x3>
(vNet)<MEDIA><|0x3>
(vNet)<OUT><DADDR><|0xAB02><|0xB|0x17|0xD002|0xAB01>

Dario Di Maio

unread,
Sep 24, 2024, 2:25:19 PM9/24/24
to sou...@googlegroups.com
The Gateway is doing his job
(vNet)<OUT><DADDR><|0xAB02><|0xB|0x17|0xD002|0xAB01>

Is more tricky to get some log from the bridge, because you don't have another Serial to print. An UDP broadcast can be used instead.

While doing those test the USB port on the ESP as bridge is not connected, right?

guy caluwaerts

unread,
Sep 24, 2024, 2:29:27 PM9/24/24
to sou...@googlegroups.com
The serial port Tx and RX from the esp01 were connected to the serial port 3 from the arduino during the log.


Op di, sep. 24, 2024 om 19:25 schreef Dario Di Maio

guy caluwaerts

unread,
Sep 24, 2024, 5:45:40 PM9/24/24
to sou...@googlegroups.com
Could the problem be the aurduino mega ? I'm using a chinese arduino mega for these test. I gone order an original arduino to be sure.

guy caluwaerts

unread,
Sep 25, 2024, 11:21:21 AM9/25/24
to 'guy caluwaerts' via souliss
today I made additional tests :

- all nodes has thier own power supply
- Arduino mega : the serial ports tested and ok.
- replaced the esp01 by a nodemcu12.

 no result. There is no communication between the arduino mega and the nodemcu. In the app, I only see nod0 with his typicals and node1 ( empty). No node2

guy

Dario Di Maio

unread,
Sep 25, 2024, 1:47:36 PM9/25/24
to sou...@googlegroups.com
You see 2 nodes in the app because you have declared only one peer, so you see the Gateway and the Peer (the mega). That's fine.

Please enable the logging on the bridge node via TCP/IP and paste the result.

You will need to connect to the bridge via Putty in Telnet mode on port 23.

guy caluwaerts

unread,
Sep 25, 2024, 4:24:12 PM9/25/24
to sou...@googlegroups.com
do you mean, the bridge node is not visible in the app ?
please find the log :
l9' ���t ��V��N%��ȵՅ���(vNet)<USERMODE><0x0|0x0|0x0|0x0|0x0|0x>
(vNet)<SETADDR><|0x4D>
(IP)<C0,A8,2B,4D,>
(vNet)<SETADDR><|0xAB01>
(vNet)<OUTPATH><|0x5>
(vNet)<NHBOR><|0x3>
(vNet)<MEDIA><|0x3>
(vNet)<OUT><DADDR><|0xAB02><|0xB|0x17|0xD002|0xAB01>
(vNet)<USERMODE><0x474D|0x0|0x0|0x0|0x0|0x>
(vNet)<IN>(0x18)<|0xB|0x17|0x4D|0x474D|0x27|0x0|0x0|0x1|0x1>
(vNet)<IN>(0x18)<|0xB|0x17|0x4D|0x474D|0x8|0xF|0x0|0x0|0x0>
(vNet)<OUTPATH><|0x1>
(vNet)<MEDIA><|0x1>
(vNet)<OUT><DADDR><|0x474D><|0xB|0x17|0x474D|0x4D>
(vNet)<OUTPATH><|0x5>
(vNet)<NHBOR><|0x3>
(vNet)<MEDIA><|0x3>
(vNet)<OUT><DADDR><|0xAB02><|0xB|0x17|0xD002|0xAB01>
(vNet)<IN>(0x18)<|0xB|0x17|0x4D|0x474D|0x8|0xF|0x0|0x0|0x0>
(vNet)<OUTPATH><|0x1>
(vNet)<MEDIA><|0x1>
(vNet)<OUT><DADDR><|0x474D><|0xB|0x17|0x474D|0x4D>
(vNet)<IN>(0x18)<|0xB|0x17|0x4D|0x474D|0x21|0x0|0x0|0x0|0x2>
(vNet)<OUTPATH><|0x1>
(vNet)<MEDIA><|0x1>
(vNet)<OUT><DADDR><|0x474D><|0x34|0x17|0x474D|0x4D>
(vNet)<OUTPATH><|0x5>
(vNet)<NHBOR><|0x3>
(vNet)<MEDIA><|0x3>
(vNet)<OUT><DADDR><|0xAB02><|0xB|0x17|0xD002|0xAB01>
(vNet)<IN>(0x18)<|0xB|0x17|0x4D|0x474D|0x27|0x0|0x0|0x0|0x1>
(vNet)<OUTPATH><|0x1>
(vNet)<MEDIA><|0x1>
(vNet)<OUT><DADDR><|0x474D><|0x34|0x17|0x474D|0x4D>

guy caluwaerts

unread,
Sep 26, 2024, 4:21:16 AM9/26/24
to 'guy caluwaerts' via souliss
maybe a stupid question, but is uart.h compatible with the CH340  chip ?

Dario Di Maio

unread,
Sep 26, 2024, 5:18:15 AM9/26/24
to sou...@googlegroups.com
For some reasons the USART seems not enabled, is missing a (vNet)<SETADDR> on 0xD0001.

The node is trying to go via (vNet)<OUTPATH><|0x5> (USART) but then it router via Wifi (vNet)<NHBOR><|0x3>

Dario Di Maio

unread,
Sep 26, 2024, 5:19:21 AM9/26/24
to sou...@googlegroups.com
You need to remove any Serial to USB device (if external) or power the device not from USB if embedded.

guy caluwaerts

unread,
Sep 26, 2024, 5:46:23 AM9/26/24
to sou...@googlegroups.com
There are no serial to usb devices connected (not to the gateway, bridge and peer)
All 3 are powered by their own power supply. Not by usb. Ground connection between the 3
Op do, sep. 26, 2024 om 10:19 schreef Dario Di Maio
You need to remove any Serial to USB device (if external) or power the device not from USB if embedded.

--
You received this message because you are subscribed to a topic in the Google Groups "souliss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/souliss/hdhHjWGYqS8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to souliss+u...@googlegroups.com.

guy caluwaerts

unread,
Sep 26, 2024, 5:48:35 AM9/26/24
to sou...@googlegroups.com
How can I change this ?

--
You received this message because you are subscribed to a topic in the Google Groups "souliss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/souliss/hdhHjWGYqS8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to souliss+u...@googlegroups.com.

Dario Di Maio

unread,
Sep 26, 2024, 2:50:10 PM9/26/24
to sou...@googlegroups.com
Let's try to put some more debug, add those to the previous sketch of the bridge

#define USART_DEBUG_INSKETCH
#define USART_DEBUG   1

#define MaCaco_DEBUG_INSKETCH
#define MaCaco_DEBUG   0

#define SERIALPORT_INSKETCH
#define LOG    serverClient
#define USART_LOG serverClient

guy caluwaerts

unread,
Sep 27, 2024, 2:29:24 PM9/27/24
to sou...@googlegroups.com
I receive an error : 'serverclient not defined in this scope'.

guy

--
You received this message because you are subscribed to a topic in the Google Groups "souliss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/souliss/hdhHjWGYqS8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to souliss+u...@googlegroups.com.
To view this discussion on the web visit

Dario Di Maio

unread,
Sep 27, 2024, 2:32:05 PM9/27/24
to sou...@googlegroups.com

You received this message because you are subscribed to the Google Groups "souliss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to souliss+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/souliss/221786373.10883056.1727461760262%40mail.yahoo.com.

guy caluwaerts

unread,
Sep 27, 2024, 5:11:13 PM9/27/24
to sou...@googlegroups.com
That's a little to technical for me to understand.  (  tenet, putty ????)

Maybe it's easier to replace the esp01 as bridge temporary with a esp32 to have a serial connection with the PC to make the log.



guy caluwaerts

unread,
Oct 12, 2024, 11:08:40 AM10/12/24
to sou...@googlegroups.com
I replaced the esp01 by an esp32 to do the test, but same result. The esp32 (bridge) and the arduino mega (peer) do not communicate.

bridge :
// Configure the framework
#include "SoulissFramework.h"

//#include "bconf/MCU_ESP8266.h"              // Load the code directly on the ESP8266
#include "bconf/MCU_ESP32.h"              // Load the code directly on the ESP32

#include "conf/SuperNode.h"                   // The main node is the Gateway, we have just one node
#include "conf/usart.h"                      // USART
#include "conf/IPBroadcast.h"

// **** Define the WiFi name and password ****
#define WIFICONF_INSKETCH
#define WiFi_SSID               "xxxx"
#define WiFi_Password           "yyy"      

#define USARTDRIVER_INSKETCH
#define USARTDRIVER Serial2
#define USART2_DEBUG_INSKETCH
#define USART2_DEBUG   1
#define MaCaco_DEBUG_INSKETCH
#define MaCaco_DEBUG   0
#define SERIALPORT_INSKETCH
#define LOG    serverClient
#define USART2_LOG serverClient
#define USART2_BAUD9k6   -  USART at 9600   bps  
// Include framework code and libraries
//#include <ESP8266WiFi.h>
#include <WiFi.h>
#include <EEPROM.h
//*** All configuration includes should be above this line ***/
#include "Souliss.h"


void setup()
{  
    Serial.begin(9600);

    Initialize();
// Connect to the WiFi network and get an address from DHCP
    GetIPAddress();                          
    SetAsGateway(myvNet_dhcp);       // Set this node as gateway for SoulissApp         
    // This is the vNet address for this node, used to communicate with other
    // nodes in your Souliss network
    SetAddress(0xAB02, 0xFF00, 0xAB01);
    SetAddress(0xD001, 0xFF00, 0x0000);
    //SetAsPeerNode(0xD002, 1);
}

void loop()
{
   EXECUTEFAST() {                    
        UPDATEFAST();  

    FAST_BridgeComms();
}
}

peer :
// Configure the framework
#include <SoulissFramework.h>
#include "bconf/StandardArduino.h"          // Use a standard Arduino
#include "conf/usart.h"                     //  USART RS485

#include <Wire.h>
String str;
// dmx LIBRARY
//#include "DMXSerial_megaavr.h"  
//#include <DMXSerial.h>
#include <SPI.h>


#define USARTDRIVER_INSKETCH
#define USART_TXENABLE          0
#define USART_TXENPIN           3
#define USARTDRIVER             Serial3
//#define USART_COLLISION   0
//#define ENABLE_WIFI true
#define USART3_BAUD9k6    -  USART at 9600   bps  
#include <EEPROM.h>
#define SERIALPORT_INSKETCH
#define LOG          Serial3
#include <SPI.h>
#include "Souliss.h"
int i;
#define L25A     0

void setup()
{
  //Serial3.begin(9600);
  Serial.begin(9600);
//DMXSerial.init(DMXController);
  Initialize();
    SetAddress(0xD002, 0xFF00, 0xD001);  
       // SetAddress(0xD002, 0xFF00, 0xAB02);  
    Set_SimpleLight(L25A);  //K4 wand
 
  // inputs
    pinMode(23, INPUT); // S25
  //outputs
  pinMode(A14, OUTPUT); //  L26
}
void loop()
{

  EXECUTEFAST() {
    UPDATEFAST();
         FAST_110ms() {
      DigIn(23, Souliss_T1n_ToggleCmd,L25A);
      Logic_SimpleLight(L25A);//
      DigOut(A14, Souliss_T1n_Coil,L25A);
         }
      FAST_PeerComms();
      START_PeerJoin();

  if (Serial3.available()) {
    str = Serial3.readString();
    Serial.print("str: ");
    Serial.println(str);}
  }
  }



guyc

unread,
Oct 13, 2024, 5:35:03 PM10/13/24
to souliss
I was testing today with several configurations, but no result.
is uart.h compatible with the  4 aurt's from the mega or is uart.h compatible with the softwareserial for a arduino uno ? 
How to set the baudrate in the bridge and the arduino mega ? 
Op zaterdag 12 oktober 2024 om 17:08:40 UTC+2 schreef guyc:

Dario Di Maio

unread,
Oct 13, 2024, 6:45:06 PM10/13/24
to sou...@googlegroups.com
Unless you are able to go trough the wiki and setup the diagnostic in case of USART I ser no space for support. Sorry.

Luca Calcaterra

unread,
Oct 14, 2024, 8:50:16 AM10/14/24
to souliss
I'm managed to connect nodemcu (esp8266- 12 f) with a mega 2560 over rs485. For direct serial probably is there different ttl levels ?  Esp is 3.3v , mega2560 is 5v.

Have you checked this ?



guyc

unread,
Oct 14, 2024, 2:07:55 PM10/14/24
to souliss
Dario,
I try to understand the wiki, but I'm not an IT specialist. It will take some time to struggle through  this.
As asked I included i n the bridge sketch :
    #define USART_DEBUG_INSKETCH
    #define USART_DEBUG   1
    #define MaCaco_DEBUG_INSKETCH
    #define MaCaco_DEBUG   0
    #define SERIALPORT_INSKETCH
    #define LOG    serverClient
    #define USART_LOG serverClient

but I receive  errors and cannot compile :
c:\Users\Admin\Documents\Arduino\libraries\souliss/frame/vNet/drivers/generic/usart/vNetDriver_usart.cpp: In function 'void vNet_SetCollisionAvoidanceIndex_M5(uint16_t, uint16_t)':
C:\Users\Admin\Documents\Arduino\wifi_bridge_esp_2\wifi_bridge_esp_2.ino:28:19: error: 'serverClient' was not declared in this scope
   28 | #define USART_LOG serverClient
      |                   ^~~~~~~~~~~~
c:\Users\Admin\Documents\Arduino\libraries\souliss/frame/vNet/drivers/generic/usart/vNetDriver_usart.cpp:164:2: note: in expansion of macro 'USART_LOG'
  164 |  USART_LOG("(USART)<CA Index>\r\n");
      |  ^~~~~~~~~
c:\Users\Admin\Documents\Arduino\libraries\souliss/frame/vNet/drivers/generic/usart/vNetDriver_usart.cpp: In function 'uint8_t vNet_Send_M5(uint16_t, oFrame*, uint8_t)':
C:\Users\Admin\Documents\Arduino\wifi_bridge_esp_2\wifi_bridge_esp_2.ino:28:19: error: 'serverClient' was not declared in this scope
   28 | #define USART_LOG serverClient
      |                   ^~~~~~~~~~~~
c:\Users\Admin\Documents\Arduino\libraries\souliss/frame/vNet/drivers/generic/usart/vNetDriver_usart.cpp:189:3: note: in expansion of macro 'USART_LOG'
  189 |   USART_LOG("(USART)<Send> Try\r\n");
      |   ^~~~~~~~~
C:\Users\Admin\Documents\Arduino\wifi_bridge_esp_2\wifi_bridge_esp_2.ino:28:19: error: 'serverClient' was not declared in this scope
   28 | #define USART_LOG serverClient
      |                   ^~~~~~~~~~~~
c:\Users\Admin\Documents\Arduino\libraries\souliss/frame/vNet/drivers/generic/usart/vNetDriver_usart.cpp:258:2: note: in expansion of macro 'USART_LOG'
  258 |  USART_LOG("(USART)<Send> Bus free\r\n");
      |  ^~~~~~~~~
c:\Users\Admin\Documents\Arduino\libraries\souliss/frame/vNet/drivers/generic/usart/vNetDriver_usart.cpp: In function 'uint8_t vNet_DataAvailable_M5()':
C:\Users\Admin\Documents\Arduino\wifi_bridge_esp_2\wifi_bridge_esp_2.ino:28:19: error: 'serverClient' was not declared in this scope
   28 | #define USART_LOG serverClient
      |                   ^~~~~~~~~~~~
c:\Users\Admin\Documents\Arduino\libraries\souliss/frame/vNet/drivers/generic/usart/vNetDriver_usart.cpp:361:3: note: in expansion of macro 'USART_LOG'
  361 |   USART_LOG("(USART)<Read> Frame reset\r\n");
      |   ^~~~~~~~~
C:\Users\Admin\Documents\Arduino\wifi_bridge_esp_2\wifi_bridge_esp_2.ino:28:19: error: 'serverClient' was not declared in this scope
   28 | #define USART_LOG serverClient
      |                   ^~~~~~~~~~~~
c:\Users\Admin\Documents\Arduino\libraries\souliss/frame/vNet/drivers/generic/usart/vNetDriver_usart.cpp:387:2: note: in expansion of macro 'USART_LOG'
  387 |  USART_LOG("(USART)<Read> Data aval\r\n");
      |  ^~~~~~~~~
c:\Users\Admin\Documents\Arduino\libraries\souliss/frame/vNet/drivers/generic/usart/vNetDriver_usart.cpp: In function 'uint8_t vNet_RetrieveData_M5(uint8_t*)':
C:\Users\Admin\Documents\Arduino\wifi_bridge_esp_2\wifi_bridge_esp_2.ino:28:19: error: 'serverClient' was not declared in this scope
   28 | #define USART_LOG serverClient
      |                   ^~~~~~~~~~~~
c:\Users\Admin\Documents\Arduino\libraries\souliss/frame/vNet/drivers/generic/usart/vNetDriver_usart.cpp:530:3: note: in expansion of macro 'USART_LOG'
  530 |   USART_LOG("(USART)<Read> Retrieve data\r\n");
      |   ^~~~~~~~~
C:\Users\Admin\Documents\Arduino\wifi_bridge_esp_2\wifi_bridge_esp_2.ino:28:19: error: 'serverClient' was not declared in this scope
   28 | #define USART_LOG serverClient
      |                   ^~~~~~~~~~~~
c:\Users\Admin\Documents\Arduino\libraries\souliss/frame/vNet/drivers/generic/usart/vNetDriver_usart.cpp:609:3: note: in expansion of macro 'USART_LOG'
  609 |   USART_LOG("(USART)<Read> Retrieve length failed\r\n");
      |   ^~~~~~~~~
exit status 1
Compilation error: 'serverClient' was not declared in this scope

The connection between bridge and arduino are TX esp to RX3 mega and TXmega over a voltage divider (1k/2k2) to RX esp. GND esp connected with GND mega
Op maandag 14 oktober 2024 om 14:50:16 UTC+2 schreef calcate...@gmail.com:

guyc

unread,
Oct 16, 2024, 8:01:40 AM10/16/24
to souliss
I installed Putty meanwhile and activad Telnet.  The problem now is the errors in the sketch from the bridge what I cannot solve.

In the wike for the bridge is mentioned in the setup  : "SetAsGateway(myvNet_dhcp); // Set this node as gateway for SoulissApp" is this correct ?
Op maandag 14 oktober 2024 om 20:07:55 UTC+2 schreef guyc:
error log.doc
wifi_bridge_esp_2.ino
Reply all
Reply to author
Forward
0 new messages