Go Down

Topic: Webbino - Server web "dinamico" per Arduino (Read 56705 times) previous topic - next topic

As_Needed

Domani (ovvero oggi) lo testo :D Per adesso vado a dormire :)
MY PWS!
http://forum.arduino.cc/index.php?topic=413560.0
http://meteoflaminia.zapto.org:4600

gpb01

#76
Nov 22, 2016, 05:50 am Last Edit: Nov 22, 2016, 05:51 am by gpb01
EDIT: Scusa @gpb01, ma da quel che leggo qua, anche il Wifi Shield usa SPI, quindi non puoi tenere il led sul pin 13!
Mea culpa ... è vero, per fare la prova velocemente ho usato il pin 13 ... rifaccio la prova con un altro pin e riporto !

EDIT2: E da qua, leggo che anche il 101! Non è che anche sulla MKR crea casino?
Però la MKR1000 ha il LED su un altro piedino ...

Quote
Onboard LED
On MKR1000 the onboard LED is connected to D6 and not D13 as on the other boards. Blink example needs to be changed to work properly.
... non credo c'entri nulla quindi.

Guglielmo
Search is Your friend ... or I am Your enemy !

gpb01

#77
Nov 22, 2016, 06:42 am Last Edit: Nov 22, 2016, 06:42 am by gpb01
Mea culpa ... è vero, per fare la prova velocemente ho usato il pin 13 ... rifaccio la prova con un altro pin e riporto !
Messo il LED sul pin 7 e rifatta la prova ...

Code: [Select]
Webbino 0.9.0
Trying to get an IP address through DHCP
FW Version: 1.1.0
Connecting to AP: xxxxxxxxxxxx
Joined AP, local IP address: 192.168.1.172
DHCP configuration done:
- IP: 192.168.1.172
- Netmask: 255.255.255.0
- Default Gateway: 192.168.1.1
Pages available in flash memory:
0. /index.html
Tags available:
0. ST_ON_CHK
1. ST_OFF_CHK
2. WEBBINO_VER
New client
Client disconnected
New client
Client disconnected
New client
Client disconnected
New client
Client disconnected
New client
Client disconnected

... non cambia nulla :(

Guglielmo
Search is Your friend ... or I am Your enemy !

gpb01

#78
Nov 22, 2016, 06:54 am Last Edit: Nov 22, 2016, 06:54 am by gpb01
Provato anche l'esempio SimpleServer ...

Code: [Select]
Webbino 0.9.0
Trying to get an IP address through DHCP
FW Version: 1.1.0
Connecting to AP: xxxxxxxxxx
Joined AP, local IP address: 192.168.1.172
DHCP configuration done:
- IP: 192.168.1.172
- Netmask: 255.255.255.0
- Default Gateway: 192.168.1.1
Pages available in flash memory:
0. /index.html
Tags available:
New client
Request for "/"
Redirecting to /index.html
Client disconnected
New client
Request for "/favicon.ico"
Client disconnected
New client
Request for "/"
Redirecting to /index.html
Client disconnected
New client

... la prima volta che vado sulla pagina, NON appare nulla, ma la sessione si chiude, se ricarico la pagina ... resta appeso.

Guglielmo
Search is Your friend ... or I am Your enemy !

gpb01

M'è venuto pure il dubbio che ci fosse qualche problema sull'hardware, ma ... ho caricato il classico esempio WiFiWebServer e ...

Code: [Select]
Attempting to connect to SSID: xxxxxxxxxxx
SSID: xxxxxxxxxx
IP Address: 192.168.1.172
signal strength (RSSI):-37 dBm
new client
GET /index.html HTTP/1.1
Host: 192.168.1.172
Connection: keep-alive
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.98 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
Accept-Encoding: gzip, deflate, sdch
Accept-Language: it,en-US;q=0.8,en;q=0.6

client disonnected

... funziona regolarmente  :smiley-confuse:

Guglielmo
Search is Your friend ... or I am Your enemy !

SukkoPera

Erm, non puoi usare nemmeno il 7:

Digital pin 7 is used as a handshake pin between the WiFi shield and the Arduino, and should not be used.
"Code is read much more often than it is written, so plan accordingly. Design for readability."

Guida rapida a ESP8266: https://goo.gl/kzh62E

gpb01

#81
Nov 22, 2016, 09:06 am Last Edit: Nov 22, 2016, 09:07 am by gpb01
Digital pin 7 is used as a handshake pin between the WiFi shield and the Arduino, and should not be used.
Azz ... si vede che è una vita che quella scheda è chiusa nel cassetto e non la uso ... provo con il 5 e riferisco :D

Guglielmo

P.S.: Però NON funzionava nenache il SimpleServer ...  :smiley-confuse:
Search is Your friend ... or I am Your enemy !

gpb01

#82
Nov 22, 2016, 09:11 am Last Edit: Nov 22, 2016, 09:15 am by gpb01
Si fa un passetto più avanti, ma ... sul browser NULLA ...

Code: [Select]
Webbino 0.9.0
Trying to get an IP address through DHCP
FW Version: 1.1.0
Connecting to AP: xxxxxxxxxxxx
Joined AP, local IP address: 192.168.1.172
DHCP configuration done:
- IP: 192.168.1.172
- Netmask: 255.255.255.0
- Default Gateway: 192.168.1.1
Pages available in flash memory:
0. /index.html
Tags available:
0. ST_ON_CHK
1. ST_OFF_CHK
2. WEBBINO_VER
New client
Request for "/index.html"
Processing replacement tag: "WEBBINO_VER"
Replacement is: "0.9.0"
Processing replacement tag: "ST_ON_CHK"
Replacement is: ""
Processing replacement tag: "ST_OFF_CHK"
Replacement is: "checked"
Client disconnected
New client
Client disconnected

... anzi, tu scrivi Client disconnected, ma il browser indica che sta ancora aspettando una risposta !

Guglielmo
Search is Your friend ... or I am Your enemy !

SukkoPera

#83
Nov 22, 2016, 09:13 am Last Edit: Nov 22, 2016, 09:15 am by SukkoPera
Giuro che non capisco :(.

La richiesta arriva, viene estratto l'url, recuperata la pagina corrispondente, inviata coi tag sostituiti ma non pare arrivare!
"Code is read much more often than it is written, so plan accordingly. Design for readability."

Guida rapida a ESP8266: https://goo.gl/kzh62E

gpb01

#84
Nov 22, 2016, 09:14 am Last Edit: Nov 22, 2016, 09:16 am by gpb01
... e, tolto del tutto il LED e caricato l'esempio "SimpleServer" ... stessa cosa ... il browser resta in attesa, mentre tu dici "Client disconnected" :

Code: [Select]
Webbino 0.9.0
Trying to get an IP address through DHCP
FW Version: 1.1.0
Connecting to AP: xxxxxxxxxx
Joined AP, local IP address: 192.168.1.172
DHCP configuration done:
- IP: 192.168.1.172
- Netmask: 255.255.255.0
- Default Gateway: 192.168.1.1
Pages available in flash memory:
0. /index.html
Tags available:
New client
Request for "/index.html"
Client disconnected
New client

Guglielmo

P.S.: Le prove le sto facendo con Chrome e con gli esempi classici della WiFi non ci sono problemi.
Search is Your friend ... or I am Your enemy !

SukkoPera

#85
Nov 22, 2016, 09:23 am Last Edit: Nov 22, 2016, 09:23 am by SukkoPera
Boh, puoi provare ad aggiungere un delay() qua:
Code: [Select]

void WebClientWifi::sendReply () {
flushBuffer ();

        delay (10);                        <-- QUA

internalClient.stop ();
DPRINTLN (F("Client disconnected"));
}


"Code is read much more often than it is written, so plan accordingly. Design for readability."

Guida rapida a ESP8266: https://goo.gl/kzh62E

zoomx

Forse ci vorrebbe uno spione di pacchetti. Per Linux (e quindi credo funzioni su OSX) conosco solo kismet.

gpb01

#87
Nov 22, 2016, 11:54 am Last Edit: Nov 22, 2016, 12:00 pm by gpb01
Boh, puoi provare ad aggiungere un delay() qua:
Il risultato NON cambia ...

Code: [Select]
Webbino 0.9.0
Trying to get an IP address through DHCP
FW Version: 1.1.0
Connecting to AP: xxxxxxxxxxx
Joined AP, local IP address: 192.168.1.172
DHCP configuration done:
- IP: 192.168.1.172
- Netmask: 255.255.255.0
- Default Gateway: 192.168.1.1
Pages available in flash memory:
0. /index.html
Tags available:
New client
Request for "/index.html"
Client disconnected
New client
Request for "/index.html"
Client disconnected
New client
Request for "/index.html"
Client disconnected
New client
Request for "/index.html"
Client disconnected

... mi sa che è venuto il momento che almeno uno shield WiFi te lo compri :D :D :D

Nota che tu scrivi sul monitor seriale "Client Disconnected", ma il browser non ha chiuso affatto la sessione e sta li ad aspettare di ricevere qualche cosa ...
... c'è qualche cosa che non va nella parte del codice che si occupa della "trasmissione" verso il WiFi ::)

Guglielmo
Search is Your friend ... or I am Your enemy !

gpb01

Non so se ti dica nulla ...
... ho decomennato queste tre righe di degug che ho trovato:

Code: [Select]
void WebClientWifi::flushBuffer () {
if (avail > 0) {
DPRINT (F("Flushing "));
DPRINT (avail);
DPRINTLN (F(" bytes to client"));

// The cast is needed on ESP8266 standalone, byt shouldn't hurt anywhere
internalClient.write ((const uint8_t *) buf, avail);
avail = 0;
}


Ho compilato il SimpleServer e lanciato, come al solito sul browser NON appare nulla, ma monitor seriale porta ti qualche info in più ...

Code: [Select]
Webbino 0.9.0
Trying to get an IP address through DHCP
FW Version: 1.1.0
Connecting to AP: xxxxxxxxx
Joined AP, local IP address: 192.168.1.172
DHCP configuration done:
- IP: 192.168.1.172
- Netmask: 255.255.255.0
- Default Gateway: 192.168.1.1
Pages available in flash memory:
0. /index.html
Tags available:
New client
Request for "/index.html"
Flushing 256 bytes to client
Flushing 238 bytes to client
Client disconnected
New client
Request for "/index.html"
Flushing 256 bytes to client
Flushing 238 bytes to client
Client disconnected
New client
Request for "/index.html"
Flushing 256 bytes to client
Flushing 238 bytes to client
Client disconnected
New client
Request for "/index.html"
Flushing 256 bytes to client
Flushing 238 bytes to client
Client disconnected

Nota che io NON ho ricaricato la pagina, ma tu continui a ciclare tra "Client disconnected" e "New client" fino a quando il browser si incavola e chiude lui la sessione ...

Ti dice nulla ?

Guglielmo
Search is Your friend ... or I am Your enemy !

As_Needed

Ancora non ho provato niente, ho compilato e basta e dà questo warning. Qualcosa di preoccupante? (mi riferisco al branch buffer) ;)

Code: [Select]
In file included from D:\Arduino\libraries\Webbinobuffer\src\WebbinoCore\WebServer.cpp:22:0:

D:\Arduino\libraries\Webbinobuffer\src\WebbinoCore\Content.h:76:7: warning: extra qualification 'SDContent::' on member 'getNextByte' [-fpermissive]

  char SDContent::getNextByte () override {

       ^



MY PWS!
http://forum.arduino.cc/index.php?topic=413560.0
http://meteoflaminia.zapto.org:4600

Go Up