View previous topic :: View next topic |
Author |
Message |
dacb
Joined: 01 Apr 2006 Posts: 2
|
Posted: Sat Apr 01, 2006 5:43 pm Post subject: wview on WGT634U wireless router w/ OpenWrt (what cable?) |
|
|
We have 'ported' radlib 2.6.2 and wview 3.2.1 to OpenWrt (Kamikaze release 3535) running on the WGT634U (and other Broadcom based) wireless router(s). The stations we intend to place on these devices are the Davis Pro2.
The issue is to decide if we should be using the USB - to - serial w/ the CP2101 sold by Davis or their straight serial interface (with a 3rd party USB - to - serial adapter).
The driver for the CP2101 from Silicon Laboratories is GPL compliant (but a joke, nevertheless). It only works on intels (however, we couldn't compile it at all). We could use the free one ( http://www.microtron.org.uk/~craig/Projects/CP2101Driver/ ) from these guys - which is included in 2.6 kernels. Has anyone tried this driver? Is it sufficient to run the Davis Pro2? Does it work on non-intel linux?
Alternatively, we could just use the Davis serial adapter and a third-party USB - to serial adapter (one based on a pl2303 or a mct_u232 for example). The advantage to this is that it doesn't financially support Silicon Laboratories, who have a really bad GPL compliance history. The primary disadvantage is that we have to have another piece of hardware in the mix.
Thoughts and comments are greatly appreciated,
- dacb |
|
Back to top |
|
|
bhnb
Joined: 28 Nov 2005 Posts: 127
|
Posted: Sun Apr 02, 2006 6:33 am Post subject: |
|
|
Hi dacb
I originally looked at getting wview going on a WRT54 running openwrt, but as the WRT doesn't have a usb port and I already had the usb datalogger it was a bit of a struggle and I moved across to the NSLU2.
Back to your interface question, under openslug (kernel 2.6.12.2) I'm using the free cp2101 driver without any problems, and Mark is using a pl2303 with a serial datalogger. Although the NSLU2 uses an intel ixp420 I'm assuming that this falls into the category of 'non-intel linux' as it's not an x86.
Alternatively, is there a spare serial port on the WGT634U? Then you could cut out the USB middleman altogether.
Cheers
Jon |
|
Back to top |
|
|
dacb
Joined: 01 Apr 2006 Posts: 2
|
Posted: Wed Apr 05, 2006 11:30 am Post subject: |
|
|
Thanks for the reply.
In addition to its USB host, the WGT634U does have two serial ports (although one is dedicated to the serial console). However, they lack control lines (which doesn't seem to matter for these weather statsions) and are TTL so I would need some kind of voltage convert/inverter to get RS-232 voltages to talk with the serial logger's RS-232 (i.e. a MAX-232, etc.). Not nearly as 'plug-n-play'.
It sounds like it is a toss up between using an 'external' USB to serial converter based on a PL2303 or (probably also) the MCT232 (which I have handy) or using the free cp2101 driver with the Davis cable. I suspect that the Davis sold USB to serial will draw less power as it doesn't have to take TTL to CMOS back to TTL - this is an advantage as the WGT634U gets flaky when the USB draws more than a few hundred milliamps - so I will probably start here. The flash drive acting as root already draws 90 to 100ma (according to /proc/bus/usb/devices).
No problems compiling the cp2101 driver on the ixp420? I will look into getting it built for mipsel ASAP. The MCT232 and PL2303 drivers build with no problems.
Do you simply capture from this device or does it also host the station's web? I have been please with the WGT634U's performance - taking about 15 seconds to regenerate all the image (including the entire 'Extra' sensor set for the Davis Pro 2) and serving pages almost instaneously.
My big concern is that the WGT doesn't have a clock - so it needs to set its time at every boot - this could be problematic as the internet connection to this installation is wireless (not wifi - but wireles broadband) and can get flaky in really bad weather. Does the SLUG keep its clock between boots or do you also have to ntpclient or rdate it at boot? Thanks for any information,
- dacb
P.S. The radlib and wview packages should be included in future OpenWrt (Kamikaze) releases. |
|
Back to top |
|
|
bhnb
Joined: 28 Nov 2005 Posts: 127
|
Posted: Thu Apr 13, 2006 3:44 pm Post subject: |
|
|
Quote: | the WGT634U gets flaky when the USB draws more than a few hundred milliamps - so I will probably start here. The flash drive acting as root already draws 90 to 100ma (according to /proc/bus/usb/devices). |
Here's the relevant line for the CP2101:
C:* #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=100mA
The driver compiled just fine - initially I had to build it myself but now it's available as an ipkg and available from nslu2-linux.org.
A slug will produce the standard set of 43 images and 7 html/xml files in just over 4 seconds, but I've de-underclocked my production one (see http://www.nslu2-linux.org/wiki/HowTo/OverClockTheSlug) so it's roughly twice as fast. I'm not serving web pages directly although others do (not necessarily for wview). I am running a few other things though, including some image processing with ImageMagick and it all plays nicely as long as there's swap available.
The slug does keep its clock between reboots. It's swings and roundabouts though - it needs manual intervention if it loses power although there's another hardware hack to fix this. If it's a showstopper for you, there is a clock on the VP which may be usable.
Nice work on the openwrt stuff - I might give it a go if I can interface my USB datalogger to a serial port on the wrt54g.
Jon |
|
Back to top |
|
|
|