How to get WiFi working?

Forum about Parallella boot process, linux kernel, distros, SD-cards, etc.

How to get WiFi working?

Postby JanKok » Sun May 25, 2014 11:14 pm

I have a Belkin N300 WiFi USB adapter. If I plug it into my PC running Ubuntu, clicking on the network icon in the "system tray" lets me select a wireless network to connect to and enter my network password. It just works without any hassle.

If I plug the same adapter into a known working USB hub on the Parallella, and then click on the network icon, the menu shows "Ethernet Network disconnected" and "VPN Connections". There is no "Wireless Networks" section of the menu.

What does it take to get a wireless connection working?
JanKok
 
Posts: 10
Joined: Mon Dec 17, 2012 3:27 am

Re: How to get WiFi working?

Postby 9600 » Mon May 26, 2014 1:38 pm

You'll likely need to build a new kernel with support enabled.

Regards,

Andrew
Andrew Back (a.k.a. 9600 / carrierdetect)
Parallella Community Manager
User avatar
9600
 
Posts: 755
Joined: Mon Dec 17, 2012 3:25 am

Re: How to get WiFi working?

Postby JanKok » Fri May 30, 2014 2:48 pm

I've tried building new kernels several times but am having trouble figuring out what drivers are needed and getting them linked into the kernel.

On the Parallella, with the WiFi USB adapter plugged in, lsusb shows (among other things):

Bus 001 Device 003: ID 050d:845a Belkin Components F7D2101 802.11n Surf & Share Wireless Adapter v1000 [Realtek RTL8192SU]

(Note that the lsusb info is a bit of a red herring because it doesn't give a clue about what driver(s) need to be added to the kernel. I figured that out by plugging the WiFi USB adapter into a PC running Ubuntu and doing "dmesg|tail -20". r8712u seems to be the required driver. I found the r8712u driver using search "/" key in menuconfig. The help for that driver shows that it applies to the RTL8192SU also.) Continuing:

dmesg|grep 8712 shows:

usbcore: registered new interface driver r8712u
r8712u: Staging version
r8712u: register rtl8712_netdev_ops to netdev_ops
usb 1-1.1: r8712u: USB_SPEED_HIGH with 4 endpoints
usb 1-1.1: r8712u: Boot from EFUSE: Autoload OK
usb 1-1.1: r8712u: CustomerID = 0x0000
usb 1-1.1: r8712u: MAC Address from efuse = b4:75:0e:76:57:af
usb 1-1.1: r8712u: Loading firmware from "rtlwifi/rtl8712u.bin"
usb 1-1.1: r8712u: Firmware request failed

dmesg | grep rtl8192
usbcore: registered new interface driver rtl8192cu

lsmod|grep 8712 shows nothing.

grep 8712 .config
CONFIG_R8712U=y

So how do I get the WiFi adapter to work?
JanKok
 
Posts: 10
Joined: Mon Dec 17, 2012 3:27 am

Re: How to get WiFi working?

Postby shodruk » Fri May 30, 2014 3:19 pm

Try this: sudo apt-get install linux-firmware
Shodruky
shodruk
 
Posts: 452
Joined: Mon Apr 08, 2013 7:03 pm

Re: How to get WiFi working?

Postby JanKok » Sat May 31, 2014 3:05 am

After doing that (and rebooting?) some wireless networks showed up in the menu on the network icon in the system tray.

That was a major step forward. Thanks!!

Now, there is still the problem that the user can't access the wireless networks - get permission error if try to activate one of the wireless networks. I tried to follow the directions at http://askubuntu.com/questions/141553/h ... dard-users but when I tried to edit users the system hung and when I reboot, the keyboard and mouse don't work on the login screen. I may have to rebuild my SD card. :?

Can someone suggest a (safe?!) way to enable users to access wireless networks?
JanKok
 
Posts: 10
Joined: Mon Dec 17, 2012 3:27 am

Re: How to get WiFi working?

Postby JanKok » Sat May 31, 2014 4:19 am

While typing my previous post, I had the Parallella turned off. When I powered it on again, it booted up normally. There seems to be some occasional flakiness in my system. Once I've logged in, it usually works fine for hours.

Anyway, I installed gnome-system-tools, but I'm not sure how to launch the program "Users and Groups" mentioned at http://askubuntu.com/questions/141553/h ... dard-users . Perhaps that is the same thing as the "User Settings" application which can be started with System->Other->User accounts Admin.

That "User accounts Admin" app doesn't fully work, in particular, if I select a user and then click on Advanced Settings, nothing happens. There is no "User Privleges" tab.

So how do I allow users to access the wireless network?
JanKok
 
Posts: 10
Joined: Mon Dec 17, 2012 3:27 am

Re: How to get WiFi working?

Postby shodruk » Sat May 31, 2014 5:00 am

Use sudo for now: sudo nm-connection-editor
Shodruky
shodruk
 
Posts: 452
Joined: Mon Apr 08, 2013 7:03 pm

Re: How to get WiFi working?

Postby JanKok » Sat May 31, 2014 4:10 pm

Yay, that works! These were the remaining steps:

sudo nm-connection-editor
Select Wi-Fi connection 1, click Edit...
In the new window, select Wi-Fi Security tab
Select your security method
Enter your password
Save...
Close
The system then connects automatically and users can access the wireless network.

There is a message:
(nm-connection-editor:2370): IBUS-WARNING **: The owner of /home/kok/.config/ibus/bus is not root!
...but at least it works. Thanks!

Sent from my Parallella - wirelessly!
JanKok
 
Posts: 10
Joined: Mon Dec 17, 2012 3:27 am

Re: How to get WiFi working?

Postby aolofsson » Sat May 31, 2014 4:30 pm

Very nice! Success of WiFi depends on driver support in kernel so please post the product model and the corresponding chipset model so that others can save time debugging.

Andreas
User avatar
aolofsson
 
Posts: 611
Joined: Tue Dec 11, 2012 6:59 pm
Location: Lexington, Massachusetts,USA

Re: How to get WiFi working?

Postby psiegl » Sat Jun 07, 2014 10:49 am

I bought myself the very cheap and small wireless adapter 'TP-Link TL-WN725N (Version 2.0)' which is already known to be a problem on the Raspberry Pi. Here's how to bring it up (without the need of a display, juse use SSH and a linux host):

1) Activate the devtmpfs! Follow the instructions here:
http://elinux.org/Parallella_Speed_Up_Ubuntu#Enable_devtmpfs
Afterwards you should be able to see the connected wireless adapter via 'lsusb'.

2) Build your own linux kernel:
Sadly Adapteva didn't activate the RealTek RTL8188EU driver within the linux kernel. Therefore you have to build the kernel by your own. Follow the steps as described here (you need at least 2.2GB space on your SD card):
http://forums.parallella.org/viewtopic.php?f=48&t=1230
You have to intercept the instructions as soon as it mentions that you can run the 'make menuconfig'. Here you have to do the following:
Code: Select all
make menuconfig
Device Drivers --->
  Staging drivers --->
    * RealTek RTL8188EU Wireless LAN NIC driver
    *   Realtek RTL8188EU AP mode                 (not really needed but who knows)
    *   Realtek RTL8188EU Peer-to-peer mode       (not really needed but who knows)

Afterwards follow the instruction again.
Build the linux kernel on the parallella ... fetch a coffee, cook food ... it will take a while (~ 2 hours)! ;)
ToDo: Maybe Adapteva wants to share their config file which is used for the linux kernel on the parallella, because the hereby generated kernel is slightly larger.
Code: Select all
-rwxr-xr-x 1 root root 5025304 Jun  6 19:05 uImage     # new linux kernel
-rwxr-xr-x 1 root root 4468792 Jun  6 19:04 uImage.bak # old Adapteva linux kernel

As soon as you rebooted the parallella you should be able to detect the wlan0 device via 'ifconfig'.

3) Connect yourself via SSH and X-Forwarding (if not already done in the first step):
Code: Select all
ssh -XC <user>@<IP ADDR>


Follow now the instructions which JanKok stated out (mostly):
Code: Select all
sudo nm-connection-editor

Code: Select all
Click on "Add"
Choose Wi-Fi and click on Create
Edit 'Connection name:'
General:
  Check 'Automatically connect to this network when it is available'
  Check 'All users may connect to this network'
Wi-Fi:
  Edit 'SSID:'
  Choose your device in 'Device MAC address'
Wi-Fi Security:
  Choose Security
  Edit 'Password:'
IPv4 Settings
  Check if DHCP or Static IP
Click save

Now the connection should appear in the Network Connections. You can close the tool, disconnect the SSH and remove the Ethernet connection. Afterwards you should be able to find your parallella device in the network.

I prefer on my host machine:
Code: Select all
nmap -sP 192.168.1.1/24
psiegl
 
Posts: 5
Joined: Mon Dec 17, 2012 3:29 am


Return to Linux/U-Boot

Who is online

Users browsing this forum: No registered users and 1 guest