WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: cannot get wifi iwlagn to work  (Read 7366 times)

Offline slamet

  • Newbie
  • *
  • Posts: 8
cannot get wifi iwlagn to work
« on: December 31, 2010, 01:06:45 AM »
Hello,

I have searched and read for iwlagn on this forum, including this thread: http://forum.tinycorelinux.net/index.php?topic=6555.0, but still cannot get my wifi to work either via wicd nor wpa_gui.

I have an HP 6930p notebook with Intel 5100 AGN (Shiloh) according to lspci.  Per above thread, I manually did 'sudo modprobe iwlagn' and did not get any error message.  I originally used 3.2 and just installed 3.4.

And one more thing, there is a "wifi" led on the machine and it is indicating that it is turned off.  Nothing I did can turn it on and this thing is usually turned on by software.

Thank you for any help.

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14815
Re: cannot get wifi iwlagn to work
« Reply #1 on: December 31, 2010, 02:57:07 AM »
Are there any messages concerning wifi from dmesg?

Offline slamet

  • Newbie
  • *
  • Posts: 8
Re: cannot get wifi iwlagn to work
« Reply #2 on: January 02, 2011, 06:59:29 PM »
Yes, see attached files for "dmesg | grep iwl" and "iwconfig" output.

If I do "ifconfig", wlan0 does not show up at all.
If I do "ifconfig wlan0 up", I get "ifconfig: SIOCSIFFLAGS: permission denied".
If I do "sudo ifconfig wlan0 up", I get "ifconfig: SIOCSIFFLAGS: Unknown error 132".

Many thanks.

Offline maro

  • Hero Member
  • *****
  • Posts: 1228
Re: cannot get wifi iwlagn to work
« Reply #3 on: January 02, 2011, 07:36:04 PM »
(1) Any 'ifconfig ... up' needs to be executed as super-user, therefore always use 'sudo ifconfig ... up' (as you've done in your last attempt).
(2) Have you got the 'firmware-iwlwifi.tcz' extension installed before you did your 'sudo ifconfig ... up'? Because as the 'dmesg' output indicates it's really "crying out loud" for the 'iwlwifi-5000-2.ucode' file (which should be included in said extension).

Offline slamet

  • Newbie
  • *
  • Posts: 8
Re: cannot get wifi iwlagn to work
« Reply #4 on: January 03, 2011, 08:40:25 AM »
(2) Have you got the 'firmware-iwlwifi.tcz' extension installed before you did your 'sudo ifconfig ... up'? Because as the 'dmesg' output indicates it's really "crying out loud" for the 'iwlwifi-5000-2.ucode' file (which should be included in said extension).
Apparently not, since I did not realise it existed and needed.  Just added it and rebooted. 

a. But "sudo ifconfig wlan0 up" still gives me "ifconfig: SIOCSIFFLAGS: Unknown error 132".  Wifi led still says it is off.
b. Don't know why I tried it, but attached file is the output of "sudo ifconfig wlan0", if it's of any use.

Thanks.

Offline maro

  • Hero Member
  • *****
  • Posts: 1228
Re: cannot get wifi iwlagn to work
« Reply #5 on: January 03, 2011, 05:51:31 PM »
The more important information for your sort of problem is in the 'dmesg' output, so please post that as well.

EDIT: Futhermore please double-check that the firmware is installed (e.g. via find /usr/local -name iwlwifi-5000-*.ucode) before you use 'sudo ifconfig wlan0 up'.
« Last Edit: January 03, 2011, 05:59:23 PM by maro »

Offline slamet

  • Newbie
  • *
  • Posts: 8
Re: cannot get wifi iwlagn to work
« Reply #6 on: January 04, 2011, 04:47:29 AM »
Ah sorry, somehow that attachment did not upload.  My bad.  Attached are the dmesg output and the "find /usr/local -name iwlwifi*".  Thanks.

Offline Arslan S.

  • Hero Member
  • *****
  • Posts: 825
Re: cannot get wifi iwlagn to work
« Reply #7 on: January 04, 2011, 10:11:07 AM »
is there a hard switch on your notebook ? if there is check if it is on state

Offline maro

  • Hero Member
  • *****
  • Posts: 1228
Re: cannot get wifi iwlagn to work
« Reply #8 on: January 04, 2011, 05:47:22 PM »
is there a hard switch on your notebook ? if there is check if it is on state

I initially thought the same, in particular when reading the 'RF_KILL bit toggled to disable radio' message in the 'dmesg' output. But with a bit of google-ing I saw this thread and that indicates to me that there might be some other messages possible (e.g. like 'Radio disabled by HW RF Kill switch').

OTOH, I just managed to get the same "ifconfig: SIOCSIFFLAGS: Unknown error 132" error if I try to bring up the interface but have not enabled the WiFi by pressing a button on the notebook (which then lights up a blue LED in my case). It might be that for other OS (e.g. M$) this enabling is done by default. Another indication for this state would be 'Tx-Power=off' in the 'iwconfig' output (compared to 'Tx-Power=12 dBm' after the enabling button was pressed).

@slamet: If all these pointers are not leading to success I'd like to get a "fuller picture" and wonder if you could attach the complete 'dmesg' output (i.e. from booting til after the 'sudo ifconfig ... up'). It might be even worthwhile to use boot code 'printk.time=1' to get timestamps on the messages. Furthermore I wonder if you could also attach the output of 'lsmod', 'ifconfig -a' and 'iwconfig' (all of those after the 'sudo ifconfig ... up' failure).

Offline slamet

  • Newbie
  • *
  • Posts: 8
Re: cannot get wifi iwlagn to work
« Reply #9 on: January 05, 2011, 07:58:35 AM »
Yes, on MS Windows, the "switch" is turned "on" by the OS.  (This machine is a Win7 machine.)  Once it's on, I can turn it on or off by pushing this "switch".  Not exactly a hardware switch, but more like something to signal to the OS, I think - not my favourite HP laptop.  The "switch" is software controlled.

I think it worked almost similarly on KUbuntu 10.10 which was able to get the wifi working on this exact machine.  I have since lost my KUbuntu set up and have not bothered to reinstall it since I like Tiny Core better, so I would like to invest the time to get it working within my limited technical skill, if possible.

Attached are the requested output messages.  With regard to the boot code, my Tiny never go to "boot" prompt mode once it is installed, so I don't know how to do it.  But all of these commands were done within a minute of each other.

Thanks again for all your help.

Offline Arslan S.

  • Hero Member
  • *****
  • Posts: 825
Re: cannot get wifi iwlagn to work
« Reply #10 on: January 05, 2011, 09:47:17 AM »
i can turn wifi on and off with fn+f2 keys of my laptop (which executes `rfkill block(unblock) wifi`), this is soft switch for linux maybe ?, also i have an hard switch.

there is no extension containing rfkill in the tcl repository, but copying ubuntu rfkill to /sbin works just fine fortunately, i am thinking of packaging rfkill as an extension later

when you have rfkill can you try these commands
Code: [Select]
rfkill list
sudo rfkill block all
sudo rfkill unblock all

if you can not reach ubuntu rfkill try arch linux rfkill
http://www.archlinux.org/packages/core/i686/rfkill/
click on download from mirror link
« Last Edit: January 05, 2011, 09:54:50 AM by Arslan S. »

Offline slamet

  • Newbie
  • *
  • Posts: 8
Re: cannot get wifi iwlagn to work [solved]
« Reply #11 on: January 06, 2011, 08:54:48 AM »
Fn + F2 did not work.  Copying KUbuntu's /sbin/rfkill and following the prescribed steps worked.  THANK YOU all. 

I put the steps into a script file but it did not work at all, so I have to do the steps manually for the time being until I can figure something else.  (Still learning here.)  Connection reliability via wicd is flaky compared to my other laptop, but this is a good start.  Now I can get on to fine tuning other things.

Again thank you all.  Talk to you on another thread.

Offline Arslan S.

  • Hero Member
  • *****
  • Posts: 825
Re: cannot get wifi iwlagn to work
« Reply #12 on: January 06, 2011, 04:59:06 PM »
i have submitted rfkill extension with an init script which you can put in your bootlocal.sh to automate unblock wifi on boot

Offline grandma

  • Full Member
  • ***
  • Posts: 213
  • Never forget Grandma Loves You & made that candy4U
    • Back when a 10MB HD was $500 bucks
Re: cannot get wifi iwlagn to work
« Reply #13 on: April 08, 2011, 10:25:39 AM »
SOLVED:

run either at a command line or in a script. I call mine

wifion.sh

#!/bin/sh
tce-load -i wireless-2.6.33.3-tinycore.tcz
tce-load -i wireless_tools.tcz
sleep 5
sudo iwconfig wlan0 essid "Your Wifi Hot Spot" rts 250 frag 400 txpower 100mW
sleep 5
sudo udhcpc -b -i wlan0
ping -c4 google.com

txpower, rts and frag are not required and some devices are unlikely to accept them - may cause error message - I use them to force my antenna to go high power to shoot a 1/4 mile signal across a lot of cross traffic interference where many antennas are sharing the same channels. the smaller frag and rts settings reduce packet size - and speed - but increase reliability.

I run the script before loading Firefox and re-run it with a click if my signal drops - works like a charm every time, although if you move around to other hot spots you would have to edit and change the wifi essid name in quotes - simple enough with this command

To edit:

use file manager or find the file and type

editor wifion.sh &

To run

click in file manager or in terminal type

./wifion.sh

for new users learning to use the ./ before running a script caused me a bit of grief - learning curve.

For some reason when I just click in file manager it just blinks and does nothing - sometimes - so I usually have to go to a terminal after finding the file. Someone here could probably teach you to make it a desktop icon.

Also at a terminal after loading wifi tools and firefox, you may want to review the commands

iwlist

iwlist scanning

ifconfig

and other commands found at a pretty good tutorial

http://www.linuxhomenetworking.com/wiki/index.php/Quick_HOWTO_:_Ch13_:_Linux_Wireless_Networking

that covers a lot of ground and common problems including using ndiswrapper - which I did not have to do.

You may want to look at this command

dmesg | tail -50

to see if your system recognizes and creates and association with any WLAN devices when you boot.

If your system sees it the wifi tools or other aps should be able to find it as well and you can even check your signal strength and quality in the results of some of those commands. If you have a device, signal and have quality, the script should connect you - at least it does here every time.

...thank you Juanito and Lee.
« Last Edit: May 06, 2011, 10:07:06 PM by grandma »
~ Luv Grandma
"When children of all nations
play in the sandbox together
all morning-all day-all week, and
one fine sunny day; all year long ...
... then war will become an ancient memory
and Grandma can knit that sweater
you'll hold near to your heart
until long after you're my age.