Jump to content

OPI ONE wireless success


Recommended Posts

Relax - Wireless is solved for OPI ONE

 

There seems to be a lot of confusion and missing information on how to access the dirt cheap OPI ONE wirelessly and the steps necessary to successfully use cheap Realtek USB dongles ( 8188cus, 8188eu ) with Armbian_5.10.

 

This is a short summary of the needed materials and steps to turn your OPI ONE into a wireless client or wireless AP. There are NO custom kernels, custom modules or anything else needed, we are using stock Armbian_5.10 with stock kernel, stock modules and stock software to configure wireless access for select tested and working Realtek wifi dongles.

 

Follow the steps without variation. Once you get wifi working you may adapt setup/configuration to your specific needs

 

Prerequisites

 

- OPI ONE with quality power supply 5V/2A

- MicroSD ( 4G or higher ) with stock Armbian_5.10 installed per official instructions

- Supported wifi USB dongle

- LAN connection to host computer ( preferrably notebook running Linux ) for needed setup/configuration 

- WLAN-router accessible from host computer to test wireless connections.

 

General procedure to set up wireless on OPI ONE

 

- Set up your OPI ONE with basic Armbian_5.10 and configure a static IP LAN-address

- Access OPI ONE via ssh from your host computer

- Plug in wireless dongle and load correct driver module

- check capabilities of wifi dongle (iw list)

- configure wpa_supplicant for client mode

- configure hostapd for AP mode

 

>>> all configurations will be minimal without added automagic complexities ( bridges, DHCP etc...)

 

OPI ONE wireless client

 

Module 8192cu works with Realtek 8188CUS dongles and provides a wireless interface wlan0 ready to be configured in managed mode with wpa_supplicant.

 

 

nano /etc/modules-load.d/modules.conf
=====================================

#8189es
8192cu

 

 

 

nano /etc/network/interfaces (adapt to your network setup)
==========================================================

auto lo
        iface lo inet loopback

#----- lan interface ( standard maintenance connection via ssh ) 
        
allow-hotplug eth0
   iface eth0 inet static
        address 192.168.3.164           
        netmask 255.255.255.0
        network 192.168.3.0

 

#----- Realtek 8192cu wlan interface client ( access defined in /etc/wpa_supplicant/wpa_supplicant.conf )
            
allow-hotplug wlan0
   iface wlan0 inet static
        address 192.168.2.164
        netmask 255.255.255.0
        network 192.168.2.0
        broadcast 192.168.2.255
        gateway 192.168.2.77
    dns-nameservers 192.168.1.1
    dns-nameservers 8.8.8.8

        wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf

 

 

nano /etc/wpa_supplicant/wpa_supplicant.conf
============================================

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1

network={
        ssid="<your_ssid>"
        psk="<your_password>"
        key_mgmt=WPA-PSK
        priority=99

}
 

 

After restarting OPI ONE it should be connected to your configured wireless router and accessible under the static IP.

Wireless connection is working now and the rest is up to your hopefully wild imagination and creativity.

 

Tested working dongles

 

RTL8188CUS cheap no-name dongle from Aliexpress ( < $2 )

 

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

RTL8188CUS Edimax EW-7811Un high quality dongle ( $10 )

 

Bus 001 Device 008: ID 7392:7811 Edimax Technology Co., Ltd EW-7811Un 802.11n Wireless Adapter [Realtek RTL8188CUS]

Wifi performance is not stellar, but definitely adequate. Under ideal conditions ( same room as router, little interference ) speeds of 80mbps ( measured with iperf ) can be expected. Crossing two walls at 20m distance from router the signal was still usable yielding 20mbps.

 

 

OPI ONE access point + wireless client

 

Surprise : You were asking for AP mode and  now you are getting AP deluxe with an extra client interface for free.

 

Module 8188eu works with Realtek 8188EU dongle and provides TWO wireless interfaces : wlan0 is ready to be configured in AP mode with hostapd and wlan1 in managed mode with wpa_supplicant.

 

When the dongle is plugged in and the driver correctly loaded, iw list will enumerate the drivers parameters for the two new interfaces. iwconfig will show wlan0 and wlan1.

 

 

 

nano /etc/modules-load.d/modules.conf
=====================================

#8189es
8188eu

nano /etc/default/hostapd
=========================

DAEMON_CONF="/etc/hostapd.conf"


nano /etc/network/interfaces
============================

auto lo
        iface lo inet loopback

#----- lan interface ( standard maintenance connection via ssh )
        
allow-hotplug eth0
   iface eth0 inet static
        address 192.168.3.164
        netmask 255.255.255.0
        network 192.168.3.0

#----- Realtek 8188eu wlan interface AP ( access defined in /etc/hostapd.conf )
              
allow-hotplug wlan0
   iface wlan0 inet static
        address 192.168.4.164
        netmask 255.255.255.0
        network 192.168.4.0

#----- Realtek 8188eu wlan interface client ( access defined in /etc/wpa_supplicant/wpa_supplicant.conf )
            
allow-hotplug wlan1
   iface wlan1 inet static
        address 192.168.2.164
        netmask 255.255.255.0
        network 192.168.2.0
        broadcast 192.168.2.255
        gateway 192.168.2.77
    dns-nameservers 192.168.1.1
    dns-nameservers 8.8.8.8

        wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf


nano /etc/hostapd.conf
======================

ssid=<your-OPI-ONE-ssid>            
interface=wlan0
hw_mode=g
channel=5
driver=nl80211
logger_syslog=0
logger_syslog_level=0
wmm_enabled=1
ieee80211n=1
wpa=3
preamble=1
#wpa_psk=66eb31d2b48d19ba216f2e50c6831ee11be98e2fa3a8075e30b866f4a5ccda27
wpa_passphrase='12345678'
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP
rsn_pairwise=CCMP
auth_algs=1
macaddr_acl=0
noscan=1
#ht_capab=[HT40-][sHORT-GI-40][sHORT-GI-40][DSSS_CCK-40]
country_code=<your country code>
#ieee80211d=1


nano /etc/wpa_supplicant/wpa_supplicant.conf
============================================

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1

network={
        ssid="<your-router-ssid>"
        psk="<your-router-password>"
        key_mgmt=WPA-PSK
        priority=99
}

 

 

After restarting OPI ONE it should be connected to your configured wireless router and accessible under the static IP. On your notebook the newly created OPI ONE access point should be visible when scanning. Specify a static IP for the link and connect using the chosen password ( e.g. '12345678' ) . Feel like a hero, empty a sixpack and order more pizza....

Wireless connection is working now and the rest is up to your hopefully wild imagination and creativity.

 

 

Tested working dongle for AP mode :

 

RTL8188EU cheap no-name dongle from Aliexpress (  $2.20  )

Bus 001 Device 009: ID 0bda:0179 Realtek Semiconductor Corp. ( noname identified as 8188EU )

Wifi performance with both interfaces active is surprisingly good. Under ideal conditions ( same room as router, little interference ) speeds of 60 (client) / 30 (AP) mbps can be expected. Crossing two walls at 20m distance from router signals were still usable yielding 20 (client) / 5 (AP) mbps.

 

 

Troubleshooting

Most of the problems encountered while setting up WIFI are caused by inadequate or overly complicated testing setups, procedures and rampant wild guesses. Keep it simple and solve one problem at a time. As a stable datum you should realize that the procedures outlined above DO WORK and have been adequately TESTED and RETESTED..

 

Solution No. 1 :  Follow the steps outlined

Solution No. 2 :  Find out where you did not follow the steps outlined

Solution No. 3 :  Find out what you added to the steps outlined

Solution No. 4 :  Reiterate

 

 

Good luck with your wireless OPI ONE, enjoy and flood the forum with working solutions. :)

Link to comment
Share on other sites

Thank you, it's work!!!

I setup AP with RTL8188EU

After AP setup tune dhcpd server and NAT by this manual https://learn.adafruit.com/setting-up-a-raspberry-pi-as-a-wifi-access-point/install-software

Have some correction in your manual:

nano /etc/hostapd.conf

wpa=3 // why not 2

#wpa_psk=66eb31d2b48d19ba216f2e50c6831ee11be98e2fa3a8075e30b866f4a5ccda27 //make # in start of the string bold, it is not commented by default.

Thank you again. 

Link to comment
Share on other sites

@rodolfo

 

your tutorial is focused if I had a wifi dongle 8189cu ...I have ordered but not coming yet ....could I use this configuration for the wifi on board ?

In this case what I have to do ? 

If you say that the wifi on board doesn't work well  I will wait until the dongle is in my hands .....

I'm trying your code with my router home with address 192.168.1.1  but no dongle....

Link to comment
Share on other sites

you're right but I don't have the dongles to test , I'd like to test it with the wifi on board if possible , if not I will wait the dongle and never Iwill buy orange pi with wifi on board 

I'm not here to speculate , my job is automation engineer , I just start this adventure to make a porting and understand something with linux 

Be cool .....

Link to comment
Share on other sites

@xwalter

 

I do understand your wish to use the OPI boards for something useful. I'll test OPI LITE's onboard wifi as soon as I get the boards, but having found a satisfactory solution with USB dongles I actually do not really care whether onboard wifi works right out of the box. Good luck with your project.

Link to comment
Share on other sites

ok thank you !

Simply .....I bought orang epi plus 2 after read "Wifi server " ....and I'd to use it , nothing more . 

I will test when my dongles later . 

If I will not get success i will try to install Kali , there are a lots of tools for Access Point (airmon etc ) 

Link to comment
Share on other sites

If I will not get success i will try to install Kali , there are a lots of tools for Access Point (airmon etc ) 

 

There are no problems with tools but kernel / drivers. Switching to other distribution with older or equal kernel you only waste time.

Link to comment
Share on other sites

I'm trying with orange pi plus 2 .....after I did 

sudo service wicd stop

I saw something as mirage .....I think there are some conflicts with wicd , hostapd and other .....

My router wifi home is 192.168.1.1 . In Armbian I see that it's connected at 192.168.3.164 but not internet ....

Link to comment
Share on other sites

using wicd I'm able to xonnect via cable (dhcp) and via wifi wlan0 to my router .

I create a new ad-hoc wifi net and I can see it with my scanner android. When I connect it happen nothing ...

I have to set some files ....big troubles 

Link to comment
Share on other sites

I had to blacklist the standard realtek module in order to get things to behave with the patched one that comes with the distro

lane@orangepione-2:~$ cat /etc/modprobe.d/wifi-blacklist.conf 
blacklist rtl8192cu

Prior to blacklisting, it would just crash and reboot as soon as the wifi module loaded.  

 

This was using one of the little rt8192 dongles from adafruit running an armbian image I built from the repo yesterday.

Link to comment
Share on other sites

@rodolfo 

I know you like me ....but at the moment I'm waiting for a dongles , differents kinds of them also to use on kali .

But now I have the orange pi plus 2 with on board wifi and I cannot test your code ....I mean I have tested but I fail because I don't have the dongle .

Anyway , don't worry because I will test soon and start to run android wifi client connected to orange pi and manage the GPIO over wifi ..... ;)

At the moment I'm installing all I need on armbian and it seems to run well , apache2, mysql, samba, phpadmin and more .GPIO's are running well too. 

Just the fuckin' wifi but  I think positive and I exchange energy with the universe , so because I'm sure to get satisfations for the next future . 

ciao 

Walter

Link to comment
Share on other sites

Just the fuckin' wifi but  I think positive and I exchange energy with the universe , so because I'm sure to get satisfations for the next future . 

ciao 

 

Wifi is fixed on all H3 boards. I will push new update later in the evening where 8189fs and 8189es are updated. I made brief testing and AP mode also works on both chips.

Link to comment
Share on other sites

Wifi is fixed on all H3 boards. I will push new update later in the evening where 8189fs and 8189es are updated. I made brief testing and AP mode also works on both chips.

 

 

USB wireless dongles for OPI ONE continue working in Armbian_5.13. The internal wifi 8189fs for OPI LITE with factory antenna works well in managed and AP mode in Armbian_5.13.

 

Performance tests with OPI LITE internal wifi show excellent results compared to USB dongles. Wireless connection is reliable and surprisingly performant ( 40 mbps crossing 2 walls in noisy environment, compared to 20mbps from notebook and 2 mbps from OPI ONE USB dongle ).

 

 

 

Link to comment
Share on other sites

Just successfully tested another Realtek usb wifi dongle with the OPI ONE. Both AP and managed mode work as decribed for 0bda:0179 Realtek Semiconductor Corp. in instructions.

 

lsusb

 

Bus 001 Device 009: ID 0bda:8179 Realtek Semiconductor Corp. ( noname identified as 8188EU )

 

Aliexpress Link : http://www.aliexpress.com/item/1pc-Mini-USB-WiFi-Wireless-802-11-n-g-b-150M-LAN-Adapter-Network-Card/32292872916.html

Link to comment
Share on other sites

Hi All,

 

thank you for great Armbian image for Orange Pi Lite.

 

Here is my report on using built-in wifi on latest Armbian 5.0.13, on Orange Pi Lite with dhcp.

My router has dhcp server activated.

 

/etc/network/interfaces

allow-hotplug wlan0
              iface wlan0 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="ssid"
        psk="password"
}
orange@orangepilite:~$ sudo ifup wlan0

After that interface was up and running well. Quick & dirty test showed 6.6-8.8 MB/sec upload speed and 3.2-6 MB/sec download in the same room with router.

Link to comment
Share on other sites

...

 

Module 8188eu works with Realtek 8188EU dongle and provides TWO wireless interfaces : wlan0 is ready to be configured in AP mode with hostapd and wlan1 in managed mode with wpa_supplicant.

 

When the dongle is plugged in and the driver correctly loaded, iw list will enumerate the drivers parameters for the two new interfaces. iwconfig will show wlan0 and wlan1.

 

...

 

Hello!

 

Which driver version is it? Im trying to get this dual interface mode on my BPi. Default is r8188eu on 5.15 kernel 4.2.6 . I successfully compiled and loaded kernel module 8188eu from https://github.com/lwfinger/rtl8188eu.git, but i got the same result: only one interface
 
root@bananapi:/home/pi# iwconfig
lo        no wireless extensions.
 
eth0      no wireless extensions.
 
wlx0c82680cfe5a  unassociated  Nickname:"<WIFI@REALTEK>"
          Mode:Auto  Frequency=2.412 GHz  Access Point: Not-Associated
          Sensitivity:0/0
          Retry:off   RTS thr:off   Fragment thr:off
          Encryption key:off
          Power Management:off
          Link Quality=0/100  Signal level=0 dBm  Noise level=0 dBm
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0
 
bond0     no wireless extensions.
 
[   58.968107] Chip Version Info: CHIP_8188E_Normal_Chip_TSMC_D_CUT_1T1R_RomVer(0)
[   59.000000] EEPROM ID = 0x8129
[   59.003160] usbcore: registered new interface driver r8188eu
[   59.024721] r8188eu 2-1:1.0 wlx0c82680cfe5a: renamed from wlan0
 
Where can i get sources for the dual interface version?
 
Best regards,
Peter
Link to comment
Share on other sites

 

Which driver version is it?

 

 

I used stock 8188eu driver of Armbian_5.10 on OPI ONE/LITE and have since just upgraded ( presently I'm at 5.14 ). Here's what I get from a running OPI ONE :

root@opione_6:/home/pi# modinfo 8188eu

filename:       /lib/modules/3.4.112-sun8i/kernel/drivers/net/wireless/rtl8188eu/8188eu.ko
version:        v4.3.0.6_12167.20140828
author:         Realtek Semiconductor Corp.
description:    Realtek Wireless Lan Driver
license:        GPL
srcversion:     6E1E9435E7EEE679F088FA2
alias:          usb:v07B8p8179d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v0BDAp0179d*dc*dsc*dp*ic*isc*ip*
alias:          usb:v0BDAp8179d*dc*dsc*dp*ic*isc*ip*
depends:        
intree:         Y
vermagic:       3.4.112-sun8i SMP preempt mod_unload modversions ARMv7 p2v8
parm:           rtw_ips_mode:The default IPS mode (int)
parm:           rtw_usb_rxagg_mode:int
parm:           rtw_qos_opt_enable:int
parm:           ifname:The default name to allocate for first interface (charp)
parm:           if2name:The default name to allocate for second interface (charp)
parm:           rtw_initmac:charp
parm:           rtw_custom_default_mac:charp
parm:           rtw_channel_plan:int
parm:           rtw_chip_version:int
parm:           rtw_rfintfs:int
parm:           rtw_lbkmode:int
parm:           rtw_network_mode:int
parm:           rtw_channel:int
parm:           rtw_mp_mode:int
parm:           rtw_wmm_enable:int
parm:           rtw_vrtl_carrier_sense:int
parm:           rtw_vcs_type:int
parm:           rtw_busy_thresh:int
parm:           rtw_ht_enable:int
parm:           rtw_bw_mode:int
parm:           rtw_ampdu_enable:int
parm:           rtw_rx_stbc:int
parm:           rtw_ampdu_amsdu:int
parm:           rtw_lowrate_two_xmit:int
parm:           rtw_rf_config:int
parm:           rtw_power_mgnt:int
parm:           rtw_smart_ps:int
parm:           rtw_low_power:int
parm:           rtw_wifi_spec:int
parm:           rtw_antdiv_cfg:int
parm:           rtw_antdiv_type:int
parm:           rtw_enusbss:int
parm:           rtw_hwpdn_mode:int
parm:           rtw_hwpwrp_detect:int
parm:           rtw_hw_wps_pbc:int
parm:           rtw_max_roaming_times:The max roaming times to try (uint)
parm:           rtw_fw_iol:FW IOL (int)
parm:           rtw_mc2u_disable:int
parm:           rtw_80211d:Enable 802.11d mechanism (int)
parm:           rtw_notch_filter:0:Disable, 1:Enable, 2:Enable only for P2P (uint)
parm:           rtw_hiq_filter:0:allow all, 1:allow special, 2:deny all (uint)
parm:           rtw_tx_pwr_lmt_enable:0:Disable, 1:Enable, 2: Depend on efuse (int)
parm:           rtw_tx_pwr_by_rate:0:Disable, 1:Enable, 2: Depend on efuse (int)
parm:           rtw_phy_file_path:The path of phy parameter (charp)
parm:           rtw_load_phy_file:PHY File Bit Map (int)
parm:           rtw_decrypt_phy_file:Enable Decrypt PHY File (int)

Hope this helps. I have not compiled the drivers and do not have any further info. Good luck.

Link to comment
Share on other sites

@FPeter

 

I just did an upgrade to Armbian_5.15 and rechecked wifi working with module 8188eu.

root@opione_6:/home/pi# lsmod

Module                  Size  Used by
.....
8188eu                908230  0

root@opione_6:/home/pi# ifconfig
.....

wlan0     Link encap:Ethernet  HWaddr 00:13:ef:80:02:7f  
          inet addr:xxxxxxxxxxxxxxxxx Bcast:192.168.4.255  Mask:255.255.255.0
          inet6 addr: xxxxxxxxxxxxxxxxxxxxx Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:10 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0   TX bytes:116 (116.0 

wlan1     Link encap:Ethernet  HWaddr 06:13:ef:80:02:7f  
          inet addr:xxxxxxxxxxxxxxxxx Bcast:192.168.2.255  Mask:255.255.255.0
          inet6 addr: xxxxxxxxxxxxxxxxxxxxx Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:14782 errors:0 dropped:211 overruns:0 frame:0
          TX packets:11804 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:8906076 (8.4 MiB)  TX bytes:2727423 (2.6 MiB)

root@opione_6:/home/pi# lsusb
....
Bus 002 Device 002: ID 0bda:8179 Realtek Semiconductor Corp.

Works like a charm. Pls. check your setup and retry per earlier instructions. Good luck.

Link to comment
Share on other sites

current driver in my system is:

 

pi@bananapi:~$ modinfo /lib/modules/4.6.2-sunxi/kernel/drivers/staging/rtl8188eu/r8188eu.ko

filename:       /lib/modules/4.6.2-sunxi/kernel/drivers/staging/rtl8188eu/r8188eu.ko

version:        v4.1.4_6773.20130222

...

 

I dont really understand - v4.1.4 staging driver in kernel 4.6.2 - Your older kernel has newer driver... ?

 

I found the following archive: http://dl.lazyzhu.com/file/RTL8188EU/

 

I tried to compile version RTL8188EUS_linux_v4.3.0.6_12167.20140828 (and all other too on the page), but without success: when i try to run install.sh, i got the following error...

 


 

When i try to skip install script and call its make command with additional -Wno-error :

 

root@bananapi:/home/pi/RTL8188EUS_linux_v4.3.0.8_13968.20150417# make -Wno-error ARCH=arm CROSS_COMPILE= -C /lib/modules/4.6.2-sunxi/build M=/home/pi/RTL8188EUS_linux_v4.3.0.8_13968.20150417/driver/rtl8188EUS_linux_v4.3.0.8_13968.20150417 modules

make: Entering directory '/usr/src/linux-headers-4.6.2-sunxi'

  Building modules, stage 2.

  MODPOST 0 modules

make: Leaving directory '/usr/src/linux-headers-4.6.2-sunxi'

 

But no *.ko appears in any subfolder... Do You have any idea, how to compile this driver version?

Link to comment
Share on other sites

 

. Do You have any idea, how to compile this driver version?

 

 

Sorry - cannot help you there. Pls. reread the instructions in case you would like working wifi. Obviously you started out somewhere and ended up in the boonies. To end this endless cycle I'd recommend you reread the basic documentations on getting started with Armbian, prepare a completely NEW current Armbian_5.15 sdcard and take it from there. Best of luck!

Link to comment
Share on other sites

Hi great tutorial. 

I have tried it twice (for the wireless client), but no luck for me.

I have a cheap AliExpress wifi dongle, with the chip given as 8188EUS.

Any ideas on if the different model could be why it doesn't work; or have I likely just done something wrong (twice)?

Cheers

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines