Go Down

Topic: ESP8266 SPI WiFi Shield ("nice to have") (Read 4565 times) previous topic - next topic

Juraj

You mean soft reset the module (what is the command via WiFiSpi) or hard reset (I must wire one output from arduino to the reset pin of the ESP module)?
reset is only to activate the WiFiManager in setup() of the firmware, so softReset() will do
You can't write an Arduino sketch if you didn't learn programming. Not the language, but the concepts of programming - algorithms and data types.

bilekj

@gcampos: thanks for your contribution, I have just merged a slightly reworked code. The main problem I found was the permanently lid LED after connecting. I think it is unnecessary.

ameliaamelia

#47
Feb 08, 2019, 10:26 pm Last Edit: Feb 09, 2019, 12:30 am by ameliaamelia
I am trying the last release of WiFiESPSpi from GitHub with
//#define WIFIMANAGER_ENABLED
untouched.
The compiler shows same errors, not present in the previous release.
1-VisualMicro studio.
2-Arduino Due
3-Arduino IDE 1.8.9 2019/02/04


Compiling 'WiFiSpiESP' for 'NodeMCU 1.0 (ESP-12E Module)'
 
WiFiSpiESP.ino: 65:25: error: variable or field 'configModeCallback' declared void
   const char* PROTOCOL_VERSION = "0.2.0"
 
WiFiSpiESP.ino: 65:25: error: 'WiFiManager' was not declared in this scope
 
WiFiSpiESP.ino: 65:38: error: 'myWiFiManager' was not declared in this scope
   const char* PROTOCOL_VERSION = "0.2.0"
Error compiling project sources
Build failed for project 'WiFiSpiESP'


ameliaamelia

bilekj

Please check once more the file WiFiSPIEsp.ino. If you commented out the WIFIMANAGER_ENABLED define, there should be no wifimanager code needed.
I have correctly compiled the actual github version (master) for ESP8266 now.

ameliaamelia

#49
Feb 09, 2019, 10:04 am Last Edit: Feb 09, 2019, 10:06 am by ameliaamelia
Found.
Using the Arduino IDE directly, all goes fine.
It seems that Visual Micro does not manage
#ifdef
kindly.
I will continue to investigate.

ameliaamelia

ameliaamelia

... continue

The Visual Micro requires to have the WiFiManager installed and included;
it verifies the
configModeCallback (line 80)
anyway, not taking into account the presence of the negative directive
#ifdef WIFIMANAGER_ENABLED
...
#endif


With the
WifiManager.h
always included, OK.
It's an issue that concerns the Visual Micro Team.

ameliaamelia

bilekj

Try to change #ifdef xxxx to #if defined(xxxx), it may work.

ameliaamelia

#52
Feb 09, 2019, 02:33 pm Last Edit: Feb 09, 2019, 02:37 pm by ameliaamelia
The #if defined (...) does not work.
Please see the reply at:
https://www.visualmicro.com/forums/YaBB.pl?num=1549707860
The suggested temporary solution does work.
ameliaamelia

gcampos

reset is only to activate the WiFiManager in setup() of the firmware, so softReset() will do
Thanks!

gcampos

@gcampos: thanks for your contribution, I have just merged a slightly reworked code. The main problem I found was the permanently lid LED after connecting. I think it is unnecessary.
Thanks.


ameliaamelia

Currently I use the function:
...
     if (true == WiFi.SSID(i).startsWith("NETWORK-NAME-PREFIX"))
      {
...

to select the network.
It would be very nice if it were implemented.
Thank you in advance.

ameliaamelia.

bilekj

Hi, ameliaamelia,
I wonder, what is the test good for?

ameliaamelia

Just a make-up:

A-In the WiFiSpi module, I modified the parameters to maintain compatibility.

1-bool WiFiSpiClass :: config (IPAddress local_ip, IPAddress gateway, IPAddress dns_server) [row149]

2-bool WiFiSpiClass :: config (IPAddress local_ip, IPAddress gateway, IPAddress subnet, IPAddress dns_server) [row 157]
I just put the dns_server parameter as the last one.

B- In your examples there is the sequence

   while (! Udp.parsePacket () && (millis () - startMs) <UDP_TIMEOUT) {}

   // when there should be a packet do not call parsePacket () once more, call available () instead
   if (Udp.available ()) {


but when Udp.parsePacket () gives the result > 0, Udp.available () always gives the result = 0.
I removed Udp.available ()).

I am still in the testing phase to convert the whole network(20). I am waiting for the empty WiFiSpi card (for simplicity I used a NodeMCU 1.0) to replace the Arduino-Ethernet board..
Thanks again.

ameliaamelia

ameliaamelia

In reply to:
"I wonder, what is the test good for?"

In my house(very large), I have several WiFi repeaters. I am using this function to select the dedicated access points; some are on internal-private network,others only on external pubblic network.
I temporaly used a strncmp(ssid,xxxxx,5).
Es. APINT01 APINT02 APEXTERN

ameliaamelia

ameliaamelia

My tests.

Sessions of 60 messages sent/receive:

4Mhz
[wifispi_drv.cpp:262] W: Error waitResponse
[srvspi_drv.cpp:360] W: Error waitResponse
8Mhz
[espspi_proxy.h:219] W: Bad CRC, retransmitting
[espspi_proxy.h:329] W: Slave tx is not ready, status 0
[wifispi_drv.cpp:262] W: Error waitResponse
[espspi_proxy.h:261] W: Bad CRC, request repeated
[srvspi_drv.cpp:236] W: Error waitResponse
10Mhz
[espspi_proxy.h:219] W: Bad CRC, retransmitting
12Mhz
[srvspi_drv.cpp:360] W: Error waitResponse
[espspi_proxy.h:261] W: Bad CRC, request repeated
13Mhz
[espspi_proxy.h:329] W: Slave tx is not ready, status 0
[srvspi_drv.cpp:360] W: Error waitResponse
13.5Mhz
[espspi_proxy.h:219] W: Bad CRC, retransmitting
14Mhz not working ...

Response time 10-12ms, some 50ms.

Arduino DUE+NodeMCU 1.0.

ameliaamelia

Go Up