iPhone Blog

Since I will probably be spending a lot of time playing around with the iPhone in the near future, I started an iphone blog to share some tips and tricks on how to get the most out of your iPhone in South Africa. I will be writing about things like setting up a development environment on a non-MAC PC, how to get free and payed apps from the US iTunes store and jailbreaking the phone the way god intended. Link: iphone.iblog.co.za

iphone.vodacom.za

iphone

If you just got your shiny brand new iPhone 3G, there’s a chance you might be greeted with the following message when you try to access the 3G network with Vodacom:

“Could not activate cellular data network: You are not subscribed to a cellular data service”

This just means that your sim is not activated for the iphone.vodacom.za APN (Not iphone.vodacom.co.za). In order to have your sim activated by Vodacom, dial Vodacom’s data services customer support on 155, press 2 , 2 and 2 again, and you will be put through to an operator that can activate your SIM for you.

As far as I can see, there is no advantage to using the iPhone APN. Out of bundle rate is still R2/MB (Ridiculous!!!!). Vodacom really needs to catch up to 2009 and start offering cost-effective data services…

4 Channel PWM output with PIC16F690

picI wanted to “pulse” four seperate LEDs on each of the four PIC16F690 PWM output channels. The correct mode to use is the enhanced PWM output – single output mode with pulse steering. Sounds hard, but it’s really not. Here is a link to the source: pic16f690_PWM_ex.c

The source code should be self-explanatory. To set up the correct mode you use:

/* use pulse steering with single output mode */
CCP1CON = 0b00001100;

To work out PR2 and T2CON you use this website: http://www.micro-examples.com/public/microex-navig/doc/097-pwm-calculator.html

You set the each of the following registers to 1 to turn on that output port:

STRA (pin5), STRB (pin6), STRC (pin7), STRD (pin14).

And then you just make a loop that varies CCPR1L  from 0 to 0xff and back down to 0 again.

Easy as pie. Have a look at the source code for a more detailed explanation and a function for pulsing the LEDs. Leave a comment if you have any questions.

Stellenbosch University – Divides Campus, Cripples Student Communication.

This post refers specifically to the IT administration people who decide on network policy. I am NOT talking about the entire department, I know many of the IT dept employees personally and they are wonderful people who are helpful and try to make life as easy as possible for students and staff. Unfortunately there is always a bunch of sour grapes that spoil the bunch.

This post is a follow-up to a previous one: Stellenbosch University makes bad judgement call.

First of all, I have to say that as a full-time student at Stellenbosch since 2005 (now studying for my Master’s in Electronic Engineering), I am striked by the backwards trend that the Stellenbosch IT department has exhibited over the last 4 years regarding network policy. During 2005, in my first year, and I think also a part of 2006, it was possible for me to log in to my linux box in my residence room on campus from the lab I was in, and do all my programming assignments via VNC on my own PC. In 2006, the First Great Divide came, where the campus segment of the network was split from the rest of the network (labs/offices/classrooms). I don’t remember whether any official communication regarding the divide was given, but presumably it was to prevent illegal filesharing. Well, this excuse was acceptable enough, so everybody just tried to accept it and go on with their work.

In 2008, the Second Great Divide happened due to a series of unfortunate events, which, ironically, could have been prevented if the IT department had just communicated with its (full-time, paying) network users. According to the student newspaper, the IT department was contacted by SAFACT and accused of profiteering from illegal filesharing on their network. IT responded by swiftly disconnecting 12 users from their network without warning, for running centralized hub servers to which approximately 1400 local network users connected every day, not only for filesharing but some only for chatting with their friends. This is the single, most heavily critisized action, that set off a domino effect of events that would soon result in severe network restrictions to be put in place. The disconnections caused mass paranoia and resulted in a couple of students writing custom decentralized hub software, named “Rooihub”. Soon after, network stability issues arose, and the first (and only) e-mail from IT to network users accused “Rooihub” of causing network instability.  A few days later, all communication between residences were severed. Not only was it never proved that “Rooihub” was the culprit, but I have to speculate that the issue could still have been resolved at this point if the issue was discussed with the Rooihub creators, who could roll-out forced upgrades to their rooihub software.

In 2009, network users are faced with an updated Electronic Communications Policy on campus which states that any form of data transmission between residences is forbidden, as well as the hosting of any server or playing of games on the network. This means that it is against the University’s policy to chat with your friend in another residence directly, ie if the message is not first passed through a University approved relay server.

Yes, we’re only students. Yes, we’re each only on campus for a short while (If you call 6 years short, maybe more for the PhD’s). But does this mean we are not worthy to be kept up to date on, and involved in network policy? All this could have been prevented if the IT administration had held a meeting with students in the first place to determine a solution to the issue of filesharing on the network, and that is why they deserve all the blame and critique that come their way. Ultimately, I have to question the judgement of an IT administration that would rather cripple its own network than work with its users on a solution.

A South African’s guide to train travel in Germany

A couple of friends and I traveled to Germany in July earlier this year, and I’ve been meaning to make a blog post about the German train system ever since. Understanding the German transport system can be intimidating for a foreigner, especially if you are on a budget and can’t afford to just take a taxi everywhere. Their transportation website (www.diebahn.de) is only partially translated, and attempting to ask a local German at the airport for directions will probably not go too well unless you are fluent in German. (Hint: They don’t like English speaking people, so if you talk to somebody immediately identify yourself as South African and they will be much friendlier towards you.)

Here’s a quick summary of the article for the impatient:

  • Travel in groups of 5 or multiples of 5. Many train/tram/bus tickets allows up to 5 travelers on a single ticket at the same price, thereby letting each member of the group pay only a 5th of the ticket’s cost.
  • If you are going to be looking around the city, buy a day ticket that allows access to the local trains, trams and busses.
  • If you are traveling outside the city boundaries, buy a regional ticket(Länder-Ticket) such as the Hessenticket. This ticket costs 30 Euro, is valid for 24 hours, allows you to travel anywhere inside a region/province (e.g. the entire Western Cape as a ZA equivalent), and can be used by up to 5 travelers on a single ticket (Effectively costing 6 Euros per person to travel the entire Hessen state.).
  • Also look out for regional tickets that are valid for a whole weekend, check online.
  • Don’t take a chance, always travel with a ticket. If you are caught, you will be levied a fine of 40 Euros.
  • Do not be late! The trains wait for nobody, not even if you’re running towards it while screaming and waving.
  • The train tickets are valid for trams and buses within the ticket’s designation region.
  • Take the Regional Express if you want to get somewhere fast.

As we landed on Frankfurt airport, we realized we had no idea how to reach our hotel in the center of Frankfurt only a couple of km’s away. The first step is exiting the international arrivals terminal and waiting for a (free) shuttle to the train platforms. At the train platform terminal, go downstairs to the actual train platforms to get access to uncrowded ticket dispensers and get your bearings. The ticket dispensers has two columns of about 10 rows of buttons you could press for about 20 types of train tickets you could buy, and this is for the local trains only!

The rule of thumb when buying tickets are as follows: Buy a day ticket (Tageskarte) if you plan on sight-seeing later the day. Buy a single-fair ticket if you only plan on getting to the hotel and sleeping off the jet lag. Buy a group ticket if you are a group of 5, this will save you a lot of money.

The trip from the airport to Frankfurt should cost you about 2 Euros. Stop, take some time, and read the big boards with yellow timetables on them on the train platform levels, and familiarize yourself with the railway’s layout by finding a map of the railway lines printed on a wall. Your first objective should be to find the train platforms, all the information and a couple of uncrowded ticket dispensers will be there (You will severely upset the locals if you hog the ticket dispensers on the top levels while trying to figure out what you should be buying). You will probably be taking the S9 to Frankfurt and getting off at the Frankfurt Hauptbahnhof (Main Train Station). Be ready to board the train. Notice how everybody around you are ready to jump on the train as soon as it stops, like athletics runners before they are set off, so make sure your group is together.

Once in Frankfurt, you can buy a day ticket or group day ticket to travel within the city region (designated area 50 I think.) You can use this ticket to travel on the trams and subway trains between stops, and you can usually find a map of all the stops at a train/tram stop. Pop into your hotel lobby and pick up a brochure with a map of the city, it will be very useful. Also ask the receptionist where the nearest supermarket is, and for the location of other areas of interest.

When traveling outside the city area, buy your group a regional ticket like the Hessenticket mentioned earlier. I couldn’t find a single source on the internet that confirmed whether you can actually travel with 5 people on a single ticket, and the answer is: Yes you can! Ie, if you are 5 travelers, you can pay 30 Euros together (or 6 Euros each), and if you are a single traveler you will pay the full 30 Euros yourself (which is something I’ve had to do once when I got separated from my group in the middle of the German countryside.)

The Hessenticket will give you access to all local trains/trams and buses, anywhere inside the Hessen region. Check Wikipedia, Hessen is quite big, larger than Gauteng. If you want to take the scenic route, take the local trains like the S-bahn and other smaller trains from stop to stop. You will make a LOT of stops along the way, but it will be worth it as you get off at train stations to switch trains, and see all the little German towns. If you are in a hurry, you can take the larger Regional Express (RE) train, which only stops at the main train stations, and can take you from Frankfurt to Kassel in about 2 hours (The scenic route took us about 5 hours…). You will know which train is the RE when you see it, it has two floors and is much bigger than the S-bahn trains.  The Hessenticket does NOT give you access to the “ICE” high-speed trains, they are VERY expensive (over 50 Euro for a one-way trip per person.) but the Regional Express should be sufficient.

If you need internet access in Germany, find an internet cafe. It is really not that expensive. Their GPRS billing system does NOT work like ours, you get billed per minute and not per MB like here, so you won’t be able to mxit in Germany for cheap if you buy a German prepaid simcard.

If you have any questions, please leave a comment to this post and I will reply as soon as possible.

Germany

German Flag

Wiimote Warrior – Robot Hack

This project started out as an idea to build a remote controllable robot, that can connect to a PC, and that can charge itself by seeking out sources of light and generating electricity from solar power. Since I live in a third world country (with a dismal exchange rate at the moment), and have limited funds and access to components, I am taking extensive measures in finding the cheapest and simplest components available, so this will probably be one of the most cost effective DIY electronics robotics projects you will find online.

The Wiimote, which I also wrote about here: 2007-12-15/wiimote-ultimate-hackers-toy, provides the perfect (and cheapest) platform for bluetooth connectivity with a PC, as well as useful sensors such as an infrared camera and tilt sensors. Check out the project page for updates: Wiimote Warrior – Wiimote Robotics Project.

Stellenbosch University Makes Bad Judgement Call

Universiteit StellenboschOn 30 October, 2008, The University of Stellenbosch’s IT department decided to cut the network links between residences. This follows after intermittent network instability issues started occurring, possibly due to network software distributed by students.

The student software, titled “Rooihub” was mostly blamed for the network issues, but no evidence was available to back these claims. The following e-mail was sent to network users the day before network routes were severed:

Date: 29 October 2008

After numerous complaints of an unstable and frequently unavailable network, the Management of Information Technology in collaboration with the Student Council agreed on the following: All the network traffic between residences will be blocked If the cause of the unstable network cannot be identified soon. This is necessary to minimize the load which the assumed ”rooihub” users are causing on the network’s performance. It will also ensure more stable access to central services such as email and WebCT.

There was no other e-mail or warning from the IT department, only this mail that states “rooihub” is suspected of causing problems. In fact, the Stellenbosch University IT department is known for not communicating important network issues to its (paying) users.

The IT department had several alternative options available:

  1. E-mail network users and warn them not to make use of “Rooihub” software.
  2. Block the UDP port that the software used.
  3. Configure switches for better handling of possible packet floods.

The decision to cut inter-residence traffic is severely lamented by network users, and is criticized by  individuals who also note that they should be entitled to a non-crippled service since they pay for it. The poor choice in solving the problem is wholly un-academic and not on par with the standards of first-class tertiary institutions. Limiting network functionality undermines the academic environment and stifles innovation.

Ironically, at time of writing there are several websites, including Wikipedia, which cannot be accessed due to misconfigured proxy settings.

As noted by a former member of the student council: “This is the kind of thing that happens when people see something as a technical problem rather than a political one.” IT’s unfortunate behaviour does nothing but damage to Matie pride.

UPDATE: As of 2 November, 2008, the network is once again unstable and unusable. This is after inter-residence links were severed. This just makes it more probable that the network issues are due to bad configuration or hardware rather than the “rooihub” software.

Spore: Quick Review

By far the most fascinating aspect of Spore is the Spore Creature Creator. If you enjoy customizing every single little aspect of your very own race of 7 legged fish-men, then you will probably waste hours on just this aspect of the game, and admittedly it is impressive.

Spore

Cellular Stage:
The first stage of Spore was done remarkably well, in terms of actual game play, this is probably where you will have the most fun. You start off as a little single-cell organism and grow as you feed on other cells. The coolest part of this level is being able to “see through” to the higher levels of life.  You can see the outlines of giant, blurry scary creatures lurking in the background until you eat enough food to reach their level, and then you pop into their reality – your previous predators now suddenly smaller than you. This continues for a while until you’ve accumulated enough genes to start evolving legs.

Creature Stage:
Here you evolve the major features of your creature and determine its ultimate shape and attributes, while attacking or befriending neighboring creature burrows. This stage is slightly repetitive maybe, but still entertaining. Make sure your creature looks exactly the way you want it before advancing to the tribal stage, and get wings.

Tribal Stage:
As with the creature stage, you befriend or destroy neighboring settlements with the addition of rudimentary tools,weapons and instruments to enhance your creatures. More entertaining and diverse than the creature stage.

Civilization Stage:
More diverse than the tribal stage, you need to manage cities and people. You can build land, air and sea vehicles. Less fun than the tribal stage and can get slightly repetitive.

Space Stage:
Irritating as hell! The spore developers realized it would take you about 4 hours of gameplay to reach the final stage, so they try to squeeze 30 more hours out of this level. You fly around in a single spaceship, establishing trade routes, terraforming planets and conquering rival civilizations. The only problem is that, every time you want to go on your own mission, 5 alerts pop up informing you that two of your planets are under pirate attack and three are in immenant danger of ecosystem collapse, all requiring your immediate attention. So you spend 95% of the time flying to random solar systems, killing pirates and frying infected creatures, and in the mean time you’re told to try and reach the center of the galaxy to discover some ultimate treasure that the Grox (An evil, super-powerful alien species who literally collonized every planet within a 5000 planet radius around the galaxtic center) are guarding.

You can build a 4 ship fleet, but the other three ships -have- to be allied units, and of course they are useless at both attack and defense, so they get vaporised within seconds (and this pisses off your allies). So you pretty much have to battle your way through the Grox alone for a couple of hours (while ignoring the total collapse of half your and your allies’ planets because they are too useless to defend/take care of themselves.) And when you finally reach the center of the galaxy you find:

**Spoiler alert!**

A space-ship with the name “Steve”, who is basically a parody of god, telling you that you are now “One of us” and giving you 42 staff’s of life or something. This amazing gift allows you to completely terraform a planet in one go. Super useful for my militaristic race of space conquerors who rely on the hostile takeover of planets of course… Biggest let-down ever. So, returning home again through the hordes of Grox, you complete a couple of missions to fill up the green experience bar at the bottom of the screen, just to find that you actually had no reason to do so since nothing happens when it is complete. Yes, apart from reaching the galactic center and having a chat with Steve, there is no point to the space stage whatsover.

Conclusion:

This game is seriously overhyped. Get it if you like games like the Sims and like designing your own creatures, vehicles and buildings. Otherwise, the only part of it that’s really worth it is the first 25 minutes.

Afrikaans Taal Monument featured in Starship Troopers 3

Throughout the movie, some of the beach scenes and actors/actresses looked suspiciously familiar – typical Western Cape surroundings. Living about 1000m from the Afrikaans Taal monument, I almost fell off my chair when I saw this:

Afrikaans Taal Monument featuring in Starship Troopers

Afrikaans Taal Monument featuring in Starship Troopers

Epic :D

This straight-to-DVD movie wasn’t great, but it wasn’t terrible. Definately far better than Starship Troopers 2, you will probably enjoy it if you are a Starship Troopers fan. Yes, it contains senseless nudity just like the shower scene we so loved in ST1, it even has the same giant brain bug. If anything, it’s worth seeing just for the challenge of spotting the particular parts of the Western Cape where the scenes were shot.

If anybody knows which church this is (It also features in the movie), I’d be very happy if you could let me know:

Unkown (ZA?) Church

Unkown (ZA?) Church

Nomad’s Land supports “Ad Block Plus” and “EasyList”

“Ever been annoyed by all those ads and banners on the internet that often take longer to download than everything else on the page? Install Adblock Plus now and get rid of them. Right-click on a banner and choose “Adblock” from the context menu — the banner won’t be downloaded again.”

http://adblockplus.org/en/

http://easylist.adblockplus.org/

Next Gen Web Dev: Playing with Python Twisted/Nevow/Athena

AthenaI had the privilege of being introduced to the next generation of bleeding edge web development tools this weekend. This post is mainly about DivMod‘s “Nevow” which is a web templating framework, running on Twisted Matrix‘s Twisted Webserver and using DivMod’s “Athena” for asynchronous AJAX- and COMET-style browser communications.

If you are familiar with web dev, you may immediately develop a headache on the mentioning of AJAX, but believe me if I say that not only does Nevow not induce migraines, it gets you more and more excited as you realise its potential.

I really cannot properly express how nice it is to work with these tools here, so please take a moment to skim through this (very) short tutorial on creating an AJAX style chat server/client using Athena: http://divmod.org/users/oubiwann/howto/chattutorial/part01/index.html

As a first attempt, I created an AJAX style event notification system:  A site is provided with two children: /alerts and /event . When an arbitrary child page of /event is visited, such as /event/anyrandomword, a new event is created with the name “anyrandomword”. Visiting /alerts will display a list of events as they are created IN REAL TIME (without a page refresh) by anybody visiting /event/NewEventName from anywhere.

I recommend you read the source from the bottom up, most of it should be self-explanatory. The python source is available here: myelement.tac.py (About 100 lines without comments). Also required is the javascript source for adding table rows and the nice background fade-in effect: mymodule.js and an xhtml template for the alert form: tabletemplate.html

Here is the complete package, better named, better structured, but without comments: firstattempt.tar

Further Reading:
http://divmod.org/trac/wiki/DivmodNevow/Tutorial
http://divmod.org/trac/wiki/DivmodNevow/Athena/Tutorials/LiveElement
http://open.thusa.co.za/enamel