New user's registration have been closed due to high spamming and low trafic on this forum. Please contact forum admins directly if you need an account. Thanks !

Connecting b3 (Jessie) to WLAN

Got problems with your B2 or B3? Share and get helped!
Post Reply
pai
Posts: 10
Joined: 19 Sep 2015, 14:12

Connecting b3 (Jessie) to WLAN

Post by pai »

Hello everyone,

I need a little help connecting my b3 to the WLAN of my router. I've done some of the steps from the wiki "Connect your B3 as a wireless device to an access point".
http://wiki.excito.com/w/index.php?titl ... cess_point

I'm not sure what it is about installing "wireless-tools" and "wpasupplicant" because the tutorial doesn't mentions it any further..
however i have installed these packages and configured the interfaces.

Code: Select all

auto wlan0
iface wlan0 inet dhcp
wpa-ssid (wlan name)
wpa-psk (wp2 password) 
When I type ifup wlan0 then i get a output:

Code: Select all

Listening on LPF/wlan0/00:0b:6b:7e:60:cc
Sending on   LPF/wlan0/00:0b:6b:7e:60:cc
Sending on   Socket/fallback
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 7
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 9
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 11
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 17
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 17
No DHCPOFFERS received.
No working leases in persistent database - sleeping.
Can anyone help me out?

Thank you!!
Puma
Posts: 230
Joined: 29 Sep 2008, 06:30

Re: Connecting b3 (Jessie) to WLAN

Post by Puma »

Pai,

As far as I know the following packages are needed:

hostapd you can install this with

Code: Select all

 apt-get install hostapd -y 


You need to configure the hostapd config file:

Code: Select all

 nano /etc/hostapd/hostapd.conf 
examples can be found on the web.

install a small DNS/DHCP server for example package dnsmasq:

Code: Select all

apt-get install dnsmasq -y
change your /etc/network/interfaces and bridge wlan0 to eth0 for example:

Code: Select all

# The loopback network interface
auto lo br0
iface lo inet loopback

allow-hotplug eth0
iface eth0 inet dhcp

allow-hotplug eth1
iface eth1 inet static
    address 192.168.xyz.xyz
    netmask 255.255.255.0
   broadcast 192.168.xyz.xyz

# wireless wlan0
allow-hotplug wlan0
iface wlan0 inet manual


# Setup bridge
iface br0 inet static
    bridge_ports wlan0 eth1
    address 192.168.xyz.xyz
    netmask 255.255.255.0
    gateway 192.168.xyz.xyz
    dns-nameservers 192.168.xyz.xyz

EOF
In nano /etc/default/hostapd you change the change the DAEMON_CONF row to:

Code: Select all

DAEMON_CONF="/etc/hostapd/hostapd.conf"
Then start hostapd with:

Code: Select all

/etc/init.d/hostapd start
This will probarbly work but only for 2.4 GHz channels for your area.
This is due to the world roaming setting in the eeprom of the wifi card.

To use 5GHz and legal channels of your country you can change the eeprom of the wifi card.
Last week I did this and it worked I can now use the 5GHz channels legally in my country.
The ath9k driver does not limit it to world roaming settings.
When needed I will write a tutorial for that.

Puma.
Linux is like a wigwam - no windows, no gates, apache inside!
Gordon
Posts: 1461
Joined: 10 Aug 2011, 03:18

Re: Connecting b3 (Jessie) to WLAN

Post by Gordon »

hostapd is for creating an access point. TS is wanting to make the B3 connect to one.

@TS: Did you see the lines about the firewall in the wiki? You need to allow at least UDP 67:68 to make DHCP work so you can get a lease.
Puma
Posts: 230
Joined: 29 Sep 2008, 06:30

Re: Connecting b3 (Jessie) to WLAN

Post by Puma »

Gordon,
Sorry overlooked that.... :(

But for accesspoint settings are ok.

Puma
Linux is like a wigwam - no windows, no gates, apache inside!
pai
Posts: 10
Joined: 19 Sep 2015, 14:12

Re: Connecting b3 (Jessie) to WLAN

Post by pai »

Hey guys,

first of all: thanks alot for your help!
Gordon wrote:@TS: Did you see the lines about the firewall in the wiki? You need to allow at least UDP 67:68 to make DHCP work so you can get a lease.
No, I didn't. You mean in here?
http://wiki.excito.com

Since I was not able to connect the b3 wirelessly to my LAN, I've changed my mind and now think making an access point out of the b3 would make more sense. Unfortunately it didn't worked out yet too. My biggest success was to set up a WLAN signal, other devices could see but were not able to connect with. Probably because of the firewall reasons?!

In the end I messed up the /etc/network/interface so that I needed to reinstall the Jessie image. :?
I think whenever I do the bridge as Puma suggested, b3 cannot connection to my router via LAN anymore (doesn't get an IP).

pai
Gordon
Posts: 1461
Joined: 10 Aug 2011, 03:18

Re: Connecting b3 (Jessie) to WLAN

Post by Gordon »

As the wiki states:
Punch a big hole in the firewall for the wlan0 interface and restart the firewall to save the configuration.

Code: Select all

iptables -A INPUT -i wlan0 -j ACCEPT
/etc/init.d/bubba-firewall restart
Obviously this refers to the original Bubba OS, so you'll have to adapt for however the Jessie installation does it. You should also note that recent Linux will assign different interface names than before, unless you have an udev rule that sets the old style names, so you'll likely see something like wlp1s0 instead of wlan0.

The same applies if you bridge your LAN and WLAN interfaces. You must open up the firewall for the newly created interface in order to be able to access the B3. Which includes the DHCP server (UDP 67:68) when running as an AP.
Post Reply