Category Archives: Guides

Howtos and guides about mostly computer related things

Easy SMS reminders for your LiU calendar

This guide is only interesting for students at the Linköping University, LiU

Abstract

When I started at the university a year ago I wrote about how to get reminders about lectures and lessons directly into your mobile phone. Since then, LiU has switched calendaring systems and is now using a system called TimeEdit. This simple guide shows how to set up a reminder system for your school schedule and thereby never miss a single lesson.

Goal

As with the old guide, I will show you how to never miss a lecture or lesson at the uni by getting SMS reminders before they start. I will only use services provided by the university and you will be ready to go in just 15 minutes! You will see information regarding when and where to go, and it is possible to customize how long before the reminder will be sent.

I have been using this setup the last six months, and it is working fairly well. I don’t know if this method works for other institutions than LiTH, but an educated guess is that any student as well as teachers and administrators can benefit from this. Your milage may vary, though.

Another good thing with this approach is that the reminder will match the current schedule at all times. In my time at the university, lectures have become moved or even cancelled, and those who write the schedule down at the start of each semester tend not to know about such changes before it is too late. By following this guide, you’ll be safe!

How to do it, then?

  1. Go to the LiU calendar. Select your faculty.
  2. Pick your courses and/or student groups.
  3. At the bottom of the generated calendar, find the link “iCal”.
  4. Right-click and select “Copy to clipboard” or “Copy shortcut”, depending on your web browser.
  5. Log on to the e-GO system. If you don’t have an e-GO account, you can use a standard gmail account.
  6. In the top left corner, click on “Calendar” (“Kalender” if your’e using a Swedish system)
  7. Find “Add” button (Swedish: “skapa”).
  8. Click “Add by URL” (See the image)
  9. Paste the adress you copied from the LiU calendar into the Public Calendar Address bar.
  10. Click “Add”
  11. Now note the new calendar to the left, your LiU calendar has been added to your e-GO calendar. It is probably called “TimeEdit”.
  12. You can go back to the calendar main page and check if it looks alright

Reminders

Now we want to get the SMS reminders up and running.

  1. Click on the little arrow next to the “TimeEdit” calendar and select Calendar Settings
  2. I recommend that you change the name of the calendar, I simply named mine “LiU”
  3. Click on the “Notifications” link
  4. To get SMS reminders, you’ll need to verify that the phone number is yours. Click the “Set up your mobile phone to receive notifications” link on the bottom of the page
  5. Select your country and type in your mobile phone number
  6. Click the “Send verification code” button
  7. You’ll recieve a text message on your phone, containing a code. Enter that code in the text box.
  8. Click “Finish setup”
  9. Now you can select which reminders to recieve, and when they should be sent. I usually select 15 minutes.
  10. Click on “save” on the bottom of the page

Finishing touches

Your’e done, and all you need to do is to sit back and relax while the mobile phone takes care of the calendar. It seems quite reliable, in all this time I can only remember one time when I didn’t get the reminder at all. Quite a feat!

For some reason, though, it seems like the calendaring system sometimes sends out duplicate reminders. This is an issue with the LiU Timeedit system and not with the google calendar, and it’s been there for the last six months.

If you’re having problems, check the LiU documentation, and the Google docs. You can also drop me a comment here, or ask me if you run into me at the university.

Happy calendaring!

Howto: Hauppauge Nova-T 500 PCI under Linux

Note: This is a technical guide aimed at a specific audience. If you happen to read this blog and have no interest in Linux and TV cards, skip this post.

Note 2: This guide is obsolete! Use at your own risk. This guide is a lot better!

My father and I recently bought a Hauppauge Nova-T 500 TV card to extend the functionality of our current TV computer. The nice thing with this card is the fact that it contains two tuners in one card, allowing two simultaneous TV recordings or watchings at the same time.

We unpacked the box and plugged the card in to our computer. The manual recommended the card to be put in PCI slot #1 or 2 for unknown reasons, but it felt best to comply. When we booted, however, I got confused.

We had indeed installed a PCI card, but there was no TV card in the PCI listing (given by the ‘lspci’ command). We thought there was something wrong with the card at first.

When inserting the card into a Windows computer, we understood where the problem was. At first, Windows recognized a new USB root hub on the computer, and only after that came the TV card. Hauppauge had made the ingenious decision of having two USB TV receivers on the card, controlled by an internal USB hub. The reasons for that I can guess is to save costs using the same chipset for both their external USB cards, and the internal what-seems-to-be-PCI cards.

So, back with the card to the Linux box, and discovering that there actually were a lot of new entries in the PCI listing, USB controllers. A quick glance on the USB listing (‘lsusb’ under Linux), showed a happy Hauppauge card.

After discovering the inner workings of the card, it was time to configure it. Apparently, the drivers were not included in the Linux kernel before version 2.6.19, and the most recent stock kernel for the Ubuntu system was 2.6.17. Time to go back and compile your own kernel from kernel.org.

If your system has at least kernel version 2.6.19, there is no need for compiling your own. The kernel version is checked with the command ‘uname -r’. In the kernel, you need to enable modular support for the “dib0700″ chipset, which is somewhere under Device Drivers > Multimedia. Make sure the dialog says “(M)” and not “(*)” for the specific driver.

After compiling and installing the kernel (providing those instructions is outside the scope of this document) you must reboot and then find a firmware file for the kernel to use. For this specific card I needed the file “dvb-usb-dib0700-01.fw”, which I couldn’t find anywhere on the net at first. The primary mirror for this file was offline, but after one hour of searching I luckily found an RPM containing several firmwares, along with this one.

To make the path easier for everybody else, I here provide these files on my server here.

NOTE: The above files are very obsolete, and should not be used. linuxtv.org has newer files.

So, extract the file named “dvb-usb-dib0700-01.fw” and copy it to the directory /lib/firmware. Then load the module dvb-usb-dib0700 using the following command:

modprobe dvb-usb-dib0700

(many systems require that you add “sudo” to the command line before the “modprobe” command.

You just loaded the driver into the kernel. Felt something? That was just the feeling of being one step closer to a working dual TV tuner card. Note that the “modprobe” command should return nothing if it works. If you get outputs like “FATAL: Module dvb-usb-dib0700 not found.” you have to make sure that you compiled in support for the TV card into the kernel.

If modprobe worked, check the output of the command ‘dmesg’. If it works, you should have something like this in the last few lines:

[ 47.706381] dib0700: loaded with support for 2 different device-types
[ 47.755845] dvb-usb: found a 'Hauppauge Nova-T 500 Dual DVB-T' in cold state, will try to load a firmware
[ 47.831894] dvb-usb: downloading firmware from file 'dvb-usb-dib0700-01.fw'
[ 48.004945] dib0700: firmware started successfully.
[ 48.106970] dvb-usb: found a 'Hauppauge Nova-T 500 Dual DVB-T' in warm state.
[ 48.107568] dvb-usb: will pass the complete MPEG2 transport stream to the software demuxer.
[ 48.107929] DVB: registering new adapter (Hauppauge Nova-T 500 Dual DVB-T).
[ 48.191285] DVB: registering frontend 1 (DiBcom 3000MC/P)...
[ 48.192903] MT2060: successfully identified (IF1 = 1220)
[ 48.657038] dvb-usb: will pass the complete MPEG2 transport stream to the software demuxer.
[ 48.657373] DVB: registering new adapter (Hauppauge Nova-T 500 Dual DVB-T).
[ 48.661165] DVB: registering frontend 2 (DiBcom 3000MC/P)...
[ 48.663158] MT2060: successfully identified (IF1 = 1220)
[ 49.129041] dvb-usb: Hauppauge Nova-T 500 Dual DVB-T successfully initialized and connected.
[ 49.129071] usbcore: registered new interface driver dvb_usb_dib0700

Basically, what it says is that the firmware gets loaded (“dib0700: firmware started successfully“) and that the frontend gets registered (“MT2060: successfully identified“) and finally gets the card to work (“dvb-usb: Hauppauge Nova-T 500 Dual DVB-T successfully initialized and connected“)

If this is your case, you can happily go on and set up MythTV or <insert your favorite PVR system here>.

Otherwise, let’s do some debugging. Most often, you forgot to provide the system with the correct firmware file. Extract the file “dvb-usb-dib0700-01.fw” to /lib/firmware, nothing else. Make sure you got support for your dib0700 in the kernel configuration and that the kernel is really 2.6.19 or higher. If you get stuck, post a comment in the form on the bottom of the page, and I or one of my many readers will probably help you.

Your TV card should show up in the directory /dev/dvb (might vary on other systems than my Ubuntu installation) as two entries; adapter0 and adapter1 (This might also vary if you have more TV cards in the computer).

Now, configure the DVB card as you would with any card. I use MythTV, and those instructions can be found here. I don’t feel like writing another MythTV guide here, there are so many out there already.

Happy tuning!

Note that I never tried connecting the remote control, many readers have commented that the remote doesn’t work yet. You will need a third-party remote or do as I am doing and use another card with a remote control.

As a conclusion, I find the Nova-T 500 an excellent card with good support under Linux except for the remote control. The driver seems pretty new, though, so there are probably improvements and bugfixes on the way in new Linux versions. Still, with our computer, a 1.8 GHz with 768 MB of memory, we can now record three DVB-T streams simultaneously (using one Nova-T 500 and one older Nova-T card) without any problems at all.

I can only recommend this card, although it still requires some compiling to get working. I believe Ubuntu Feisty Fawn (in beta at the time of writing) has support for the card out of the box (but you still need the firmware).

If this guide was helpful, I would appreciate you leaving a comment here. Also comment if something doesn’t work or if you have additional suggestions. Thank you!

Your own internet radio station with MPD/Icecast

This is a short, un-detailed howto of how to create your own internet station using the MPD music player daemon and icecast. There are some drawbacks with this solution, but since I have been an avid MPD user for a long time, this solution integrates nicely with what I am used to. Read on for complete instructions
Advantages:

  • Integrates directly with MPD
  • Quite customizable and very nice to control via an SSH shell.

Drawbacks:

  • Ogg Vorbis is the only audio format supported as of now
  • There is a bug when resuming playback that has been paused for a long time

Prerequisites

  • Your favorite Linux distribution. On this current server I have gentoo, while my favorite is Ubuntu. Your choice!
  • A good internet connection. Streaming music over a slow internet connection will probably halt your other traffic.

Software used:

  • mpd, at least version 0.12.0
  • icecast, I use version 2.3.1
  • your favorite MPD client, I favour “ncmpc”
  • a listener client, on Windows I use foobar2000 (you need ogg support for your player)

Let’s get started. Install all the above software on your computers, see the howto on the wiki for this.

Configure icecast. This can be a bit tricky and ther are many ways to fail in this step. You should:

  • Set hostname (mine is stream.broach.se)
  • Set the source password (the password that mpd will have to specify to be able to stream to the icecast server)
  • Set the admin password.

Icecast can be a bit tricky to configure, especially since it uses an XML file. The configuration is probably located at /etc/icecast/icecast.xml.
You also need to choose whether to use burst-on-connect. I have turned burst-on-connect on to reduce latency between MPD and the listener client, and I have no problems with lag. Remember that I mostly sit on high-speed internet connections and therefore your situation and configuration might vary.

Now configure mpd. See the howto on the wiki again. I use quality 4.00, which gives a bitrate of a bit lower than 128, which is OK for web-radio. If you are an audiophile you should use 5.00 or more. Also set the correct password needed to connect to the icecast server. This is the source password you have typed in the icecast xml file. If everything seems OK, fire up icecast and then MPD.

My mpd.conf:

music_directory "/var/music"
playlist_directory "/var/lib/mpd/playlists"
db_file "/var/lib/mpd/database"
log_file "/var/log/mpd.log"
error_file "/var/log/mpd.error.log"
pid_file "/var/run/mpd/mpd.pid"

audio_output {
type            "shout"
name            "Music stream"
host            "localhost"
port            "8000"
mount           "/stream.ogg"
password        "password"
quality         "2"

user            "source"
description     "All kinds of music"
genre           "Everything"
} # end of audio_output

Replace “user” and “password” with the information you specified in your icecast configuration.
Start icecast, then mpd, and then your mpd client to play some music. Now mpd streams music encoded as an Ogg Vorbis stream to icecast, which is now waiting for listeners. Goto another computer and start to listen to “http://your-server-adress:8000/stream.ogg.m3u”, which will be the name of the audio stream.

Everything should work now. If it doesn’t, you probably have a configuration issue. If the playback is skippy and it seems that MPD plays the file at wrong speed (ie. the timer seems to go very fast and jump a few seconds now and then), you have encountered the skipper bug. Restart MPD and resume playback. I don’t have another solution to this bug yet, but luckily it only occurs when you haven’t played any music for a few minutes. Prevent it to happen by always have a song in your MPD playlist. This bug was solved by upgrading libshout from 2.0 to 2.1. Thanks to the guys in the #mpd IRC channel for this!

Wishlist:

  1. A configuration option for MPD that sends a silent audio stream when the music is offline or paused. This prevents the skipper bug, and allows all clients to be connected even though you pause the music. You won’t have to reconnect again when starting to play, because there always has been a connection
  2. Reverse proxy support for icecast. I have the icecast server located behind my router, and the generated URL is invalid because port 80 on the webserver is routed to the icecast server for the domain “stream.broach.se”, but not “etnoy.broach.se” and “www.broach.se”. Therefore I need to manually change the source code to make this work. I resolved this problem by manually adding a stream.ogg.m3u file to the web directory containing the correct URL for the strem. Hackish, but it works well.

Report any problems by commenting on this blog entry, or ask me a question by e-mail.

Updated 06/07 2006
Updated 11/01 2006
Updated 11/03 2006
Updated 07/01 2007