Форум обсуждения систем  

Вернуться   Форум обсуждения систем "Умный дом", проектов Ардуино, OpenWRT и других DIY устройств > Форум умного дома > Сделай сам > OpenWRT/LEDE

Ответ
 
Опции темы Поиск в этой теме Опции просмотра
Старый 17.10.2013, 23:23   #1
Admin
Administrator
 
Аватар для Admin
 
Регистрация: 12.04.2010
Адрес: Москва
Сообщений: 9,616
Вес репутации: 9821
Admin has a brilliant futureAdmin has a brilliant futureAdmin has a brilliant futureAdmin has a brilliant futureAdmin has a brilliant futureAdmin has a brilliant futureAdmin has a brilliant futureAdmin has a brilliant futureAdmin has a brilliant futureAdmin has a brilliant futureAdmin has a brilliant future
По умолчанию

эти настройки в файле /etc/config/wireless
Admin вне форума   Ответить с цитированием
Старый 19.10.2013, 00:26   #2
Dimsan
Junior Member
 
Регистрация: 04.10.2013
Адрес: Украина, Херсон
Возраст: 32
Сообщений: 5
Вес репутации: 0
Dimsan is an unknown quantity at this point
По умолчанию

Здравствуйте. Как и где сохранить пароли для подключения к разным точкам доступа? Т.е. в одном месте роутер должен подключаться к одной точке доступа, в другом месте - к другой.
Попробовал создать по 2 конфигурации в файлах network и wireless, но это не сработало, так к тому же, потерял к роутеру доступ через вай-фай (хотя он пинговался нормально).
Dimsan вне форума   Ответить с цитированием
Старый 19.10.2013, 01:08   #3
Admin
Administrator
 
Аватар для Admin
 
Регистрация: 12.04.2010
Адрес: Москва
Сообщений: 9,616
Вес репутации: 9821
Admin has a brilliant futureAdmin has a brilliant futureAdmin has a brilliant futureAdmin has a brilliant futureAdmin has a brilliant futureAdmin has a brilliant futureAdmin has a brilliant futureAdmin has a brilliant futureAdmin has a brilliant futureAdmin has a brilliant futureAdmin has a brilliant future
По умолчанию

Я думаю что можно прописать изменение настроек? по какому то либо условию в скрипте
Admin вне форума   Ответить с цитированием
Старый 19.10.2013, 22:55   #4
Dimsan
Junior Member
 
Регистрация: 04.10.2013
Адрес: Украина, Херсон
Возраст: 32
Сообщений: 5
Вес репутации: 0
Dimsan is an unknown quantity at this point
По умолчанию

Мне кажется, что должно быть какое-то готовое решение.
Dimsan вне форума   Ответить с цитированием
Старый 20.10.2013, 10:40   #5
snikers
Junior Member
 
Регистрация: 29.09.2013
Сообщений: 8
Вес репутации: 0
snikers is an unknown quantity at this point
По умолчанию

Код:
root@OpenWrt:~#  wifi off
/sbin/uci: Parse error (invalid command) at line 4, byte 1
/sbin/uci: Parse error (invalid command) at line 4, byte 1
command failed: Operation not supported (-122)
Configuration file: /var/run/hostapd-phy0.conf
Using interface wlan0 with hwaddr 90:94:e4:f2:cd:0c and ssid "DIR-620D1"
/sbin/uci: Parse error (invalid command) at line 4, byte 1
/sbin/uci: Parse error (invalid command) at line 4, byte 1
root@OpenWrt:~# wifi on
/sbin/uci: Parse error (invalid command) at line 4, byte 1
/sbin/uci: Parse error (invalid command) at line 4, byte 1
command failed: Operation not supported (-122)
Configuration file: /var/run/hostapd-phy0.conf
Using interface wlan0 with hwaddr 90:94:e4:f2:cd:0c and ssid "DIR-620D1"
/sbin/uci: Parse error (invalid command) at line 4, byte 1
/sbin/uci: Parse error (invalid command) at line 4, byte 1
root@OpenWrt:~#
wireless

config wifi-device 'radio0'
option type 'mac80211'
ctrl_interface=/var/run/hostapd-phy0
option path '10180000.wmac'
list ht_capab 'GF'
list ht_capab 'SHORT-GI-20'
list ht_capab 'SHORT-GI-40'
list ht_capab 'TX-STBC'
list ht_capab 'RX-STBC12'
option channel '4'
option distance '30'
option frag '2346'
option rts '2347'
option txpower '14'
option country 'RU'
option hwmode '11ng'
option htmode 'HT40+'
option noscan '1'
option macaddr_acl=0

config wifi-iface
option device 'radio0'
option network 'lan'
option mode 'ap'
option ssid 'DIR-620D1'
option encryption 'psk+ccmp'
option key '76543210'
option disassoc_low_ack=1
option preamble=1
option auth_algs=1

здесь есть ошибки
как правильно разложить по секциям?

Последний раз редактировалось snikers; 20.10.2013 в 10:45.
snikers вне форума   Ответить с цитированием
Старый 20.10.2013, 11:30   #6
Admin
Administrator
 
Аватар для Admin
 
Регистрация: 12.04.2010
Адрес: Москва
Сообщений: 9,616
Вес репутации: 9821
Admin has a brilliant futureAdmin has a brilliant futureAdmin has a brilliant futureAdmin has a brilliant futureAdmin has a brilliant futureAdmin has a brilliant futureAdmin has a brilliant futureAdmin has a brilliant futureAdmin has a brilliant futureAdmin has a brilliant futureAdmin has a brilliant future
По умолчанию

Так написано что ошибка в четвертой строке
Нужно удалить вот эту строку
option path '10180000.wmac'
Admin вне форума   Ответить с цитированием
Старый 24.10.2013, 11:59   #7
Gremlin
Junior Member
 
Регистрация: 10.10.2013
Сообщений: 2
Вес репутации: 0
Gremlin is an unknown quantity at this point
По умолчанию

До сих пор не могу настроить 3Г .
После попытки установить соединение logread дает такой лог:
Oct 24 07:53:51 OpenWrt daemon.notice pppd[6912]: pppd 2.4.5 started by root, uid 0
Oct 24 07:53:52 OpenWrt local2.info chat[6917]: abort on (BUSY)
Oct 24 07:53:52 OpenWrt local2.info chat[6917]: abort on (NO CARRIER)
Oct 24 07:53:52 OpenWrt local2.info chat[6917]: abort on (ERROR)
Oct 24 07:53:52 OpenWrt local2.info chat[6917]: report (CONNECT)
Oct 24 07:53:52 OpenWrt local2.info chat[6917]: timeout set to 12 seconds
Oct 24 07:53:52 OpenWrt local2.info chat[6917]: send (AT&F^M)
Oct 24 07:53:52 OpenWrt local2.info chat[6917]: expect (OK)
Oct 24 07:53:52 OpenWrt local2.info chat[6917]: AT&F^M^M
Oct 24 07:53:52 OpenWrt local2.info chat[6917]: OK
Oct 24 07:53:52 OpenWrt local2.info chat[6917]: -- got it
Oct 24 07:53:52 OpenWrt local2.info chat[6917]: send (ATE1^M)
Oct 24 07:53:52 OpenWrt local2.info chat[6917]: expect (OK)
Oct 24 07:53:52 OpenWrt local2.info chat[6917]: ^M
Oct 24 07:53:52 OpenWrt local2.info chat[6917]: ATE1^M^M
Oct 24 07:53:52 OpenWrt local2.info chat[6917]: OK
Oct 24 07:53:52 OpenWrt local2.info chat[6917]: -- got it
Oct 24 07:53:52 OpenWrt local2.info chat[6917]: send (AT+CGDCONT=1,"IP","internet.mts.ru"^M)
Oct 24 07:53:52 OpenWrt local2.info chat[6917]: abort on (NO CARRIER)
Oct 24 07:53:52 OpenWrt local2.info chat[6917]: timeout set to 15 seconds
Oct 24 07:53:52 OpenWrt local2.info chat[6917]: expect (OK)
Oct 24 07:53:52 OpenWrt local2.info chat[6917]: ^M
Oct 24 07:53:52 OpenWrt local2.info chat[6917]: AT+CGDCONT=1,"IP","internet.mts.ru"^M^M
Oct 24 07:53:52 OpenWrt local2.info chat[6917]: OK
Oct 24 07:53:52 OpenWrt local2.info chat[6917]: -- got it
Oct 24 07:53:52 OpenWrt local2.info chat[6917]: send (ATD*99#^M)
Oct 24 07:53:52 OpenWrt local2.info chat[6917]: expect (CONNECT)
Oct 24 07:53:52 OpenWrt local2.info chat[6917]: ^M
Oct 24 07:53:52 OpenWrt local2.info chat[6917]: ATD*99#^M^M
Oct 24 07:53:52 OpenWrt local2.info chat[6917]: CONNECT
Oct 24 07:53:52 OpenWrt local2.info chat[6917]: -- got it
Oct 24 07:53:52 OpenWrt local2.info chat[6917]: send ( ^M)
Oct 24 07:53:52 OpenWrt daemon.debug pppd[6912]: Script USE_APN=internet.mts.ru /usr/sbin/chat -t5 -v -E -f /etc/chatscripts/3g.chat finished (pid 6916), status = 0x0
Oct 24 07:53:52 OpenWrt daemon.info pppd[6912]: Serial connection established.
Oct 24 07:53:52 OpenWrt daemon.debug pppd[6912]: using channel 4
Oct 24 07:53:52 OpenWrt daemon.info pppd[6912]: Using interface 3g-wan
Oct 24 07:53:52 OpenWrt daemon.notice pppd[6912]: Connect: 3g-wan <--> /dev/ttyUSB1
Oct 24 07:53:53 OpenWrt daemon.debug pppd[6912]: sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0xebd02ef5>]
Oct 24 07:53:56 OpenWrt daemon.debug pppd[6912]: sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0xebd02ef5>]
Oct 24 07:53:59 OpenWrt daemon.debug pppd[6912]: sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0xebd02ef5>]

Связи с интернетом нет... ОпСоС - МТС, модем ZTE MF112
Gremlin вне форума   Ответить с цитированием
Старый 24.10.2013, 16:47   #8
cray888
Junior Member
 
Регистрация: 24.10.2013
Сообщений: 3
Вес репутации: 0
cray888 is an unknown quantity at this point
По умолчанию

Всем добрый вечер! Подскажите пожалуйста, где я сделал что-то не так. Прошил роутер mr3020 по инструкции с этого форума (Инструкция), только роутер настроил в качестве wifi client. Все подключилось и работает, если бы не одно но, когда делаю ping ya.ru (или любой другой адрес) очень долго происходит запрос IP адреса по имени DNS (около 10 секунд), хотя ping 8.8.8.8 отрабатывает моментально, складывается впечатление что он пытается подключиться сперва к другому DNS серверу, а не к тому что указан в wwan. Сталкивался кто с такой проблемой?
Код:
root@OpenWrt:~# cat /etc/config/network
config interface 'loopback'
        option ifname 'lo'
        option proto 'static'
        option ipaddr '127.0.0.1'
        option netmask '255.0.0.0'

config interface 'lan'
        option ifname 'eth0'
        option type 'bridge'
        option proto 'static'
        option ipaddr '192.168.2.1'
        option netmask '255.255.255.0'

config interface 'wwan'
        option proto 'static'
        option ipaddr '192.168.1.20'
        option netmask '255.255.255.0'
        option gateway '192.168.1.1'
        option dns '192.168.1.1'
Код:
root@OpenWrt:~# cat /etc/config/wireless
config wifi-device  radio0
        option type     mac80211
        option macaddr  64:66:b3:94:0e:34
        option hwmode   11ng
        option htmode   HT20
        list ht_capab   SHORT-GI-20
        list ht_capab   SHORT-GI-40
        list ht_capab   RX-STBC1
        list ht_capab   DSSS_CCK-40
        # REMOVE THIS LINE TO ENABLE WIFI:
        # option disabled 0
        option chanel '7'
        option country 'RU'
        option txpower '20'

config wifi-iface
        option device   radio0
        option network  lan
        option mode     sta
        option ssid     DrayTek
        option bssid    00:50:7F:C5:16:00
        option key      qwer1234
        option encryption psk2
        option network  wwan
Код:
root@OpenWrt:~# cat /etc/config/firewall
config defaults
        option syn_flood        1
        option input            ACCEPT
        option output           ACCEPT
        option forward          ACCEPT
# Uncomment this line to disable ipv6 rules
#       option disable_ipv6     1

config zone
        option name             lan
        option network          'lan'
        option input            ACCEPT
        option output           ACCEPT
        option forward          ACCEPT

config zone
        option name             wan
        option network          'wan'
        option input            ACCEPT
        option output           ACCEPT
        option forward          ACCEPT
        option masq             1
        option mtu_fix          1
        option network          'wan wwan'

config forwarding
        option src              lan
        option dest             wan

config forwarding
        option src              wan
        option dest             lan

# We need to accept udp packets on port 68,
# see https://dev.openwrt.org/ticket/4108
config rule
        option name             Allow-DHCP-Renew
        option src              wan
        option proto            udp
        option dest_port        68
        option target           ACCEPT
        option family           ipv4

# Allow IPv4 ping
config rule
        option name             Allow-Ping
        option src              wan
        option proto            icmp
        option icmp_type        echo-request
        option family           ipv4
        option target           ACCEPT

# Allow DHCPv6 replies
# see https://dev.openwrt.org/ticket/10381
config rule
        option name             Allow-DHCPv6
        option src              wan
        option proto            udp
        option src_ip           fe80::/10
        option src_port         547
        option dest_ip          fe80::/10
        option dest_port        546
        option family           ipv6
        option target           ACCEPT

# Allow essential incoming IPv6 ICMP traffic
config rule
        option name             Allow-ICMPv6-Input
        option src              wan
        option proto    icmp
        list icmp_type          echo-request
        list icmp_type          echo-reply
        list icmp_type          destination-unreachable
        list icmp_type          packet-too-big
        list icmp_type          time-exceeded
        list icmp_type          bad-header
        list icmp_type          unknown-header-type
        list icmp_type          router-solicitation
        list icmp_type          neighbour-solicitation
        list icmp_type          router-advertisement
        list icmp_type          neighbour-advertisement
        option limit            1000/sec
        option family           ipv6
        option target           ACCEPT

# Allow essential forwarded IPv6 ICMP traffic
config rule
        option name             Allow-ICMPv6-Forward
        option src              wan
        option dest             *
        option proto            icmp
        list icmp_type          echo-request
        list icmp_type          echo-reply
        list icmp_type          destination-unreachable
        list icmp_type          packet-too-big
        list icmp_type          time-exceeded
        list icmp_type          bad-header
        list icmp_type          unknown-header-type
        option limit            1000/sec
        option family           ipv6
        option target           ACCEPT

# include a file with users custom iptables rules
config include
        option path /etc/firewall.user
cray888 вне форума   Ответить с цитированием
Старый 24.10.2013, 18:23   #9
Admin
Administrator
 
Аватар для Admin
 
Регистрация: 12.04.2010
Адрес: Москва
Сообщений: 9,616
Вес репутации: 9821
Admin has a brilliant futureAdmin has a brilliant futureAdmin has a brilliant futureAdmin has a brilliant futureAdmin has a brilliant futureAdmin has a brilliant futureAdmin has a brilliant futureAdmin has a brilliant futureAdmin has a brilliant futureAdmin has a brilliant futureAdmin has a brilliant future
По умолчанию

А если option dns '192.168.1.1'
Тоже долгий отклик?
Admin вне форума   Ответить с цитированием
Старый 24.10.2013, 19:41   #10
andr128
Senior Member
 
Аватар для andr128
 
Регистрация: 16.09.2012
Адрес: Irkutsk
Сообщений: 555
Вес репутации: 1604
andr128 has a reputation beyond reputeandr128 has a reputation beyond reputeandr128 has a reputation beyond reputeandr128 has a reputation beyond reputeandr128 has a reputation beyond reputeandr128 has a reputation beyond reputeandr128 has a reputation beyond reputeandr128 has a reputation beyond reputeandr128 has a reputation beyond reputeandr128 has a reputation beyond reputeandr128 has a reputation beyond repute
По умолчанию

а чуть ниже читали http://cyber-place.ru/showpost.php?p=1708&postcount=5
без relayed режим клиента не работает как надо.
andr128 вне форума   Ответить с цитированием
Ответ

Метки
network openwrt, wi-fi openwrt, настройка сети openwrt


Здесь присутствуют: 4 (пользователей: 0 , гостей: 4)
 

Ваши права в разделе
Вы не можете создавать новые темы
Вы не можете отвечать в темах
Вы не можете прикреплять вложения
Вы не можете редактировать свои сообщения

BB коды Вкл.
Смайлы Вкл.
[IMG] код Вкл.
HTML код Выкл.

Быстрый переход


Текущее время: 02:55. Часовой пояс GMT +3.


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd. Перевод: zCarot
Яндекс.Метрика