Bananian

Bananian on BPI-Router - Discussion

99 29273
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

minz0r  
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
  1. # Interface
  2. interface=wlan0
  3. #driver=nl80211
  4. # RTL8192CU Wlan adapter
  5. driver=rtl871xdrv
  6. bridge=br0

  7. # Main settings
  8. ssid=wlanssid
  9. wpa_passphrase=yoursecret
  10. channel=4
  11. hw_mode=g
  12. #  this enables the 802.11n speeds and capabilities ...  You will also need to enable WMM for full HT functionality.
  13. ieee80211n=1
  14. wmm_enabled=1

  15. country_code=DE
  16. # bei fehlerhafter Firmware das Land auf Grenada setzen
  17. #country_code=GD

  18. #   let your AP broadcast the settings that agree with the above-mentioned regulatory requirements per country
  19. ieee80211d=1

  20. # Security
  21. # 2 nur wpa2; 3= wpa und wpa2
  22. #wpa=2
  23. wpa=3

  24. # auth_algs=1 open auth
  25. #auth_algs=1
  26. auth_algs=3

  27. # anz erlaubte clients
  28. max_num_sta=255
  29. wpa_key_mgmt=WPA-PSK
  30. rsn_pairwise=CCMP
  31. wpa_pairwise=TKIP CCMP

  32. #   these have to be set in agreement w/ channel and some other values... read hostapd.conf docs
  33. ht_capab=[HT40+][HT40-][SMPS-STATIC][SHORT-GI-40]

  34. # Levels (minimum value for logged events):
  35. #  0 = verbose debugging
  36. #  1 = debugging
  37. #  2 = informational messages
  38. #  3 = notification
  39. #  4 = warning
  40. #
  41. logger_syslog=-1
  42. logger_syslog_level=2
  43. logger_stdout=-1
  44. logger_stdout_level=1
Copy the Code

Matuka  
Hi,
I tried the this configuration and works well. But, the wifi signal strength is very weak:
  1. IEEE 802.11bgn  ESSID:"curacaong"  Nickname:"<WIFI@REALTEK>"
  2.           Mode:Master  Frequency:2.432 GHz  Access Point: AC:A2:13:5C:AC:81   
  3.           Bit Rate:300 Mb/s   Sensitivity:0/0  
  4.           Retry:off   RTS thr:off   Fragment thr:off
  5.           Encryption key:off
  6.           Power Management:off
  7.           Link Quality=90/100  Signal level=-67 dBm  Noise level=0 dBm
  8.           Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
  9.           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:
  1. auto lo
  2. iface lo inet loopback

  3. auto eth0.101
  4. iface eth0.101 inet dhcp

  5. auto eth0.102
  6. iface eth0.102 inet static
  7. address 10.20.30.1
  8. netmask 255.255.255.0
  9. broadcast 10.20.30.255
Copy the Code
Here is my /etc/dhcp/dhcpd.conf

  1. ddns-update-style none;
  2. default-lease-time 600;
  3. max-lease-time 7200;

  4. authoritative;

  5. subnet 10.20.30.0 netmask 255.255.255.0 {
  6.   interface eth0;
  7.   range 10.20.30.100 10.20.30.200;
  8.   option subnet-mask 255.255.255.0;
  9.   option broadcast-address 10.20.30.255;
  10.   option routers 10.20.30.1;
  11.   option domain-name "bpi";
  12.   option domain-name-servers 8.8.8.8;
  13. }
Copy the Code
Here is my /etc/network/if-pre-up.d/swconfig

  1. #!/bin/sh

  2. ifconfig eth0 up

  3. swconfig dev eth0 set reset 1
  4. swconfig dev eth0 set enable_vlan 1
  5. swconfig dev eth0 vlan 101 set ports '3 8t'
  6. swconfig dev eth0 vlan 102 set ports '4 0 1 2 8t'
  7. swconfig dev eth0 set apply 1#  
Copy the Code
my ip route shows:

  1. default via 10.30.78.1 dev eth0.101
  2. 10.20.30.0/24 dev eth0.102  proto kernel  scope link  src 10.20.30.1
  3. 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 ?

jekader  
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?
  1. cat /proc/sys/net/ipv4/ip_forward
Copy the Code

hawhill  
Forwarding is one thing, then probably masquerading is also needed.

jekader  
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

You have to log in before you can reply Login | Sign Up

Points Rules