[GUIDE] Wifi Hotspot (Wifi Module 3)

Moderators: odroid, meveric, mdrjr

[GUIDE] Wifi Hotspot (Wifi Module 3)

Unread postby mdrjr » Thu Aug 28, 2014 4:26 am

Applies to: XU/X/X2/U2/U3/XU3 running Ubuntu 14.04 or Ubuntu Server 14.04

This guide should cover a simple and easy how-to method to use the Wifi Module 3 as a AccessPoint

Note: Its _VERY_ important to not have NetworkManager running or it will not allow the wifi interface to get into AccessPoint.

Method 1:
service network-manager stop to stop it on Ubuntu (note that it will disable all your interfaces if you do that.

Method 2:
Make NetworkManager ignore your wifi card.

By running this:
Code: Select all
echo >> /etc/NetworkManager/NetworkManager.conf
echo "[keyfile]" >> /etc/NetworkManager/NetworkManager.conf
echo "unmanaged-devices=mac:"`ifconfig|grep wlan|awk '{print $5}'` >> /etc/NetworkManager/NetworkManager.conf


Method 3:
All interfaces configured on /etc/network/interfaces.d will be ignored by NetworkManager.
You can check man 5 interfaces to further information on interfaces configuration.


Now to get it onto Access Point mode.
Realtek drivers requires us to use their modded hostapd.
You can get sources here: http://builder.mdrjr.net/tools/realtek_sources.zip
OR
A pre-built version for Ubuntu 14.04 here: http://builder.mdrjr.net/tools/hostapd_realtek.tar

This guide assumes that you are using the pre-built version.


1. Downloading Hostapd.
Code: Select all
mkdir ~/hpd && cd ~/hpd
wget builder.mdrjr.net/tools/hostapd_realtek.tar


2. Uncompress
Code: Select all
tar xf hostapd_realtek.tar


3. Files and what they do
hostapd: Realtek's modified hostapd with support for their Drivers.
rtl_hostapd_2G.conf: Realtek provided configuration with probably all the supported functions
rtl_minimal.conf: minimal configuration to provide a network using WPA2
hostapd_cli: client to access a running hostapd

4. Configuring your wifi Network
edit the file rtl_minimal.conf

change the first 4 parameters to match your needs.
They are:
    Interface: you can get the interface name by running ifconfig -a (should be wlanN, where N is a number)
    ssid: Your Wifi network name
    channel: The channel that your network will be. Recommended are 6 and 11 due to low interference levels
    wpa_passphrase: Is your network secret key used to access it

5. Getting your network up and running.
(This will cover only bridging the network with eth0 so you can share your cabled connection via wifi)
If you need extra options not covered here or how to it make it permanent here's a good reading:
https://help.ubuntu.com/community/Netwo ... tionBridge
https://help.ubuntu.com/14.04/servergui ... ation.html

Code: Select all
apt-get install bridge-utils
service network-manager stop
ifconfig eth0 up
ifconfig wlan2 up
brctl addbr br0
brctl addif br0 eth0
dhclient br0
brctl addif br0 wlan2
./hostapd rtl_minimal.conf &


This above code block will do the following:
apt-get install bridge-utils: Install Ubuntu package for bridging network connections
service network-manager stop: Stop network manager so it doesn't touch our interfaces
ifconfig eth0 up: make eth0 up without an ip address
ifconfig wlan2 up: make our wifi card up without an ip address
brctl addbr br0: create a bridge interface, named br0
brctl addif br0 eth0: add eth0 to our bridge
dhclient br0: call your network dhcp server to grab an IP to our bridge (this will clone the eth0 mac address, so it should get any previous ip address assigned)
brctl addif br0 wlan2: add our wifi card to our bridge
./hostapd rtl_minimal.conf &: start hostapd and leave it on background


At this stage you can already connect to your wifi network :)
mdrjr
Site Admin
 
Posts: 11663
Joined: Fri Feb 22, 2013 11:34 pm
Location: Brazil
languages_spoken: english, portuguese
ODROIDs: -

Re: [GUIDE] Wifi Hotspot (Wifi Module 3)

Unread postby odroid » Thu Aug 28, 2014 10:37 am

Very nice tutorial.
I can build a home gateway with ODROID!
Thanks,
User avatar
odroid
Site Admin
 
Posts: 27956
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: [GUIDE] Wifi Hotspot (Wifi Module 3)

Unread postby funfrancis » Wed Sep 03, 2014 6:43 pm

Hi
I have installed Ubuntu 14.04 Trusty Dev Center on my ODROID-U3 board with a WIFi nodule
I was successfull at all the steps but I am unable to proceed from step 5
I get error saying that the network has been stopped
funfrancis
 
Posts: 60
Joined: Wed Jun 11, 2014 12:24 pm
languages_spoken: english
ODROIDs: Odroid u3

Re: [GUIDE] Wifi Hotspot (Wifi Module 3)

Unread postby mdrjr » Thu Sep 04, 2014 2:47 am

When you run what command?
mdrjr
Site Admin
 
Posts: 11663
Joined: Fri Feb 22, 2013 11:34 pm
Location: Brazil
languages_spoken: english, portuguese
ODROIDs: -

Re: [GUIDE] Wifi Hotspot (Wifi Module 3)

Unread postby funfrancis » Thu Sep 04, 2014 12:33 pm

I get errors when I run these commands
errors like rt1971 drive not initialized

apt-get install bridge-utils
service network-manager stop
ifconfig eth0 up
ifconfig wlan2 up
brctl addbr br0
brctl addif br0 eth0
dhclient br0
brctl addif br0 wlan2
./hostapd rtl_minimal.conf &

As a result I am unable to access the WIFi using the module
funfrancis
 
Posts: 60
Joined: Wed Jun 11, 2014 12:24 pm
languages_spoken: english
ODROIDs: Odroid u3

Re: [GUIDE] Wifi Hotspot (Wifi Module 3)

Unread postby venkatbo » Thu Sep 04, 2014 5:12 pm

... rt1971 drive not initialized ...


It appears the hostapd config file (rtl_minimal.conf ?) file has a driver entry like so:
Code: Select all
driver=rt1971


That may not match the driver used for your wifi (Hardkernel Wifi 3 module ?) adapter. When I run the following commands to get the driver info, I see this output:
Code: Select all
$ sudo apt-get install lshw

$ sudo lshw -C network
  *-network:0             
       description: Wireless interface
       physical id: 1
       bus info: usb@1:3.3
       logical name: wlan2
       serial: 00:a8:2b:00:06:36
       capabilities: ethernet physical wireless
       configuration: broadcast=yes driver=rtl8192cu multicast=yes wireless=unassociated

                                    ^^^^^^

which seems to imply that the Hardkernel Wifi 3 module uses the rtl8192cu driver.

May have to ensure the driver entry matches the device used by you in your setup.
User avatar
venkatbo
 
Posts: 454
Joined: Mon Feb 25, 2013 3:10 pm
Location: Bay Area, California
languages_spoken: english
ODROIDs: C0/C1+/C2 U3+ XU3-Lite/XU4 VU/VU7+ Touchscreen Show TFT Cloudshell SmartPower mAHRS DAC GPS Multiscope

Re: [GUIDE] Wifi Hotspot (Wifi Module 3)

Unread postby mdrjr » Fri Sep 05, 2014 2:33 am

Yes but what command specific that causes that?
And please post the full error..

I've downloaded the official Ubuntu image and tested. Its working just fine.

@venkatbo. Don't talk nonsense stuff.. please.
mdrjr
Site Admin
 
Posts: 11663
Joined: Fri Feb 22, 2013 11:34 pm
Location: Brazil
languages_spoken: english, portuguese
ODROIDs: -

Re: [GUIDE] Wifi Hotspot (Wifi Module 3)

Unread postby funfrancis » Fri Sep 05, 2014 10:03 am

@mdrjr. Which image of Ubuntu did you use? I am using Ubuntu 14.04 Trusty Dev Center
funfrancis
 
Posts: 60
Joined: Wed Jun 11, 2014 12:24 pm
languages_spoken: english
ODROIDs: Odroid u3

Re: [GUIDE] Wifi Hotspot (Wifi Module 3)

Unread postby mdrjr » Fri Sep 05, 2014 11:34 am

I used Ubuntu 14.04 official but that should work on Trusty Dev Center as well. As it uses the same kernel driver for the realtek wifi.
mdrjr
Site Admin
 
Posts: 11663
Joined: Fri Feb 22, 2013 11:34 pm
Location: Brazil
languages_spoken: english, portuguese
ODROIDs: -

Re: [GUIDE] Wifi Hotspot (Wifi Module 3)

Unread postby funfrancis » Fri Sep 05, 2014 12:54 pm

Could you provide the link for the image that you used as I downloaded the image from your forum but it had errors and wasn't getting flashed
Did u install any driver for the WiFi module
funfrancis
 
Posts: 60
Joined: Wed Jun 11, 2014 12:24 pm
languages_spoken: english
ODROIDs: Odroid u3

Re: [GUIDE] Wifi Hotspot (Wifi Module 3)

Unread postby venkatbo » Fri Sep 05, 2014 1:29 pm

... @venkatbo. Don't talk nonsense stuff.. please.


@mdrjr, we all know you are an expert - but no need to be curt & rude unnecessarily, to others in the forum. You alone do not make this forum. In the absence of a quick response to the post of @funfrancis, I was just trying to help, using some of my observation, with the original recipe. fwiw, I encountered a similar error and hence was purely speculating a reason - if you did not follow the tone of my response, pl. re-read. My post was not a fact, but purely a speculation - so take or leave it - but no need to be arrogant ! You could've simply indicated my observation was inaccurate or wrong, and moved on...

If your original post was flawless, then it should've worked right off the bat for us. When I got a similar error, I researched a bit using the post:
http://forum.xda-developers.com/showthr ... ?t=2009381
and hence my suggestion. After all I did take some effort to research and help.

If knowledgeable folks like you put down folks trying to help, there will be less of sharing, and the community only will suffer the consequences. You should be able to differentiate between deliberate crap and suggestive speculation.
User avatar
venkatbo
 
Posts: 454
Joined: Mon Feb 25, 2013 3:10 pm
Location: Bay Area, California
languages_spoken: english
ODROIDs: C0/C1+/C2 U3+ XU3-Lite/XU4 VU/VU7+ Touchscreen Show TFT Cloudshell SmartPower mAHRS DAC GPS Multiscope

Re: [GUIDE] Wifi Hotspot (Wifi Module 3)

Unread postby funfrancis » Mon Sep 15, 2014 4:35 pm

hi

I get the error when I type brctl addbr br0 in Ubuntu 14.04

bash: brctl: command not found
funfrancis
 
Posts: 60
Joined: Wed Jun 11, 2014 12:24 pm
languages_spoken: english
ODROIDs: Odroid u3

Re: [GUIDE] Wifi Hotspot (Wifi Module 3)

Unread postby mdrjr » Mon Sep 15, 2014 4:55 pm

funfrancis wrote:hi

I get the error when I type brctl addbr br0 in Ubuntu 14.04

bash: brctl: command not found


You don't have bridge-utils installed :)
apt-get install bridge-utils
mdrjr
Site Admin
 
Posts: 11663
Joined: Fri Feb 22, 2013 11:34 pm
Location: Brazil
languages_spoken: english, portuguese
ODROIDs: -

Re: [GUIDE] Wifi Hotspot (Wifi Module 3)

Unread postby funfrancis » Mon Sep 15, 2014 5:01 pm

I get error saying that

I am unable to fetch some archives
funfrancis
 
Posts: 60
Joined: Wed Jun 11, 2014 12:24 pm
languages_spoken: english
ODROIDs: Odroid u3

Re: [GUIDE] Wifi Hotspot (Wifi Module 3)

Unread postby mdrjr » Mon Sep 15, 2014 5:07 pm

funfrancis wrote:I get error saying that

I am unable to fetch some archives


You have two options here.
Either you paste the full error so I can understand what you are doing or what's wrong.
(Most likely you didn't updated your Ubuntu)

Or you Google the error.
mdrjr
Site Admin
 
Posts: 11663
Joined: Fri Feb 22, 2013 11:34 pm
Location: Brazil
languages_spoken: english, portuguese
ODROIDs: -

Re: [GUIDE] Wifi Hotspot (Wifi Module 3)

Unread postby funfrancis » Mon Sep 15, 2014 5:47 pm

i am using U2/3 Ubuntu 14.04 Trusty Dev Center
Is the WiFi module compatible with this OS
funfrancis
 
Posts: 60
Joined: Wed Jun 11, 2014 12:24 pm
languages_spoken: english
ODROIDs: Odroid u3

Re: [GUIDE] Wifi Hotspot (Wifi Module 3)

Unread postby mdrjr » Mon Sep 15, 2014 6:20 pm

Yes it is.
mdrjr
Site Admin
 
Posts: 11663
Joined: Fri Feb 22, 2013 11:34 pm
Location: Brazil
languages_spoken: english, portuguese
ODROIDs: -

Re: [GUIDE] Wifi Hotspot (Wifi Module 3)

Unread postby funfrancis » Mon Sep 15, 2014 6:44 pm

This is the error message

$ sudo apt-get install bridge-utils
[sudo] password for odroid:

Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
bridge-utils
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 28.6 kB of archives.
After this operation, 137 kB of additional disk space will be used.
Err http://ports.ubuntu.com/ubuntu-ports/ trusty/main bridge-utils armhf 1.5-6ubuntu2
Could not resolve 'ports.ubuntu.com'
E: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/po ... _armhf.deb Could not resolve 'ports.ubuntu.com'

E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
funfrancis
 
Posts: 60
Joined: Wed Jun 11, 2014 12:24 pm
languages_spoken: english
ODROIDs: Odroid u3

Re: [GUIDE] Wifi Hotspot (Wifi Module 3)

Unread postby mdrjr » Mon Sep 15, 2014 6:46 pm

You don't have internet access on your board or your DNS configuration is wrong.
mdrjr
Site Admin
 
Posts: 11663
Joined: Fri Feb 22, 2013 11:34 pm
Location: Brazil
languages_spoken: english, portuguese
ODROIDs: -

Re: [GUIDE] Wifi Hotspot (Wifi Module 3)

Unread postby funfrancis » Mon Sep 15, 2014 6:52 pm

Hi
Before making the changes, The board is able to get connected using Ethernet or WiFi but
I am unable to open pages

How do I change the DNS configuration
funfrancis
 
Posts: 60
Joined: Wed Jun 11, 2014 12:24 pm
languages_spoken: english
ODROIDs: Odroid u3

Re: [GUIDE] Wifi Hotspot (Wifi Module 3)

Unread postby mdrjr » Mon Sep 15, 2014 6:54 pm

funfrancis wrote:Hi
Before making the changes, The board is able to get connected using Ethernet or WiFi but
I am unable to open pages

How do I change the DNS configuration


I'm sorry to say that.. but you are blindly following the guide without taking your time to understand what it does.
So I suggest you to stop and try to understand what its doing
mdrjr
Site Admin
 
Posts: 11663
Joined: Fri Feb 22, 2013 11:34 pm
Location: Brazil
languages_spoken: english, portuguese
ODROIDs: -

Re: [GUIDE] Wifi Hotspot (Wifi Module 3)

Unread postby funfrancis » Mon Sep 15, 2014 7:32 pm

Should I follow all the methods or just the method 3 for accessing the WiFi module
funfrancis
 
Posts: 60
Joined: Wed Jun 11, 2014 12:24 pm
languages_spoken: english
ODROIDs: Odroid u3

Re: [GUIDE] Wifi Hotspot (Wifi Module 3)

Unread postby nicedreams » Wed Dec 31, 2014 10:18 am

mdrjr, Wanted to say thank you for this post about the wireless. It solved my wireless issues with hostapd.

I found a work around that seems to be a good way to disable the Ubuntu Network Manger.

# Disable Ubuntu Network Manger
echo "manual" | sudo tee /etc/init/network-manager.override

Forgot the site I found this from, but after doing this I haven't had to disable or do anything with the Network Manager.
nicedreams
 
Posts: 17
Joined: Sun Jul 06, 2014 1:41 pm
languages_spoken: english
ODROIDs: ODROID-U3

Re: [GUIDE] Wifi Hotspot (Wifi Module 3)

Unread postby mdrjr » Wed Dec 31, 2014 10:55 am

That works too.. but this disables NetworkManager completely.. its just telling the Ubuntu starting system to ignore the NetworkManager completely :)
Its a nice method too :)
mdrjr
Site Admin
 
Posts: 11663
Joined: Fri Feb 22, 2013 11:34 pm
Location: Brazil
languages_spoken: english, portuguese
ODROIDs: -

Re: [GUIDE] Wifi Hotspot (Wifi Module 3)

Unread postby nicedreams » Wed Dec 31, 2014 1:17 pm

I'm having an issue now to where the wireless doesn't enable unless a network cable is plugged in. I set my ODROID up with the WiFi Module 3 as an access point on a separate subnet. LAN is DHCP which grabs 192.168.2.0 and WLAN is static as 192.168.200.1 with NAT pass-through. It works great, but if I don't have my network cable plugged into the ODROID, the wireless will not turn on. As soon as I plug in a network cable into the LAN the Wifi light startups up and works.

Is there an easy way to get the WiFi to work without the LAN cable plugged in at bootup?

I did Method #2 of your post to make sure my other workaround was the issue.
nicedreams
 
Posts: 17
Joined: Sun Jul 06, 2014 1:41 pm
languages_spoken: english
ODROIDs: ODROID-U3

Re: [GUIDE] Wifi Hotspot (Wifi Module 3)

Unread postby nicedreams » Wed Dec 31, 2014 1:56 pm

Was able to dig up some more info. Was suggested to try ifplugd, but that didn't work. I did notice after just leaving the thing on, that after a few minutes with the LAN cable disconnected that the wireless did end up turning on. So the wireless does come on, but takes like 5 minutes to come up before I'm able to connect to it via the wifi with the LAN cable still disconnected.

If I connect the LAN cable, after boot or before powered on then the wifi still comes up fine.
nicedreams
 
Posts: 17
Joined: Sun Jul 06, 2014 1:41 pm
languages_spoken: english
ODROIDs: ODROID-U3

Re: [GUIDE] Wifi Hotspot (Wifi Module 3)

Unread postby nicedreams » Wed Dec 31, 2014 2:21 pm

I'm will start a new post if needed. Don't know if this helps on this wireless thread or not. I kind of figured it out. With the Ubuntu 14 image I can't see boot messages and just a black screen until the GUI loads. I found out that DHCP is hanging on bootup waiting for LAN to get an address and after 2 minutes times out and continues boot and then the wireless works because the system is booted.

1) How can I enable the boot message instead of getting a black screen.
2) Can the system continue to boot or try to obtain an IP on the LAN via DHCP afterboot so don't have to wait 2 minutes for wireless?

/etc/network/interface

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet dhcp

auto wlan2
iface wlan2 inet static
address 192.168.200.1
netmask 255.255.255.0

up iptables-restore < /etc/iptables.ipv4.nat


This is a headless setup so hoping I don't have to type ifup/ifdown commands to make this work.
nicedreams
 
Posts: 17
Joined: Sun Jul 06, 2014 1:41 pm
languages_spoken: english
ODROIDs: ODROID-U3

Re: [GUIDE] Wifi Hotspot (Wifi Module 3)

Unread postby nicedreams » Wed Dec 31, 2014 2:31 pm

You can delete all this guys. I figured it out after 3 hours of google.

auto lo

iface lo inet loopback

#auto eth0
allow-hotplug eth0
iface eth0 inet dhcp

auto wlan2
allow-hotplug wlan2
iface wlan2 inet static
address 192.168.200.1
netmask 255.255.255.0

up iptables-restore < /etc/iptables.ipv4.nat



Had to remove auto eth0 and add hotplug on eth0. Now it's working fine.
nicedreams
 
Posts: 17
Joined: Sun Jul 06, 2014 1:41 pm
languages_spoken: english
ODROIDs: ODROID-U3

Re: [GUIDE] Wifi Hotspot (Wifi Module 3)

Unread postby hokoon » Tue Jan 20, 2015 6:29 am

any body get this work with C-1?

It working greate with my U3, but C-1 complain "unable to set the device to mode 3 (master mode)".
Last edited by hokoon on Tue Jan 20, 2015 4:55 pm, edited 1 time in total.
hokoon
 
Posts: 258
Joined: Tue Jun 11, 2013 2:55 pm
languages_spoken: ไทย
ODROIDs: U2, XU, U3, C-1

Re: [GUIDE] Wifi Hotspot (Wifi Module 3)

Unread postby mdrjr » Tue Jan 20, 2015 6:37 am

Not sure.. I'll test :)
mdrjr
Site Admin
 
Posts: 11663
Joined: Fri Feb 22, 2013 11:34 pm
Location: Brazil
languages_spoken: english, portuguese
ODROIDs: -

Re: [GUIDE] Wifi Hotspot (Wifi Module 3)

Unread postby hokoon » Wed Jan 21, 2015 6:48 am

@mdrjr, this is the message from hostapd.

Code: Select all
root@odroid:~# /usr/local/bin/hostapd /etc/hostapd/hostapd.conf
Configuration file: /etc/hostapd/hostapd.conf
drv->ifindex=5
l2_sock_recv==l2_sock_xmit=0x0x54638
ioctl[SIOCSIWMODE]: Operation not supported
Could not set interface to mode(3)!
Could not set interface to master mode!
rtl871xdrv driver initialization failed.
rmdir[ctrl_interface]: No such file or directory
root@odroid:~#
hokoon
 
Posts: 258
Joined: Tue Jun 11, 2013 2:55 pm
languages_spoken: ไทย
ODROIDs: U2, XU, U3, C-1

Re: [GUIDE] Wifi Hotspot (Wifi Module 3)

Unread postby frudo » Sat Jan 31, 2015 5:32 pm

@hokoon
Following this guide I got the same error with C1. But it workS out of the box using the original hostapd and the driver that came with "ubuntu-14.04.1lts-lubuntu-odroid-c1-20150120".
First check
-if the Wifi Module is pluged in correctly and (with lsusb.
frudo
 
Posts: 4
Joined: Fri Jan 30, 2015 9:12 pm
languages_spoken: english german
ODROIDs: C1

Re: [GUIDE] Wifi Hotspot (Wifi Module 3)

Unread postby frudo » Sat Jan 31, 2015 5:40 pm

Sorry for sending before finishing...

@hokoon
Following this guide I got the same error with C1. But it works out of the box using the original hostapd and the driver that came with "ubuntu-14.04.1lts-lubuntu-odroid-c1-20150120".
First check with lsusb if the Wifi Module is plugged in correctly. I had to change the usb port and that's why I followed this guide in the first place.
frudo
 
Posts: 4
Joined: Fri Jan 30, 2015 9:12 pm
languages_spoken: english german
ODROIDs: C1

Re: [GUIDE] Wifi Hotspot (Wifi Module 3)

Unread postby hokoon » Sat Jan 31, 2015 5:47 pm

Oh! I'll give it a try.
hokoon
 
Posts: 258
Joined: Tue Jun 11, 2013 2:55 pm
languages_spoken: ไทย
ODROIDs: U2, XU, U3, C-1

Re: [GUIDE] Wifi Hotspot (Wifi Module 3)

Unread postby mdrjr » Sun Feb 01, 2015 1:20 am

Please make sure you guys have the latest kernel on C1.. it should work now.
mdrjr
Site Admin
 
Posts: 11663
Joined: Fri Feb 22, 2013 11:34 pm
Location: Brazil
languages_spoken: english, portuguese
ODROIDs: -

Re: [GUIDE] Wifi Hotspot (Wifi Module 3)

Unread postby Mark Miles » Wed Feb 04, 2015 2:13 am

Can you help me with this?
I don't want to bridge eth0 with wlan1, I want them to stay separate, so I have:
- eth0 with a fixed IP eg. 192.168.0.100 and...
- wlan1 with a fixed IP eg. 10.0.0.1
and a DHCP server that can assign an IP only to wireless clients.

Also, how can I auto-generate a SSID that uses an unique machine ID? For example I have 10 Odroids and I want 10 SSID's with a fixed pattern and a variable part, eg: ODROID-12a78, ODROID-78s22, and so on...

How can I do this? And can you help me configure everything so that the system starts with these settings?

Thanks.
Mark Miles
 
Posts: 52
Joined: Mon Sep 08, 2014 10:07 pm
languages_spoken: english
ODROIDs: U3+

Re: [GUIDE] Wifi Hotspot (Wifi Module 3)

Unread postby hokoon » Wed Feb 04, 2015 2:31 am

I'll write a guide for none-bridge ap in another thread.

Edit: This is it viewtopic.php?f=52&t=9102
hokoon
 
Posts: 258
Joined: Tue Jun 11, 2013 2:55 pm
languages_spoken: ไทย
ODROIDs: U2, XU, U3, C-1

Re: [GUIDE] Wifi Hotspot (Wifi Module 3)

Unread postby nmirod » Sat Feb 14, 2015 4:30 am

Is it possible to have a similar effect using the wifi module 2? I have tried to follow the guide but I'm unable to get a network up.

I wish to have way to ssh into the odroid X2 through wireless and without requiring internet access. Setting up the wi-fi module as an access point seemed the best way, but I can't get it to work.
nmirod
 
Posts: 20
Joined: Sun Dec 28, 2014 1:33 am
languages_spoken: english
ODROIDs: Odroid X2

Re: [GUIDE] Wifi Hotspot (Wifi Module 3)

Unread postby E_lexy » Fri Feb 27, 2015 6:20 am

Thanks for the tut, however I am not able to get it working.

Im running [url]this image (http://odroid.in/ubuntu_14.04lts/ubuntu ... 604.img.xz)[/url], with kernel 3.8.13 on a U3.

I have a succesfull bridge setup with this device:
Code: Select all
Bus 001 Device 007: ID 050d:705a Belkin Components F5D7050 Wireless G Adapter v3000 [Ralink RT2571W]


Code: Select all
hostapd /etc/hostapd/hostapd.conf -dd
random: Trying to read entropy from /dev/random
Configuration file: /etc/hostapd/hostapd.conf
nl80211: Could not add multicast membership for vendor events: -2 (No such file or directory)
rfkill: initial event: idx=0 type=1 op=0 soft=0 hard=0
nl80211: Supported cipher 00-0f-ac:1
nl80211: Supported cipher 00-0f-ac:5
nl80211: Supported cipher 00-0f-ac:2
nl80211: Supported cipher 00-0f-ac:4
nl80211: Using driver-based off-channel TX
nl80211: interface wlan0 in phy phy0
nl80211: Set mode ifindex 3 iftype 3 (AP)
nl80211: Setup AP(wlan0) - device_ap_sme=0 use_monitor=0
nl80211: Subscribe to mgmt frames with AP handle 0xb3d60
nl80211: Register frame type=0xb0 nl_handle=0xb3d60 match=
nl80211: Register frame type=0x0 nl_handle=0xb3d60 match=
nl80211: Register frame type=0x20 nl_handle=0xb3d60 match=
nl80211: Register frame type=0xa0 nl_handle=0xb3d60 match=
nl80211: Register frame type=0xc0 nl_handle=0xb3d60 match=
nl80211: Register frame type=0xd0 nl_handle=0xb3d60 match=
nl80211: Register frame type=0x40 nl_handle=0xb3d60 match=
nl80211: Add own interface ifindex 4
nl80211: Add own interface ifindex 3
nl80211: Adding interface wlan0 into bridge br100
phy: phy0
BSS count 1, BSSID mask 00:00:00:00:00:00 (0 bits)
nl80211: Regulatory information - country=00
nl80211: 2402-2472 @ 40 MHz 20 mBm
nl80211: 2457-2482 @ 40 MHz 20 mBm
nl80211: 2474-2494 @ 20 MHz 20 mBm
nl80211: 5170-5250 @ 40 MHz 20 mBm
nl80211: 5735-5835 @ 40 MHz 20 mBm
nl80211: Added 802.11b mode based on 802.11g information
Allowed channel: mode=1 chan=1 freq=2412 MHz max_tx_power=20 dBm
Allowed channel: mode=1 chan=2 freq=2417 MHz max_tx_power=20 dBm
Allowed channel: mode=1 chan=3 freq=2422 MHz max_tx_power=20 dBm
Allowed channel: mode=1 chan=4 freq=2427 MHz max_tx_power=20 dBm
Allowed channel: mode=1 chan=5 freq=2432 MHz max_tx_power=20 dBm
Allowed channel: mode=1 chan=6 freq=2437 MHz max_tx_power=20 dBm
Allowed channel: mode=1 chan=7 freq=2442 MHz max_tx_power=20 dBm
Allowed channel: mode=1 chan=8 freq=2447 MHz max_tx_power=20 dBm
Allowed channel: mode=1 chan=9 freq=2452 MHz max_tx_power=20 dBm
Allowed channel: mode=1 chan=10 freq=2457 MHz max_tx_power=20 dBm
Allowed channel: mode=1 chan=11 freq=2462 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=1 freq=2412 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=2 freq=2417 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=3 freq=2422 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=4 freq=2427 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=5 freq=2432 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=6 freq=2437 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=7 freq=2442 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=8 freq=2447 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=9 freq=2452 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=10 freq=2457 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=11 freq=2462 MHz max_tx_power=20 dBm
Completing interface initialization
Mode: IEEE 802.11g  Channel: 1  Frequency: 2412 MHz
DFS 0 channels required radar detection
nl80211: Set freq 2412 (ht_enabled=0, vht_enabled=0, bandwidth=20 MHz, cf1=2412 MHz, cf2=0 MHz)
RATE[0] rate=10 flags=0x1
RATE[1] rate=20 flags=0x1
RATE[2] rate=55 flags=0x1
RATE[3] rate=110 flags=0x1
RATE[4] rate=60 flags=0x0
RATE[5] rate=90 flags=0x0
RATE[6] rate=120 flags=0x0
RATE[7] rate=180 flags=0x0
RATE[8] rate=240 flags=0x0
RATE[9] rate=360 flags=0x0
RATE[10] rate=480 flags=0x0
RATE[11] rate=540 flags=0x0
hostapd_setup_bss(hapd=0xb3300 (wlan0), first=1)
wlan0: Flushing old station entries
nl80211: flush -> DEL_STATION wlan0 (all)
wlan0: Deauthenticate all stations
nl80211: send_mlme - noack=0 freq=0 no_cck=0 offchanok=0 wait_time=0 fc=0xc0 nlmode=3
nl80211: send_mlme -> send_frame
nl80211: send_frame - Use bss->freq=2412
nl80211: send_frame -> send_frame_cmd
nl80211: CMD_FRAME freq=2412 wait=0 no_cck=0 no_ack=0 offchanok=0
CMD_FRAME - hexdump(len=26): c0 00 00 00 ff ff ff ff ff ff 00 1c df 5a fb 43 00 1c df 5a fb 43 00 00 02 00
nl80211: Frame command failed: ret=-16 (Device or resource busy) (freq=2412 wait=0)
wpa_driver_nl80211_set_key: ifindex=3 (wlan0) alg=0 addr=(nil) key_idx=0 set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=3 (wlan0) alg=0 addr=(nil) key_idx=1 set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=3 (wlan0) alg=0 addr=(nil) key_idx=2 set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=3 (wlan0) alg=0 addr=(nil) key_idx=3 set_tx=0 seq_len=0 key_len=0
Using interface wlan0 with hwaddr 00:1c:df:5a:fb:43 and ssid "Sereta_home"
Deriving WPA PSK based on passphrase
SSID - hexdump_ascii(len=11):
     53 65 72 65 74 61 5f 68 6f 6d 65                  Sereta_home     
PSK (ASCII passphrase) - hexdump_ascii(len=10): [REMOVED]
PSK (from passphrase) - hexdump(len=32): [REMOVED]
random: Got 20/20 bytes from /dev/random
Get randomness: len=32 entropy=0
GMK - hexdump(len=32): [REMOVED]
Get randomness: len=32 entropy=0
Key Counter - hexdump(len=32): [REMOVED]
WPA: Delay group state machine start until Beacon frames have been configured
VLAN: vlan_set_name_type(name_type=2)
nl80211: Set beacon (beacon_set=0)
nl80211: Beacon head - hexdump(len=62): 80 00 00 00 ff ff ff ff ff ff 00 1c df 5a fb 43 00 1c df 5a fb 43 00 00 00 00 00 00 00 00 00 00 64 00 11 04 00 0b 53 65 72 65 74 61 5f 68 6f 6d 65 01 08 82 84 8b 96 0c 12 18 24 03 01 01
nl80211: Beacon tail - hexdump(len=31): 2a 01 04 32 04 30 48 60 6c 30 14 01 00 00 0f ac 04 01 00 00 0f ac 04 01 00 00 0f ac 02 00 00
nl80211: ifindex=3
nl80211: beacon_int=100
nl80211: dtim_period=2
nl80211: ssid - hexdump_ascii(len=11):
     53 65 72 65 74 61 5f 68 6f 6d 65                  Sereta_home     
nl80211: hidden SSID not in use
nl80211: privacy=1
nl80211: auth_algs=0x1
nl80211: wpa_version=0x2
nl80211: key_mgmt_suites=0x2
nl80211: pairwise_ciphers=0x10
nl80211: group_cipher=0x10
WPA: Start group state machine to set initial keys
WPA: group state machine entering state GTK_INIT (VLAN-ID 0)
Get randomness: len=16 entropy=0
GTK - hexdump(len=16): [REMOVED]
WPA: group state machine entering state SETKEYSDONE (VLAN-ID 0)
wpa_driver_nl80211_set_key: ifindex=3 (wlan0) alg=3 addr=0x76840 key_idx=1 set_tx=1 seq_len=0 key_len=16
   broadcast key
nl80211: Set wlan0 operstate 0->1 (UP)
netlink: Operstate: ifindex=3 linkmode=-1 (no change), operstate=6 (IF_OPER_UP)
wlan0: interface state UNINITIALIZED->ENABLED
wlan0: AP-ENABLED
wlan0: Setup of interface done.
ctrl_iface not configured!
RTM_NEWLINK: ifi_index=3 ifname=wlan0 operstate=2 linkmode=0 ifi_flags=0x1003 ([UP])
RTM_NEWLINK: ifi_index=3 ifname=wlan0 master=4 operstate=2 ifi_flags=0x1003 ([UP])
nl80211: Add ifindex 4 for bridge br100
nl80211: Add own interface ifindex 4
RTM_NEWLINK: ifi_index=4 ifname=br100 operstate=6 linkmode=0 ifi_flags=0x11043 ([UP][RUNNING][LOWER_UP])
wlan0: Event INTERFACE_STATUS (5) received
Unknown event 5
RTM_NEWLINK: ifi_index=3 ifname=wlan0 master=4 operstate=6 ifi_flags=0x11043 ([UP][RUNNING][LOWER_UP])
nl80211: Add ifindex 4 for bridge br100
nl80211: Add own interface ifindex 4
RTM_NEWLINK: ifi_index=3 ifname=wlan0 master=4 operstate=6 ifi_flags=0x11043 ([UP][RUNNING][LOWER_UP])
nl80211: Add ifindex 4 for bridge br100
nl80211: Add own interface ifindex 4
RTM_NEWLINK: ifi_index=3 ifname=wlan0 master=4 operstate=6 ifi_flags=0x11043 ([UP][RUNNING][LOWER_UP])
nl80211: Add ifindex 4 for bridge br100
nl80211: Add own interface ifindex 4
RTM_NEWLINK: ifi_index=3 ifname=wlan0 operstate=6 linkmode=0 master=4 ifi_flags=0x11043 ([UP][RUNNING][LOWER_UP])
VLAN: vlan_newlink(wlan0)
VLAN: vlan_newlink(wlan0)
VLAN: vlan_newlink(wlan0)
VLAN: vlan_newlink(wlan0)


p.s. I don't seem to have a network-manager:
Code: Select all
service network-manager stop
network-manager: unrecognized service


This old wlan stick heats up and then starts acting up so I bought another one:
Code: Select all
Bus 001 Device 011: ID 0bda:8172 Realtek Semiconductor Corp. RTL8191SU 802.11n WLAN Adapter


When I follow your tutorial I get this result from the ./hostapd rtl_minimal.conf
Code: Select all
Configuration file: rtl_minimal.conf
drv->ifindex=6
Failed to request a scan of neighboring BSSes
ioctl[RTL_IOCTL_HOSTAPD]: Operation not supported
Could not connect to kernel driver.
+rtl871x_sta_deauth_ops, ff:ff:ff:ff:ff:ff is deauth, reason=2
rtl871x_set_key_ops
ioctl[RTL_IOCTL_HOSTAPD]: Operation not supported
Failed to set encryption.
rtl871x_set_key_ops
ioctl[RTL_IOCTL_HOSTAPD]: Operation not supported
Failed to set encryption.
rtl871x_set_key_ops
ioctl[RTL_IOCTL_HOSTAPD]: Operation not supported
Failed to set encryption.
rtl871x_set_key_ops
ioctl[RTL_IOCTL_HOSTAPD]: Operation not supported
Failed to set encryption.
Using interface wlan1 with hwaddr 24:05:0f:27:01:2c and ssid 'ODROID-TEST'
rtl871x_set_wps_assoc_resp_ie
ioctl[RTL_IOCTL_HOSTAPD]: Operation not supported
rtl871x_set_key_ops
ioctl[RTL_IOCTL_HOSTAPD]: Operation not supported
Failed to set encryption.
rtl871x_set_beacon_ops
ioctl[RTL_IOCTL_HOSTAPD]: Operation not supported
rtl871x_set_hidden_ssid ignore_broadcast_ssid:0, ODROID-TEST,11
ioctl[RTL_IOCTL_HOSTAPD]: Operation not supported
rtl871x_set_acl
Failed to set beacon head/tail or DTIM period


Any ideas or hints?
E_lexy
 
Posts: 1
Joined: Fri Feb 27, 2015 5:43 am
languages_spoken: english
ODROIDs: u3

Re: [GUIDE] Wifi Hotspot (Wifi Module 3)

Unread postby mdrjr » Mon Mar 02, 2015 12:01 am

Update your kernel or use the latest image.
mdrjr
Site Admin
 
Posts: 11663
Joined: Fri Feb 22, 2013 11:34 pm
Location: Brazil
languages_spoken: english, portuguese
ODROIDs: -

Re: [GUIDE] Wifi Hotspot (Wifi Module 3)

Unread postby Gerry » Sun Mar 08, 2015 10:32 pm

Followed method 3 "NetworkManager diabled"

Changed to static ip and disabled network manager with success:

Now I'm kicked out of the network at:

brctl addif br0 eth1

which immediately breaks my ssl connection.

Thanks for any help ?

Gerry
Gerry
 
Posts: 18
Joined: Thu Jan 08, 2015 8:08 pm
languages_spoken: english,DE
ODROIDs: C1,C2

Re: [GUIDE] Wifi Hotspot (Wifi Module 3)

Unread postby mdrjr » Mon Mar 09, 2015 3:36 am

That's pretty much right...
since you are modifying the interfaces configuration..
mdrjr
Site Admin
 
Posts: 11663
Joined: Fri Feb 22, 2013 11:34 pm
Location: Brazil
languages_spoken: english, portuguese
ODROIDs: -

Re: [GUIDE] Wifi Hotspot (Wifi Module 3)

Unread postby Gerry » Mon Mar 09, 2015 7:49 pm

Thanks for the response !

since you are modifying the interfaces configuration..


So that means all of this configuration can only be done using direct access to the C1 or via serial terminal ?
That would be an important prerequisite to mention for non-experts like me.

BTW, in a raspberry- forum I found a tutorial which only needs 3 commands in /etc/network/interfaces for establishing the bridge:
auto br0
iface br0 inet dhcp
bridge_ports eth0 wlan0

Should that work also here ?

Ok, the DHCP is left to another router, but that is likely the major setup for most users.
Gerry
 
Posts: 18
Joined: Thu Jan 08, 2015 8:08 pm
languages_spoken: english,DE
ODROIDs: C1,C2

Re: [GUIDE] Wifi Hotspot (Wifi Module 3)

Unread postby mdrjr » Mon Mar 09, 2015 9:54 pm

Yes, this works on Ubuntu as well..

But you just created a bridge with those two interfaces...

What about the rest of the wifi configuration..

There's no difference between rPi/ODROID/x86 when it comes to this part.. since everybody is using the same stuff.
mdrjr
Site Admin
 
Posts: 11663
Joined: Fri Feb 22, 2013 11:34 pm
Location: Brazil
languages_spoken: english, portuguese
ODROIDs: -

Re: [GUIDE] Wifi Hotspot (Wifi Module 3)

Unread postby Gerry » Mon Mar 09, 2015 11:33 pm

Code: Select all
What about the rest of the wifi configuration..

I thought that is to be done in the hostapd- environment as you described above :?:
Gerry
 
Posts: 18
Joined: Thu Jan 08, 2015 8:08 pm
languages_spoken: english,DE
ODROIDs: C1,C2

Re: [GUIDE] Wifi Hotspot (Wifi Module 3)

Unread postby mgb5r » Wed May 06, 2015 6:15 am

Hi,
I followed the guide.. method 2, steps 1...5
all seemed ok untill the last command... "./hostapd rtl_minimal.conf &"...
this is the output:
Code: Select all
# Configuration file: rtl_minimal.conf
drv->ifindex=3
ioctl[SIOCSIWMODE]: Invalid argument
Could not set interface to mode(3)!
Could not set interface to master mode!
rtl871xdrv driver initialization failed.
rmdir[ctrl_interface]: No such file or directory

[1]+  Exit 1                  ./hostapd rtl_minimal.conf


Does someone know what I did wrong :?: or is missing :?: ?
thanks
mgb5r
 
Posts: 44
Joined: Tue Feb 26, 2013 7:03 am
languages_spoken: english - italian
ODROIDs: ODROID-X2

Re: [GUIDE] Wifi Hotspot (Wifi Module 3)

Unread postby mdrjr » Thu May 07, 2015 12:55 pm

What kernel version?
mdrjr
Site Admin
 
Posts: 11663
Joined: Fri Feb 22, 2013 11:34 pm
Location: Brazil
languages_spoken: english, portuguese
ODROIDs: -

Re: [GUIDE] Wifi Hotspot (Wifi Module 3)

Unread postby mgb5r » Sat May 09, 2015 2:45 am

root@odroid:~# uname -r
3.8.13.30
mgb5r
 
Posts: 44
Joined: Tue Feb 26, 2013 7:03 am
languages_spoken: english - italian
ODROIDs: ODROID-X2

Re: [GUIDE] Wifi Hotspot (Wifi Module 3)

Unread postby mdrjr » Sat May 09, 2015 5:37 am

Do you have the Wifi Module #3 ?
mdrjr
Site Admin
 
Posts: 11663
Joined: Fri Feb 22, 2013 11:34 pm
Location: Brazil
languages_spoken: english, portuguese
ODROIDs: -

Re: [GUIDE] Wifi Hotspot (Wifi Module 3)

Unread postby mgb5r » Sun May 10, 2015 2:29 am

yes. #3
I will try to repeat all the procedure.
mgb5r
 
Posts: 44
Joined: Tue Feb 26, 2013 7:03 am
languages_spoken: english - italian
ODROIDs: ODROID-X2

Next

Return to Ubuntu (All Linux'es)

Who is online

Users browsing this forum: No registered users and 3 guests