LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (http://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   Atheros AR6000 creating access point/ad hoc? (http://www.linuxquestions.org/questions/linux-hardware-18/atheros-ar6000-creating-access-point-ad-hoc-849267/)

yifanlu 12-09-2010 07:08 AM

Atheros AR6000 creating access point/ad hoc?
 
Hello, I have a ARM Linux based cell phone with an Atheros AR6000 wifi chipset inside. I want to use it to share my internet connection, but never mind about that. Does anyone know if it's possible to either create an Access Point or create an Ad-Hoc connection so I can connect to it with my laptop? If so, how? I looked up iwconfig, trying 'iwconfig wlan0 mode Master essid "Access_Point"', but that didn't work. I don't mind recompiling the kernel or drivers, just tell me if it's possible at all. Thanks!

serafean 12-10-2010 05:30 PM

Hi, I recently made an AP from an atheros chip using the ath9k driver (check support for your chip). This driver, using the new wireless stack, doesn't support Master mode directly, but through hostapd. Hostapd comes with a pretty well documented *.conf file, so it's not too hard to set up.

Serafean

yifanlu 12-10-2010 11:40 PM

Thanks! May I have a link?

serafean 12-11-2010 10:04 AM

hostapd

yifanlu 12-11-2010 12:06 PM

Thanks, I tried hostapd (cross-compiled for ARM), and it gave me errors about writing to ioctl (I'm root). My chip is AR6002, how do I check compatibility?

Oh, nvm, found it: http://wireless.kernel.org/en/users/Drivers/ath6kl (Maybe, it says AR6003 support, but I don't know about AR6002)

Weired there's an "l" at the end. My driver is just ath6k. I'll compile this one.

yifanlu 12-11-2010 01:42 PM

I looked at my current ath6k driver, and it looks like it supports both AP and iBSS mode. If I use 'iwconfig wlan0 mode Ad-Hoc essid TEST channel 8', and then 'iwconfig', nothing changes. What's the correct way of creating an ad-hoc network with iwconfig?

serafean 12-12-2010 10:47 AM

Hi, to check your driver's capabilities, I haven't yet encountered a better tool than iw. for instance, my iwlagn powered card doesn't support adhoc :
Quote:

#iw phy0 info
Supported interface modes:
* IBSS
* managed
* monitor
(only partial output) I haven't yet figured out how the phy0 part selects its number, the first driver loaded gets 0, the second 1... I have never used more than one argument at a time with iwconfig. As such, I'd do 3 commands where you do one (not sure it makes a difference, can't hurt to try) :
Quote:

#iwconfig wlan0 mod Ad-hoc
#iwconfig wlan0 channel 8
#iwconfig wlan0 essid test
This way you can also see which step went wrong (if any does). Then try to set an IP address using ifconfig.

Serafean

yifanlu 12-15-2010 05:23 PM

Ok, so I managed to create an Ad-Hoc access point. Now how do I share my internet connection? Do I need dhcp-server if I want to assign ip?

I connected to the ad-hoc network "test" created by my cell phone. On the phone, I sat wlan0 with a static ip of 192.168.1.2. On my PC, I connected and sat a static ip of 192.168.1.3. However, from my computer, I can't ping 192.168.1.2.

serafean 12-16-2010 11:40 AM

check your phone's firewall settings. Try disabling the firewall on the computer, and pinging it from the phone. To shar your internet connection, you'll have to set up routing using the "route" command (or installing a DNS server) and Network Address Translation (firewall : iptables?).

Serafean

yifanlu 12-16-2010 11:44 PM

Thanks, it works now. problem was that I needed to set gateway to 0.0.0.0 (don't know why). Last problem: the software on the phone no longer have access to the wifi. I want to manually start and stop broadcasting to save battery. What's the best iwconfig command to control broadcasting on/off/power level? I see iwconfig wlan0 power xxx and txpower. But I don't know how to use it. I want to be able to: 1) turn transmission on/off and 2) control how powerful the transmission is


All times are GMT -5. The time now is 09:39 PM.