Author Topic: Always need #ifdown wlan0 #ifup wlan0  (Read 1481 times)

Offline werepacman

  • Full Member
  • ***
  • Posts: 80
Always need #ifdown wlan0 #ifup wlan0
« on: December 11, 2011, 02:14:15 PM »
PC with PClinuxOS shares internet though wifi card in adhoc mode, open connection.
But sharing doesn't work untill I restart interface with commands: #ifdown wlan0 #ifup wlan0

Offline T6

  • Super Villain
  • ******
  • Posts: 19077
  • xmas is comming!
Re: Always need #ifdown wlan0 #ifup wlan0
« Reply #1 on: December 11, 2011, 02:19:41 PM »
is it necessary to share it in adhoc mode?

is it a 3G modem on one pc and shared using the wifi adapter?

a little more info please

also tell us what adapter are you using and the kernel you have

lspci and uname -r in konsole can tell you more
"If you wish to make an apple pie from scratch, you must first invent the universe."

Carl Sagan

Offline werepacman

  • Full Member
  • ***
  • Posts: 80
Re: Always need #ifdown wlan0 #ifup wlan0
« Reply #2 on: December 11, 2011, 06:25:30 PM »
I'm not sure if my Atheros AR242x / AR542x card supports Master mode in Linux (ath5k driver).

Quote
iwconfig wlan0 mode managed
Error for wireless request "Set Mode" (8B06) :
    SET failed on device wlan0 ; Device or resource busy.

Internet comes through the LAN eth0 interface.


Quote
2.6.33.7-pclos6.pae

03:00.0 Ethernet controller: Marvell Technology Group Ltd. 88E8056 PCI-E Gigabit Ethernet Controller (rev 12)
05:00.0 Ethernet controller: Atheros Communications Inc. AR242x / AR542x Wireless Network Adapter (PCI-Express) (rev 01)
06:06.0 Ethernet controller: Compex RL100-ATX 10/100


Offline T6

  • Super Villain
  • ******
  • Posts: 19077
  • xmas is comming!
Re: Always need #ifdown wlan0 #ifup wlan0
« Reply #3 on: December 11, 2011, 06:33:21 PM »
that kernel is kinda old, you can try 2.6.38.8-pclos3.pae.bfs

also this situation sounds ideal for a cheap router, conect the modem to the router and then all machines will conect to the wireless network created by the router

d-link has lots of very cheap and good models that can be perfect with or without modification(dd-wrt)
"If you wish to make an apple pie from scratch, you must first invent the universe."

Carl Sagan

Offline AS

  • Hero Member
  • *****
  • Posts: 4111
  • Have a nice ... night!
Re: Always need #ifdown wlan0 #ifup wlan0
« Reply #4 on: December 11, 2011, 06:39:47 PM »
that kernel is kinda old, you can try 2.6.38.8-pclos3.pae.bfs



+1,

as far as I can remember 2.6.38.8-pclos3 specifically address some ath5k issues.

AS

EDIT: http://www.pclinuxos.com/forum/index.php/topic,94300.msg793383.html#msg793383
« Last Edit: December 11, 2011, 06:53:15 PM by as »

Online muungwana

  • Hero Member
  • *****
  • Posts: 6203
Re: Always need #ifdown wlan0 #ifup wlan0
« Reply #5 on: December 11, 2011, 06:49:34 PM »
I'm not sure if my Atheros AR242x / AR542x card supports Master mode in Linux (ath5k driver).

can you post the output of the following command?

iw list
.. 3 things are certain in life : death, taxes and software bloat ..
.. tell me something i don't know, something i can use as i struggle to reason with the world around me ..

Offline werepacman

  • Full Member
  • ***
  • Posts: 80
Re: Always need #ifdown wlan0 #ifup wlan0
« Reply #6 on: December 13, 2011, 02:19:34 AM »
Quote
iw list
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] (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
   Supported interface modes:
       * IBSS
       * managed
       * AP
       * AP/VLAN
       * monitor
       * mesh point
   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
       * Unknown command (68)
       * Unknown command (55)
       * Unknown command (57)
       * Unknown command (59)
       * Unknown command (67)
       * set_wiphy_netns
       * Unknown command (65)
       * Unknown command (66)
       * connect
       * disconnect


as far as I can remember 2.6.38.8-pclos3 specifically address some ath5k issues.

I installed last kernel 2.6.38.8-pclos3.pae.bfs

With this kernel ad-hoc mode doesn't work

Quote
# ifup wlan0
NETLINK: Packet too small or truncated! 64!=16!=1000

I think it archived its aim. LOL
« Last Edit: December 14, 2011, 07:23:54 AM by werepacman »

Online muungwana

  • Hero Member
  • *****
  • Posts: 6203
Re: Always need #ifdown wlan0 #ifup wlan0
« Reply #7 on: December 14, 2011, 04:01:47 AM »
   Supported interface modes:
       * IBSS
       * managed
       * AP
       * AP/VLAN
       * monitor
       * mesh point

it looks like your card support master mode(AP).
.. 3 things are certain in life : death, taxes and software bloat ..
.. tell me something i don't know, something i can use as i struggle to reason with the world around me ..

Offline werepacman

  • Full Member
  • ***
  • Posts: 80
Re: Always need #ifdown wlan0 #ifup wlan0
« Reply #8 on: December 14, 2011, 07:08:49 AM »
#iwconfig wlan0 mode master
Error for wireless request "Set Mode" (8B06) :
    SET failed on device wlan0 ; Invalid argument

What is the magic word to switch to AP mode? :-)


Or when I try
#iwconfig wlan0 mode managed
Error for wireless request "Set Mode" (8B06) :
    SET failed on device wlan0 ; Device or resource busy.

« Last Edit: December 14, 2011, 10:30:45 AM by werepacman »

Online muungwana

  • Hero Member
  • *****
  • Posts: 6203
Re: Always need #ifdown wlan0 #ifup wlan0
« Reply #9 on: December 14, 2011, 10:50:22 AM »

setting up your wilreless card to operate in master mode, ie mode where it acts as an access point is not trivial.

PCC has an option for it but it didnt work for me last time i tried it. The program i know that can do that is called "hostapd". Its a command line tool and only works from root's account and last time i checked,pclinuxos version did not have support for "nl80211" driver required by all mac80211 drivers and its configuration text file is too detailed for casual tinkerer.

If you are pressed for time and dont care that much about how things works, then i think you should continue what what you already know.

what error did you get when you update the kernel and ad hoc mode stopped working? "It doesnt work" is not very descriptive.
.. 3 things are certain in life : death, taxes and software bloat ..
.. tell me something i don't know, something i can use as i struggle to reason with the world around me ..

Offline werepacman

  • Full Member
  • ***
  • Posts: 80
Re: Always need #ifdown wlan0 #ifup wlan0
« Reply #10 on: December 15, 2011, 03:15:33 PM »
I don't see my ad-hoc (AP) with other devices.

The error log is
#ifup wlan0
NETLINK: Packet too small or truncated! 64!=16!=1000
« Last Edit: December 15, 2011, 03:42:08 PM by werepacman »