Bananian
Bananian on BPI-Router - Discussion
99
32332
|
[Bananian]
Bananian on BPI-Router - Discussion
[Copy link]
|
|
TheLoon replied at Sun Feb 8, 2015 19:13 
Help! I've loged in via ssh and also directly with attached keyboard but bananian-config won't take ...
You try to change the hardware configuration? That's not (really) required for the R1 at the moment.
But there is no known bug regarding this. We only have a bug then trying to select the keyboard layout: https://dev.bananian.org/view.php?id=38 |
|
|
|
|
|
|
|
alexschomb replied at Fri Jan 30, 2015 17:46 
Hello guys,
first of all, thanks for your great work on building Bananian for the BPi R1.
Hi,
for wlan chip rt8192cu which is used in Bpi-R1 you need a special hostapd from realtek (now mediatek)
because they dont support nl80211 standard of the kernel.
in Arch you could imply install via yaourt -S hostapd-8192cu
then use hostapd.conf- # Interface
- interface=wlan0
- #driver=nl80211
- # RTL8192CU Wlan adapter
- driver=rtl871xdrv
- bridge=br0
- # Main settings
- ssid=wlanssid
- wpa_passphrase=yoursecret
- channel=4
- hw_mode=g
- # this enables the 802.11n speeds and capabilities ... You will also need to enable WMM for full HT functionality.
- ieee80211n=1
- wmm_enabled=1
- country_code=DE
- # bei fehlerhafter Firmware das Land auf Grenada setzen
- #country_code=GD
- # let your AP broadcast the settings that agree with the above-mentioned regulatory requirements per country
- ieee80211d=1
- # Security
- # 2 nur wpa2; 3= wpa und wpa2
- #wpa=2
- wpa=3
- # auth_algs=1 open auth
- #auth_algs=1
- auth_algs=3
- # anz erlaubte clients
- max_num_sta=255
- wpa_key_mgmt=WPA-PSK
- rsn_pairwise=CCMP
- wpa_pairwise=TKIP CCMP
- # these have to be set in agreement w/ channel and some other values... read hostapd.conf docs
- ht_capab=[HT40+][HT40-][SMPS-STATIC][SHORT-GI-40]
- # Levels (minimum value for logged events):
- # 0 = verbose debugging
- # 1 = debugging
- # 2 = informational messages
- # 3 = notification
- # 4 = warning
- #
- logger_syslog=-1
- logger_syslog_level=2
- logger_stdout=-1
- logger_stdout_level=1
Copy the Code |
|
|
|
|
|
|
|
Hi,
I tried the this configuration and works well. But, the wifi signal strength is very weak:- IEEE 802.11bgn ESSID:"curacaong" Nickname:"<WIFI@REALTEK>"
- Mode:Master Frequency:2.432 GHz Access Point: AC:A2:13:5C:AC:81
- Bit Rate:300 Mb/s Sensitivity:0/0
- Retry:off RTS thr:off Fragment thr:off
- Encryption key:off
- Power Management:off
- Link Quality=90/100 Signal level=-67 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
Copy the Code I tried to increase the txpower, but it says:
Error for wireless request "Set Tx Power" (8B26) :
SET failed on device wlan0 ; Invalid argument.
Anybody has same experience? Any suggestion to me?
Thanks in advanced.
|
|
|
|
|
|
|
|
Hi,
I've been trying to follow the thread and something is being lost for me.
I install the Bananian 15.01, run the update (nothing needed), and run the config.
I've selected the R1 as the device. I can get the IP address so I'm able to SSH into it.
But getting wireless up and running as well as making it a router is something that escapes me.
Has anyone setup the system starting with the 15.01 yet? Would it be possible to share all the steps involved?
I would greatly appreciate it. Thank you all in advance.
-AZ |
|
|
|
|
|
|
|
After 2 shots of Turkish coffee and 5 hour energy drink, I've gone back and done this:
1. Installed the 14.11 build that had VLANs configured.
2. Updated to 15.01 using "bananian-update"
3. Installed DHCP-SERVER
I am now able to get an IP address when connecting to the LAN part.
I have an IP address on the WAN (given out by my current router)
There is no routing between the two VLANs. 
Here is my /etc/network/interfaces:- auto lo
- iface lo inet loopback
- auto eth0.101
- iface eth0.101 inet dhcp
- auto eth0.102
- iface eth0.102 inet static
- address 10.20.30.1
- netmask 255.255.255.0
- broadcast 10.20.30.255
Copy the Code Here is my /etc/dhcp/dhcpd.conf
- ddns-update-style none;
- default-lease-time 600;
- max-lease-time 7200;
- authoritative;
- subnet 10.20.30.0 netmask 255.255.255.0 {
- interface eth0;
- range 10.20.30.100 10.20.30.200;
- option subnet-mask 255.255.255.0;
- option broadcast-address 10.20.30.255;
- option routers 10.20.30.1;
- option domain-name "bpi";
- option domain-name-servers 8.8.8.8;
- }
Copy the Code Here is my /etc/network/if-pre-up.d/swconfig
- #!/bin/sh
- ifconfig eth0 up
- swconfig dev eth0 set reset 1
- swconfig dev eth0 set enable_vlan 1
- swconfig dev eth0 vlan 101 set ports '3 8t'
- swconfig dev eth0 vlan 102 set ports '4 0 1 2 8t'
- swconfig dev eth0 set apply 1#
Copy the Code my ip route shows:
- default via 10.30.78.1 dev eth0.101
- 10.20.30.0/24 dev eth0.102 proto kernel scope link src 10.20.30.1
- 10.30.78.0/24 dev eth0.101 proto kernel scope link src 10.30.78.120
Copy the Code Any help on my next step? |
|
|
|
|
|
|
|
bridge between networks ? |
|
|
|
|
|
|
|
psboxnet_admin replied at Mon Feb 23, 2015 01:18 
After 2 shots of Turkish coffee and 5 hour energy drink, I've gone back and done this:
1. Installed ...
Is forwarding on in the kernel?- cat /proc/sys/net/ipv4/ip_forward
Copy the Code |
|
|
|
|
|
|
|
Forwarding is one thing, then probably masquerading is also needed. |
|
|
|
|
|
|
|
Well he's routing between private subnets so as long as remote route has the return route set it should work without NAT. |
|
|
|
|
|
|
|
psboxnet_admin replied at Mon Feb 23, 2015 01:18 
After 2 shots of Turkish coffee and 5 hour energy drink, I've gone back and done this:
1. Installed ...
to activate vlan, edit /etc/network/if-pre-up.d/swconfig file and comment the "exit 0" line :
#exit 0
it's fun to bridge your LAN and wireless interface. To do this, install the bridge-utils package :
apt-get install bridge-utils
To configure your network interfaces edit the /etc/network/interfaces file :
auto lo
iface lo inet loopback
# LAN vlan
auto eth0.102
iface eth0.102 inet manual
# WAN vlan
auto eth0.101
iface eth0.101 inet dhcp
# Bridge lan and wireless
auto lanbr0
iface lanbr0 inet static
bridge_ports eth0.102 wlan0
address 192.168.0.2
netmask 255.255.255.0
To allow forwarding between the two vlans, edit the /etc/sysctl.conf and uncomment the line "net.ipv4.ip_forward=1" (it's permanent)
To make persistent your netfilter configuration, install the iptables-persistent package :
apt-get install iptables-persistent
for example a shell script with some iptables rules for a router :
# Loopback address
LOOP=127.0.0.1
# LAN network
PRIVATE=192.168.0.0/24
#LAN interface
LAN=lanbr0
#WAN interface
WAN=eth0.101
# Delete old iptables rules
# and temporarily block all traffic.
iptables -P OUTPUT DROP
iptables -P INPUT DROP
iptables -P FORWARD DROP
iptables -F
iptables -t nat -F
# Set default policies
iptables -P OUTPUT ACCEPT
iptables -P INPUT DROP
iptables -P FORWARD DROP
# Prevent external packets from using loopback addr
iptables -A INPUT -i $WAN -s $LOOP -j DROP
iptables -A FORWARD -i $WAN -s $LOOP -j DROP
iptables -A INPUT -i $WAN -d $LOOP -j DROP
iptables -A FORWARD -i $WAN -d $LOOP -j DROP
# Allow local loopback
iptables -A INPUT -s $LOOP -j ACCEPT
iptables -A INPUT -d $LOOP -j ACCEPT
# Allow incoming pings (can be disabled)
iptables -A INPUT -p icmp --icmp-type echo-request -j ACCEPT
# Allow ssh
iptables -A INPUT -p tcp --dport ssh -j ACCEPT
# Allow bootpc (for dhcp server)
iptables -A INPUT -p udp --dport 67 -i $LAN -j ACCEPT
# forward et nat
iptables -A FORWARD -s $PRIVATE -j ACCEPT
iptables -t nat -A POSTROUTING -s $PRIVATE -o $WAN -j MASQUERADE
# Keep state of connections
iptables -A OUTPUT -m state --state NEW -o $WAN -j ACCEPT
iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -A FORWARD -m state --state NEW -o $WAN -j ACCEPT
iptables -A FORWARD -m state --state ESTABLISHED,RELATED -j ACCEPT
# Save rules to launch them at boot
iptables-save > /etc/iptables/rules.v4 |
|
|
|
|
|
|