Android 7.1 (Pinebook) 0.3.10-66 [Sep 19] | Android 7.1 (PINE A64(+)) 0.3.10-66 [Sep 19] | Android 7.1 (SOPINE) 0.3.10-66 [Sep 19] | Linux Images (ROCK64) 0.5.9-104 [Sep 13] | Android Images (ROCK64) 0.3.4-86 [Sep 13] | PINE64 Installer v2.0.0-beta.3 [Sep 12] | Android Images (ROCK64) 20170809 [Aug 24] | Debian Jessie LXDE (ROCK64) 20170809 [Aug 16]

Getting Started | Visit the WIKI | IRC Logs | Forum Rules/Policy


USB Wifi drivers avail in new kernel (3.10.101-0-pine64-longsleep)
#1
Ok quick guide with some of the basics. I am using longlseeps kernel on debian. 

First make sure you have his latest kernel. To check you can issue;


Code:
uname -a


at a command prompt. If you dont see the kernel version in the subject of this post or higher then run the magic;

Code:
bash <(curl -s https://raw.githubusercontent.com/longsleep/build-pine64-image/master/simpleimage/platform-scripts/pine64_update_uboot.sh)
bash <(curl -s https://raw.githubusercontent.com/longsleep/build-pine64-image/master/simpleimage/platform-scripts/pine64_update_kernel.sh)
Info about this kernel is at http://forum.pine64.org/showthread.php?t...08#pid8808

Ok once you have the latest kernel, power down the pine, insert your USB device and power up.

Once you are able to login you should see if the device was detected either 

Code:
lsusb

or

dmesg
should show you some basic info on your device. If you see it, great lets move on to the next step.

Now try;

Code:
iwconfig
if for wlan0 you see anything other than;

Code:
wlan0      no wireless extensions.
Things are looking up. 

Next I will show you the changes I made to my /etc/network/interfaces and /etc/wpa_supplicant/wpa_supplicant.conf


Ok /etc/network/interfaces first, I added this to the existing file

Code:
auto wlan0
iface wlan0 inet manual
wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
iface pine64 inet static
address 192.168.0.165
netmask 255.255.255.0
gateway 192.168.0.1

You can see I manually set the IP of my pine. You can do it with DHCP instead 

Code:
auto wlan0
iface wlan0 inet dhcp
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
iface pine64 inet dhcp

Note the change from wpa-roam to wpa-conf not sure why, but it works.

In the /etc/wpa_supplicant/wpa_supplicant.conf I have this;


Code:
network={
       ssid="dd-wrt_vap"
       psk="1234567890"
       proto=RSN
       key_mgmt=WPA-PSK
       pairwise=CCMP
       group=CCMP
       auth_alg=OPEN
       priority=9
       id_str="pine64"
}
Of course change the SSID to match your network, the psk to match the key for WPA on your network, and the id_str should match the iface in the interfaces file. 

After you have made the changes you can issue


Code:
ifup iwlan0
If it works, you are in business. If not, for giggles reboot. If its still not working then please note any issues and ask away. 

A few things to note. If you leave eth0 set to auto and dhcp your pine may pause while it tries to connect there first it seems. 
If your wifi adapter is a ra-link then you will probably need to dl the firmware, google is the best bet for finding the right instructions for this part. In my case I had to enable non free sources for debian as well. 

As always I am not an expert, merely worked in IS for 23 years and am an enthusiast. I am open to questions suggestions and critique.

One last thing, thanks again to longsleep others for their hard work!

Some Iperf numbers since I know some may wonder, YMMV!
Code:
[email protected]:~# iperf -c 192.168.0.45
------------------------------------------------------------
Client connecting to 192.168.0.45, TCP port 5001
TCP window size: 22.5 KByte (default)
------------------------------------------------------------
[  3] local 192.168.0.165 port 43787 connected with 192.168.0.45 port 5001
[ ID] Interval       Transfer     Bandwidth
[  3]  0.0-10.0 sec  46.6 MBytes  39.0 Mbits/sec
Reply
#2
(05-07-2016, 07:37 AM)rahlquist Wrote: Ok quick guide with some of the basics. I am using longlseeps kernel on debian. 
(Lots of words)

Thanks, man.

I tinkered around a bit with this, but as I don't have the wifi/bt board available yet, I tested with an USB Wifi-dongle I've had lying around (a Netgear WNA-3100M). After the updates, my kernel actually replied that WTF-message and prompted me to install realtek-firmware package. 
I DuckDuckWent there from Midori and found this realtek-firmware install howto which worked wonders. I unplugged and replugged the device after the package was installed (sudo apt-get install realtek-firmware) and woop-de-doo! WiFi!

dmesg output:
Code:
[  226.242969] ehci_irq: highspeed device connect
[  226.459751] usb 1-1: new high-speed USB device number 3 using sunxi-ehci
[  226.610842] rtl8192cu: Chip version 0x11
[  226.723156] rtl8192cu: MAC address: a4:2b:8c:5e:33:e1
[  226.723181] rtl8192cu: Board Type 0
[  226.723505] rtlwifi: rx_max_size 15360, rx_urb_num 8, in_ep 1
[  226.723652] rtl8192cu: Loading firmware rtlwifi/rtl8192cufw_TMSC.bin
[  226.770856] rtlwifi: Loading alternative firmware rtlwifi/rtl8192cufw.bin
[  226.770871] rtlwifi: Firmware rtlwifi/rtl8192cufw_TMSC.bin not available
Installed driver, unplugged and replugged:
Code:
[  490.072514] ehci_irq: highspeed device disconnect
[  490.072642] usb 1-1: USB disconnect, device number 3
[  491.817477] ehci_irq: highspeed device connect
[  492.042864] usb 1-1: new high-speed USB device number 4 using sunxi-ehci
[  492.195924] rtl8192cu: Chip version 0x11
[  492.308508] rtl8192cu: MAC address: a4:2b:8c:5e:33:e1
[  492.308535] rtl8192cu: Board Type 0
[  492.308833] rtlwifi: rx_max_size 15360, rx_urb_num 8, in_ep 1
[  492.308978] rtl8192cu: Loading firmware rtlwifi/rtl8192cufw_TMSC.bin
[  492.344507] ieee80211 phy2: Selected rate control algorithm 'rtl_rc'
[  492.346360] rtlwifi: wireless switch is on
[  493.435815] rtl8192cu: MAC auto ON okay!
Reply
#3
"sudo apt-get install linux-firmware" will install many of the firmware that is available.

Just found out today that this new kernel had the support for USB WiFi adapters, longsleep's builds are the best option for running Linux on the Pines right now.

Also got a Mate desktop with lightdm up on running on longsleep's latest. Smile
Currently playing around with Arduinos, CHIPs, Orange Pis, PineA64s, Raspberry Pis, etc.
Reply
#4
I have been looking forward to this for quite some time. Great news.
  If you manage to click this link you'll join in the IRC channel
Reply
#5
Hi,

I have been looking everywhere for a good tutorial on setting up WiFi via the CLI with the native Pine64 WiFi add-on and I am happy to report that yours worked perfectly! Fantastic, thank you.

The one addition is that Longsleep's Ubuntu build does not include iwconfig and so I to install it using the command below.

sudo apt-get install wireless-tools

Other than that one addition, your instructions worked flawlessly.

Thank you!
Reply
#6
I followed your guide. I have also installed the rt73usb driver for railink.
Now the external usb wifi module's LED blinks and it is recognised by the Pine64.
But it is not connecting to any WiFi network. Using the GUI, it shows "Device not managed".
On a shell, typing dmesg, it shows:
Code:
[ 2750.605157] ehci_irq: highspeed device connect
[ 2750.830038] usb 1-1: new high-speed USB device number 2 using sunxi-ehci
[ 2752.975000] usb 1-1: reset high-speed USB device number 2 using sunxi-ehci
[ 2753.441906] ieee80211 phy0: rt2x00_set_chip: Info - Chipset detected - rt: 2573, rf: 0002, rev: 000a
[ 2753.472168] ieee80211 phy0: Selected rate control algorithm 'minstrel_ht'
[ 2753.476443] usbcore: registered new interface driver rt73usb
[ 2753.907578] ieee80211 phy0: rt2x00lib_request_firmware: Info - Loading firmware file 'rt73.bin'
[ 2753.909248] ieee80211 phy0: rt2x00lib_request_firmware: Info - Firmware detected - version: 1.7
[ 2753.984817] IPv6: ADDRCONF(NETDEV_UP): wlx00e04d8247e0: link is not ready

lsmod
Code:
...other things...
rt73usb                22354  0
rt2x00usb               8556  1 rt73usb
rt2x00lib              35228  2 rt73usb,rt2x00usb
led_class               3081  1 rt2x00lib
mac80211              363596  2 rt2x00lib,rt2x00usb
cfg80211              367839  3 mac80211,rt2x00lib,8723bs
...other things...

On a shell, using iwconfig it shows:
Code:
wlx00e04d8247e0  IEEE 802.11bg  ESSID:off/any  
         Mode:Managed  Access Point: Not-Associated   Tx-Power=20 dBm  
         Retry  long limit:7   RTS thr:off   Fragment thr:off
         Power Management:on

My interfaces file:
Code:
# interfaces(5) file used by ifup(8) and ifdown(8)
# Include files from /etc/network/interfaces.d:
source-directory /etc/network/interfaces.d

# Disable wlan1 by default (8723bs has two intefaces)
iface wlan1 inet manual

auto wlx00e04d8247e0
iface wlx00e04d8247e0 inet manual
wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
iface pine64 inet static
address 192.168.1.64
netmask 255.255.255.0
gateway 192.168.1.1


And my wpa_supplicant.conf:
Code:
network={
      ssid="DLink-Marco"
      psk="************"
      proto=RSN
      key_mgmt=WPA-PSK
      pairwise=CCMP
      group=CCMP
      auth_alg=OPEN
      priority=9
      id_str="pine64"
}
I have forgot something? Thanks for help in advice
EDIT: Added the dmesg output
EDIT X2:  Added the lmod output
If it is necessary, I will open a new thread for my problem
Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
  Create a WiFi hotspot on Debian 8 JulianM 1 2,603 09-11-2017, 12:53 AM
Last Post: alex17pat
  Pine64 doesn't recognize Wifi/BT Module clobeca 3 133 07-13-2017, 08:58 PM
Last Post: MarkHaysHarris777
  Better WiFi/BT module? fonix232 17 1,054 02-13-2017, 04:38 AM
Last Post: xalius
Sad wifi direct bj_jung 2 704 12-29-2016, 10:26 AM
Last Post: happytuna
  Enabling wifi c4tich 10 1,849 12-28-2016, 02:22 PM
Last Post: workaccountbro
  WIFI & Bluetooth? 7777777 14 5,662 12-24-2016, 05:01 AM
Last Post: Toriless
  RF connector on wifi\bt board kb1qzh 1 344 12-15-2016, 06:36 PM
Last Post: tllim
  Wifi module able to share ethernet connection? Connection is unstable! cr2016 12 1,051 10-12-2016, 04:16 AM
Last Post: cr2016
  Losing WiFi Connection on Android Everytime mribunal 4 652 10-10-2016, 06:38 PM
Last Post: mribunal
  Unable to activate wifi on Linux smouton 5 1,444 09-17-2016, 10:35 PM
Last Post: MarkHaysHarris777

Forum Jump:


Users browsing this thread: 1 Guest(s)