Project

General

Profile

Actions

Bug #347

closed

Fix access point usage

Added by Hammel over 10 years ago. Updated about 10 years ago.

Status:
Closed
Priority:
Immediate
Assignee:
Category:
04 - Root File System
Target version:
Start date:
29 Jun 2014
Due date:
30 Jun 2014
% Done:

100%

Estimated time:
Severity:
02 - High

Description

Either I've broken something or just forgot how to use the access point, but it doesn't seem to be working. Might be an issue with which wireless usb stick to use. Look in closed issues to get a refresher.

Actions #1

Updated by Hammel over 10 years ago

  • Subject changed from Fix acces point usage to Fix access point usage
Actions #2

Updated by Hammel about 10 years ago

  • Severity changed from 01 - Critical to 02 - High
Actions #3

Updated by Hammel about 10 years ago

  • Status changed from New to In Progress
  • % Done changed from 0 to 30

I found the problem. Hostapd 2.0 doesn't work if wpa_supplicant is running. So I killed wpa_supplicant and started hostapd and that got it running again. The question is whether or not it will accept connections. Based on this post for ArchLinux it seems it should. I just need a test for that. Probably testing to see if the PiBox ssid is visible and then trying to connect to it from my laptop.

Actions #4

Updated by Hammel about 10 years ago

  • % Done changed from 30 to 50
Things that need to be fixed:
  1. when switching to AP the network restart doesn't kill wpa_supplicant
  2. Start dhcpd fails because /var/lib/dhcp doesn't exist and the leases file needs to be created (/var/lib/dhcp/dhcpd.leases)
  3. The static IP address from bui-network-config might not work with the address range in dhcpd.conf. The default IP address for the AP should be 192.168.3.1.

Do all this and the host goes into AP mode and starts serving up dhcp addresses.

Actions #5

Updated by Hammel about 10 years ago

I fixed most of the problem except those with bui-network-config and the static IP address. The system comes up correctly when switching back and forth between client and ap modes. However, in ap mode I can't connect from another device. My devices can see the PiBox but no connection happens. There is nothing in the logs either. The debug option (-dd) doesn't really tell me anything obvious.

I'll have to go back to reading how to setup hostap mode:
  1. http://dishingtech.blogspot.com/2012/01/realtek-wi-fi-direct-programming-guide.html
  2. https://bbs.archlinux.org/viewtopic.php?pid=1225271#p1225271
  3. https://bbs.archlinux.org/viewtopic.php?pid=1221799
    See also RM #196
Actions #6

Updated by Hammel about 10 years ago

  • % Done changed from 50 to 70

Got it working tonight. The trick was to add the following to /etc/hostsapd.conf

auth_algs=1
wpa_pairwise=TKIP
macaddr_acl=0
ignore_broadcast_ssid=0
hw_mode=g

Not sure exactly which fixed the problem but I know changing auth_aug back to 2 (as it is now) causes it not to work. I'm pretty sure that was the issue since the other options don't seem that important.

Since bui-network-config writes this file from the code without a template file I'll have to fix the code (and/or make it use a template file).

Actions #7

Updated by Hammel about 10 years ago

  • % Done changed from 70 to 80

Updated bui-network-config to write the defaults for these values. Tested on dev system. Need to verify on target.

Actions #8

Updated by Hammel about 10 years ago

  • Status changed from In Progress to Closed
  • % Done changed from 80 to 100

Verified working on target.

Closing issue.

Actions

Also available in: Atom PDF