LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking > Linux - Wireless Networking
User Name
Password
Linux - Wireless Networking This forum is for the discussion of wireless networking in Linux.

Notices


Reply
  Search this Thread
Old 10-31-2004, 08:31 AM   #1
sleeper.service
LQ Newbie
 
Registered: May 2004
Distribution: Mandrake 9.2
Posts: 16

Rep: Reputation: 0
Automating config? (SMC 2662w .v4 on Mandrake 9.2)


Hello (and pardon for asking silly questions -- the answer is probably simple, but beyond my current experience).

To make a long story short... one robot which I currently build needed more processing power (image recognition causes Cyrix Geode 300 to enter undocumented "snail mode"). Thus I decided to move image processing onto server side -- naturally via WLAN.

Having studied the compatibility of various cards, I finally settled on SMC 2662W v.4 (little USB card, looks like this) -- for which I initially tried SMC drivers (but those crashed) and SourceForge drivers (but those didn't compile).

I then found the Berlios driver (http://at76c503a.berlios.de) and downloaded its current CVS snapshot. The install was fairly ordinary:
Quote:
make
make install
wondered why it crashes
removed drivers bundled with Mandrake
tried again, already saw the MAC address recognized
tried making a crude "ifcfg-wlan0" script, but it kept crashing
discovered a pattern in crashes
The pattern:

Boot machine with "ifcfg-wlan0" present --> crash.
Add file later, attach card with file present --> crash.
Attach card, add file, call "ifup wlan0" immediately (<10s) --> crash.
Attach card, add file, call "ifup wlan0" after some delay (>15s) --> works fine.

Seems related to USB hotplugging... but what exactly could be wrong?
Advise would be greatly appreciated.

My script:
Quote:
DEVICE=wlan0
BOOTPROTO=static
IPADDR=192.168.0.250
NETMASK=255.255.255.0
NETWORK=192.168.0.0
BROADCAST=192.168.0.255
GATEWAY=192.168.0.3
ONBOOT=no
WIRELESS_ESSID=")hub("
WIRELESS_MODE=Managed
WIRELESS_NICK="zog"
The script is located as usual: under "/etc/sysconfig/network-scripts".
File attributes were copied from a working "ifcfg-eth0".
The error exhibits itself so:

-- system freezes for 10 seconds
-- dmesg shows the following messages

Quote:
Oct 31 16:39:52 zog kernel: hub.c: new USB device 00:07.2-2.3, assigned address 4
Oct 31 16:39:52 zog kernel: usb-uhci.c: interrupt, status 2, frame# 44
Oct 31 16:39:56 zog kernel: usb-uhci.c: ENXIO 80000280, flags 0, urb cd0c6cc0, burb cd0c62c0
Oct 31 16:39:56 zog kernel: hub.c: usb_hub_port_status (2) failed (err = -6)
Oct 31 16:39:56 zog kernel: usb-uhci.c: ENXIO 80000200, flags 0, urb cd0c6cc0, burb cd0c62c0
Oct 31 16:39:57 zog kernel: at76c503.c: 200 ms delay for board type 7
Oct 31 16:39:57 zog kernel: at76c503.c: $Id: at76c503.c,v 1.72 2004/10/19 20:45:25 jal2 Exp $ compiled Oct 31 2004 04:25:30
Oct 31 16:39:57 zog kernel: at76c503.c: firmware version 1.102.0 #113 (fcs_len 4)
Oct 31 16:39:57 zog kernel: at76c503.c: device's MAC 00:04:e2:aa:00:93, regulatory domain ETSI (Europe - (Spain+France) (id 48)
Oct 31 16:39:57 zog kernel: at76c503.c: registered wlan0
Oct 31 16:39:57 zog /etc/hotplug/net.agent: invoke ifup wlan0
Oct 31 16:39:58 zog /etc/hotplug/usb.agent: Setup at76c505a-rfmd2958 for USB product 3eb/7614/100
Oct 31 16:40:01 zog kernel: NETDEV WATCHDOG: wlan0: transmit timed out
Oct 31 16:40:01 zog kernel: at76c503.c: wlan0: tx timeout.
Oct 31 16:40:02 zog kernel: usb_control/bulk_msg: timeout
Oct 31 16:40:02 zog kernel: at76c503.c: wlan0: get_cmd_status failed: -110
Oct 31 16:40:03 zog kernel: NETDEV WATCHDOG: wlan0: transmit timed out
Oct 31 16:40:03 zog kernel: at76c503.c: wlan0: tx timeout.
Oct 31 16:40:05 zog kernel: NETDEV WATCHDOG: wlan0: transmit timed out
Oct 31 16:40:05 zog kernel: at76c503.c: wlan0: tx timeout.
(more timeout messages)

Last edited by sleeper.service; 08-07-2005 at 03:09 PM.
 
Old 11-03-2004, 10:35 AM   #2
snecklifter
Member
 
Registered: Mar 2004
Location: UK/West Yorkshire/Huddersfield
Distribution: Fedora 7
Posts: 982

Rep: Reputation: 30
Hi sleeper,

Sorry about the delay, this took a while to look up some kind of answer for you. It would appear your best bet would be to remove the cvs of the berlios driver and use the one that came with Mandrake 9.2. You also need to remove atmelwlandriver which is included in 9.2 and may have been installed at some point. For more info try

http://www.jennings.homelinux.net/atmel_92.html

or this may be the mad ramblings of someone who's not quite sure....

Regards
Chris
 
Old 11-03-2004, 03:17 PM   #3
sleeper.service
LQ Newbie
 
Registered: May 2004
Distribution: Mandrake 9.2
Posts: 16

Original Poster
Rep: Reputation: 0
Thank you -- I will definitely try.

However, one thing appears odd. The article you mention (otherwise quite helpful)... claims that Mandrake 9.2 should automatically detect Atmel-based cards... but when I initially tested, this was not the case. It only reported that no driver was claiming the new USB device.

I suspect that version 4 of the SMC-2662 is too new for the pre-compiled drivers (both SourceForge/atmelwlan and Berlios/at76c503a) shipped with Mandrake 9.2... so it appears likely that I must compile some newer driver.

But when I do (attempt to compile)... the SourceForge/atmelwlan driver complains about invalid makefile syntax (I checked the mentioned lines, but found nothing obvious). The Berlios/at76c503a driver compiles, and behaves as described above.

I think I shall make another attempt with "atmelwlan" -- this time with a CVS version. If that doesn't work, I will try assembling my own interface configuration routine, to be executed some time after card detection shows up in logs.

It won't be the convenient way (especially for someone who passionately hates the highly concise syntax of shell scripts, and considers C more intuitive) but it should be doable.

Does anyone, by any chance... know how to deploy an alternative script for launching on card attachment... without kludgy steps like monitoring the system log? I feel there probably exists a more straightforward way, but haven't found it yet.

Last edited by sleeper.service; 11-03-2004 at 03:37 PM.
 
Old 11-03-2004, 03:40 PM   #4
sleeper.service
LQ Newbie
 
Registered: May 2004
Distribution: Mandrake 9.2
Posts: 16

Original Poster
Rep: Reputation: 0
Update:

I think I've found the right file to edit!
(Currently studying "/etc/hotplug/net.agent".)

Last edited by sleeper.service; 11-03-2004 at 03:41 PM.
 
Old 11-05-2004, 07:08 PM   #5
sleeper.service
LQ Newbie
 
Registered: May 2004
Distribution: Mandrake 9.2
Posts: 16

Original Poster
Rep: Reputation: 0
Results till now:

+ Automatic running of "ifup" possible
- Requires long delay (18 seconds for reliable success)
+ Card is properly configured even on boot
- But only when machine was shutdown with card attached (otherwise must be removed and reinserted)

For most purposes... this is good enough. But still, if anyone should know potentially useful tricks which would *somehow* permit skipping the unnatural waiting before "ifup"... I would be most grateful. I am aware that if the mystery persists, I should eventually contact the driver developers... but currently, I would not desire to bother them yet (with something which could easily be my mistake).

And in case anyone else needs to use SMC 2662 .v 4, I am documenting my configuration below:

1) Current driver
BerliOS "at76c503" latest CVS version (but releases 0.9-0.11 also work).

2) Current contents of "/etc/sysconfig/network-scripts/ifcfg-wlan0":
Code:
DEVICE=wlan0
WIRELESS_MODE=Managed
WIRELESS_RATE=11M
WIRELESS_NICK=zog
WIRELESS_ESSID=")hub("
BOOTPROTO=static
IPADDR=192.168.0.250
NETMASK=255.255.255.0
NETWORK=192.168.0.0
BROADCAST=192.168.0.255
GATEWAY=192.168.0.3
ONBOOT=no
MII_NOT_SUPPORTED=yes
3) Little modification to "/etc/hotplug/net.agent":
Code:
# RedHat and similar
if [ -x /sbin/ifup ]; then

   # To kludge -- or not to kludge?
   if [ "${INTERFACE:0:5}" == "wlan0" ]; then

      # Dealing with wlan0 -- invoke delayed ifup
      debug_mesg invoke delayed ifup $INTERFACE
      exec /etc/sysconfig/network-scripts/delayed-ifup-wlan0 &
      debug_mesg delayed invoke branched off
   else
      # Dealing with something else -- behave normally
      debug_mesg invoke ifup $INTERFACE
      exec /sbin/ifup $INTERFACE >/dev/null
   fi
else
   mesg "how do I bring interfaces up on this distro?"
fi
4) Contents of file "/etc/sysconfig/network-scripts/delayed-ifup-wlan0"
Code:
#!/bin/bash
# Delayed ifup of wlan0
# Called to deal with SMC-2662 oddities
sleep 18
ifup wlan0

Last edited by sleeper.service; 08-07-2005 at 03:10 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
smc 2662w v.3 fedora core 2 novamon Linux - Hardware 1 07-08-2004 09:17 PM
SMC 2662W USB Wireless adapter? cucolin@ Linux - Wireless Networking 0 07-07-2004 08:21 PM
SMC 2662W V3 Nightmare GreggBz Linux - Hardware 2 05-14-2004 06:06 PM
RTL-8139 SMC EZ CARD (SMC 1211TX) (more of these stupid issues) Jimbobbob Linux - Networking 4 04-04-2003 05:40 PM
SMC 2632W card and SAMBA config problems weblion Linux - Software 3 03-04-2002 06:50 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking > Linux - Wireless Networking

All times are GMT -5. The time now is 01:30 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration