Page 1 of 1
SqueezeOS access point
Posted: Thu Jan 07, 2016 1:37 am
by ddichiera
I'm having trouble setting up an access point on my SqueezeOS Joggler.
I've followed the instructions on this page
http://www.jogglerwiki.com/forum/viewto ... &start=160, but no luck.
I keep getting a syntax error when I run the Bash script.
joggler@openframe2:~$ sudo /opt/squeezeplay/bin/install_ap.sh
/opt/squeezeplay/bin/install_ap.sh: 12: /opt/squeezeplay/bin/install_ap.sh: Syntax error: "(" unexpected
Any suggestions?
Re: SqueezeOS access point
Posted: Thu Jan 07, 2016 7:34 am
by pete
From reading the thread it was tested on an OpenPeak device rather than an O2 Joggler. I have two types of USB WLAN sticks inside of those. The same as the regular O2 Joggler and some that have the antennas built in to the stick.
I had issues trying this with my PFSense firewall (BSD). Here is a list of AP working WLAN devices.
https://docs.google.com/spreadsheets/d/ ... li=1#gid=0
Re: SqueezeOS access point
Posted: Sat Jan 09, 2016 9:35 pm
by ddichiera
Thanks, but I don't think that's what was happening here.
I did a fresh install and now I can run the bash script, but I can't do an update or install hostapt or bridge-utils.
Spent about a day on this so far, with no success.
Code: Select all
root@openframe:/home/joggler# apt-get -y update
Err http://ubuntu.datahop.net trusty InRelease
Err http://ubuntu.datahop.net trusty-updates InRelease
Err http://ubuntu.datahop.net trusty-backports InRelease
Err http://ubuntu.datahop.net trusty-security InRelease
Err http://ubuntu.datahop.net trusty Release.gpg
Cannot initiate the connection to ubuntu.datahop.net:80 (2a01:450:10:1::10). - connect (101: Network is unreachable) [IP: 2a01:450:10:1::10 80]
Err http://ubuntu.datahop.net trusty-updates Release.gpg
Cannot initiate the connection to ubuntu.datahop.net:80 (2a01:450:10:1::10). - connect (101: Network is unreachable) [IP: 2a01:450:10:1::10 80]
Err http://ubuntu.datahop.net trusty-backports Release.gpg
Cannot initiate the connection to ubuntu.datahop.net:80 (2a01:450:10:1::10). - connect (101: Network is unreachable) [IP: 2a01:450:10:1::10 80]
Err http://ubuntu.datahop.net trusty-security Release.gpg
Cannot initiate the connection to ubuntu.datahop.net:80 (2a01:450:10:1::10). - connect (101: Network is unreachable) [IP: 2a01:450:10:1::10 80]
Reading package lists... Done
W: Failed to fetch http://ubuntu.datahop.net/ubuntu/dists/trusty/InRelease
W: Failed to fetch http://ubuntu.datahop.net/ubuntu/dists/trusty-updates/InRelease
W: Failed to fetch http://ubuntu.datahop.net/ubuntu/dists/trusty-backports/InRelease
W: Failed to fetch http://ubuntu.datahop.net/ubuntu/dists/trusty-security/InRelease
W: Failed to fetch http://ubuntu.datahop.net/ubuntu/dists/trusty/Release.gpg Cannot initiate the connection to ubuntu.datahop.net:80 (2a01:450:10:1::10). - connect (101: Network is unreachable) [IP: 2a01:450:10:1::10 80]
W: Failed to fetch http://ubuntu.datahop.net/ubuntu/dists/trusty-updates/Release.gpg Cannot initiate the connection to ubuntu.datahop.net:80 (2a01:450:10:1::10). - connect (101: Network is unreachable) [IP: 2a01:450:10:1::10 80]
W: Failed to fetch http://ubuntu.datahop.net/ubuntu/dists/trusty-backports/Release.gpg Cannot initiate the connection to ubuntu.datahop.net:80 (2a01:450:10:1::10). - connect (101: Network is unreachable) [IP: 2a01:450:10:1::10 80]
W: Failed to fetch http://ubuntu.datahop.net/ubuntu/dists/trusty-security/Release.gpg Cannot initiate the connection to ubuntu.datahop.net:80 (2a01:450:10:1::10). - connect (101: Network is unreachable) [IP: 2a01:450:10:1::10 80]
W: Some index files failed to download. They have been ignored, or old ones used instead.
Re: SqueezeOS access point
Posted: Sun Jan 10, 2016 2:16 am
by ddichiera
Ok, I updated the sources list with the following lines and I can now update. (I think I was in Australia when I built the current pendrive and now I'm in Italy - does that make any difference?)
Code: Select all
#------------------------------------------------------------------------------#
# OFFICIAL UBUNTU REPOS #
#------------------------------------------------------------------------------#
###### Ubuntu Main Repos
deb http://it.archive.ubuntu.com/ubuntu/ trusty main restricted universe multiverse
deb-src http://it.archive.ubuntu.com/ubuntu/ trusty main restricted universe multiverse
###### Ubuntu Update Repos
deb http://it.archive.ubuntu.com/ubuntu/ trusty-updates main restricted universe multiverse
deb-src http://it.archive.ubuntu.com/ubuntu/ trusty-updates main restricted universe multiverse
Then I replaced the hostapd.conf file with these parameters from here:
https://seravo.fi/2014/create-wireless- ... nt-hostapd
Code: Select all
interface=wlan0
ssid=Example-WLAN
hw_mode=g
wpa=2
wpa_passphrase=PASS
wpa_key_mgmt=WPA-PSK WPA-EAP WPA-PSK-SHA256 WPA-EAP-SHA256
That got me to the point that hostapd would run with the following command:
Code: Select all
hostapd -d /etc/hostapd/hostapd.conf
Now I'm getting these errors:
Code: Select all
root@openframe:/home/joggler# hostapd -d /etc/hostapd/hostapd.conf
random: Trying to read entropy from /dev/random
Configuration file: /etc/hostapd/hostapd.conf
rfkill: initial event: idx=0 type=1 op=0 soft=0 hard=0
nl80211: Supported cipher 00-0f-ac:1
nl80211: Supported cipher 00-0f-ac:5
nl80211: Supported cipher 00-0f-ac:2
nl80211: Supported cipher 00-0f-ac:4
nl80211: Using driver-based off-channel TX
nl80211: interface wlan0 in phy phy0
nl80211: Set mode ifindex 3 iftype 3 (AP)
nl80211: Failed to set interface 3 to mode 3: -16 (Device or resource busy)
nl80211: Try mode change after setting interface down
nl80211: Set mode ifindex 3 iftype 3 (AP)
nl80211: Mode change succeeded while interface is down
nl80211: Setup AP(wlan0) - device_ap_sme=0 use_monitor=0
nl80211: Subscribe to mgmt frames with AP handle 0x9cd0d90
nl80211: Register frame type=0xb0 nl_handle=0x9cd0d90 match=
nl80211: Register frame type=0x0 nl_handle=0x9cd0d90 match=
nl80211: Register frame type=0x20 nl_handle=0x9cd0d90 match=
nl80211: Register frame type=0xa0 nl_handle=0x9cd0d90 match=
nl80211: Register frame type=0xc0 nl_handle=0x9cd0d90 match=
nl80211: Register frame type=0xd0 nl_handle=0x9cd0d90 match=
nl80211: Register frame type=0x40 nl_handle=0x9cd0d90 match=
nl80211: Add own interface ifindex 3
phy: phy0
BSS count 1, BSSID mask 00:00:00:00:00:00 (0 bits)
nl80211: Regulatory information - country=00
nl80211: 2402-2472 @ 40 MHz 20 mBm
nl80211: 2457-2482 @ 40 MHz 20 mBm
nl80211: 2474-2494 @ 20 MHz 20 mBm
nl80211: 5170-5250 @ 160 MHz 20 mBm
nl80211: 5250-5330 @ 160 MHz 20 mBm
nl80211: 5490-5730 @ 160 MHz 20 mBm
nl80211: Added 802.11b mode based on 802.11g information
ACS was disabled on your build, rebuild hostapd with CONFIG_ACS=y or set channel
wlan0: IEEE 802.11 Configured channel (0) not found from the channel list of current mode (1) IEEE 802.11g
wlan0: IEEE 802.11 Hardware does not support configured channel
Could not select hw_mode and channel. (-3)
wlan0: Unable to setup interface.
hostapd_interface_deinit_free(0x9ccf6f0)
hostapd_interface_deinit_free: num_bss=1 conf->num_bss=1
hostapd_interface_deinit(0x9ccf6f0)
hostapd_bss_deinit: deinit bss wlan0
wlan0: Flushing old station entries
nl80211: flush -> DEL_STATION wlan0 (all)
wlan0: Deauthenticate all stations
nl80211: send_mlme - noack=0 freq=0 no_cck=0 offchanok=0 wait_time=0 fc=0xc0 nlmode=3
nl80211: send_mlme -> send_frame
nl80211: send_frame - Use bss->freq=0
nl80211: send_frame -> send_frame_cmd
nl80211: Frame command failed: ret=-22 (Invalid argument) (freq=0 wait=0)
wpa_driver_nl80211_set_key: ifindex=3 (wlan0) alg=0 addr=(nil) key_idx=0 set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=3 (wlan0) alg=0 addr=(nil) key_idx=1 set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=3 (wlan0) alg=0 addr=(nil) key_idx=2 set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=3 (wlan0) alg=0 addr=(nil) key_idx=3 set_tx=0 seq_len=0 key_len=0
hostapd_cleanup(hapd=0x9cd02f8 (wlan0))
hostapd_free_hapd_data: Interface wlan0 wasn't started
hostapd_interface_deinit_free: driver=0x810c7e0 drv_priv=0x9cd0bf8 -> hapd_deinit
nl80211: Remove monitor interface: refcount=0
nl80211: Remove beacon (ifindex=3)
netlink: Operstate: ifindex=3 linkmode=0 (kernel-control), operstate=6 (IF_OPER_UP)
nl80211: Set mode ifindex 3 iftype 2 (STATION)
nl80211: Failed to set interface 3 to mode 2: -16 (Device or resource busy)
nl80211: Try mode change after setting interface down
nl80211: Set mode ifindex 3 iftype 2 (STATION)
nl80211: Mode change succeeded while interface is down
nl80211: Teardown AP(wlan0) - device_ap_sme=0 use_monitor=0
nl80211: Unsubscribe mgmt frames handle 0x81458519 (AP teardown)
hostapd_interface_free(0x9ccf6f0)
hostapd_interface_free: free hapd 0x9cd02f8
hostapd_cleanup_iface(0x9ccf6f0)
hostapd_cleanup_iface_partial(0x9ccf6f0)
hostapd_cleanup_iface: free iface=0x9ccf6f0
If I make any entries to the hostapd.conf file I get errors telling me it doesn't recognise the command
Re: SqueezeOS access point
Posted: Mon Jan 18, 2016 9:45 pm
by Juggler
Some time ago I promised to write about setting up a Joggler access point... (eyes shifting, inhaling air through teeth).
I've done it manually on BuZz's distros and it is a PITA.
However, I found that the create_ap script works a treat. But before this you need to use the rt2800usb rather then the rt2870sta driver. Driver rt2800usb supports the mode necessary for an AP to work, and to be honest I've found it to be perfectly usable.
See :
http://www.jogglerwiki.com/forum/viewto ... 580#p23981
For create_ap see :
https://github.com/oblique/create_ap
Haven't done this on SqPOS, but SqPOS is based on BuZz's ubuntu base distro.
There are some other guides on the net about create_ap. Also for doing manually I came across :
https://jon.sprig.gs/blog/post/235
HTH