Wow! This has turned out to be a real pain. Below is a process I started, but ran into issues. I could see the module, but it would never make a Wlan0 to access using iwconfig or ifconfig.
I tried this on the Trendnet TEW-229UB and the TEW-424UB. Maybe because they are cheap devices, but heck, I spent something like $25 for both, and in Windows, they work perfectly.
After I had depmod -a and the ndiswrapper module listed (lsmod), everything seemed ok. The syslog had no errors on the 424, but never showed the wlan0. I could run lshw -C network, but would only show the wired adapter. I could run lsusb, and it would show the device. I could even run ndiswrapper -l and the device showed installed and hardware present. So, what the hell? No errors, everything working, but no WLAN0 shows up?
If I find more info, I’ll post it.
- make sure the ndiswrapper package is installed, so do that.
- Make sure that the wireless-tools package is installed. Probably is from the initial install.
- Get your wireless driver for Windows XP.
- Unpack the driver somewhere, then cd there and run ndiswrapper on driver. Something like so:
ndiswrapper -i driver.inf
I installed the Trendnet TEW-229 and that was:
ndiswrapper -i sis162u.inf
- Then let ndiswrapper setup the module.
ndiswrapper -m
- Then run: depmod -a
After that you’ll see the ndiswrapper module when you run lsmod.
And from here I can see the module, but don’t know what to do… I’ll try to figure it out though, and write it here!
Here’s a quick post based on a Python Script I made in Zope to display the data from a ZSQL method in a 2 column table layout. Not that big of a deal, but I wanted to save this because it took a little bit of thought and some learning.
(My original code is all mess up on this, I’ll try to find and repost it.)
## Script (Python) "genlodinfo" ##bind container=container ##bind context=context ##bind namespace= ##bind script=script ##bind subpath=traverse_subpath ##parameters=itemid ##title= ## # Example code: ################################### """ Author: Greg Fischer 1st Byte Solutions - greg@1stbyte.com Date: 9/24/05 License: You are free to reengineer rework, recode, redistribute, resell or alter this code in any way you see fit, but you must give credit to my original work and you must provide this same license to those that may receive your distribution if you do. (just leave my name on it, and you must offer the same freedom in your work, that's all) Purpose: This script will gather from a zsql method, cat the records into address records (with exra info), then generate a table with alternating rows. In other words, it will fill the table from left to right, then down a row, 2 columns wide. """ ################################### def iseven(n): """Return true if n is even.""" return n%2==0 def isodd(n): """Return true if n is odd.""" return not iseven(n) # Import a standard function, and get the HTML request and response objects. from Products.PythonScripts.standard import html_quote request = container.REQUEST RESPONSE = request.RESPONSE rs = context.sql.ap_lodging(itemid) rownum = 1 x = [] for r in rs: ritemid = str(r[0]) rtqstart = str(r[4]) rtqend = str(r[5]) rstreet1 = r[12] rstreet2 = r[13] rcity = r[14] rstate = r[15] rzip = r[16] rnotes = r[18] lodstr = rtqstart + ' - ' + rtqend + '
' lodstr = lodstr + rstreet1 + '
' + rstreet2 + '
' lodstr = lodstr + rcity + ', ' + rstate + ' ' + rzip + '
' if rnotes <> '': lodstr = lodstr + rnotes + '
' x.append(lodstr) table = '' tablee = '
' tr = '' tre = '' td = '' tde = '' if len(x) >= 1: c = len(x) listing = '' cur = 0 for addy in x: listing = listing + '' #first build the addy with starting table elements #first record only if cur == 0: listing = listing + table + tr + td + addy + tde #Now check if this is an odd seq item, #just add a new cell and end the row if isodd(cur): listing = listing + td + addy + tde + tre #if this is an even item, it should be on a new row #and NOT the first item if iseven(cur) and cur <> 0: listing = listing + tr + td + addy + tde #all good, but if last record, then end row #else skip and loop to previous isodd and #add a new cell(which ends the row as well) if cur == (c - 1): listing = listing + tre #if this is the last item, end the table if cur == (c - 1): listing = listing + tablee cur = cur + 1 else: listing = 'No records' return listing
And you return the results simply by calling the script in your dtml. something like: dtml-var “path.to.script(itemid=itemid)”
As always, I hope this help someone else out there, not just myself! Good luck!
Ok, here’s my configure command:
./configure
--with-apxs2=/path/to/httpd/bin/apxs
--with-mysql=/path/to/mysql
--with-mysql-sock=/tmp/mysql.sock
--prefix=/path/to/httpd/php
--with-config-file-path=/path/to/httpd/php
--enable-force-cgi-redirect
--disable-cgi
--with-zlib
--with-gettext
--with-gdbm
--with-gd
--with-png
--with-png-dir=/usr/lib
--with-jpeg
--with-jpeg-dir=/usr/lib
--with-pdo-mysql
--with-mysqli
I ran into errors trying to run the function imagecreatefromjpeg and imagesx and imagesy. And the system could not find the jpeg libs. On Debian Sarge, you need to run an apt-get install libjpeg62-dev. Also, I ran configure with just the –with-jpeg switch, and it didn’t work. So, I had to also include the –with-jpeg-dir=/path/to/lib. On Debian is was in /usr/lib. After that, it all worked out.
It’s worth noting, you must have libpng, libjpeg, and GD installed as well. If I remember, GD was already on Debian, or maybe it was in PHP, not sure about that, but I know it must installed.
I just spent an hour trying to figure this out, AGAIN! To compile Zlib support into your Python interpreter, do this:
1. Install the Zlib-dev package for your distribution. (you probably have zlib already, but not the dev package)
On Ubuntu it’s called ‘zlib1g-dev’, on others it might just be: zlib-dev or zlib-devel. Do a search on your distro package lists to find it.
You should end up with a ‘zlib.h’ file in your system. In mine, Ubuntu, I have /usr/include/zlib.h
2. Get your python sources to compile and run the configure script like so:
./configure –with-zlib=/usr/include
See there that I included the ‘/usr/include’ directory to find zlib.h in? After the make && make install it worked great!
Keep in mind your mileage may vary, but this might help I hope. More importantly, now I can remember how I did this! 