LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices

Reply
 
Search this Thread
Old 12-09-2010, 07:08 AM   #1
yifanlu
LQ Newbie
 
Registered: Dec 2010
Posts: 6

Rep: Reputation: 0
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!
 
Old 12-10-2010, 05:30 PM   #2
serafean
Member
 
Registered: Mar 2006
Location: Czech Republic
Distribution: Gentoo, Chakra
Posts: 871
Blog Entries: 9

Rep: Reputation: 103Reputation: 103
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
 
Old 12-10-2010, 11:40 PM   #3
yifanlu
LQ Newbie
 
Registered: Dec 2010
Posts: 6

Original Poster
Rep: Reputation: 0
Thanks! May I have a link?
 
Old 12-11-2010, 10:04 AM   #4
serafean
Member
 
Registered: Mar 2006
Location: Czech Republic
Distribution: Gentoo, Chakra
Posts: 871
Blog Entries: 9

Rep: Reputation: 103Reputation: 103
hostapd
 
Old 12-11-2010, 12:06 PM   #5
yifanlu
LQ Newbie
 
Registered: Dec 2010
Posts: 6

Original Poster
Rep: Reputation: 0
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.

Last edited by yifanlu; 12-11-2010 at 12:13 PM.
 
Old 12-11-2010, 01:42 PM   #6
yifanlu
LQ Newbie
 
Registered: Dec 2010
Posts: 6

Original Poster
Rep: Reputation: 0
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?
 
Old 12-12-2010, 10:47 AM   #7
serafean
Member
 
Registered: Mar 2006
Location: Czech Republic
Distribution: Gentoo, Chakra
Posts: 871
Blog Entries: 9

Rep: Reputation: 103Reputation: 103
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

Last edited by serafean; 12-12-2010 at 10:48 AM.
 
Old 12-15-2010, 05:23 PM   #8
yifanlu
LQ Newbie
 
Registered: Dec 2010
Posts: 6

Original Poster
Rep: Reputation: 0
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.

Last edited by yifanlu; 12-15-2010 at 10:03 PM.
 
Old 12-16-2010, 11:40 AM   #9
serafean
Member
 
Registered: Mar 2006
Location: Czech Republic
Distribution: Gentoo, Chakra
Posts: 871
Blog Entries: 9

Rep: Reputation: 103Reputation: 103
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
 
Old 12-16-2010, 11:44 PM   #10
yifanlu
LQ Newbie
 
Registered: Dec 2010
Posts: 6

Original Poster
Rep: Reputation: 0
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

Last edited by yifanlu; 12-16-2010 at 11:46 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Distro to create Wireless Access Point - Atheros AR5212 PCI NIC theNbomr Linux - Wireless Networking 5 01-19-2010 09:58 AM
atheros access point authmode wep problem /y0shi Slackware 1 04-15-2008 04:40 AM
problem "creating" an access point with dnsmasq samel_tvom Linux - Networking 2 01-13-2008 11:08 AM
Madwifi ad-hoc mode wuth Atheros Chipset mkirc Linux - Wireless Networking 6 05-01-2006 04:04 AM
Using an Atheros WLAN card as Access Point firebolt Linux - Hardware 0 03-27-2004 02:34 PM


All times are GMT -5. The time now is 11:45 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration