====== Repetidor Wifi (NAT) con el ESP8266 ====== Guía en español -> http://openwrt.tuinstituto.es/repetidor-wifi-nat-con-wemos-d1-mini-esp8266\\ Proyecto esp_repeater -> https://github.com/martin-ger/esp_wifi_repeater\\ Stack TCP/IP para sistemas embebidos con soporte NAT -> https://github.com/martin-ger/esp-open-lwip\\ SDK para compilar esp_repeater -> https://github.com/pfalcon/esp-open-sdk Este es posible instalarlo desde AUR para usuarios de Archlinux\\ Discusión en reddir -> https://www.reddit.com/r/esp8266/comments/5whmee/nodemcu_as_wifi_repeater/\\ **Video en youtube con la explicación detallada el proyecto** {{youtube>OM2FqnMFCLw?medium}} ===== Compilando el esp-open-sdk ===== El sdk compilado no es útil para este proyecto porque es necesario realizar un cambio en las fuentes de la librería **lwip**, este es la implementación de protocolo TCP/IP con mínimo consumo de RAM lo que lo hace usable en dispositivos embebidos. - Se clona las fuentes del sdk https://github.com/pfalcon/esp-open-sdk - entra a la carpeta que acaba de clonar con el comando **cd esp-open-sdk** - Se reemplaza la carpeta esp-open-lwip borrándola con el comando **rm -rf esp-open-lwip** - Luego clona la versión alternativa que integra NAT con el comando **git clone https://github.com/martin-ger/esp-open-lwip.git** y una vez clonado borre la carpeta de .git con el comando **rm -rf esp-open-lwip/.git** - A continuación escriba el comando **make** ===== Compilando el esp_wifi_repeater ===== - En otra ubicación clone el proyecto https://github.com/martin-ger/esp_wifi_repeater para compilarlo con el comando **git clone https://github.com/martin-ger/esp_wifi_repeater.git** - Ingrese a la carpeta con **cd esp_wifi_repeater** - Edite dentro del Makefile la variable BUILD_AREA con la ubicación del SDK así **BUILD_AREA = ..** - En mi sistema python es igual a python3 y para correr esptool.py es necesario python2. Leyendo acá https://stackoverflow.com/questions/7237415/python-2-instead-of-python-3-as-the-temporary-default-python puedo crear un entorno virtual para python2 así\\ # Use this to create your temporary python "install" # (Assuming that is the correct path to the python interpreter you want to use.) virtualenv -p /usr/bin/python2.7 --distribute temp-python # Type this command when you want to use your temporary python. # While you are using your temporary python you will also have access to a temporary pip, # which will keep all packages installed with it separate from your main python install. # A shorter version of this command would be ". temp-python/bin/activate" source temp-python/bin/activate # When you no longer wish to use you temporary python type deactivate \\ Pero necesita instalar las dependencias como python2-serial\\ \\ Otra opción es editar en ../esp-open-sdk/esptool/esptool.py la primera línea y reemplazar **#!/usr/bin/env python** por **#!/usr/bin/env python2** - Ejecute el comando **make** para construir el proyecto ===== Referencias ===== * http://www.iwriteiam.nl/FJF2LinuxLog.html