Raspberry Pi PirateBox

Posted by uraliss 
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
Raspberry Pi PirateBox
September 27, 2012 07:23PM
Hi Folks,
Im loving the idea of piratebox and I have recently aquired a raspberry pi.

My linux foo is not great at the moment and although I have tried to get piratebox up and running on my pi I am having no luck whatsoever.

Has anyone had any luck with this and if so can you post instructions or an image file so I can get this idea up and running?

Thanks for reading.
Re: Raspberry Pi PirateBox
September 28, 2012 10:03AM
Hi,
I started to write a tutorial today. It is not finished yet and I just found a few point, where the current debian piratebox-package is not compatible with raspberrian.

I'm on it.

Matthias
Re: Raspberry Pi PirateBox
September 28, 2012 10:16AM
Hi,
can you try this small draft-like how-to?

PirateBox with Webserver ; Raspberry PI How-To

It is tested with USB-Wifi
TP-Link TK-WN722N


Matthias



Edited 1 time(s). Last edit at 09/28/2012 10:17AM by Matthias.
Re: Raspberry Pi PirateBox
September 28, 2012 05:44PM
Thanks for this matthias!

I will get to this tonight hopefully and post the results as soon as I can.

Much appreciated!
Re: Raspberry Pi PirateBox
September 28, 2012 06:22PM
would it be possible to allow piratebox to interface with ethernet? for those who don't have a wifi adapter
Re: Raspberry Pi PirateBox
September 28, 2012 08:54PM
on entering the command to create the link i get no such file or directory

sudo ln /opt/piratebox/init.d/piratebox /etc/init.d/piratebox
ln: accessing `/opt/piratebox/init.d/piratebox': No such file or directory

Hope you can help
Re: Raspberry Pi PirateBox
September 28, 2012 09:03PM
Quote

would it be possible to allow piratebox to interface with ethernet? for those who don't have a wifi adapter
Yes should be with severall modifications in /opt/piratebox/conf/piratebox.conf

Quote

on entering the command to create the link i get no such file or directory
Shouldn't be. I copy & pasted every command from my ssh session into the wiki... but just found the problem.

Please do the following:
  rm /opt/piratebox -rfv
  cd ~ 
  cd piratebox
and then follow the tutorial with
# sudo mkdir -p  /opt
 # sudo cp -rv  piratebox /opt

I'm sorry for this
Matthias

edit: missed a "cd piratebox" after the "tar xzf..."-command



Edited 1 time(s). Last edit at 09/28/2012 09:04PM by Matthias.
Re: Raspberry Pi PirateBox
September 28, 2012 09:13PM
Matthias Wrote:
-------------------------------------------------------
> > would it be possible to allow piratebox to
> interface with ethernet? for those who don't have
> a wifi adapter
>
> Yes should be with severall modifications in
> /opt/piratebox/conf/piratebox.conf

Modifications such as?
Re: Raspberry Pi PirateBox
September 29, 2012 09:47AM
Ok, i started from scratch on a new image
this time I got to here:


sudo update-rc.d piratebox  defaults

update-rc.d: using dependency based boot sequencing
update-rc.d: warning: default stop runlevel arguments (0 1 6) do not match piratebox Default-Stop values (1 0)

not sure if thats a problem or not...
Re: Raspberry Pi PirateBox
September 29, 2012 09:52AM
Don't care about that.
Re: Raspberry Pi PirateBox
September 29, 2012 10:05AM
So i carried on with the how-to and completed the setup
i rebooted the pi and everything seems fine but i cannot see the piratebox wifi ap

not sure if it helps or not but lsusb lists my device as a RTL8188CUS 802.11n WLAN Adapter

So near now I can feel it! LOL
Re: Raspberry Pi PirateBox
September 29, 2012 10:52AM
can you please provide the output for this card of the following command
lsusb -v

You can find linux supported USB-Cards here: [linuxwireless.org]

You can additional install the tool "iw" for more helpfull output:

  sudo apt-get -y install iw 
Re: Raspberry Pi PirateBox
September 29, 2012 11:07AM
pi@raspberrypi ~ $ lsusb -v

Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Couldn't open device, some information will be missing
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            9 Hub
  bDeviceSubClass         0 Unused
  bDeviceProtocol         1 Single TT
  bMaxPacketSize0        64
  idVendor           0x1d6b Linux Foundation
  idProduct          0x0002 2.0 root hub
  bcdDevice            3.02
  iManufacturer           3 
  iProduct                2 
  iSerial                 1 
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           25
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0xe0
      Self Powered
      Remote Wakeup
    MaxPower                0mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         9 Hub
      bInterfaceSubClass      0 Unused
      bInterfaceProtocol      0 Full speed (or root) hub
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0004  1x 4 bytes
        bInterval              12

Bus 001 Device 002: ID 0424:9512 Standard Microsystems Corp. 
Couldn't open device, some information will be missing
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            9 Hub
  bDeviceSubClass         0 Unused
  bDeviceProtocol         2 TT per port
  bMaxPacketSize0        64
  idVendor           0x0424 Standard Microsystems Corp.
  idProduct          0x9512 
  bcdDevice            2.00
  iManufacturer           0 
  iProduct                0 
  iSerial                 0 
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           41
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0xe0
      Self Powered
      Remote Wakeup
    MaxPower                2mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         9 Hub
      bInterfaceSubClass      0 Unused
      bInterfaceProtocol      1 Single TT
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0001  1x 1 bytes
        bInterval              12
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       1
      bNumEndpoints           1
      bInterfaceClass         9 Hub
      bInterfaceSubClass      0 Unused
      bInterfaceProtocol      2 TT per port
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0001  1x 1 bytes
        bInterval              12

Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. 
Couldn't open device, some information will be missing
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass          255 Vendor Specific Class
  bDeviceSubClass         0 
  bDeviceProtocol         1 
  bMaxPacketSize0        64
  idVendor           0x0424 Standard Microsystems Corp.
  idProduct          0xec00 
  bcdDevice            2.00
  iManufacturer           0 
  iProduct                0 
  iSerial                 0 
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           39
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0xe0
      Self Powered
      Remote Wakeup
    MaxPower                2mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           3
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass      0 
      bInterfaceProtocol    255 
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x02  EP 2 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x83  EP 3 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0010  1x 16 bytes
        bInterval               4

Bus 001 Device 004: ID 05e3:0608 Genesys Logic, Inc. USB-2.0 4-Port HUB
Couldn't open device, some information will be missing
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            9 Hub
  bDeviceSubClass         0 Unused
  bDeviceProtocol         1 Single TT
  bMaxPacketSize0        64
  idVendor           0x05e3 Genesys Logic, Inc.
  idProduct          0x0608 USB-2.0 4-Port HUB
  bcdDevice           77.64
  iManufacturer           0 
  iProduct                1 
  iSerial                 0 
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           25
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0xe0
      Self Powered
      Remote Wakeup
    MaxPower              100mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         9 Hub
      bInterfaceSubClass      0 Unused
      bInterfaceProtocol      0 Full speed (or root) hub
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0001  1x 1 bytes
        bInterval              12

Bus 001 Device 007: ID 0bda:8176 Realtek Semiconductor Corp. RTL8188CUS 802.11n WLAN Adapter
Couldn't open device, some information will be missing
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0        64
  idVendor           0x0bda Realtek Semiconductor Corp.
  idProduct          0x8176 RTL8188CUS 802.11n WLAN Adapter
  bcdDevice            2.00
  iManufacturer           1 
  iProduct                2 
  iSerial                 3 
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           46
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0x80
      (Bus Powered)
    MaxPower              500mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           4
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass    255 Vendor Specific Subclass
      bInterfaceProtocol    255 Vendor Specific Protocol
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x02  EP 2 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x03  EP 3 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x84  EP 4 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               1

Bus 001 Device 006: ID 1c4f:0002 SiGma Micro Keyboard TRACER Gamma Ivory
Couldn't open device, some information will be missing
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               1.10
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0         8
  idVendor           0x1c4f SiGma Micro
  idProduct          0x0002 Keyboard TRACER Gamma Ivory
  bcdDevice            1.10
  iManufacturer           1 
  iProduct                2 
  iSerial                 0 
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           59
    bNumInterfaces          2
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0xa0
      (Bus Powered)
      Remote Wakeup
    MaxPower               98mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         3 Human Interface Device
      bInterfaceSubClass      1 Boot Interface Subclass
      bInterfaceProtocol      1 Keyboard
      iInterface              0 
        HID Device Descriptor:
          bLength                 9
          bDescriptorType        33
          bcdHID               1.10
          bCountryCode            0 Not supported
          bNumDescriptors         1
          bDescriptorType        34 Report
          wDescriptorLength      54
         Report Descriptors: 
           ** UNAVAILABLE **
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0008  1x 8 bytes
        bInterval              10
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         3 Human Interface Device
      bInterfaceSubClass      0 No Subclass
      bInterfaceProtocol      0 None
      iInterface              0 
        HID Device Descriptor:
          bLength                 9
          bDescriptorType        33
          bcdHID               1.10
          bCountryCode            0 Not supported
          bNumDescriptors         1
          bDescriptorType        34 Report
          wDescriptorLength      50
         Report Descriptors: 
           ** UNAVAILABLE **
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x82  EP 2 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0003  1x 3 bytes
        bInterval              10

I know my card works because it connects to my home wireless network normally

i installed iw but im not sure how to use it yet.

Thanks for all your help on this Matthias. Very much appreciated.
Re: Raspberry Pi PirateBox
September 29, 2012 11:09AM
  sudo  iw phy
This output is interesting for me smiling smiley
Re: Raspberry Pi PirateBox
September 29, 2012 11:15AM
pi@raspberrypi ~ $ sudo iw phy
nl80211 not found.

im guessing that means my card is not supported in mesh mode ???



Edited 1 time(s). Last edit at 09/29/2012 11:21AM by uraliss.
Re: Raspberry Pi PirateBox
September 29, 2012 11:17AM
well, how it should look like:


pi@raspberrypi ~ $ sudo iw phy
Wiphy phy0
        Band 1:
                Capabilities: 0x116e
                        HT20/HT40
                        SM Power Save disabled
                        RX HT20 SGI
                        RX HT40 SGI
                        RX STBC 1-stream
                        Max AMSDU length: 3839 bytes
                        DSSS/CCK HT40
                Maximum RX AMPDU length 65535 bytes (exponent: 0x003)
                Minimum RX AMPDU time spacing: 8 usec (0x06)
                HT TX/RX MCS rate indexes supported: 0-7
                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] (disabled)
                        * 2472 MHz [13] (disabled)
                        * 2484 MHz [14] (disabled)
                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
                 * monitor
                 * P2P-client
                 * P2P-GO
        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


It seems your card is not supported for being an AccessPoint: [linuxwireless.org]
Re: Raspberry Pi PirateBox
September 29, 2012 11:23AM
thanks Matthias that would explain why I didnt have much luck with project-byzantium on these adaptors too.

What adapter would you recommend?
Re: Raspberry Pi PirateBox
September 29, 2012 11:32AM
Also would it be worth uploading your raspberry pi piratebox image so others could make use of it?
just a thought.
Re: Raspberry Pi PirateBox
September 29, 2012 01:21PM
Every card with "Master Mode" support will suffice. You can checkout this list: [en.wikipedia.org]

Yes, It have been my plan to offer a downloadable image for the RaspberryPI since I have the device.. but currently, I don't have a plan how to repackage the image again, so that it will work well.
Re: Raspberry Pi PirateBox
September 29, 2012 02:40PM
Matthias Wrote:
-------------------------------------------------------
>
> You can find linux supported USB-Cards here:
> [linuxwireless.org]
>


or for the pi [elinux.org]
Re: Raspberry Pi PirateBox
September 29, 2012 05:01PM
will this one do the job?

[www.ebay.co.uk]
Re: Raspberry Pi PirateBox
September 29, 2012 07:54PM
uraliss Wrote:
-------------------------------------------------------
> will this one do the job?
>
> [www.ebay.co.uk]
> n-Wireless-USB-Adapter-/180977321533?pt=UK_Computi
> ng_USB_Wi_Fi_Adapters_Dongles&hash=item2a2316c63d#
> ht_3182wt_1243

from elinux TL-WN722N (ath9k_htc device with htc_9271.fw file from [linuxwireless.org]); needs powered USB Hub (cool smiley
Re: Raspberry Pi PirateBox
October 07, 2012 12:26AM
Hi
I had istall PB on Raspberry Pi with Belkin Components F5D7050 Wireless G Adapter v3000 [Ralink RT2571W]

Seems so PB runs, when i start piratebox i got


pi@raspberrypi /opt/piratebox $ sudo /etc/init.d/piratebox start
[....] Starting script piratebox :
Generating hosts file ....
Generating dnsmasq.conf .....
Empty tmp folder
rm: Entfernen von „/opt/piratebox/tmp/“ nicht möglich: Ist ein Verzeichnis
[....] Setting up wlan:Bringing up wifi interface wlan0
Setting up wlan0
[ ok ] Starting hostap... :.
[ ok ] Starting dnsmasq... :.
[ ok ] Starting droopy...:.
[....] Starting lighttpd...:2012-10-07 00:15:47: (network.c.379) can't bind to port: 80 Address already in use
(warning).

I can see APN but i can not connect to. I had try connect usb-wlan with usb-hub and without.


pi@raspberrypi /opt/piratebox $ lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 0424:9512 Standard Microsystems Corp.
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp.
Bus 001 Device 004: ID 058f:6254 Alcor Micro Corp. USB Hub
Bus 001 Device 005: ID 058f:6254 Alcor Micro Corp. USB Hub
Bus 001 Device 006: ID 050d:705a Belkin Components F5D7050 Wireless G Adapter v3000 [Ralink RT2571W]


pi@raspberrypi /opt/piratebox $ sudo iw phy
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 (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: 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:
* 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: Raspberry Pi PirateBox
October 07, 2012 01:07PM
Hi,
did you follow the install-howto point to point or at which point did you started the owrk on it again?

After running my commands described on the howto, the piratebox-scripts get started while booting the device.

....] Starting lighttpd...:2012-10-07 00:15:47: (network.c.379) can't bind to port: 80 Address already in use 
(warning).
Mentioned that there is already a lighttpd running. This can be the piratebox-started-one or the default one (when forgot to stop and disable it).

Then you should post the result of
# iwconfig
too.

Please check this stuff first, then we try to find the problem with connecting to the box
Re: Raspberry Pi PirateBox
October 07, 2012 01:32PM
Now i had new install PB on RPi with another wlan RT5370 as tutorial, point to point.
PB start ok:


pi@raspberrypi ~ $ sudo /etc/init.d/piratebox start
[....] Starting script piratebox :
Generating hosts file ....
Generating dnsmasq.conf .....
Empty tmp folder
rm: cannot remove `/opt/piratebox/tmp/': Is a directory
[....] Setting up wlan:Bringing up wifi interface wlan0
Setting up wlan0
[ ok ] Starting hostap... :.
[ ok ] Starting dnsmasq... :.
[ ok ] Starting droopy...:.
[ ok ] Starting lighttpd...:.

I can see AP but can not connect to: PC or Android Phone allways trying get IP but get no.

pi@raspberrypi ~ $ ifconfig
eth0 Link encap:Ethernet HWaddr b8:27:eb:4e:19:01
inet addr:192.168.2.38 Bcast:192.168.2.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:869 errors:0 dropped:0 overruns:0 frame:0
TX packets:734 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:62204 (60.7 Kicool smiley TX bytes:93603 (91.4 Kicool smiley

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 cool smiley TX bytes:0 (0.0 cool smiley

mon.wlan0 Link encap:UNSPEC HWaddr 7C-DD-90-1D-8D-83-00-00-00-00-00-00-00-00-00-00
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:2164 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:289184 (282.4 Kicool smiley TX bytes:0 (0.0 cool smiley

wlan0 Link encap:Ethernet HWaddr 7c:dd:90:1d:8d:83
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 cool smiley TX bytes:0 (0.0 cool smiley

pi@raspberrypi ~ $ iwconfig
lo no wireless extensions.

wlan0 IEEE 802.11bgn ESSIDyawning smileyff/any
Mode:Managed Access Point: Not-Associated Tx-Power=20 dBm
Retry long limit:7 RTS thryawning smileyff Fragment thryawning smileyff
Power Managementyawning smileyn

eth0 no wireless extensions.

mon.wlan0 IEEE 802.11bgn Mode:Monitor Tx-Power=20 dBm
Retry long limit:7 RTS thryawning smileyff Fragment thryawning smileyff
Power Managementyawning smileyn
Re: Raspberry Pi PirateBox
October 07, 2012 03:06PM
I also started getting

Quote
dimidu
Starting lighttpd...:2012-10-07 00:15:47: (network.c.379) can't bind to port: 80 Address already in use
(warning).
And as far as I have seen lighttpd is not running (killall lighttpd can't find it)

Also, not being able to connect to the PB network might be caused by permission rights to the piratebox folder. At least this did occur to me when I was playing around with new img files recently.
chmod 777
solved my connection problem.

Ubuntuhak, playing and tinkering with Ubuntu!
Re: Raspberry Pi PirateBox
October 07, 2012 04:51PM
Hi,
the problem is, that you wlan0 device isn't getting the set up ip-adress.
Can you please post your piratebox.conf

Matthias
Re: Raspberry Pi PirateBox
October 07, 2012 06:48PM
I had solved that now with change in piratebox.conf
DROOPY_USE_USER="no"

i had change to "yes"

and

sudo /etc/init.d/piratebox stop
sudo /etc/init.d/piratebox start
Re: Raspberry Pi PirateBox
November 21, 2012 09:38PM
I'm having a bit of trouble with my Raspberry Pi Pirate Box.
It is broadcasting the Piratebox freeshare network, but I cannot connect to it. (I am using the TP-Link TL-WN722N)

Here is my piratebox.conf file

#########
## Config for pirate-box WWW Release
##  written by Matthias Strubel  (matthias.strubel@aod-rpg.de) 2011-02-22 
##  licenced by gpl ; feel free to improve or send me feedback
##
##  2012-04-12 Created
##  2012-06-08 Changed IP Stuff to generating dnsmasq.conf stuff
##             ADDed SubConfig for IPV6 config
##             Changed Order of config
##  
########

#######
## Configuration help
##    If you plan to use one laptop as the piratebox:
##        Set DO_IFCONFIG , USE_APN, USE_DNSMASQ to yes
##    If you plan to run a two component setup (one router and one providing the storage+website)
##     connected with ethernet:
##        Set DO_IFCONFIG , USE_APN, USE_DNSMASQ  to no
##        Configure your ethernet eth0 (or whatever) to a static IP
##        force your router to publish the  HOST Option with your static IP; in case of dnsmasq add the /etc/hosts entrys 
##        Have a look at [wiki.daviddarts.com] for futher instructions
##    
##    You may deactivated severall option as needed. It's flexible.


#----------------- Folder Configuration  -------------------#

PIRATEBOX_FOLDER="/opt/piratebox"
WWW_FOLDER="/opt/piratebox/www"


#Datafolder  , where is you usb-stick // drive mounted
SHARE_FOLDER="$PIRATEBOX_FOLDER/share"

#Upload Folder
# Change this if you want to user uploaded data in a subfolder
#   Make sure the folder exists
# UPLOADFOLDER="$SHARE_FOLDER/Upload"
UPLOADFOLDER="$SHARE_FOLDER/Shared"

#----------------- Startup Configuration  -------------------#
# Which Steps has to be done

#Do network config 
DO_IFCONFIG="yes"

#Do IW config - setting up a wlan0 interface with iw
#  for some wifi-cards required
DO_IW="no"
#Iw physical interface  
PHY_IF="phy0"

#Start services...
#   act like a apn  / <yes|no>
#    please have a look @ hostapd.conf ; you may need to change some options, regarding wifi-card 
USE_APN="yes"
#   act like dns&dhcp (dnsmasq) 
USE_DNSMASQ="yes"

#HOSTNAME  ... if you really want to change it, plz change:
#    bin/droopy
#    conf/hosts
HOST="piratebox.lan"


#Option for enabling special checks under openwrt
OPENWRT="no"

#----------------- Configuration for DNSMASQ & IF-Setup  -------------------#
# Name of the wlan interface
INTERFACE="wlan0"
# On which interface DNSMASQ should listen. -i is the parameter for dnsmasq
# Make it empty to disable
DNSMASQ_INTERFACE="wlan0"

#Brdige add interfacce (setr yes to enable bridging)
DO_BRIDGE="no" 
BRIDGE="br-lan"

#Network
NET=192.168.77

#IP-SHORT (is stringed together)
#  Which IP is your Box??  i.e. 1 => 192.168.77.1
IP_SHORT=1

#DHCP LEASE Start
START_LEASE=10
#DHCP LEASE End Range
END_LEASE=250
#Leasetime  (When should the client renew it's IP)
LEASE_DURATION=12h

# Define the netmask
NETMASK=255.255.255.0

#SET IP for ifconfig stuff - DON'T CHANGE
IP=$NET.$IP_SHORT 

#Load Config about ipv6 stuff - DON'T CHANGE
 . $PIRATEBOX_FOLDER/conf/ipv6.conf


#----------------- Configuration for the pure piratebox -------------------#
## droopy, webserver, shoutbox- and forum-server 


#Start droopy? - Enable upload?
DROOPY_ENABLED="yes"
#Image-SRC
IMAGENAME="piratebox-logo-small.png"
IMAGE="$PIRATEBOX_FOLDER/src/$IMAGENAME"
DROOPY_TXT=""
DROOPY_PORT="8080"
DROOPY_USERDIR=""
# Uncomment line below for adding directory feature
#DROOPY_USERDIR=" -u True "

#Use UserId from lighttpd for droopy  (use on ext-filesystems)
DROOPY_USE_USER="yes"

#Configuration for chat  (If you decide to move the chat folder, you have to change /opt/piratebox/chat/cgi-bin/py* files )
CHATFILE="$WWW_FOLDER/cgi-bin/data.pso"

# Reset Shoutbox on Startup?
RESET_CHAT="yes"

#Inititiation Chat-Message
CHATMSG="<date>00:00:00</date>&nbsp;&nbsp;<name>PirateBox:</name>&nbsp;&nbsp;&nbsp;<data class='def'>Chat and share files anonymously!</data><br>" 

#------------------------ Additional configuration for lighttpd 
LIGHTTPD_USER=nobody
LIGHTTPD_GROUP=nogroup


#------------------------ Hook in user-config
.  $PIRATEBOX_FOLDER/conf/hook_custom.conf

Re: Raspberry Pi PirateBox
November 22, 2012 05:55AM
Hi,
what do you exactly mean with "you cannot connect" ?
Don't you get a IP?
Don't you are able to connect via wifi?

Can you please post the output of

"ps"
"ifconfig"

on your raspberry ?

Thanks