Small is beautifull: CherryPy

Today, I decided to write a new webapp (this will be out soon). I have been off since a while in the webapp developpement, so it’s a bit hard to start this new project.

I decided to look on recent Quixote’s developpement on Alinea. I first used the same components.. after 2 hours.. nothing works :

  • issues with session management, not really hard to fix
  • big trouble with _q_traversal, _q_index .. I really hate this stuff. I don’t really understand why quixote have a so complicated framework.

After 2 hours, I switched to something more friendly: CherryPy in 10 minutes I have the base working. I really like the way you can use medusa or mod_scgi in Quixote, but Webware, CherryPy, Zope have some simple components for sessions, and url handling: And this is so hard in Quixote :(

biQuad (and double biQuad) homemade wifi Antenna: 14db !

After the omnidirectionnal antennas, and the can-antenna, here comes the new one:

http://www.brest-wireless.net/albums/AntenneQuads/dsc01296.sized.jpg
http://www.brest-wireless.net/albums/AntenneQuads/dsc01300.sized.jpg
http://www.brest-wireless.net/albums/AntenneQuads/double_biquad2.sized.jpg

This is a biQuad, and a double-biQuad antenna. You can find the construction guide (in Fr) here.

As usuall the photos is in the Brest-Wireless gallery

The small one is about 11/12db .. and the biggest one: ~ 14db !!

Update: Fix links

Shuttle ST62K (aka Zen) Fan issue

Like a lot of users, i get an issue with my fan on the Shuttle Xpc. In fact, i found a lot of comments over the net, that Shuttle used some bad fan in this boxes. Some users decide to use the waranty, but i don’t want to send this back to Paris, just to have another crappy fan.

I decided to change it by myself. But finding the right fan is really hard, because it’s 80mn x 80mn x 1.5mn fan. After a long search i decided to go to a tunning shop. (They have a bunch of various CPU fan).. The guy said to me: Ok, No problem. We have a video card fan that can feet .. Oh really a video fan ?

He give me a Zalman ZM-OP1

Despite this fan doesn’t have the exact same caracteristics as the default one, it perform quite the same. And it does even less noise. So i’m really happy :)

Many thanks to the shop: Tuning Informatique (http://www.tuninginformatique.com/)

update: fix the Zalman URL

Wifi can-antenna ;)

I decide to launch a new wireless antenna collection. Here is my new homemade one.

http://www.brest-wireless.net/albums/AntenneRicore/nescafe1.sized.jpg
http://www.brest-wireless.net/albums/AntenneRicore/nescafe2.sized.jpg

You can discover all photos here, and the construction guide

Howto recover MoinMoin password

I just forget my moinmoin password.. loosely i’m .. Ok to change it:

  • add a user w/ a new login/password.
  • just edit the old login account file (in users/)
  • change the password w/ the SHA key of the new user
  • login :)

Quick and Dirty: Speed up wifi lookup of ndiswrapper

Have you see how many time, it takes to ndiswrapper to deliver the scan result ? It’s about 3,25 sec on my builtin wireless card. This is too much no ? Specialy if you want to write a application to scan for AP level.

The quick and dirty way to fix that (it works fine for me.. perhaps others..) :

  • Edit iw_ndis.c
  • Search for iw_get_scan function
  • change this
//if (time_before(jiffies, handle->scan_timestamp + 3 * HZ))
if time_before(jiffies, handle->scan_timestamp)
return -EAGAIN;

This simply drop the 3 sec wait for results.. Now I get search results in 0.25 sec ;) .. Please report if this works for you !

Homemade Omnidirectionnal Wifi Antenna

Once again, i tested several wireless design.

The spider

The spider is a simple to do (really), quarter wave omni-directional antenna. The cost: a female N :) Beside this antenna doesn’t have any gain, it prove to be really usefull, mainly for wardriving because it’s small, and offer really better performance than the default PCMCIA builtins (because it’s a omni and this is very good for out-door use)

http://www.brest-wireless.net/albums/AntenneSpider/spider_1.sized.jpg

French reader can read the complete story of this spider. Original design can be found here. Another trick, i don’t use a 32 mn line but 0.95 * 32 ~ 30 mn

The 6db one

This one require a little more job. The design came from gumph website. In fact the main issue with this one is to cut the parts at the good size. I made a 8 parts one, and give me ~ 6db. I will add 4 others soon. More infos can be found here

http://www.brest-wireless.net/albums/AntenneOmni/omni_jkx_1.sized.jpg

The full photo album is on the Brest Wireless photo gallery.

Playing music on soundcard without locking

Why this soundcard allow me to play 2 mp3 at the same time while this doesn’t.. Hum good question. In fact to support this kind of stuff the sound card should support have some sub-device, to be sure .. simply aplay -l

Here on my shuttle .. not working

aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: IXP [ATI IXP], device 0: ATI IXP AC97 [ATI IXP AC97]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: IXP [ATI IXP], device 1: ATI IXP IEC958 [ATI IXP IEC958 (AC97)]
Subdevices: 1/1
Subdevice #0: subdevice #0

Here on another box (VIA C3 based)

aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: V8235 [VIA 8235], device 0: VIA 8235 [VIA 8235]
Subdevices: 4/4
Subdevice #0: subdevice #0
Subdevice #1: subdevice #1
Subdevice #2: subdevice #2
Subdevice #3: subdevice #3
card 0: V8235 [VIA 8235], device 1: VIA 8235 [VIA 8235]
Subdevices: 1/1
Subdevice #0: subdevice #0

So yes the C3 can play 4 stream at the same time, while the AC97 doesn’t.

Another way to do this is to use software mixing

Update:

To use the software mix in Alsa: simply change the pcm.default to pcm.dmix

#pcm.default cards.pcm.default
pcm.default pcm.dmix

Tcpdump rules !

Tcpdump is clearly one of my favorite tool. Here a little example to filter the traffic of my OSPF router.

tcpdump -i eth0 ip[9] == 89

And the result:

12:43:48.219432 IP p2b.soif.fr > OSPF-ALL.MCAST.NET: OSPFv2, Hello (1), length: 48
12:43:48.560817 IP wrt.soif.fr > OSPF-ALL.MCAST.NET: OSPFv2, Hello (1), length: 48

Wonderfull no ? :)

Have fun with a Gkrellm on a WRT54G ? Geeky no ..:)

Ok a little screenshot is perhaps better than a long talk.

http://brest-wireless.net/albums/Misc/gkrellm_wrt.gif

Yes, I use gkrellm to monitor my WRT (mainly the bandwith, CPU Load .. and other stuffs). This is pretty easy to use, and friendly no ?

update: I miss the URL: http://chriscarey.us/software/gkrellm/wrt54g/