Ajouté l'information pour la configuration du NAT pour le petit repeater WIFI

This commit is contained in:
Christian Zufferey
2020-04-22 17:29:56 +02:00
parent 6bcfb2f5f3
commit 3b9eecb26a
29 changed files with 61 additions and 37 deletions

View File

@@ -1,4 +1,4 @@
-- Petit script pour configurer le client WIFI du NodeMCU -- Petit script pour configurer le client WIFI du NodeMCU
print("\n wifi_cli_conf.lua zf180824.2000 \n") print("\n wifi_cli_conf.lua zf180824.2000 \n")
wifi.sta.config{ssid="3g-s7", pwd="12234567", save=true} wifi.sta.config{ssid="3g-s7", pwd="xxx", save=true}

View File

@@ -1,4 +1,4 @@
-- Petit script pour configurer le client WIFI du NodeMCU -- Petit script pour configurer le client WIFI du NodeMCU
print("\n wifi_cli_conf.lua zf180824.2000 \n") print("\n wifi_cli_conf.lua zf180824.2000 \n")
wifi.sta.config{ssid="3g-s7", pwd="12234567", save=true} wifi.sta.config{ssid="3g-s7", pwd="xxx", save=true}

View File

@@ -4,7 +4,7 @@ print("\n wifi_cli_conf.lua zf181205.1931 \n")
--credentials par défaut --credentials par défaut
cli_ssid="3g-s7" cli_ssid="3g-s7"
cli_pwd="12234567" cli_pwd="xxx"
--ses propre credentials --ses propre credentials
f= "credentials.lua" if file.exists(f) then dofile(f) end f= "credentials.lua" if file.exists(f) then dofile(f) end

View File

@@ -6,7 +6,7 @@ function wifi_cli_conf()
--credentials par défaut --credentials par défaut
--cli_ssid="3g-s7" --cli_ssid="3g-s7"
cli_ssid="3G-zf" cli_ssid="3G-zf"
cli_pwd="12234567" cli_pwd="xxx"
--ses propre credentials --ses propre credentials
f= "credentials.lua" if file.exists(f) then dofile(f) end f= "credentials.lua" if file.exists(f) then dofile(f) end

View File

@@ -6,7 +6,7 @@ function wifi_cli_conf()
--credentials par défaut --credentials par défaut
--cli_ssid="3g-s7" --cli_ssid="3g-s7"
cli_ssid="3G-zf" cli_ssid="3G-zf"
cli_pwd="12234567" cli_pwd="xxx"
--ses propre credentials --ses propre credentials
f= "credentials.lua" if file.exists(f) then dofile(f) end f= "credentials.lua" if file.exists(f) then dofile(f) end

View File

@@ -4,7 +4,7 @@ print("\n wifi_cli_conf.lua zf181205.1931 \n")
--credentials par défaut --credentials par défaut
cli_ssid="3g-s7" cli_ssid="3g-s7"
cli_pwd="12234567" cli_pwd="xxx"
--ses propre credentials --ses propre credentials
f= "credentials.lua" if file.exists(f) then dofile(f) end f= "credentials.lua" if file.exists(f) then dofile(f) end

View File

@@ -4,7 +4,7 @@ print("\n wifi_cli_conf.lua zf181205.1931 \n")
--credentials par défaut --credentials par défaut
cli_ssid="3g-s7" cli_ssid="3g-s7"
cli_pwd="12234567" cli_pwd="xxx"
--ses propre credentials --ses propre credentials
f= "credentials.lua" if file.exists(f) then dofile(f) end f= "credentials.lua" if file.exists(f) then dofile(f) end

View File

@@ -4,7 +4,7 @@ print("\n wifi_cli_conf.lua zf181205.1931 \n")
--credentials par défaut --credentials par défaut
cli_ssid="3g-s7" cli_ssid="3g-s7"
cli_pwd="12234567" cli_pwd="xxx"
--ses propre credentials --ses propre credentials
f= "credentials.lua" if file.exists(f) then dofile(f) end f= "credentials.lua" if file.exists(f) then dofile(f) end

View File

@@ -9,8 +9,7 @@ function secrets_wifi()
-- cli_ssid="3g-s7" -- cli_ssid="3g-s7"
-- cli_ssid="3G-zf2" -- cli_ssid="3G-zf2"
-- cli_ssid="apzuzu6_EXT" cli_ssid="xxx"
cli_ssid="apzuzu6"
cli_pwd="xxx" cli_pwd="xxx"
-- cli_ssid="voie4." -- cli_ssid="voie4."

View File

@@ -9,8 +9,7 @@ function secrets_wifi()
-- cli_ssid="3g-s7" -- cli_ssid="3g-s7"
-- cli_ssid="3G-zf2" -- cli_ssid="3G-zf2"
-- cli_ssid="apzuzu6_EXT" cli_ssid="xxx"
cli_ssid="apzuzu6"
cli_pwd="xxx" cli_pwd="xxx"
-- cli_ssid="voie4." -- cli_ssid="voie4."

View File

@@ -9,7 +9,6 @@ function secrets_wifi()
-- cli_ssid="3g-s7" -- cli_ssid="3g-s7"
-- cli_ssid="3G-zf2" -- cli_ssid="3G-zf2"
-- cli_ssid="apzuzu6_EXT"
cli_ssid="xxx" cli_ssid="xxx"
cli_pwd="yyy" cli_pwd="yyy"

View File

@@ -6,7 +6,7 @@ function wifi_cli_conf()
--credentials par défaut --credentials par défaut
--cli_ssid="3g-s7" --cli_ssid="3g-s7"
cli_ssid="3G-zf" cli_ssid="3G-zf"
cli_pwd="12234567" cli_pwd="xxx"
--ses propre credentials --ses propre credentials
f= "credentials_solar.lua" if file.exists(f) then dofile(f) end f= "credentials_solar.lua" if file.exists(f) then dofile(f) end

View File

@@ -6,7 +6,7 @@ function wifi_cli_conf()
--credentials par défaut --credentials par défaut
--cli_ssid="3g-s7" --cli_ssid="3g-s7"
cli_ssid="3G-zf" cli_ssid="3G-zf"
cli_pwd="12234567" cli_pwd="xxx"
--ses propre credentials --ses propre credentials
f= "credentials.lua" if file.exists(f) then dofile(f) end f= "credentials.lua" if file.exists(f) then dofile(f) end

View File

@@ -6,7 +6,7 @@ function wifi_cli_conf()
--credentials par défaut --credentials par défaut
--cli_ssid="3g-s7" --cli_ssid="3g-s7"
cli_ssid="3G-zf" cli_ssid="3G-zf"
cli_pwd="12234567" cli_pwd="xxx"
--ses propre credentials --ses propre credentials
f= "credentials.lua" if file.exists(f) then dofile(f) end f= "credentials.lua" if file.exists(f) then dofile(f) end

View File

@@ -4,7 +4,7 @@ print("\n wifi_cli_conf.lua zf190126.1533 \n")
--credentials par défaut --credentials par défaut
cli_ssid="3G-zf" cli_ssid="3G-zf"
cli_pwd="12234567" cli_pwd="xxx"
--ses propre credentials --ses propre credentials
f= "credentials.lua" if file.exists(f) then dofile(f) end f= "credentials.lua" if file.exists(f) then dofile(f) end

View File

@@ -4,7 +4,7 @@ print("\n wifi_cli_conf.lua zf190126.1533 \n")
--credentials par défaut --credentials par défaut
cli_ssid="3G-zf" cli_ssid="3G-zf"
cli_pwd="12234567" cli_pwd="xxx"
--ses propre credentials --ses propre credentials
f= "credentials.lua" if file.exists(f) then dofile(f) end f= "credentials.lua" if file.exists(f) then dofile(f) end

View File

@@ -4,7 +4,7 @@ print("\n wifi_cli_conf.lua zf190126.1533 \n")
--credentials par défaut --credentials par défaut
cli_ssid="3G-zf" cli_ssid="3G-zf"
cli_pwd="12234567" cli_pwd="xxx"
--ses propre credentials --ses propre credentials
f= "credentials.lua" if file.exists(f) then dofile(f) end f= "credentials.lua" if file.exists(f) then dofile(f) end

View File

@@ -6,7 +6,7 @@ function wifi_cli_conf()
--credentials par défaut --credentials par défaut
--cli_ssid="3g-s7" --cli_ssid="3g-s7"
cli_ssid="3G-zf" cli_ssid="3G-zf"
cli_pwd="12234567" cli_pwd="xxx"
--ses propre credentials --ses propre credentials
f= "credentials_tst_ds18b20.lua" if file.exists(f) then dofile(f) end f= "credentials_tst_ds18b20.lua" if file.exists(f) then dofile(f) end

View File

@@ -5,10 +5,10 @@ print("\n wifi_cli_conf.lua zf190408.1953 \n")
--credentials par défaut --credentials par défaut
--cli_ssid="3g-s7" --cli_ssid="3g-s7"
cli_ssid="AlexIphone" cli_ssid="AlexIphone"
cli_pwd="q1w2abcdfH&" cli_pwd="xxx"
cli_ssid="3g-s7" cli_ssid="3g-s7"
cli_pwd="12234567" cli_pwd="xxx"
--ses propre credentials --ses propre credentials
f= "credentials.lua" if file.exists(f) then dofile(f) end f= "credentials.lua" if file.exists(f) then dofile(f) end

View File

@@ -1,5 +1,5 @@
# WIFI repeater, tout petit répéteur WIFI à base de NodeMCU ESP # WIFI repeater, tout petit répéteur WIFI à base de NodeMCU ESP
zf200416.2314 zf200422.1719
<!-- TOC depthFrom:1 depthTo:6 withLinks:1 updateOnSave:1 orderedList:0 --> <!-- TOC depthFrom:1 depthTo:6 withLinks:1 updateOnSave:1 orderedList:0 -->
@@ -8,18 +8,22 @@ zf200416.2314
- [Description](#description) - [Description](#description)
- [Problématiques](#problmatiques) - [Problématiques](#problmatiques)
- [Installation, flashing du firmware](#installation-flashing-du-firmware) - [Installation, flashing du firmware](#installation-flashing-du-firmware)
- [utilisation](#utilisation) - [Utilisation](#utilisation)
- [Utilisation de la console](#utilisation-de-la-console) - [Utilisation de la console](#utilisation-de-la-console)
- [Via le port série](#via-le-port-srie) - [Via le port série](#via-le-port-srie)
- [Via telnet](#via-telnet) - [Via telnet](#via-telnet)
- [Verrouillage du repeater](#verrouillage-du-repeater) - [Verrouillage du repeater](#verrouillage-du-repeater)
- [Changer les paramètres WIFI en console](#changer-les-paramtres-wifi-en-console) - [Changer les paramètres WIFI en console](#changer-les-paramtres-wifi-en-console)
- [Configuration du NAT](#configuration-du-nat)
- [Reset factory](#reset-factory) - [Reset factory](#reset-factory)
- [Limitations](#limitations) - [Limitations](#limitations)
- [Goodies](#goodies) - [Goodies](#goodies)
- [Documentation complète](#documentation-complte) - [Documentation complète](#documentation-complte)
<!-- /TOC --> <!-- /TOC -->
## Sources ## Sources
https://github.com/martin-ger/esp_wifi_repeater https://github.com/martin-ger/esp_wifi_repeater
@@ -58,11 +62,11 @@ Script pour flasher le NodeMCU plus facilement:
./zflash.sh go ./zflash.sh go
``` ```
## utilisation ## Utilisation
Pour la première configuration il faut se connecter sur l'AP *MyAP* et charger la page **192.168.4.1** pour la configuration du WIFI *repeater*. Pour la première configuration il faut se connecter sur l'AP *MyAP* et charger la page **192.168.4.1** pour la configuration du WIFI *repeater*.
## Utilisation de la console ### Utilisation de la console
On peut accéder à la console soit via le port série ou telnet. Après connexion demandez le help avec la commande help ! On peut accéder à la console soit via le port série ou telnet. Après connexion demandez le help avec la commande help !
@@ -113,13 +117,36 @@ set ap_password <le password WIFI de votre repeater>
``` ```
Sauvegarder votre configuration Sauvegarder votre configuration
``` ```
save save config
``` ```
Redémarrer votre repeater Redémarrer votre repeater
``` ```
reset reset
``` ```
### Configuration du NAT
On peut configurer très facilement le NAT avec la commande *portmap*:<br>
Ouvrir le port 22 de la machine 192.168.4.2 sur le port 2222 du routeur
```
portmap add TCP 2222 192.168.4.2 22
```
On peut voir après la configuration en faisant un:
```
show config
```
Fermeture du port 2222
```
portmap remove TCP 2222
```
ATTENTION: il ne faut pas oublier de sauver la configuration !
```
save config
```
Comme les adresses IP sont attribuées dynamiquement, il serait bien de sauvegarder après aussi le DHCP, afin que la même adresse IP soit attribuée à la même machine !
```
save dhcp
```
## Reset factory ## Reset factory
Il faut se connecter en série sur la console et entrer la commande: Il faut se connecter en série sur la console et entrer la commande:

View File

@@ -5,7 +5,7 @@ print("\n wifi_cli_conf.lua zf190217.1245 \n")
--credentials par défaut --credentials par défaut
--cli_ssid="3g-s7" --cli_ssid="3g-s7"
cli_ssid="3G-zf" cli_ssid="3G-zf"
cli_pwd="12234567" cli_pwd="xxx"
--ses propre credentials --ses propre credentials
f= "credentials.lua" if file.exists(f) then dofile(f) end f= "credentials.lua" if file.exists(f) then dofile(f) end

View File

@@ -1,5 +1,5 @@
-- Petit script pour configurer le client WIFI du NodeMCU -- Petit script pour configurer le client WIFI du NodeMCU
print("\n wifi_cli_conf.lua zf181101.1743 \n") print("\n wifi_cli_conf.lua zf181101.1743 \n")
wifi.sta.config{ssid="3g-s7", pwd="12234567", save=true} wifi.sta.config{ssid="3g-s7", pwd="xxx", save=true}

View File

@@ -6,7 +6,7 @@ function wifi_cli_conf()
--credentials par défaut --credentials par défaut
--cli_ssid="3g-s7" --cli_ssid="3g-s7"
cli_ssid="3G-zf" cli_ssid="3G-zf"
cli_pwd="12234567" cli_pwd="xxx"
--ses propre credentials --ses propre credentials
f= "credentials.lua" if file.exists(f) then dofile(f) end f= "credentials.lua" if file.exists(f) then dofile(f) end

View File

@@ -1,4 +1,4 @@
-- Petit script pour configurer le client WIFI du NodeMCU -- Petit script pour configurer le client WIFI du NodeMCU
print("\n wifi_cli_conf.lua zf200302.2300 \n") print("\n wifi_cli_conf.lua zf200302.2300 \n")
wifi.sta.config{ssid="apzuzu6", pwd="12234567", save=true} wifi.sta.config{ssid="xxx", pwd="xxx", save=true}

View File

@@ -1,4 +1,4 @@
-- Petit script pour configurer le client WIFI du NodeMCU -- Petit script pour configurer le client WIFI du NodeMCU
print("\n wifi_cli_conf.lua zf180824.2000 \n") print("\n wifi_cli_conf.lua zf180824.2000 \n")
wifi.sta.config{ssid="3G-zf", pwd="12234567", save=true} wifi.sta.config{ssid="3G-zf", pwd="xxx", save=true}

View File

@@ -1,4 +1,4 @@
-- Petit script pour configurer le client WIFI du NodeMCU -- Petit script pour configurer le client WIFI du NodeMCU
print("\n wifi_cli_conf.lua zf200302.2300 \n") print("\n wifi_cli_conf.lua zf200302.2300 \n")
wifi.sta.config{ssid="apzuzu6", pwd="12234567", save=true} wifi.sta.config{ssid="xxx", pwd="xxx", save=true}

View File

@@ -6,7 +6,7 @@ function wifi_cli_conf()
--credentials par défaut --credentials par défaut
--cli_ssid="3g-s7" --cli_ssid="3g-s7"
cli_ssid="3G-zf" cli_ssid="3G-zf"
cli_pwd="12234567" cli_pwd="xxx"
--ses propre credentials --ses propre credentials
f= "credentials.lua" if file.exists(f) then dofile(f) end f= "credentials.lua" if file.exists(f) then dofile(f) end

View File

@@ -4,7 +4,7 @@ print("\n wifi_cli_conf.lua zf190126.1533 \n")
--credentials par défaut --credentials par défaut
cli_ssid="3G-zf" cli_ssid="3G-zf"
cli_pwd="12234567" cli_pwd="xxx"
--ses propre credentials --ses propre credentials
f= "credentials.lua" if file.exists(f) then dofile(f) end f= "credentials.lua" if file.exists(f) then dofile(f) end

View File

@@ -6,7 +6,7 @@ function wifi_cli_conf()
--credentials par défaut --credentials par défaut
--cli_ssid="3g-s7" --cli_ssid="3g-s7"
cli_ssid="3G-zf" cli_ssid="3G-zf"
cli_pwd="12234567" cli_pwd="xxx"
--ses propre credentials --ses propre credentials
f= "credentials.lua" if file.exists(f) then dofile(f) end f= "credentials.lua" if file.exists(f) then dofile(f) end