Bananian: Scan WLANs while being Access Point?

Hello!

I noticed a very nice tool called “wifite” which I wanted to use on my BPi R1. It has the two Wifi-Antennas plugged in and running as an Access Point (wlan0, no bridging). Wifite can not be started because the wifi-network-card can not be run in monitor mode (instead of master).

When I try to change the wifi mode via “iwconfig wlan0 mode monitor” it says ‘invalid argument’. It was okay for me because i already run it as an Access Point. So I bought a TL-WN725N usb wifi dongle. I created a new interface called wlan1 in /etc/network/interfaces but it can not be set up.

How can I install the usb wifi dongle parallel to the internal wifi chip (ap)?

Thank you for your help! Simon

If this dongle is recognised with kernel you should be able to use it parallel - as another access point. Perhaps creating and adding to bridge would be more simple way if have more than one adaptor.

Hello Igor, thank you for your answer. When I check for the usb wifi dongle with ‘lsusb’, it says:

Bus 003 Device 002: ID 0bda:8178 Realtek Semiconductor Corp. RTL8192CU 802.11n WLAN Adapter

I have read about a problem that realtek chips don’t work well with bananian hardwear. Also is monitor mode not always supported. As the integrated BPi r1 wifi chip is also from Realtek, its too hard to setup both i think. In my eyes the solution would be to get another Wifi usb dongle.

Isn’t this the onboard wifi chip? How does complete lsusb output looks like? In case only one 0bda vendor id is listed you most probably run in undervoltage problems (known since years: http://linux-sunxi.org/Lamobo_R1#Powering_the_board)

Hi Charles, thanks for replying. You’re right, the quoted chip is the onboard wifi. Full lsusb: `

# lsusb                                                         
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 002: ID 0bda:8178 Realtek Semiconductor Corp. RTL8192CU 802.11n WLAN Adapter
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 0bda:8179 Realtek Semiconductor Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

I installed the driver for Bus001Dev002 but it still fails to setup wlan1. How do I assign the internal wifi chip to wlan0 and the usb wifi chip to wlan1?

# ifup wlan1 
Cannot find device "wlan1"
Failed to bring up wlan1.

`

One more thing to mention.You need to fix powering related issues before even start to try this. Only powering the board can be on the edge when powering via micro USB and when you add another wireless adaptor on USB, this might already be too much. Add second one via powered usb hub. At least.

What do you get from iwconfig ?

The differentiation ‘internal’ vs. ‘usb wifi’ is misleading since internal is also usb. You need to fix your powering problems first (forget about the Micro USB connector, you need to rely on community knowledge, so check the link to linux-sunxi wiki again).

To make your R1 an usable device you have to fix the many hardware flaws first:

There was an older forum run by Banana guys where a lot of initial discussion or let’s better say reverse engineering around this sad design happened (eg. how customers discovered how to power a SATA disk and stuff like this). But they shut this earlier forum down.

Hi, thanks for the answers again.

I checked my power-consumption and it gave me following result: `

# awk '{printf ("%0.2f",$1/1000000); }' </sys/devices/platform/sunxi-i2c.0/i2c-0/0-0034/axp20-supplyer.28/power_supply/ac/current_now
0.85#  `

For me it looks like my BPi R1 (with Wifi dongle and SSD connected) only uses 850mA out of 1800mA total, which seems to be okay. Am I wrong here?

The internal wifi (Bus 003 Dev 002) is running well. I can connect my laptop to it and visit the internet at a stable connection. The problem is that I don’t see the external wifi (usb dongle, Bus 001 Dev 002) coming up as wlan1 (which was configured in /etc/network/interfaces). Even when I replug the external wifi it still doesn’t work.

Do you still think there’s a hardware problem? Or can it maybe be due to wrong configured software (like hostapd or so)?

What about the voltage value?

Hi Charles `

# cat /sys/devices/platform/sunxi-i2c.0/i2c-0/0-0034/axp20-supplyer.28/power_supply/ac/voltage_now
4749000
# uname -a                                                              ~/CTest
Linux bananapi 3.4.111-bananian #5 SMP PREEMPT Fri Mar 25 17:24:42 UTC 2016 armv7l GNU/Linux`

The voltage is 4.75V which should be okay

If your PSU is rated 5V and not also 4.75V and that’s at just 0.85A then you suffer from under-voltage. Just add some load and voltage drops a lot more. Long known problem, never fixed by Sinovoip: http://web.archive.org/web/20150328191439/http://bananapi.com/index.php/forum/general/391-why-the-sata-disk-doesnt-work-on-bpi-r1

I read the thread you linked. There is a fix for powering an SSD, but my SSD works fine. I can’t find a solution in there for non-working usb-dongle-wifi, except maybe powering the BPi R1 via battery-connector? I don’t know how to connect the BPi R1 to a power-supply (no battery) via JST.

Seems like the Banana Pi Router 1 is designed with lots of hardware-bugs …