Published by kyle on 31 May 2009

RNDIS Modem & Linux

For a few weeks now, I’ve been trying to get my HTC Touch HD phone to work as a tethered (cos I haven’t bought a Bluetooth module for the laptop yet) RNDIS modem on Linux. I know it works great on Windows, but some for inexplicable reason connections would be fine on Linux for a minute or two, and then start timing out. ICMP worked great all the time, but SSH would only get a few lines, HTTP would get a few KB downloaded, etc. Rather infuriating.

Some investigation revealed the following in the output of dmesg when Internet Sharing was started up. Not very encouraging either, although it does give something to base a search on.

[ 5967.528071] usb 1-2: new high speed USB device using ehci_hcd and address 9
[ 5967.728209] usb 1-2: configuration #1 chosen from 1 choice
[ 5967.860790] rndis_host 1-2:1.0: dev can’t take 1536 byte packets (max 1536), adjusting MTU to 1478
[ 5967.870155] rndis_host 1-2:1.0: RNDIS_MSG_QUERY(0×00010202) failed, -47
[ 5967.892147] eth2: register ‘rndis_host’ at usb-0000:00:1d.7-2, RNDIS device, 80:00:60:0f:e8:00

After much fiddling around on forums, I came across the following solution… Continue Reading »

Published by kyle on 20 May 2009

Asterisk and Festival Integration

So… you want your PBX to talk to you? This could be the start of a very bad relationship! In this short piece, I’ll describe making Asterisk on Debian/Ubuntu talk to Festival that is also installed on a Debian or Ubuntu server.

Firstly, have a read at VoIP-Info but don’t make any changes to files just yet. In this scenario, I’ll be using Method 1.

Create /etc/festival.scm and put the following into it - you may recognize it from Step 1 in the wiki.

;; Enable access to localhost (needed by debian users)
(set! server_access_list ‘(”localhost\\.localdomain” “localhost”))

;;; Command for Asterisk begin

(define (tts_textasterisk string mode)
“(tts_textasterisk STRING MODE)
Apply tts to STRING. This function is specifically designed for
use in server mode so a single function call may synthesize the string.
This function name may be added to the server safe functions.”
(let ((wholeutt (utt.synth (eval (list ‘Utterance ‘Text string)))))
(utt.wave.resample wholeutt 8000)
(utt.wave.rescale wholeutt 5)
(utt.send.wave.client wholeutt)))

;;; Command for Asterisk end

If you are going to access it from a different host, put the source IP address or hostname into the server_access_list array variable.

Next up, execute cp /usr/share/doc/festival/examples/festival.init /etc/init.d/festival to copy a sample init script to the init.d directory. Use chmod +x /etc/init.d/festival to make it executable, and then use update-rc.d festival defaults to insert startup links in the default runlevel directories.

/etc/default/festival also requires RUN_FESTIVAL=yes in it, in order for the init script to start the server.

Once all of the above is complete, you should be able to run /etc/init.d/festival start and Festival will start. This can be verified as such…

root@mxns2:~# ps waux | grep -i festiva[l]
festival 25411 0.0 8.4 26728 21496 ? S 22:52 0:00 /usr/bin/festival –server -b /etc/festival.scm
root@mxns2:~#

You can also check to see that Festival is listening on the network, as it should be in this case.

root@mxns2:~# netstat -lnp | grep -i festival
tcp 0 0 0.0.0.0:1314 0.0.0.0:* LISTEN 25411/festival
root@mxns2:~#

This tells us that it is listening on all IP addresses assigned to the server, on port 1314. Access control is provided by the array mentioned earlier.

Next up, Asterisk has to be told how to communicate with Festival. This is done by creating the /etc/asterisk/festival.conf file, and putting the following data into it.

[general]
host=localhost
port=1314
usecache=yes
cachedir=/var/cache/asterisk/festival/
festivalcommand=(tts_textasterisk “%s” ‘file)(quit)\n

As noted above, the port that Festival is listening on is 1314, and in this case Asterisk and Festival are both running on the same server - hence localhost. In my setup, I have a remote Festival server, and I put in the IP address of the Festival server.

So, almost all good to go. All you need to do now is set up an extension with the appropriate details. As per the wiki, you could stick the following into your extensions.conf

; testing festival (text-to-speech app)
exten => 555,1,Answer
exten => 555,2,Festival(mary had a little lamb) ; do NOT use quotes around the string! if you use commas, you will have to escape them with a “\” (backslash).
exten => 555,3,Hangup

Reload Asterisk, and off you go!

Published by kyle on 12 May 2009

A free television

Free to a loving home, my old, perfectly working 28″ television and cabinet. It takes a traditional antenna, has a working remote, S-Video inputs on the side, and two SCART sockets on the back.

Collection from Yoker, G14 0NT at evenings or weekends. We live up two flights of stairs, so be prepared :-)

http://www.flickr.com/photos/kylegordon/sets/72157617745258733/

Published by kyle on 06 May 2009

Zebraimg

A while back I set up an account with Shelfari. Stuck without a barcode scanner, I came up with an alternative method of importing the ISBN numbers… Continue Reading »

Published by kyle on 07 Apr 2009

Happy Birthday

40 years ago, the first RFC was published. Lets all break out the cakes and candles!

RFC 1

Published by kyle on 07 Mar 2009

Avaya Playtime

OK, so I got to borrow an Avaya 4610SW from work, cos it would be faster to play with firmware via TFTP on my home network than it would be when using the business network. These are some notes…

turn off 802.1q - my network doesn’t do tagging,

Grab the latest firmware from ftp://ftp.avaya.com/incoming/Up1cku9/tsoweb/ip_telephone/071008/ - in this case it was plain old 46xxH323_071008.zip, and extract into TFTP root, or provide symlink

Turn on the phone, and it collects the following from TFTP…

Mar  6 23:01:59 senior in.tftpd[2619]: RRQ from 172.24.32.29 filename 46xxupgrade.scr
Mar  6 23:01:59 senior in.tftpd[2620]: RRQ from 172.24.32.29 filename 46xxsettings.txt
Mar  6 23:02:05 senior in.tftpd[2622]: RRQ from 172.24.32.29 filename b10d01b2_9.bin

That’ll be the bootloader getting downloaded (or Bootapp, as Avaya like to call it), then saved to flash. It then rebooted, updated with BIG SCARY WARNINGS, rebooted again, and then it picked up these…

Mar  6 23:05:02 senior in.tftpd[2666]: RRQ from 172.24.32.29 filename 46xxupgrade.scr
Mar  6 23:05:03 senior in.tftpd[2674]: RRQ from 172.24.32.29 filename 46xxsettings.txt
Mar  6 23:05:06 senior in.tftpd[2707]: RRQ from 172.24.32.29 filename a10d01b2_9.bin

which were saved to flash again, rebooted, Updated, rebooted, and then off it went.

So, upgrades went smoothly, whilst staying on the H323 featureset. Point proven for the boss, and should be easy to deploy the new firmware after some more testing. I now want to play with SIP…

The above file includes SIP in the downloaded zip file, but APPARENTLY… the SIP firmware is chosen based on the SIG parameter in 46xxsettings.txt. So, essentially, to enable SIP, you just have to enter SET SIG 2 into 46xxsettings.txt and let 46xxupgrade.scr work the magic. However, in my experience, this failed miserably. The phone just carried on blindly using the currently loaded firmware. To manually change the phone into SIP mode, you have to hit Mute, then dial SIG (744), and then hit #. It will then prompt you to change the SIG value, at which point when you save it, it will pick up the new firmware from the TFTP server.

After a short delay whilst it loads s10d01b2_2_2.bin, it’s off and running. As long as you’ve provided some basic SIP details in 46xxsettings.txt, it will prompt for a SIP username and password after a short delay. I believe this can also be automated based on MAC address, according to some conjecture and hearsay on the internet…

Published by kyle on 15 Feb 2009

Zattoo on Kubuntu 0804

Want to make Zattoo work on Kubuntu 0804? It’ll most likely fail silently, without spitting out any useful error information.

Some chopping up of ldd /usr/bin/zattoo_player output reveals that it’s useful to run sudo apt-get install dbus-x11, at which point zattoo_player will start working.

Published by kyle on 07 Feb 2009

2009 Todo

Spurred on by mrben and Elwell, my ambitions for this year include…

* Finish rebuilding the Land Rover

* Finish restoring the TR6

* Sort out the MythTV situation in the living room (lack of acceleration on the TV-Out port)

* Flesh out Asterisk to do more than just make and take calls, such as DND messages, engaged messages, presence alerts, etc

* Set things in motion to build a house in the countryside

* Be more focused on relevant projects

* Expand amateur radio skills and experience

I’ll add more as I think of them :-)

Published by kyle on 07 Feb 2009

That’s not a brush…

This a real brush…

Brush

It’s rated at 8500 RPM, but the grinder runs at 10,000RPM. Frighteningly fast, and slightly unwieldy due to the gyroscopic effect present.

On a related note, due to such machinery, the replacement bulkhead is almost clean now. A touch more here and there, and it will be painted with red oxide tomorrow. The spraypaint system will be here in a couple of days, so hopefully we can get the bulkhead painted and refitted before the Land Rover has to go away for the new chassis at the end of February.

Published by kyle on 31 Jan 2009

Egroupware and SyncML fix

Recently I acquired a HTC Touch HD, and in order to connect it to my eGroupWare installation, I purchased the Synthesis SyncML client to do the necessary translation. Now, Charlotte’s SonyEricsson has a built in SyncML client (which I’ll be playing with when back in the UK), but Microsoft didn’t see fit to provide SyncML capability on Windows Mobile 6.1. Anyway, life goes on.

Synthesis has trouble passing telephone numbers onto eGroupWare. I think eGW is at fault for this, so I’ve filed a bug. In the meantime, I’ve attached a small patch file that maps the Synthesis fields to what I think are the correect Vcal fields. Just apply it to /addressbook/inc/class.addressbook_vcal.inc.php and things should start working. If they don’t… you know where to edit :-) And before anyone complains, I am neither a PHP programmer or an experienced patcher. This is pretty much my first patch file…

273d272
<                         ‘TEL;CELL;VOICE;X-Synthesis-Ref1′ => array(’tel_cell_private’), // Private cell
277d275
<                         ‘TEL;HOME;VOICE;X-Synthesis-Ref1′ => array(’tel_home’), // Home telephone
280d277
<                         ‘TEL;WORK;VOICE;X-Synthesis-Ref1′ => array(’tel_work’), // Work telephone

Next »