Modifications

Sauter à la navigation Sauter à la recherche
419 octets ajoutés ,  12 novembre 2016 à 16:01
Ligne 72 : Ligne 72 :     
== Accéder WebREPL depuis d'autres réseaux WiFi ==
 
== Accéder WebREPL depuis d'autres réseaux WiFi ==
Accessing the WebREPL over the ESP8266's own WiFi access point like above is handy if there's no router or other WiFi network available.  However if you do have access to a WiFi network you can instead connect the ESP8266 to this network and access the WebREPL from any other machine on the network.  This makes it easier to use the WebREPL without losing access to the internet or your own WiFi network on a laptop that can only be connected to one WiFi network at a time.
+
Accéder à WebREPL de l'ESP8266 via le réseau WiFi de l'ESP8266 est bien pratique pour un premier contact (ou phase de configuration)!
   −
To use the WebREPL on another WiFi network you'll first need to connect the ESP8266 to the WiFi networkThe [https://docs.micropython.org/en/latest/esp8266/esp8266/quickref.html#networking MicroPython ESP8266 documentation shows] a few simple commands to connect to a networkFrom the serial REPL (don't use the WebREPL since you'll lose access when the commands change to a different WiFi network!) run the following commands:
+
Par contre, ce qui serait vraiment-vraiment cool, c'est de connecter l'ESP8266 sur le réseau WiFi domestique (celui de votre routeur/box Internet). Cette section se de la page se penche sur ce point.
 +
 
 +
Une fois connecté sur votre réseau WiFi domestique, vous pourrez accéder à WebREPL en utilisant l'adresse IP de votre ESP8266 (cette attribuée par votre routeur/box) sans pour autant perdre votre connexion Internet sur votre PC (en effet, votre PC reste également connecté sur votre routeur/box... cette fois, plus besoin de connecter le PC sur le réseau WiFi de l'ESP8266).
 +
 
 +
Pour pouvoir utiliser WebREPL sur un autre réseau WiFi (votre réseau WiFi domestique), il faudra indiquer à votre ESP8266 comment se connecter sur ce réseauLa documentation officielle [https://docs.micropython.org/en/latest/esp8266/esp8266/quickref.html#networking MicroPython ESP8266] propose quelques commandes simples pour se connecter sur un réseau.   
 +
 
 +
Saisissez les commandes suivantes depuis une connexion REPL série (n'utilisez pas WebREPL car vous perdrez la connexion durant le changement de réseau WiFi):
    
  <syntaxhighlight lang="python">
 
  <syntaxhighlight lang="python">
Ligne 80 : Ligne 86 :  
wlan = network.WLAN(network.STA_IF)
 
wlan = network.WLAN(network.STA_IF)
 
wlan.active(True)
 
wlan.active(True)
wlan.connect('ssid', 'password')
+
wlan.connect('ssid-du-WiFi', 'mot-de-passe')
 
  </syntaxhighlight>
 
  </syntaxhighlight>
    
{{ADFImage|FEATHER-WEBREPL-ACCESS-20.png}}
 
{{ADFImage|FEATHER-WEBREPL-ACCESS-20.png}}
   −
Where '''ssid''' is the name of the WiFi access point SSID, and '''password''' is the password required to use the access point (try an empty string '' if no password is required).
+
'''ssid-du-WiFi''' est le nom SSID du point d'accès (celui de votre réseau domestique) et '''mot-de-passe''' le mot de passe requit pour accéder au point d'accès (essayez une chaine de caractère vide '' s'il n'y a pas de mot de passe).
    
After a moment the ESP8266 should connect to the WiFi network.  You can run the ifconfig function to check that the board has been assigned an IP address and is on the network:
 
After a moment the ESP8266 should connect to the WiFi network.  You can run the ifconfig function to check that the board has been assigned an IP address and is on the network:
29 917

modifications

Menu de navigation