Temporary Fix for solving problems with ALFA devices

Posted by Matthias 
This forum is currently read only. You can not log in or make any changes. This is a temporary situation.
Now, this forum is in read-only mode. You find details Details hereContinue on /r/PirateBox
Temporary Fix for solving problems with ALFA devices
March 28, 2013 11:07AM
Hi,
this is a beta-release of version 0.6E.
It contains a different wlan-setup script and would help against problems using ALFA-USB device as wifi device.

The following howto has to be done with the piratebox-RaspberryPi image or after you did the normal installation.

Language: PHP
cd /tmp wget http://downloads.piratebox.de/piratebox-ws_0.6E_beta1.tar.gz tar xzf piratebox-ws_0.6E_beta1.tar.gz   #if piratebox is up, stop it sudo /etc/init.d/piratebox stop   #save your shared folder sudo mv /opt/piratebox/share /opt/piratebox_share   sudo rm -r /opt/piratebox sudo mv /tmp/piratebox/piratebox /opt/   sudo sed ';s:DROOPY_USE_USER="no":DROOPY_USE_USER="yes":'; -i /opt/piratebox/conf/piratebox.conf   sudo rm -r /opt/piratebox/share sudo mv /opt/piratebox_share /opt/piratebox/share   #start the box sudo /etc/init.d/piratebox start


If this code is more tested, I'll release 0.6E and a new RaspberryPi image.

regards
Matthias
(hopefully, there is no typo winking smiley )


This is only my signature.
Re: Temporary Fix for solving problems with ALFA devices
March 29, 2013 12:44PM
Thats fixed it! 5 out of 5 successful boots on Alfa AWUS036NH connected directly to pi, 5/5 success with Alfa via powered usb hub and for good measure 5/5 success on WIPI adapter direct on pi. Well done Matthias! Thanks.
Re: Temporary Fix for solving problems with ALFA devices
March 29, 2013 01:23PM
thumbs up
thanks for the feedback!
Had similar problems only with a Widemac USB 2.0 150 MBps 802.11N adapter (Ralink rt5370 chipset). Also had success five out of five times with the beta version above. It was tested with the 2013-02-09 version of wheezy-raspian using the instructions for a manual installation of PirateBox.
Re: Temporary Fix for solving problems with ALFA devices
April 01, 2013 09:06AM
Thank you thumbs up
I find that even with your beta release I can not get my awus036h working fully with piratebox. I have tried with your distro and also with Adafruit's Pi distro. I noticed the adapter was showing up as wlan1 and replaced wlan0 with wlan1 in all the scripts and configs but this results in wlan1 getting an IP but not getting set up as an AP. I also noticed errors from iwconfig.

I am using a rev2 512MB RAM pi with a 5v 2a power supply. Piratebox works fine with a rtl1882 usb adapter. I'd be glad to help you test with the awus036h since it's such an awesome adapter for achieving wireless range.
I should have said hostapd not iwconfig.

quarterturn Wrote:
-------------------------------------------------------
> I find that even with your beta release I can not
> get my awus036h working fully with piratebox. I
> have tried with your distro and also with
> Adafruit's Pi distro. I noticed the adapter was
> showing up as wlan1 and replaced wlan0 with wlan1
> in all the scripts and configs but this results in
> wlan1 getting an IP but not getting set up as an
> AP. I also noticed errors from iwconfig.
>
> I am using a rev2 512MB RAM pi with a 5v 2a power
> supply. Piratebox works fine with a rtl1882 usb
> adapter. I'd be glad to help you test with the
> awus036h since it's such an awesome adapter for
> achieving wireless range.
Re: Temporary Fix for solving problems with ALFA devices
April 06, 2013 06:10PM
sudo mv /opt/piratebox_share /opt/piratebox/share
I had everything under control until that part and then it told me that /opt/piratebox_share didn't exist.

Could've been something wrong with my build. I'll try again on a clean card. Do I have to have the ALFA hooked up while I follow these instructions or should it not matter?
Re: Temporary Fix for solving problems with ALFA devices
April 06, 2013 07:04PM
Then you have not done this step before removing /opt/piratebox:

sudo mv /opt/piratebox/share /opt/piratebox_share

for saving your shared data.

Do

mkdir /opt/piratebox/share

to recreate it.

Matthias
Re: Temporary Fix for solving problems with ALFA devices
April 09, 2013 02:19PM
fix is now delivered in current image.
Re: Temporary Fix for solving problems with ALFA devices
April 12, 2013 06:03AM
I installed version 0.6E on an sd for my raspberry
This works fine with the wifi key w541u
But with my USB wifi Realtek RTL8187L it well recognized
To boot (flashing LED) but the network piratebox not visible?
Re: Temporary Fix for solving problems with ALFA devices
April 12, 2013 06:36AM
Matthias Wrote:
-------------------------------------------------------
> Realtek RTL8187L ?
> can you please post the output of the command "iw"
> . It seems that chipset is not supported for
> AP-mode (refering to
> [wireless.kernel.org] )

I believe RTL8187L does not support ap mode
Re: Temporary Fix for solving problems with ALFA devices
April 12, 2013 07:02AM
iwconfig
wlan0 IEEE 802.11bg ESSID : off/any
mode :managed access point: not-associated tx-power=20dbm
Retry long limit :7 rts thryawning smileyff Fragment thr yawning smileyff
Power Management yawning smileyff
confused smiley
Re: Temporary Fix for solving problems with ALFA devices
April 12, 2013 07:05AM
nope, the command is named "iw"
Re: Temporary Fix for solving problems with ALFA devices
April 12, 2013 07:15AM
I how to copy the list (in linux) iw as the result and send it to you?
Re: Temporary Fix for solving problems with ALFA devices
April 12, 2013 07:17AM
"iw list" > iw_output.txt

Then everything is in iw_output.txt smiling smiley
Re: Temporary Fix for solving problems with ALFA devices
April 12, 2013 04:29PM
root@raspberrypi:/home/pi# iw list
Wiphy phy0
Band 1:
Frequencies:
* 2412 MHz [1] (20.0 dBm)
* 2417 MHz [2] (20.0 dBm)
* 2422 MHz [3] (20.0 dBm)
* 2427 MHz [4] (20.0 dBm)
* 2432 MHz [5] (20.0 dBm)
* 2437 MHz [6] (20.0 dBm)
* 2442 MHz [7] (20.0 dBm)
* 2447 MHz [8] (20.0 dBm)
* 2452 MHz [9] (20.0 dBm)
* 2457 MHz [10] (20.0 dBm)
* 2462 MHz [11] (20.0 dBm)
* 2467 MHz [12] (20.0 dBm) (passive scanning, no IBSS)
* 2472 MHz [13] (20.0 dBm) (passive scanning, no IBSS)
* 2484 MHz [14] (20.0 dBm) (passive scanning, no IBSS)
Bitrates (non-HT):
* 1.0 Mbps
* 2.0 Mbps
* 5.5 Mbps
* 11.0 Mbps
* 6.0 Mbps
* 9.0 Mbps
* 12.0 Mbps
* 18.0 Mbps
* 24.0 Mbps
* 36.0 Mbps
* 48.0 Mbps
* 54.0 Mbps
max # scan SSIDs: 4
max scan IEs length: 2285 bytes
Coverage class: 0 (up to 0m)
Supported Ciphers:
* WEP40 (00-0f-ac:1)
* WEP104 (00-0f-ac:5)
* TKIP (00-0f-ac:2)
* CCMP (00-0f-ac:4)
Available Antennas: TX 0 RX 0
Supported interface modes:
* managed
* monitor
software interface modes (can always be added):
* monitor
interface combinations are not supported
Supported commands:
* new_interface
* set_interface
* new_key
* new_beacon
* new_station
* new_mpath
* set_mesh_params
* set_bss
* authenticate
* associate
* deauthenticate
* disassociate
* join_ibss
* join_mesh
* remain_on_channel
* set_tx_bitrate_mask
* action
* frame_wait_cancel
* set_wiphy_netns
* set_channel
* set_wds_peer
* connect
* disconnect
Supported TX frame types:
* IBSS: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
* managed: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
* AP: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
* AP/VLAN: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
* mesh point: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
* P2P-client: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
* P2P-GO: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
Supported RX frame types:
* IBSS: 0xd0
* managed: 0x40 0xd0
* AP: 0x00 0x20 0x40 0xa0 0xb0 0xc0 0xd0
* AP/VLAN: 0x00 0x20 0x40 0xa0 0xb0 0xc0 0xd0
* mesh point: 0xb0 0xc0 0xd0
* P2P-client: 0x40 0xd0
* P2P-GO: 0x00 0x20 0x40 0xa0 0xb0 0xc0 0xd0
Device supports RSN-IBSS.
root@raspberrypi:/home/pi#
Re: Temporary Fix for solving problems with ALFA devices
April 14, 2013 06:57AM
Do you have a solution to my problem?eye rolling smiley
Re: Temporary Fix for solving problems with ALFA devices
April 15, 2013 04:41AM
Yeah, you need a different device.

Look at this output, I marked the lines your devices misses:


pi@raspberrypi ~ $ sudo iw phy
Wiphy phy0
Band 1:
Capabilities: 0x172
HT20/HT40
Static SM Power Save
RX Greenfield
RX HT20 SGI
RX HT40 SGI
RX STBC 1-stream
Max AMSDU length: 3839 bytes
No DSSS/CCK HT40
Maximum RX AMPDU length 65535 bytes (exponent: 0x003)
Minimum RX AMPDU time spacing: 2 usec (0x04)
HT RX MCS rate indexes supported: 0-7, 32
TX unequal modulation not supported
HT TX Max spatial streams: 1
HT TX MCS rate indexes supported may differ
Frequencies:
* 2412 MHz [1] (20.0 dBm)
* 2417 MHz [2] (20.0 dBm)
* 2422 MHz [3] (20.0 dBm)
* 2427 MHz [4] (20.0 dBm)
* 2432 MHz [5] (20.0 dBm)
* 2437 MHz [6] (20.0 dBm)
* 2442 MHz [7] (20.0 dBm)
* 2447 MHz [8] (20.0 dBm)
* 2452 MHz [9] (20.0 dBm)
* 2457 MHz [10] (20.0 dBm)
* 2462 MHz [11] (20.0 dBm)
* 2467 MHz [12] (20.0 dBm) (passive scanning, no IBSS)
* 2472 MHz [13] (20.0 dBm) (passive scanning, no IBSS)
* 2484 MHz [14] (20.0 dBm) (passive scanning, no IBSS)
Bitrates (non-HT):
* 1.0 Mbps
* 2.0 Mbps (short preamble supported)
* 5.5 Mbps (short preamble supported)
* 11.0 Mbps (short preamble supported)
* 6.0 Mbps
* 9.0 Mbps
* 12.0 Mbps
* 18.0 Mbps
* 24.0 Mbps
* 36.0 Mbps
* 48.0 Mbps
* 54.0 Mbps
max # scan SSIDs: 4
max scan IEs length: 2257 bytes
Coverage class: 0 (up to 0m)
Supported Ciphers:
* WEP40 (00-0f-ac:1)
* WEP104 (00-0f-ac:5)
* TKIP (00-0f-ac:2)
* CCMP (00-0f-ac:4)
Available Antennas: TX 0 RX 0
Supported interface modes:
* IBSS
* managed
* AP
* AP/VLAN
* WDS
* monitor
* mesh point
software interface modes (can always be added):
* AP/VLAN
* monitor
interface combinations are not supported
Supported commands:
* new_interface
* set_interface
* new_key
* new_beacon
* new_station
* new_mpath
* set_mesh_params
* set_bss
* authenticate
* associate
* deauthenticate
* disassociate
* join_ibss
* join_mesh
* remain_on_channel
* set_tx_bitrate_mask
* action
* frame_wait_cancel
* set_wiphy_netns
* set_channel
* set_wds_peer
* connect
* disconnect
Supported TX frame types:
* IBSS: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
* managed: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
* AP: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
* AP/VLAN: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
* mesh point: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
* P2P-client: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
* P2P-GO: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
Supported RX frame types:
* IBSS: 0xd0
* managed: 0x40 0xd0
* AP: 0x00 0x20 0x40 0xa0 0xb0 0xc0 0xd0
* AP/VLAN: 0x00 0x20 0x40 0xa0 0xb0 0xc0 0xd0
* mesh point: 0xb0 0xc0 0xd0
* P2P-client: 0x40 0xd0
* P2P-GO: 0x00 0x20 0x40 0xa0 0xb0 0xc0 0xd0
Re: Temporary Fix for solving problems with ALFA devices
April 15, 2013 05:36AM
I advise you that as a key wifi or I can solve the problem with a file?
Re: Temporary Fix for solving problems with ALFA devices
April 15, 2013 05:44AM
We have a list of known as working devices, check it out and buy a new one: [piratebox.aod-rpg.de]
Re: Temporary Fix for solving problems with ALFA devices
April 18, 2013 06:04AM
I installed under xwindows wicd and my rtl8187 card works but not always visible PirateBox I think has a driver problem and not the wireless card you
procedure to install the native drivers?
Re: Temporary Fix for solving problems with ALFA devices
April 18, 2013 06:28AM
I don't believe, that the native drivers (via ndiswrapper) are able to run in AP mode.
Re: Temporary Fix for solving problems with ALFA devices
May 03, 2013 02:04PM
Matthias Wrote:
-------------------------------------------------------
> Then you have not done this step before removing
> /opt/piratebox:
>
> sudo mv /opt/piratebox/share /opt/piratebox_share
>
> for saving your shared data.
>
> Do
>
> mkdir /opt/piratebox/share
>
> to recreate it.
>
> Matthias

Well, I was starting a new one, which is why it probably wasn't working. Did the mkdir and went ahead and started the service and it's working, so thanks.

Is the new image with this built-in on this page:
[piratebox.aod-rpg.de]
Because it's dated as February 6th, so I wasn't sure.

Thanks again for everything you do, Matthias.