LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   LinuxAnswers Discussion (https://www.linuxquestions.org/questions/linuxanswers-discussion-27/)
-   -   DISCUSSION: Netgear MA111 USB Wireless Howto (https://www.linuxquestions.org/questions/linuxanswers-discussion-27/discussion-netgear-ma111-usb-wireless-howto-221120/)

linuxmankev 08-22-2004 10:25 PM

DISCUSSION: Netgear MA111 USB Wireless Howto
 
This thread is to discuss the article titled: Netgear MA111 USB Wireless Howto

incognite 08-29-2004 01:44 AM

thanks for the guide, im having a few problems with the make all command though, when i try it i get the following.

[root@localhost linux-wlan-ng-0.2.1-pre20]# make all
set -e; for d in src doc man etc; do make -C $d ; done
make[1]: Entering directory `/usr/src/linux-wlan-ng-0.2.1-pre20/src'
set -e; for d in mkmeta p80211 prism2 shared wlanctl wland nwepgen wlancfg; do make -C $d ; done
make[2]: Entering directory `/usr/src/linux-wlan-ng-0.2.1-pre20/src/mkmeta'
gcc -E -M -I../include -I/usr/src/linux-2.6.8-1.521/include -D__LINUX_WLAN__ ../shared/p80211types.c ../shared/p80211metamsg.c ../shared/p80211metamib.c ../shared/p80211meta.c mkmetadef.c ../shared/p80211types.c ../shared/p80211metamsg.c ../shared/p80211metamib.c ../shared/p80211meta.c mkmetastruct.c > .depend
mkdir -p obj
make[2]: Leaving directory `/usr/src/linux-wlan-ng-0.2.1-pre20/src/mkmeta'
make[2]: Entering directory `/usr/src/linux-wlan-ng-0.2.1-pre20/src/p80211'
if test ! -d /usr/src/linux-wlan-ng-0.2.1-pre20/src/p80211/../.tmp_versions; then \
cp -rf /usr/src/linux-2.6.8-1.521/.tmp_versions /usr/src/linux-wlan-ng-0.2.1-pre20/src/p80211/../ ; \
fi
cp: cannot stat `/usr/src/linux-2.6.8-1.521/.tmp_versions': No such file or directory
make[2]: *** [default] Error 1
make[2]: Leaving directory `/usr/src/linux-wlan-ng-0.2.1-pre20/src/p80211'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/usr/src/linux-wlan-ng-0.2.1-pre20/src'
make: *** [all] Error 2
[root@localhost linux-wlan-ng-0.2.1-pre20]#

Any Idea's? Im running Fedora 2 with everything updated possible....
Any assistance would be greatly appreciated!

Thanks in advance
Cogs

incognite 08-29-2004 03:42 AM

Ok fixed that part by just making a folder called .tmp_versions where it was looking but now i get another error when i try and run make install.

[root@localhost linux-wlan-ng-0.2.1-pre20]# make install
find . -name .depend -exec rm {} \;
set -e; for d in src doc man etc; do make -C $d install ; done
make[1]: Entering directory `/usr/src/linux-wlan-ng-0.2.1-pre20/src'
set -e; for d in p80211 prism2 shared wlanctl wland nwepgen mkmeta wlancfg; do make -C $d install ; done
make[2]: Entering directory `/usr/src/linux-wlan-ng-0.2.1-pre20/src/p80211'
mkdir -p ?/lib/modules/2.6.8-1.521custom/kernel/drivers/net
cp p80211.ko ?/lib/modules/2.6.8-1.521custom/kernel/drivers/net
make[2]: Leaving directory `/usr/src/linux-wlan-ng-0.2.1-pre20/src/p80211'
make[2]: Entering directory `/usr/src/linux-wlan-ng-0.2.1-pre20/src/prism2'
mkdir -p ?/etc/wlan
cp shared.prism2 ?/etc/wlan
mkdir -p ?/etc/wlan/
cp *pda ?/etc/wlan/
for x in *.hex ; do \
if [ -f "$x" ] ; then \
cp $x ?/etc/wlan//prism2_`echo $x | cut -c1-2`.hex ; \
fi; \
done
set -e; for d in driver ridlist download; do make -C $d install ; done
make[3]: Entering directory `/usr/src/linux-wlan-ng-0.2.1-pre20/src/prism2/driver'
cp prism2_pci.ko prism2_usb.ko ?/lib/modules/2.6.8-1.521custom/kernel/drivers/net
cp: `?/lib/modules/2.6.8-1.521custom/kernel/drivers/net': specified destination directory does not exist
Try `cp --help' for more information.
make[3]: *** [install] Error 1
make[3]: Leaving directory `/usr/src/linux-wlan-ng-0.2.1-pre20/src/prism2/driver'
make[2]: *** [install] Error 2
make[2]: Leaving directory `/usr/src/linux-wlan-ng-0.2.1-pre20/src/prism2'
make[1]: *** [install] Error 2
make[1]: Leaving directory `/usr/src/linux-wlan-ng-0.2.1-pre20/src'
make: *** [install] Error 2
[root@localhost linux-wlan-ng-0.2.1-pre20]#

Tried making a folder like before but didnt work. :(

Any suggestions?

exodist 09-10-2004 08:32 PM

I got it installed just fine, did the modprobe and am now trying to configure it (gentoo, do-it-yourselfer) I tried ifconfig and nothing showed up for wlan0, so I tried ifconfig wlan0 and got some data saying it was ethernet, but no hardware address, I tried giving it an ip ifconfig wlan0 192.168.0.22 and got: SIOCSIFFLAGS: No such device
I have configured the wlancfg and wlan-mySSID (I replaced it wit my SSID) and gave it the wep configurations, but it just does not seem to work (and yes I did load the module)

jarrywhu 09-18-2004 05:47 AM

anyone who has made the ma111 working with the "how to"?why I can't?I used red hat linux whit kernel 2.6.3

exodist 09-18-2004 12:49 PM

Tutorial did one thing...
 
the tutorial told me where to get the driver, the linux-wlan-ng project, from there I figured it out on my own (with some frustration) but then again I am unorthadox and a gentoo user with 5 years of experiance telling me to do it myself and not use packages or utilities :-D

first I downloaded the driver and ran the script liek mentioned and it installed the prism2_usb module. I then would do modprobe on the driver (modprobe prism2_usb) and would get my wlan0 device, but it didn't have a mac address, and I was unable to use it weather or not it was on a network with wep encryption. you are probably stuck here as well, type ifconfig wlan0, is there a mac address? if not that is the problem.

to fix it in gentoo:
use emerge to install linux-wlan-ng: emerge linux-wlan-ng

do not uninstall the manually installed driver however, emerge fails to place some needed files in /etc/wlan (grrrr) not uninstalling the manual one will fix this.

then to get the card initilized run /etc/init.d/wlan start
to make initilize at boot type: rc-update add wlan default
that will initilize the card w/ no wep encryption and it will connect to the first open network it finds. you can use ifconfig wlan0 IP to set the cards ip, or you can use dhcpcd -t 10 -d wlan0

if you need wep encryption you need to configure /etc/conf.d/wlan.cfg, it also has further instructions regarding this inside the file.

here is a copy of the /etc/init.d/wlan for those not using gentoo, I doubt it will work as-is in another distro, but it might give you an idea.

#!/sbin/runscript

source_config() {
if [ -f /etc/wlan/shared ]
then
source /etc/wlan/shared
else
return 1
fi
return 0
}

start() {
ebegin "Starting WLAN devices"
if ! source_config
then
eerror "Error loading /etc/wlan/shared"
eend 1
return 1
fi

# NOTE: We don't explicitly insmod the card driver here. The
# best thing to do is to specify an alias in /etc/modules.conf.
# Then, the first time we call wlanctl with the named device,
# the kernel module autoload stuff will take over.

for DEVICE in $WLAN_DEVICES; do
#=======ENABLE========================================
# Do we want to init the card at all?
eval 'WLAN_ENABLE=$ENABLE_'$DEVICE
if ! is_true $WLAN_ENABLE ; then
continue
fi

if is_true $WLAN_DOWNLOAD; then
wlan_download $DEVICE
fi

wlan_enable $DEVICE

#=======MAC STARTUP=========================================
wlan_supports_scan $DEVICE

if [ $? = 0 ] ; then
wlan_scan $DEVICE
if [ $? = 0 ] ; then
wlan_source_config_for_ssid "$ssid:$bssid"

wlan_user_mibs $DEVICE
# make it quiet
error=`eval wlan_wep $DEVICE`

grep 'autojoin' /proc/net/p80211/$DEVICE/wlandev > /dev/null
if [ $? = 0 ]; then
wlan_infra $DEVICE
else
wlan_dot11_join $DEVICE
fi
else
echo "network not found. maybe start IBSS?"
fi
else
wlan_source_config $DEVICE

wlan_user_mibs $DEVICE
# make it quiet
error=`eval wlan_wep $DEVICE`

if is_true $IS_ADHOC ; then
wlan_adhoc $DEVICE
else
wlan_infra $DEVICE
fi
fi
done

eend 0
}

stop() {
ebegin "Shutting Down WLAN Devices"
if ! source_config
then
eerror "Error loading /etc/wlan/shared"
eend 1
return 1
fi

# Do a reset on each device to make sure none of them are still
# trying to generate interrupts.
for DEVICE in $WLAN_DEVICES; do
# This just makes it quiet...
error="$(eval wlan_disable $DEVICE)"
done

eend 0
}

geekdesign 09-21-2004 11:01 AM

I am kind of new to the wireless part of linux I have a MA111 wireless usb card. I was wondering what kernel I need? I am using 2.4 with redhat 8.0. Do I need to upgrade to 2.6 or should it be ok with 2.4? If someone knows an easier version of linux to get it configured, please let me know?

Thanks in advance

zerogood 10-24-2004 03:48 PM

on the first tutorial i tryed to unzip the tar.gz file to /usr/src but it said i need permission to do this so i tryed to do it in the terminal but what is the command for unzipping something to somewhere like /usr/src?

exodist 10-26-2004 02:14 AM

you need to be root:
su root
password:

then go to the directory where you want it to extract to (/usr/src)
cd /usr/src
then type:
tar -zxvf path/to/file/thefile.tar.gz
that will extract it intot he current directory. (/usr/src) not into the directory where the file is located.

explination:
tar is the command used for archives (.tar)
gunzip extracts .gz files
bunzip2 extracts bz2 files
however when you have a .tar.gz or .tar.bz2 the tar program can take care of the gunzip or bunzip for you
tar -z file to handle gzip (.gz)
tar -j file to handle bzip2 (bz2)
the -zx means extract from gzip
the -zxv ads verbose so you can see what is happening.
the -zxvf adds something, I am not sure what the f flag does atm, look it up (tar --help) I know it was important and is screwy if you leave it out.. been using it 5 years now and never looked it up.

exodist 10-26-2004 02:15 AM

looked it up, f needs to be at the end, f means use the file that follows it

tar -f filename
tar -zxv[f] filename the filename must be immediately after the f with a space between.

tar -zfxv filename will nto work it will try to find xv as the filename (I think)

Qwertie 12-16-2004 03:41 PM

Wow, installing a device driver in linux only takes 7 steps? Gee, it's practically plug & play!

But I'm having a teensy problem doing step one. How to I get the source code for my kernel? I have Fedora Core 2. I do not know how to determine the kernel version, but even if I did, I wouldn't know how to get the source.

Honestly, what kind of OS requires the kernel source just to use a device driver? ...

exodist 12-16-2004 03:56 PM

www.kernel.org

Qwertie 12-16-2004 05:28 PM

Great. Now how do I figure out what version kernel I have?

exodist 12-16-2004 05:34 PM

lol good question, I always compile my own and thus know what version, why not just use the most recent version?

Qwertie 12-16-2004 05:37 PM

And while I'm at it, does anyone care to explain why exactly the kernel source code (40MB?!) is needed to build a device driver?

Also, well, I sort of have to figure out how this driver works. Does anyone know of a good website about the linux device driver model?


All times are GMT -5. The time now is 08:32 PM.