Jump to content


Photo

[Tutorial] OPI ONE wireless success


  • Please log in to reply
45 replies to this topic

#31 UglyDoodle

UglyDoodle

    Newbie

  • Senior Members
  • Pip
  • 5 posts

Posted 05 September 2016 - 08:54 PM

Hi! Nice tutorial!

 

But my OPi is acting weird... When I unplug my Ethernet cable, my WiFi dongle stop to work!

 

My lsusb:

Bus 002 Device 002: ID 0bda:8178 Realtek Semiconductor Corp. RTL8192CU 802.11n WLAN Adapter

My lsmod:

root@orangepione:~# lsmod
Module                  Size  Used by
rtl8192cu              61143  0 
rtlwifi                45784  1 rtl8192cu
rtl8192c_common        33420  1 rtl8192cu
mac80211              358429  3 rtlwifi,rtl8192c_common,rtl8192cu

My interfaces config.:

root@orangepione:~# cat /etc/network/interfaces
# Wired adapter #1
allow-hotplug eth0
   iface eth0 inet static
	address 192.168.1.68
	netmask 255.255.255.0
	network 192.168.1.0
	gateway 192.168.1.1

allow-hotplug wlan0
   iface wlan0 inet static
	address 192.168.1.69
        netmask 255.255.255.0
        network 192.168.1.0
        broadcast 192.168.1.255
        gateway 192.168.1.1
    dns-nameservers 192.168.1.1
    dns-nameservers 8.8.8.8
        wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf

My wpa_supplicant.conf:

root@orangepione:~# cat /etc/wpa_supplicant/wpa_supplicant.conf
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1

network={
        ssid="xxxxxxxxxxxxxxxx"
        psk="xxxxxxxxxxxx"
        key_mgmt=WPA-PSK
        priority=99
}

My modinfo rtl8192cu:

root@orangepione:~# modinfo rtl8192cu
filename:       /lib/modules/3.4.112-sun8i/kernel/drivers/net/wireless/rtlwifi/rtl8192cu/rtl8192cu.ko
firmware:       rtlwifi/rtl8192cufw.bin
description:    Realtek 8192C/8188C 802.11n USB wireless
license:        GPL
author:         Larry Finger	<Larry.Finger@lwfinger.net>
author:         Ziv Huang	<ziv_huang@realtek.com>
author:         Georgia		<georgia@realtek.com>
alias:          usb:v7392p7822d*dc*dsc*dp*ic*isc*ip*
...
alias:          usb:v0BDAp8191d*dc*dsc*dp*ic*isc*ip*
depends:        rtlwifi,mac80211,rtl8192c-common
intree:         Y
vermagic:       3.4.112-sun8i SMP preempt mod_unload modversions ARMv7 p2v8 
parm:           swenc:Set to 1 for software crypto (default 0)
 (bool)
parm:           debug:Set debug level (0-5) (default 0) (int)

Armbian version:

root@orangepione:/# dpkg-query -W -f='${Version}\n' linux-jessie-root-orangepione

5.16

Looking at my dmesg:

[    6.018555] rtl8192cu: Loading firmware rtlwifi/rtl8192cufw.bin
[    6.018925] usbcore: registered new interface driver rtl8192cu
[    6.026844] ieee80211 phy0: Selected rate control algorithm 'rtl_rc'
[    6.028078] rtlwifi: wireless switch is on
[    6.160511] systemd-udevd[179]: renamed network interface wlan0 to wlan1

So, i changed my interfaces config to:

root@orangepione:~# cat /etc/network/interfaces
# Wired adapter #1
allow-hotplug eth0
iface eth0 inet static
    address 192.168.1.68
    netmask 255.255.255.0
    network 192.168.1.0
    gateway 192.168.1.1

allow-hotplug wlan1
iface wlan0 inet static
    address 192.168.1.69
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.1
dns-nameservers 192.168.1.1
dns-nameservers 8.8.8.8
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf

But... Unfortunately my problem persists...

 

What should I do?

 

Thank you!



#32 tkaiser

tkaiser

    Advanced Member

  • Moderators
  • 2842 posts

Posted 05 September 2016 - 09:13 PM

What should I do?

 

Execute 'netstat -rn' to get the idea why two interfaces connecting to the same network (192.168.1.0/24 in your case) is a bad idea with this kernel/config. The net route to your network uses eth0 (default route as well) so unplugging the cable you'll loose access. I don't know whether it helps to change order of NICs in interfaces file or if you must use scripts to adjust the routes (googling for 'pre-down route add delete' should help)


Please don't send personal messages! Use the forum so others can participate and benefit!

 

Before you report any problem please be aware that crappy SD cards and insufficient power supply are reason N° 1 why things are failing. Try to rule this out first please, check 'getting started' recommendations and check/provide 'sudo armbianmonitor -u' output first!

 

Did you check out custom google powered forum search already (before opening new threads or asking questions)?


#33 UglyDoodle

UglyDoodle

    Newbie

  • Senior Members
  • Pip
  • 5 posts

Posted 05 September 2016 - 11:36 PM

Execute 'netstat -rn' to get the idea why two interfaces connecting to the same network (192.168.1.0/24 in your case) is a bad idea with this kernel/config. The net route to your network uses eth0 (default route as well) so unplugging the cable you'll loose access. I don't know whether it helps to change order of NICs in interfaces file or if you must use scripts to adjust the routes (googling for 'pre-down route add delete' should help)

 

Thank you tkaiser!

 

I made a clean install of the latest version of armbian for my Orange Pi One. Then apt-get update, apt-get upgrade etc.

 

Followed again the tutorial and now my OPi keeps rebooting every time my WiFi dongle is connected to the USB port.

 

Much trouble to just make an WiFi dongle to work... I'm thinking about trash out this OPi and going back to Raspberry Pi!

 

[]s!



#34 UglyDoodle

UglyDoodle

    Newbie

  • Senior Members
  • Pip
  • 5 posts

Posted 05 September 2016 - 11:40 PM

By the way... Can't understand why armbian don't have native support to at least one of these:

 

- Atheros AR9271

- Ralink RT3070
- Ralink RT3572

 

They are the most used USB WiFi adapters out there...



#35 tkaiser

tkaiser

    Advanced Member

  • Moderators
  • 2842 posts

Posted 10 October 2016 - 10:47 PM

Testers wanted: there is an alternative to configure Wi-Fi: https://github.com/i...mment-252751466

 

It's basically just 'nmtui' and then 'Activate a connection'. Feedback welcome!


Please don't send personal messages! Use the forum so others can participate and benefit!

 

Before you report any problem please be aware that crappy SD cards and insufficient power supply are reason N° 1 why things are failing. Try to rule this out first please, check 'getting started' recommendations and check/provide 'sudo armbianmonitor -u' output first!

 

Did you check out custom google powered forum search already (before opening new threads or asking questions)?


#36 sle118

sle118

    Member

  • Senior Members
  • PipPip
  • 10 posts

Posted 19 October 2016 - 08:49 PM

Not sure if this is the right place to post, but since instructions on getting hostapd to work were provided here, I'll give it a shot.
 
I am on the orange pi PC
 

dpkg-query -W -f='${Version}\n' linux-jessie-root-orangepipc
5.20

with this dongle which I had lying in a drawer. 

lsusb 
Bus 004 Device 002: ID 0bda:8176 Realtek Semiconductor Corp. RTL8188CUS 802.11n WLAN Adapter

from the thread below, I understand that there is a patched module and instructions were given to build and install it, which I did
http://forum.armbian...s-module-8192cu
 
I can't use "iw"
 

iw wlan0 info
command failed: No such device (-19)

but I can scan for networks
 

iwlist wlan0 scanning
wlan0 Scan completed :
Cell 01 - Address: XX:XX:XX:XX:XX:XX
ESSID:"XXXX"
Protocol:IEEE 802.11bgn
Mode:Master
Frequency:2.422 GHz (Channel 3)
Encryption key:on
Bit Rates:144 Mb/s
Extra:rsn_ie=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
IE: IEEE 802.11i/WPA2 Version 1
Group Cipher : TKIP
Pairwise Ciphers (1) : TKIP
Authentication Suites (1) : PSK
Quality=20/100 Signal level=100/100

so I am assuming that the dongle is ready for hostapd to hookup.  I clone Igor's hostapd repository and ensured I had a successful build, after which I installed the generated deb package

https://github.com/igorpecovnik/hostapd

This gives me 2 binaries, a "standard" one and a patched one. 

 

# hostapd -v
hostapd v2.5
User space daemon for IEEE 802.11 AP management,
IEEE 802.1X/WPA/WPA2/EAP/RADIUS Authenticator
Copyright (c) 2002-2015, Jouni Malinen <j@w1.fi> and contributors

# hostapd-rt -v
hostapd v2.5
User space daemon for IEEE 802.11 AP management,
IEEE 802.1X/WPA/WPA2/EAP/RADIUS Authenticator
Copyright (c) 2002-2015, Jouni Malinen <j@w1.fi> and contributors

 

so I tried running the realtek version of hostapd as built
 

# hostapd-rt hostapd.realtek.conf
No drivers enabled
Failed to initialize global context

no joy, so try the other version
 

# hostapd hostapd.conf
Configuration file: hostapd.conf
Line 20: unknown configuration item 'noscan'
1 errors found in configuration file 'hostapd.conf'
Failed to set up interface with hostapd.conf
Failed to initialize interface

not good, but let's remove that "noscan" option and see

[color=#222222][font="Helvetica Neue", Arial, Verdana, sans-serif][size=4][background=#ffffff]#hostapd -dd hostapd.conf[/size][/font][/color][/background]

output:

Spoiler

 
what seems to be the culprit of my issue is that the nl80211 driver that's used when building hostapd is unable to set the dongle to ap mode 

netlink: Operstate: ifindex=5 linkmode=0 (kernel-control), operstate=6 (IF_OPER_UP)
nl80211: Set mode ifindex 5 iftype 2 (STATION)
nl80211: Failed to set interface 5 to mode 2: -19 (No such device)

so command "ip" shows the interface as being at index 5.

ip link show wlan0
5: wlan0: <BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state UP mode DEFAULT group default qlen 1000
    link/ether 00:e0:4c:03:18:be brd ff:ff:ff:ff:ff:ff

this makes me wonder if an empty "iw list" is the issue that would need to be fixed here. 

 

thanks for the help!

 

 
 


#37 robov

robov

    Newbie

  • Senior Members
  • Pip
  • 1 posts

Posted 21 October 2016 - 07:14 AM

That's great :) , I have Orange Pi PC

 

1> I was just curious that Wireless AP is working with 8188EU only ? [I see admin updated and tested for 8189fs and 8189es too]

any other than this.

2> Will it work with RTL8192 5dbi antenna https://www.aliexpre...84964962.html 

3> We got success in armbian only, right ? I had fedora f22 installed from start.

 

 

Thanks again for awesome work and good support by Admin, Staff and members. Cheers !



#38 appz

appz

    Newbie

  • Senior Members
  • Pip
  • 8 posts

Posted 31 October 2016 - 06:55 PM

Just try new core

 

 

Module connect to internal USB:

USB-DP1

USB-DM1

 

Core;

Linux nanopineo 4.9.0-sun8i #4 SMP Mon Oct 31 04:12:20 CST 2016 armv7l armv7l armv7l GNU/Linux 

 

 

--------------------------------------------------------------------------------- 

$ ifconfig 

 
wlx009f13d0a14d Link encap:Ethernet  HWaddr 00:9f:13:d0:a1:4d
          inet addr:192.168.0.110  Bcast:192.168.0.255  Mask:255.255.255.0
          inet6 addr: fe80::29f:13ff:fed0:a14d/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:491 errors:0 dropped:0 overruns:0 frame:0
          TX packets:302 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:549938 (549.9 KB)  TX bytes:33758 (33.7 KB)
 
-------------------------------------------------------------------------------------
/etc/network/interfaces
 
allow-hotplug wlx009f13d0a14d
iface wlx009f13d0a14d inet dhcp
 
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
 

------------------------------------------------------------------------------------

 

 

 /etc/wpa_supplicant/wpa_supplicant.conf

 
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
 
 
network={
        ssid="your sid"
        psk="your pass"
        key_mgmt=WPA-PSK
}
 
 
---------------------------------------
 
~$ lsmod
Module                  Size  Used by
ccm                     7767  1
rtl8192cu              60443  0
rtl_usb                 9530  1 rtl8192cu
rtl8192c_common        40018  1 rtl8192cu
rtlwifi                59200  3 rtl_usb,rtl8192c_common,rtl8192cu
mac80211              408281  3 rtl_usb,rtlwifi,rtl8192cu
cfg80211              244332  2 mac80211,rtlwifi
rfkill                 12189  3 cfg80211
cpufreq_dt              3887  0
uio_pdrv_genirq         3591  0
thermal_sys            49978  1 cpufreq_dt
uio                     8953  1 uio_pdrv_genirq
 
 
----------------------------------------------------------
 
lsusb
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 002: ID 0bda:8176 Realtek Semiconductor Corp. RTL8188CUS 802.11n WLAN Adapter
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
 
 
 
Its work!

 

But need restart one time.

 

NanoPi Neo



#39 tkaiser

tkaiser

    Advanced Member

  • Moderators
  • 2842 posts

Posted 27 November 2016 - 12:55 PM

Someone suggested including these bits here in Armbian https://github.com/d...ncurrent-softAP but since I'm not interested in Wi-Fi dongles at all I forward this.

Please don't send personal messages! Use the forum so others can participate and benefit!

 

Before you report any problem please be aware that crappy SD cards and insufficient power supply are reason N° 1 why things are failing. Try to rule this out first please, check 'getting started' recommendations and check/provide 'sudo armbianmonitor -u' output first!

 

Did you check out custom google powered forum search already (before opening new threads or asking questions)?


#40 Kaju666

Kaju666

    Newbie

  • Senior Members
  • Pip
  • 4 posts

Posted 02 January 2017 - 08:48 PM

Hello

 

i have some problems and i don't know why i don't see wlan0 in interfaces.

 

i make everything like in instruction + downloaded 8192cu bin driver and put in lib/firmware/rtlwifi

 

dmesg:

2017-01-02_20h42_03.png

 

Other commands:

2017-01-02_20h45_04.png



#41 Igor

Igor

    Administrator

  • Administrators
  • 3078 posts

Posted 02 January 2017 - 08:52 PM

What about:
iwconfig
nmtui-connect

Donate to support Armbian. Thank you! | Use forum not private messaging | Use search before opening new topic | Enjoy!


#42 Kaju666

Kaju666

    Newbie

  • Senior Members
  • Pip
  • 4 posts

Posted 02 January 2017 - 09:04 PM

Both without any wlan0.

https://screenpresso.com/=SmUSd

https://screenpresso.com/=W1OHd



#43 Kaju666

Kaju666

    Newbie

  • Senior Members
  • Pip
  • 4 posts

Posted 03 January 2017 - 09:20 AM

Ok i make this working :) It's easier that described here :)

 

First i downloaded latest armbian 5.20 and installed image to sdcard and connected LAN cable(do not plug wifi adpater).

Then after login i made commands below:

sudo apt-get update

sudo apt-get upgrade

sudo apt-get install git build-essential dkms network-manager

git clone https://github.com/pvaret/rtl8192cu-fixes.git

sudo dkms add ./rtl8192cu-fixes

sudo dkms install 8192cu/1.10

sudo depmod -a

sudo cp ./rtl8192cu-fixes/blacklist-native-rtl8192.conf /etc/modprobe.d/

sudo reboot

Then i plug in my NETIS adapter (RTL8188CUS) and typed:

nmcli -a d wifi connect

 Connected to my WIFI, unplugged LAN, and hardreset device.

 

Thats it :)



#44 Igor

Igor

    Administrator

  • Administrators
  • 3078 posts

Posted 03 January 2017 - 09:24 AM

Amazing what you can find in our docs  :)

https://docs.armbian...wireless-driver


Donate to support Armbian. Thank you! | Use forum not private messaging | Use search before opening new topic | Enjoy!


#45 Kaju666

Kaju666

    Newbie

  • Senior Members
  • Pip
  • 4 posts

Posted 03 January 2017 - 09:33 AM

Amazing what you can find in our docs  :)

https://docs.armbian...wireless-driver

 

ofcourse i tried this but somehow it not works, instruction from github works.



#46 Igor

Igor

    Administrator

  • Administrators
  • 3078 posts

Posted 03 January 2017 - 09:35 AM

of course i tried this but somehow it not works, instruction from github works.

blacklisting the original driver is missing, the rest is the same - we are using the same (working) driver source.


Donate to support Armbian. Thank you! | Use forum not private messaging | Use search before opening new topic | Enjoy!