• Система автоматизации с открытым исходным кодом на базе esp8266/esp32 микроконтроллеров и приложения IoT Manager. Наша группа в Telegram

Вопрос WIFI ретранслятор

telect

New member
Добрый день!

Пытаюсь заставить работать ESP8266 как WIFI ретранслятор, чтоб он ловил сигнал с роутера и отправлял его дальше. Телефон видит новую сеть подключается к ней, но интернета нет. Пробовал с ноута подключаться - тоже самое.

Вот как я настроил модуль.

1. Подключился к роутеру

AT+CWJAP="Home","87654321"
WIFI CONNECTED
WIFI GOT IP
OK

2. Создал новую сеть

AT+CWSAP="Arduino","12345678",5,3

OK

3. Переключил в режим приема и ретрансляции

AT+CWMODE=3
OK



4. Проверил айпи

+CIFSR:APIP,"192.168.4.1"
+CIFSR:APMAC,"1a:fe:54:d9:e4:bf"
+CIFSR:STAIP,"192.168.0.190"
+CIFSR:STAMAC,"16:fe:54:d9:e4:bf"

5. Проверил пинг:

AT+PING="google.com"

+2



И всё равно интернета на подключенных устройствах нет. Что я упустил?
 

amatron

New member
Using the ESP8266 as a WiFi range extender

This blog article refers to my YouTube Video you find here.
It shows how an ESP8266 module (like this one) can be used as a (rather unreliable) WiFi range extender.


Overview of the setup

Beside an ESP8266 module, you need to:

  • download the modified firmeware here and flash it to your module
  • copy the DNS forwarder script from here to your module
  • add a route to the 192.168.4.0 subnet to your default gateway (i.e. usually your WiFi dsl/cable router)
  • attach the module to your WiFi network and run it in StationAP mode:
wifi.setmode(wifi.STATIONAP)
wifi.sta.config("YOURSSID","YOURWIFIPASSWD")
tmr.alarm(0, 500, 1, function()
if wifi.sta.getip()==nil then
print("Connecting to AP...")
else
tmr.stop(1)
tmr.stop(0)
print("Connected as: " .. wifi.sta.getip())
end
end)
cfg={}
cfg.ssid="intarwebs"
wifi.ap.config(cfg)


  • connect another device to the "intarwebs" SSID. If you want to really use that, you should encrypt that side as well. Here is how.
The disconnects from the Wifi Router appear to be related to big packets and/or heavy traffic. It has been suggested that it might be a power issue, but neither with the scope, nor with the Fluke 87V's min/max function I was able to detected a significant voltage drop.
I have captured the traffic with wireshark, but could not make sense of it yet. My best guess at the moment is that with a big TCP windows size, the module runs into a buffer size problem or that it is busy for too long on the "left" side. The module only has one radio to serve both connections, so unlike your typical router, it can't forward a continuous stream of packets.

http://www.areresearch.net/2015/10/using-esp8266-as-wifi-range-extender.html
 
Сверху Снизу