Posts

FreeBSD with GPS to give Stratum 0 time source

I have ordered a bu-353 gps mouse. I hope to add this to Freebsd as it uses a prolific chipset, so using ucom and uplcom it should map as /dev/ttyU0 . To use this as a time source , I can configure NTPd via ntp.conf , to use the serial port, or I can used gpsd to manage the gps, and tell ntp.conf to use shared memory to read from gpsd. not using gpsd is attractive as it's relatively large, 1.5MB statically compiled. To statically compile, you need to run configure, in my case like this ./configure --disable-python --enable-static --disable-shared --prefix=/usr/local/m0n0/ --disable-sirf --disable-tsip --disable-fv18 --disable-tripmate --disable-earthmate --disable-itrax --disable-ashtech --disable-navcom --disable-garmin --disable-ubx --disable-evermore --disable-gpsclock --disable-rtcm104 --disable-ntrip --enable-fixed-port-speed=4800 then modify the Makefile to add -all-static like this; LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) \ $(CFLAGS) $(AM_LDFLAGS) $(LDF...

All Quiet on the western front

Well not really, with a new baby , new job and christmas all happening in the last few months, time has been precious. I managed to get my heatmiser PRT-HW/N and PRT-N working on my openwrt box with a usb serial and rs232 to 485 adapter. Now using a spare sony ericson z610i phone via usb , I can control my heatmiser controls via sms. This is done using smstools , a bash file that parses the sms body and then runs a perl script based on the commands in the message. The perl script does some serial communication to program the 2 heatmiser stats. I can set the temp, turn on/off frost control etc. I hope to tidy it up a little bit, but so far it's quite robust, so a small tidy before I put the code somewhere for others to copy/use. Other things , I have been fixing some bugs in m0n0wall and adding some features and adding to ipv6 support. I just ordered a usb GPS unit, so I can use it on m0n0wall or openwrt with gpsd and ntpd to create a stratum 1 time source. It was only around ...

A great Builder

This guy spent 4 months renovating our house and did an excellent job, couldn't recommend him more ! now he has a web site, check it out

Setting linux time from your Cell Phone

I have a Sony z610 cell hooked up to my wgt634u via usb running openwrt. As this box has no internet connection, on power failure it has the wrong date/time. As the z610 has it's own battery I wish to set my system time based on the z610 clock. the z610 has no support for NITZ or getting it's time from the cell provider, but this is ok. the z610 appears as ttyACM0 and ttyACM1. I use smsd pointing at ttyACM1 , so my clock script is free to use ttyACM0. As this is openwrt, and mipsel based, perl modules like serialport.pm are broken (termios.h etc.) so instead I use ser2net to share the port via tcp, then use perl sockets to access the serial port. This is actually deceptively easy. In perl I used Net::Telnet instead of sockets as this was even easier ! (I didn't get the expected results with sockets either). Perl Script is easy ---------- use Net::Telnet (); $t = new Net::Telnet (Timeout => 10); $t->open(Host => "localhost", Port => 2008); @lines =...

watchdog script for openwrt

sometimes my 3g based openwrt system gets in a broken state, and as it is going to be remote, I need a watchdog script to reboot it if the internet connection is broken This is a bash script that runs from boot --------------- #!/bin/sh ping -4 -c 3 -I ppp0 www.google.com | grep -v '0 packets received' | grep 'packets received' || (ping -4 -c 3 -I ppp0 www.yahoo.com | grep -v '0 packets received' | grep 'packets received' || reboot) sleep 60 /bin/sh /etc/config/watchdog.sh >> /dev/null 2>&1 & --------------- it is called from /etc/rc.d/S95done

windows 7 MCE

The other day I installed Windows 7 RC 64bit onto a spare PC , and plugged in my Dazzle/Pinnacle USB hybrid DTV stick (330e). Windows installed the drivers itself, and following the tuning menu in MCE, it found the Irish DVB-T ( DTT trial) broadcast. When I tried to play it on the PC, it complained about codecs and wouldn't display. I added my xbox360 as a media extender, and it played the channels fine via MCE ! ( the dvb-t here is h.264 ). Next I added a PCI satellite card ( nova-s-plus ), pointing at astra 2D. It found channels such as BBC1 etc, and BBCHD. These all played fine on the 360 too ! Next I tried some divx and xvid via MCE (not via upnp or media player) , these were fine. Lastly I tried some MPEG-TS files in HD , these were not fine. HDTVpump didn't make and difference. They would think they were playing, but I got no audio or video on my 360. They played fine on the PC. I tried it on a macbookpro core duo, and they played on the 360 then. It appears MCE i...

MythTV and DVB-T settings

To receive the DVB-T stations in Ireland, I used Full Scan (Tuned) with these settings Freq. 738000000 Band. 8Mhz Inversion. Auto Constellation QAM 64 LP Coderate 1/2 HP Coderate 2/3 Trans. Mode 8k Guard Interval 1/32 Hierarchy None