Temat: Sagem 2704 + USB Dongle WiFI

Witam mam kilka pytań odnośnie instalacji Dongla WiFi w routerze sagem 2704

Model TP_LINK WN422G: https://wikidevi.com/wiki/TP-LINK_TL-WN422G_v2
Nie używam aktywnego huba

Zacząłem od zainstalowania potrzebnych modułów. Przed tym USB było nieaktywne

kmod-ath
kmod-ath9k
kmod-ath9k-common
kmod-ath9k-htc
kmod-usb-ohci
kmod-usb-core
kmod-usb2

problemem jest bardzo słaba prędkość WiFi na poziomie poniżej 1MB/s dla G oraz ok 2MB/s dla wersji N

Konfiguracja:

root@OpenWrt:~# nano /etc/config/wireless

config wifi-device  radio0
        option type     mac80211
        option channel  11
        option hwmode   11g
        option path     'pci0000:00/0000:00:00.0/0000:01:00.0/bcma0:0'
        option htmode
        # REMOVE THIS LINE TO ENABLE WIFI:
        option disabled 1

config wifi-iface
        option device   radio0
        option network  lan
        option mode     ap
        option ssid     OpenWrt
        option encryption none

config wifi-device  radio1
        option type     mac80211
        option channel  1
        option hwmode   11g
        option path     'platform/ehci-platform/usb1/1-1/1-1:1.0'
        list ht_capab   SHORT-GI-20
        list ht_capab   SHORT-GI-40
        list ht_capab   RX-STBC1
        list ht_capab   DSSS_CCK-40
        option htmode   HT20
        # REMOVE THIS LINE TO ENABLE WIFI:

config wifi-iface
        option device   radio1
        option network  lan
        option mode     ap
        option ssid     OpenWrt
        option encryption psk2
        option key      p1ramida

Ponadto zauważyłem dosyć spore obciążenie routera czy to normalne ?
WIFI włączone, podłączony jeden użytkownik na odległość 1m, brak przesyłanych danych a mimo to:

Mem: 25848K used, 35592K free, 0K shrd, 1716K buff, 9608K cached
CPU:   1% usr   1% sys   0% nic  96% idle   0% io   0% irq   0% sirq
Load average: 0.72 0.66 0.56 2/36 1123
  PID  PPID USER     STAT   VSZ %VSZ %CPU COMMAND
  938     1 root     S     1772   3%   1% /usr/sbin/hostapd -P /var/run/wifi-ph
1107  1091 root     R     1484   2%   1% top
1090   673 root     S     1220   2%   1% /usr/sbin/dropbear -F -P /var/run/dro
  626     1 root     S     1540   3%   0% /sbin/netifd
    4     2 root     SW       0   0%   0% [kworker/0:0]
  729     1 root     S     4180   7%   0% /usr/sbin/openvpn --syslog openvpn(sa
  715     1 root     S     1532   2%   0% /usr/sbin/uhttpd -f -h /www -r OpenWr
1091  1090 root     S     1488   2%   0% -ash
  812   626 root     S     1488   2%   0% udhcpc -p /var/run/udhcpc-eth0.2.pid
  756     1 root     S     1484   2%   0% /usr/sbin/ntpd -n -p 0.openwrt.pool.n
    1     0 root     S     1356   2%   0% /sbin/procd
  593     1 root     S     1320   2%   0% /sbin/logd -S 16
  644     1 root     S     1188   2%   0% /usr/sbin/odhcpd
  673     1 root     S     1152   2%   0% /usr/sbin/dropbear -F -P /var/run/dro
  909     1 root     S     1108   2%   0% /usr/sbin/ntpclient -i 600 -s -l -D -
  958     1 nobody   S      964   2%   0% /usr/sbin/dnsmasq -C /var/etc/dnsmasq
  256     1 root     S      896   1%   0% /sbin/ubusd
  257     1 root     S      772   1%   0% /sbin/askfirst ttyS0 /bin/ash --login
    3     2 root     SW       0   0%   0% [ksoftirqd/0]
  500     2 root     DW       0   0%   0% [kworker/u2:2]

Po odłączeniu się użytkownika od WiFi:

Mem: 25692K used, 35748K free, 0K shrd, 1716K buff, 9584K cached
CPU:   0% usr   0% sys   0% nic  99% idle   0% io   0% irq   0% sirq
Load average: 0.33 0.53 0.36 1/37 1084
  PID  PPID USER     STAT   VSZ %VSZ %CPU COMMAND
1084  1079 root     R     1484   2%   0% top
1078   680 root     S     1220   2%   0% /usr/sbin/dropbear -F -P /var/run/dro
    4     2 root     SW       0   0%   0% [kworker/0:0]
  731     1 root     S     4180   7%   0% /usr/sbin/openvpn --syslog openvpn(sa
  932     1 root     S     1764   3%   0% /usr/sbin/hostapd -P /var/run/wifi-ph
  626     1 root     S     1540   3%   0% /sbin/netifd
  715     1 root     S     1532   2%   0% /usr/sbin/uhttpd -f -h /www -r OpenWr
1079  1078 root     S     1488   2%   0% -ash
  809   626 root     S     1488   2%   0% udhcpc -p /var/run/udhcpc-eth0.2.pid
  757     1 root     S     1484   2%   0% /usr/sbin/ntpd -n -p 0.openwrt.pool.n
    1     0 root     S     1356   2%   0% /sbin/procd
  593     1 root     S     1320   2%   0% /sbin/logd -S 16
  645     1 root     S     1188   2%   0% /usr/sbin/odhcpd
  680     1 root     S     1152   2%   0% /usr/sbin/dropbear -F -P /var/run/dro
  910     1 root     S     1108   2%   0% /usr/sbin/ntpclient -i 600 -s -l -D -
  959     1 nobody   S      964   2%   0% /usr/sbin/dnsmasq -C /var/etc/dnsmasq
  256     1 root     S      896   1%   0% /sbin/ubusd
  257     1 root     S      772   1%   0% /sbin/askfirst ttyS0 /bin/ash --login
  106     2 root     SW       0   0%   0% [spi1]
  211     2 root     SWN      0   0%   0% [jffs2_gcd_mtd3]

Wifi wyłączone:

Mem: 24444K used, 36996K free, 0K shrd, 1716K buff, 9584K cached
CPU:   0% usr   0% sys   0% nic  99% idle   0% io   0% irq   0% sirq
Load average: 0.00 0.01 0.07 1/38 1150
  PID  PPID USER     STAT   VSZ %VSZ %CPU COMMAND
1150  1079 root     R     1484   2%   0% top
  731     1 root     S     4180   7%   0% /usr/sbin/openvpn --syslog openvpn(sa
  932     1 root     S     1764   3%   0% /usr/sbin/hostapd -P /var/run/wifi-ph
  626     1 root     S     1540   3%   0% /sbin/netifd
  715     1 root     S     1532   2%   0% /usr/sbin/uhttpd -f -h /www -r OpenWr
1079  1078 root     S     1488   2%   0% -ash
  809   626 root     S     1488   2%   0% udhcpc -p /var/run/udhcpc-eth0.2.pid
  757     1 root     S     1484   2%   0% /usr/sbin/ntpd -n -p 0.openwrt.pool.n
1143  1142 root     S     1480   2%   0% -ash
    1     0 root     S     1356   2%   0% /sbin/procd
  593     1 root     S     1320   2%   0% /sbin/logd -S 16
1078   680 root     S     1220   2%   0% /usr/sbin/dropbear -F -P /var/run/dro
1142   680 root     S     1220   2%   0% /usr/sbin/dropbear -F -P /var/run/dro
  645     1 root     S     1188   2%   0% /usr/sbin/odhcpd
  680     1 root     S     1152   2%   0% /usr/sbin/dropbear -F -P /var/run/dro
  910     1 root     S     1108   2%   0% /usr/sbin/ntpclient -i 600 -s -l -D -
  959     1 nobody   S      964   2%   0% /usr/sbin/dnsmasq -C /var/etc/dnsmasq
  256     1 root     S      896   1%   0% /sbin/ubusd
  257     1 root     S      772   1%   0% /sbin/askfirst ttyS0 /bin/ash --login
  106     2 root     SW       0   0%   0% [spi1]

LOG systemowy:

Mon Apr 28 09:54:40 2014 kern.info kernel: [   15.440000] cfg80211: Calling CRDA to update world regulatory domain
Mon Apr 28 09:54:40 2014 kern.info kernel: [   15.448000] cfg80211: World regulatory domain updated:
Mon Apr 28 09:54:40 2014 kern.info kernel: [   15.452000] cfg80211:  DFS Master region: unset
Mon Apr 28 09:54:40 2014 kern.info kernel: [   15.460000] cfg80211:   (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp), (dfs_cac_time)
Mon Apr 28 09:54:40 2014 kern.info kernel: [   15.468000] cfg80211:   (2402000 KHz - 2472000 KHz @ 40000 KHz), (N/A, 2000 mBm), (N/A)
Mon Apr 28 09:54:40 2014 kern.info kernel: [   15.476000] cfg80211:   (2457000 KHz - 2482000 KHz @ 40000 KHz), (N/A, 2000 mBm), (N/A)
Mon Apr 28 09:54:40 2014 kern.info kernel: [   15.484000] cfg80211:   (2474000 KHz - 2494000 KHz @ 20000 KHz), (N/A, 2000 mBm), (N/A)
Mon Apr 28 09:54:40 2014 kern.info kernel: [   15.492000] cfg80211:   (5170000 KHz - 5250000 KHz @ 80000 KHz), (N/A, 2000 mBm), (N/A)
Mon Apr 28 09:54:40 2014 kern.info kernel: [   15.500000] cfg80211:   (5735000 KHz - 5835000 KHz @ 80000 KHz), (N/A, 2000 mBm), (N/A)
Mon Apr 28 09:54:40 2014 kern.info kernel: [   15.508000] cfg80211:   (57240000 KHz - 63720000 KHz @ 2160000 KHz), (N/A, 0 mBm), (N/A)
Mon Apr 28 09:54:40 2014 kern.info kernel: [   15.516000] usb 1-1: new high-speed USB device number 2 using ehci-platform
Mon Apr 28 09:54:40 2014 kern.info kernel: [   15.668000] PPP generic driver version 2.4.2
Mon Apr 28 09:54:40 2014 kern.info kernel: [   15.676000] NET: Registered protocol family 24
Mon Apr 28 09:54:40 2014 kern.info kernel: [   15.976000] b43-phy0: Broadcom 43225 WLAN found (core revision 23)
Mon Apr 28 09:54:40 2014 kern.info kernel: [   15.984000] b43-phy0: Found PHY: Analog 8, Type 4 (N), Revision 6
Mon Apr 28 09:54:40 2014 kern.info kernel: [   15.992000] Broadcom 43xx driver loaded [ Features: PNL ]
Mon Apr 28 09:54:40 2014 kern.debug kernel: [   16.016000] ieee80211 phy0: Selected rate control algorithm 'minstrel_ht'
Mon Apr 28 09:54:40 2014 kern.info kernel: [   16.068000] usb 1-1: ath9k_htc: Firmware htc_9271.fw requested
Mon Apr 28 09:54:40 2014 kern.info kernel: [   16.072000] usbcore: registered new interface driver ath9k_htc
Mon Apr 28 09:54:40 2014 kern.info kernel: [   16.508000] usb 1-1: ath9k_htc: Transferred FW: htc_9271.fw, size: 51272
Mon Apr 28 09:54:40 2014 kern.info kernel: [   16.804000] ath9k_htc 1-1:1.0: ath9k_htc: HTC initialized with 33 credits
Mon Apr 28 09:54:40 2014 kern.info kernel: [   18.888000] ath9k_htc 1-1:1.0: ath9k_htc: FW Version: 1.3
Mon Apr 28 09:54:40 2014 kern.debug kernel: [   18.896000] ath: EEPROM regdomain: 0x809c
Mon Apr 28 09:54:40 2014 kern.debug kernel: [   18.896000] ath: EEPROM indicates we should expect a country code
Mon Apr 28 09:54:40 2014 kern.debug kernel: [   18.896000] ath: doing EEPROM country->regdmn map search
Mon Apr 28 09:54:40 2014 kern.debug kernel: [   18.896000] ath: country maps to regdmn code: 0x52
Mon Apr 28 09:54:40 2014 kern.debug kernel: [   18.896000] ath: Country alpha2 being used: CN
Mon Apr 28 09:54:40 2014 kern.debug kernel: [   18.896000] ath: Regpair used: 0x52
Mon Apr 28 09:54:40 2014 kern.info kernel: [   18.980000] ieee80211 phy1: Atheros AR9271 Rev:1
Mon Apr 28 09:54:40 2014 kern.info kernel: [   18.992000] cfg80211: Calling CRDA for country: CN
Mon Apr 28 09:54:40 2014 kern.info kernel: [   19.016000] cfg80211: Regulatory domain changed to country: CN
Mon Apr 28 09:54:40 2014 kern.info kernel: [   19.024000] cfg80211:  DFS Master region: FCC
Mon Apr 28 09:54:40 2014 kern.info kernel: [   19.028000] cfg80211:   (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp), (dfs_cac_time)
Mon Apr 28 09:54:40 2014 kern.info kernel: [   19.040000] cfg80211:   (2402000 KHz - 2482000 KHz @ 40000 KHz), (N/A, 2000 mBm), (N/A)
Mon Apr 28 09:54:40 2014 kern.info kernel: [   19.048000] cfg80211:   (5170000 KHz - 5250000 KHz @ 80000 KHz), (N/A, 2300 mBm), (N/A)
Mon Apr 28 09:54:40 2014 kern.info kernel: [   19.056000] cfg80211:   (5250000 KHz - 5330000 KHz @ 80000 KHz), (N/A, 2300 mBm), (0 s)
Mon Apr 28 09:54:40 2014 kern.info kernel: [   19.064000] cfg80211:   (5735000 KHz - 5835000 KHz @ 80000 KHz), (N/A, 3000 mBm), (N/A)
Mon Apr 28 09:54:40 2014 kern.info kernel: [   19.072000] cfg80211:   (57240000 KHz - 59400000 KHz @ 2160000 KHz), (N/A, 2800 mBm), (N/A)
Mon Apr 28 09:54:40 2014 kern.info kernel: [   19.080000] cfg80211:   (59400000 KHz - 63720000 KHz @ 2160000 KHz), (N/A, 4400 mBm), (N/A)
Mon Apr 28 09:54:40 2014 kern.info kernel: [   19.088000] cfg80211:   (63720000 KHz - 65880000 KHz @ 2160000 KHz), (N/A, 2800 mBm), (N/A)
Mon Apr 28 09:54:40 2014 user.emerg syslog: Error: Failed to connect to ubus
Mon Apr 28 09:54:40 2014 kern.info kernel: [   21.824000] bcm63xx_enetsw bcm63xx_enetsw.0: link UP on Port 1, 100Mbps, full-duplex
Mon Apr 28 09:54:40 2014 kern.info kernel: [   21.832000] bcm63xx_enetsw bcm63xx_enetsw.0: link UP on Port 2, 100Mbps, full-duplex
Mon Apr 28 09:54:40 2014 kern.info kernel: [   21.840000] bcm63xx_enetsw bcm63xx_enetsw.0: link UP on Port 3, 100Mbps, full-duplex
Mon Apr 28 09:54:40 2014 kern.info kernel: [   21.848000] bcm63xx_enetsw bcm63xx_enetsw.0: link UP on Port 4, 100Mbps, full-duplex
Mon Apr 28 09:54:44 2014 authpriv.info dropbear[680]: Not backgrounding
Mon Apr 28 09:54:47 2014 user.emerg syslog: 'radio0' is disabled
Mon Apr 28 09:54:47 2014 user.emerg syslog: 'radio0' is disabled

któreś z zainstalowanych pakietów mogą się gryźć ze sobą ?

2 (edytowany przez Skajper4 2014-04-28 21:07:01)

Odp: Sagem 2704 + USB Dongle WiFI

Wywal: kmod-ath9k  - ta paczka jest do sieciówek na atherosie na PCI więc Tobie zbędna do tego dongla.
U mnie wygląda to tak (chociaż mam wn722n, ale to jest to samo): http://wrzuc.se/images/535eb0269624a.png
Niestety nie pokażę więcej bo mam starą sieciówkę intela 3945abg i nie wyciągnie więcej niż tyle, chociaż jest max zasięg.
Ustaw tryb N i HT40, może pomoże.
I jeśli nie używasz wbudowanego wifi, polecam zaktualizować obraz do najnowszej wersji z trunka. (ew. mogę podesłać "mirror" jako rar-a gdzie jest system + paczki pod niego, wtedy nie będzie takiego czegoś, że kernel nie jest kompatybilny z paczką bo wyszła nowa wersja trunka)

3 (edytowany przez mateo704 2014-04-29 07:39:45)

Odp: Sagem 2704 + USB Dongle WiFI

Używam już najnowszej wersji trunka. A powiedz mi podłączasz Dongla przez aktywny HUB czy bezpośrednio do portu ?  Podejrzewam że to może być przyczyną. Mógłbyś jeszcze pokazać jaką masz konfiguracje karty w /etc/config/wireless.

niski transfer mi nie przeszkadza specjalnie, najgorsze jest to ze gubi pakiety średnio 7-10%

4

Odp: Sagem 2704 + USB Dongle WiFI

Podłączam bezpośrednio

root@OpenWrt:~# cat /etc/config/wireless

config wifi-device 'radio1'
        option type 'mac80211'
        option channel '11'
        option path 'platform/ehci-platform/usb1/1-1/1-1:1.0'
        list ht_capab 'SHORT-GI-20'
        list ht_capab 'SHORT-GI-40'
        list ht_capab 'RX-STBC1'
        list ht_capab 'DSSS_CCK-40'
        list ht_capab 'HT40-'
        option txpower '20'
        option country 'PL'

config wifi-iface
        option device 'radio1'
        option network 'wan'
        option ssid 'xxxx'
        option mode 'sta'
        option bssid 'xx:xx:xx:xx:xx:xx'
        option encryption 'wep-open'
        option key '1'
        option key1 '0897q0752iufsd87uj3'

config wifi-iface
        option device 'radio1'
        option network 'lan'
        option mode 'ap'
        option encryprion 'wpa-mixed'
        option key 'haslo'
        option encryption 'psk-mixed'
        option ssid 'Bus obserwacyjny nr. 8B'