linHES and Shepherd XMLTV listing grabber

Over the weekend I built a new mythtv box. My old box (Dell GX260) has been in service for about 3.5 years and has been very good but its getting old and times are moving on, its hardware is starting to get left behind.

With the new release of Mythtv v0.22 due later this month and the recent release of VDPAU by Nvidia I thought it time to build a new box and take advantage of these new features.

Having bought a used Dell GX620 for AU180 I threw in a new Leadtech 8400GS GPU (low profile), 1TB HDD and a used Dvico Dual digital 4 TV Capture card.

I have to this point only ever used Mythdora which has been great and am currently running 10.21 (after running 3.01 for 3 years). This time around I wanted something that was easy to upgrade and keep up to date, easy to install and was stable – enter linHES. linHES is the ‘new’ knopmyth but is now based on Arch linux. I have been using Arch on my laptop since Christmas so have a fair amount of experience with the distro so it seems to be a perfect fit for me.

Installation of linHES was painless and the Dual digital card was working fine (its a version 1) although for some odd reason on the first installation ( I have since done a few) the first time I tried to add the second DVB tuner on the card it wouldn’t work, every installation since then has worked fine which seems odd.

Prior to setting up the cards I made sure I had the mythtv package that had VDPAU prebuilt. to do this I just passed pacman -S mythtv-vdpau and off it went.

My previous mythboxes have used the fantastic script to get the TV listings called Shepherd. Shepherd has some perl dependencies that need to be installed prior to running the Sheperd config. I found a few of them were packages prebuilt to be installed using pacman but one remainied elusive and was a requirements to run shepherd, it was called ‘Compress::Zlib’. I ended up getting it by installing perl pacman -S perl and finally was able to run Shepherd.

Just now I realise I could have installed shepherd and all its dependencies with a simple pacman -S shepherd. I’m such a idiot. I recall seeing shepherd in the repo the other day when I was having a poke around and thought it must be something else. I’m a glutton for punishment.

Will do a fresh install tonight after university and install it into the main TV room this weekend for full time use.

VOIP over 3G – Update 2

OK, so I have been living with VOIP over 3G for a little while now. It is working fine providing you have a good 3G connection. How you know you have a good 3G connection is a mystery to me but I guess the signal strength is a factor. The service provided by Exetel is very good and the price – well it almost unbeatable.

The calls I have made have almsot all been very clear with just a little bit of garble now and then. Last week I had an 8 min phone conversation and the call was very acceptable, especially given the whole thing cost me on my calulation about 50c (data of 2MB per min and VSP cost of 10c).

I think the major issue still is the fact that SIPdroid only supports the G711 codec. With luck the recent bounty proposed on SIPdroids site for the development of low bandwidth codecs (lets hope G729) will help make this an even better experience (an even cheaper).

rTorrent and selfsigned SSL certs

Here is a little tutorial for using rTorrent on sites using self signed SSL certs that I wrote today.

I have taken bits a pieces from various sites around the place.

Broadly speaking the process to get rTorrent working using a self signed cert are these:-

1. Get the cert and convert to a format rTorrent can use
2. Put the cert somewhere you will be able to find
3. Change rTorrents config to ensure it knows where to find the SSL certs

So, here we go.

1. ==Get the cert==
Log into your linux box as the user that will be running rTorrent and change to you home
directory.

Pass the following command……

sudo openssl s_client -connect thesitenamehere.com:443 | tee out_cert

You will see the SSL certificate on your screen, now hit CTRL-C, magically in the directory
you are now in will be a file called out_cert. Now you need to convert the cert to x509
format. To do this pass the following command

sudo openssl x509 -inform PEM -in out_cert -text -out out.pem

You can view the files we created with a text editor if you so wish.

2. ==Put the cert in a know directory==
Now you need to find out where your QNAP/NAS/PC has all the SSL certificates, they could be
in /etc/ssl/certs, take a look. If not you need to find out where they are. Once you
have found where they are copy the out.pem file to the directory where the SSL certs are
lets pretend they are in /etc/ssl/certs. Pass the following command…

sudo cp out.pem /etc/ssl/certs

Then once it is in that directory change to the /etc/ssl/certs directory. Once you are in
there pass the following command….

sudo c_rehash

3. ==The ~rtorrent.rc==
Now you need to find the example ~rtorrent.rc file that comes with rTorrent (note
that it is a hidden file as it starts with ‘~’).
Once found copy it to the home directory of the user that will be running rTorrent. the name of the
file should be ~rtorrent.rc

Now go into the ~rtorrent.rc file and take a look at the options it gives you, this is the
power of rTorrent. Use your favourite text editor, I use vi, there are plenty others.

Anyway, now you need to put the following line at the bottom of the ~rtorrent.rc file

# directory for ssl certificates on self signed trackers
http_capath=/etc/ssl/certs

That should be it. You should be able to connect to your site now and torrent away.

You will need to change the rtorrent.rc file to ensure it works well with your QNAP/NAS/PC. In particular you should alter it to include a watch directory for new .torrent files so its starts automatically downloading, and also perhaps a default save directory etc.

Check out rtorrents site and also read some of the tutorials out there……

Howto: Use rtorrent like a pro
http://libtorrent.rakshasa.no/

Enjoy rTorrent, its the shitzen.

VOIP over 3G – Update 1

Today I received my new SIM from Exetel. After a slight hitch porting out from my old mobile provider I was up and running in no time.

I got a mate to call me on the DID number that I have assigned to my Pennytel account that is a trunk with my PBXes account that SIPdroid registers with (the hoops i go through). It worked fine with just a few seconds of jitter during the conversation that lasted a few minutes. So, so far so good. We will see how it goes over the next few weeks and see how mad it drives me.

VOIP over 3G

I’m excited by the prospects of mobile VOIP using my ADP1 and Sipdroid.

Sipdorid has its draw backs, the main one being development has been pushed to interoperate with PBXes as opposed to any old VSP or even my Asterisk box at home but thats what you get and I can’t bitch to much about something that works (through PBXes) and is free.

So, today I signed up with a provider that re-sells (among other things) Optus 3G data. I can’t get over how cheap (at least for Australia) the data is. They are charging 1.5c per MB of data. At this rate it makes sense to ditch my current MVNO (who re-sells Vodafone) and go with the new mob. Exetel, who I am switching to, are also an ISP here in Australia and I like their style, its cheap and they don’t piss about with the facts. Its kind of ‘here are our prices and this is how we will do you over, if you don’t like it then piss off, and, if we don’t like you we’ll also tell you to piss off’ which is an interetsing but kind of likeable quality in the business that they are in.

The man that runs the show, John Linton, has a blog and his outlook on things is what tipped me to try them out, its refreshing to see these kind of comments in business. Here is a perfect example.

So, we’ll see how it pans out. I’ll be going VOIP for all my calls (when possible) and text messages also using a VSP. Lets hope the Optus service and network here in Perth doesn’t let me down.

EDIT: I’m crapping my self now that this will not work. Sipdroid only supports the G711 codec which is a monster when it comes to bandwidth consumption. I wish it supported G729 – this could be a short experiment ending up in failure due to Sipdroid and the Andorid OS. Please, please Optus network deliver me a fast stable 3G connection.

Trixbox Astersik server – some success with other stuff.

Last weekend I cleaned up some network issues at home. In short I had run into some issues becasue I was running and BIND DNS server that was being used by my webserver plus the webserver had entries in its hosts file plus I am running m0n0wall which handled DNS resolution for other clients on the network. It was all very confusing but I think its sorted now.

So, now that my network is decent I got stuck into Trixbox. The issues I had were as follows:-
1. Couldn’t received call on my Ekiga SIP client running on my laptop in the man cave, strangely I could call other external extension from Ekiga but not receive calls. It was just always engaged.
2. I couldn’t seem to get my SPA3102 to act as a VOIP to PSTN gateway or PSTN to VOIP Gateway.
3. Couldn’t get Sipdroid runinng on my ADP1 to register with my Trixbox to then beable to act as an extension and receiv calls etc.

Point 1 must have something to do with Ekiga, I say this becasue I installed X-Lite last night and could make and receive calls fine with it. Anyone know why Ekiga will not receive calls, despite it registering fine and being able to make calls fine???

Point 2 was a little more tricky. It turned out that the other day I moved my modem into the man cave as there was a phone line extension there. The ADSL worked fine but strangely when ever I called my land line it was engaged, this as a result frustrated my attempts to get Asterisk answer PSTN calls and vica-versa. This isn’t so bad becasue know one knows what the number is but its a worry. It turns out I had to move the modem back up stairs to where I had installed an ADSL filter splitter. Writing about this now leads me to belive that perhaps the problem is from the way the phone extensions were installed and having a filter/splitter upstairs and only using it for PSTN then having another filter/splitter down stairs and only using that for ADSL is causing the problem. I’ll buy an in-line filter for my phone only and plug the modem back in the man-cave without a filter and see if that solves the problem.

So anyway, I re-set the SPA3102 back to factory default and re-entered the various setting to ensure the thing woirked in Australia again and also sounded like and Australian phone. I re-set it up a–la Trixbox without the tears and now…..it works! Sweet.

Point 3, I admit, II buckled and signed up with PBXes. It hurts me to do this and I’m still annoyed but at this moment its the easiest way to achieve what I would like, ie, Sipdroid working. IN the end I opened a new account at Pennytel and set up Pennytel as a trunk at PBXes. Whats cool is that I also have an account with Pennytel so Pennytel to Pennyytel calls are free. Thsi way, if my fike wants to speak with me and Sipdroid is regiustered to PBXes OK she just calls me Pennytel account number and its a FREE call, of course this depends on if Sipdroid is using 3G or if its on Wi-Fi.

Sipdroid with Trixbox/Asterisk – How????

I have spend many hours trying to get my ADP1 phone running Sipdroid to register with my trixbox server. Its driving me nuts, really, it is.

Yes, I have changed the sip_nat.conf file and ensured it has…

nat=yes
externip=203.blah.blah.blah
localnet=blah.blah.blah.blah/255.255.255.0

I have tried it over WI-Fi on my LAN and over 3G. I was able to reguister OK – once then if fails there after. Strangely it will register only after you creat a new extension for sipdroid in trixbox.

Is it my NAT router doing something odd?

So, do you think I can get it to work. No, I can’t and its driving me NUTS! AHhhhhhhhhhhhh.

I think I’ll just buckle to it all and register with PBXes and then register a VSP as a trunk there and use it that way. Surely it couldn’t be this difficuly but apparently it is. Interestingly on the Sipdroid site it says something to the effect, we are smarter than you and have changed PBXes a little from a standard trixbox installation (obviously) so don’t bother wasting to much time trying to get Sipdroid working with your own asterisk box – it won’t work. This really shits me to be honest. Shouldn’t these kind of things be created to give the maximum amount of interopability.

So who has managed to get Sipdroid register and work with your own Trixbox/Asterisk server? Let me know how you did it – its killing me.

If someone at PBXes reads this – what changes need to be made to my Trixbox to get Sipdroid to work with it, come on guys…..

ADP1 and cupcake 1.5 – no rooot!!!!

So I received my replacement ADP1 at the start of the week, all is good.

Having installed the fabulous app connectbot I had a poke around in the internal file structure on the ADP1 and tried to become root by using su. It says that that UID can not run su!!!! I thought that the ADP1 was rooted out of the box, short answer, it is, till you upgrade it to 1.5, then it isn’t.

This is a little annoying but I’ll live with it. What I need doing can hopefully be done using the adb tool supplied with the android SDK. The uni I go to has wifi but uses EAP and TKIP which I can not see in the setting available in the WI-FI GUI, as a result I need to hand code the wpa_supplicant.conf file and with luck i’ll get on-line.

Replacement ADP1 received

Great couple of days, rebuilt modem works and now, today, I received my replacement ADP1. Another night of updating and loading of my favourite apps.

Modem fixed

Oh the trials and tribulations of fixing ones own electronics.

Having purchased $10 worth on new capacitors from RS components yesterday, today i finally was able to remove the old ones and put the new one in.

The tricky bit was removing the solder from the holes where the old capacitors were. Unfortunatley my lack of experience resulted in one of the hole fill with solder and my iron could not melt it all again to be able to suck it out with a solder sucker. In the end I resorted to a 0.6mm fine drill and a steady hand to drill the solder from the hole on about 5 holes in the end.

It would appear its worked well with good up and down speeds. Amazing.

I’ll see how it goes tonight, I’m worried I will wake to a molten plastic mess.