Category Archives: Internet / Communication

Ubuntu 12.10 on the Asus F201E / X201E

Since I am currently over-saturated with Apple products (MacBook, iPad, iPhone, iPod – I have them all) or Windows products (at work), I was looking for a portable notebook to escape the Apple/Windows universe every now and then to play a bit with Linux.

Requirements were that the notebook had to be light and very cheap – the latter characteristic is also good for traveling because you don’t need to worry too much that the notebook gets stolen. The choice fell on the Asus F201E that is called X201E (http://www.asus.com/Notebooks/Versatile_Performance/X201E/) in the US.

Choppy YouTube videos with shipped Ubuntu
It came preinstalled with Ubuntu 12.04 64-Bit, however the performance of fullscreen HD Flash videos was very poor. Videos on websites like YouTube were displayed very choppy and sometimes also with a lag in the audio track. Therefore, I tried to install newer graphics drivers, tried several other tweaks and a few other Linux distributions – with no real improvement.

The Asus F201E running Ubuntu 12.10.

The Asus F201E running Ubuntu 12.10.

Fresh install of Ubuntu 12.10
Finally, I found out that my favorite distribution for better performance (less choppy Flash video) and usability for desktop use (installed fonts, installed Flash plugin, drivers, clearness of the user interface) was Ubuntu 12.10. The main trick here was to take the 32-Bit version and NOT the 64-Bit version although the processor supports it.

I used Linux Live USB creator on Windows to put the downloaded iso file from Ubuntu (link) onto a USB stick and make it bootable. I booted from the stick using the legacy BIOS option by pressing ESC during startup and then selecting the USB stick in the menu and not the UEFI boot option.

The UEFI install caused a lot of trouble and did not work, also with the other Linux distributions. To save time, I therefore opted for the good old BIOS option that seemed to work. I let Ubuntu partition the entire 500 GB harddrive. The installation went fine, only a few things had to be changed to make it work as before:

Minor tweaks necessary
For a few issues, some tweaks were necessary to fix them.

Brightness keys
After the installation, the keys for the brightness were not working. This could be fixed by editing the /etc/default/grub file and changing the line “GRUB_CMDLINE_LINUX_DEFAULT=”quiet splash” to “GRUB_CMDLINE_LINUX_DEFAULT=”quiet splash acpi_osi=”. After running “sudo update-grub” in the terminal and rebooting, the keys were working again.

Network card not working
Besides, the ethernet controller was not recognized and did not work, while Wifi was functioning just fine. This could be fixed my installing the package linux-backports-modules-cw-3.6-quantal-generic. This package will install several other packages (depending on the current kernel used) and after running “modprobe alx” in the terminal as super user, the ethernet card was working also.

Asus software sources
The original Ubuntu that came with the Asus was using two special software sources, those I added again in 12.10. They were “http://asus.archive.canonical.com/updates precise-annan public” and “http://asus.archive.canonical.com/updates precise-annan public (Source Code)”. I don’t really know whether Ubuntu 12.10 is using any of these Asus packages, but for future reference, I just included them in this blog post.

System up and running
After fixing these few issues, Ubuntu 12.10 is running fine. Flash videos play more smoothly and everything seems to work just as intended. Speed-wise, the notebook naturally cannot compete with devices that have faster processors and are more expensive, but with this build quality it is a nice travel companion at the fraction of the price of a MacBook air.

Reading E-mails in the Snow

This night temperatures dropped in Oslo and finally there is some real snow.

pic
Oslo University

It is now -9°C during the day and -15°C in the night. At the University campus, snow plows were deployed to remove the snow a bit. Today, February 6th, is the Sami National Day and as a result I could see a lot of Sami and Norwegian flags on the campus.

pic
Baby change facility at the men’s toilet

Another very interesting “feature” of Scandinavia is that they are very child-friendly. You see a lot of young couples with their children walking around; in the student area where I live there are special student kindergartens (for the children of the students that is). Child-care is not only seen as a task for the mothers, but also for the fathers. As a result, I spotted this sign of a baby change facility at the men’s toilet in our library.

Communication

Since GPRS data transfer is free in the network of Teletopia, I installed Google’s Gmail for Mobile and Google Maps for Mobile on my mobile phone.

pic
Gmail

The programs are running perfectly fast and answering emails goes as quickly as writing text messages.

pic
Google Maps for Mobile

On Google Maps for Mobile, Oslo was directly displayed when I started it (so now Google not only has all my emails, but also knows where I am!). The picture above shows a map of Maastricht.

pic
Satellite view

You can even switch to a satellite view, which basically looks like Google Earth on your phone. In total, I transferred about 1 Megabyte of data, which would have cost me around 19 euros in Germany – in Oslo it is for free.

Asterisk: Use Callthrough To Avoid Roaming Charges

I just figured out an easy way to avoid unnecessary roaming charges when being abroad with your mobile phone. All you need is a running Asterisk server and a prepaid card of the country you are in. It works like this:

1. Buy a local SIM card:

When abroad, you first buy a local prepaid SIM card for your mobile phone. That means that you get a phone number for the country you are in and you can already be reached for free (okay, you have to tell your friends your new number, of course). This is by now doable because in many countries the prices for prepaid SIM cards have dropped and especially the MVNOs offer in many countries prepaid cards with cheap national call rates.

2. Register with FreeWorldDialup (FWD)

Next to that, you need an account at FWD, a free internet SIP service. Also every other SIP provider works, which accepts calls from the “open” Internet. Normally, all the providers allowing you ENUM entries should work, too. At FWD, you get a virtual SIP number (i.e. 123456).

3. Locate a local access number

The guys from SIP Broker offer many local access numbers from different countries. Locate the number, which you can reach from your purchased prepaid card for the national (cheap) rate.

4. Let Asterisk do the rest

Now activate your new FWD number in Asterisk, specify all the details in the sip.conf as usual. Now the most important part: Create a kind of dial-in menu in your extensions.conf:

In this example, incoming calls to the FWD number are signaled at extension 4444 (only the most important parts of the dialplan are shown here):

[incoming]
;incoming calls are routet to “callin”
exten => 4444,1,Goto(callin,4222,1)

[callin]
;creates a DISA menu with access to the options in “callinmenu”
exten => 4222,1,background(menu)
exten => 4222,n,DISA(no-password|callinmenu)
exten => 4222,n,Hangup

[callinmenu]
;the actual menu: pressing “1” gives you the mailbox, “2” lets you dial internal numbers, “3” lets you call normal numbers via “callthrough”

exten => 1,1,voicemailmain
exten => 1,n,Goto(callin,4222,1)

;internal calls
exten => 2,1,background(pls-entr-num-uwish2-call)
exten => 2,n,DISA(no-password|internal)
exten => 2,n,Goto(callin,4222,1)

;external calls via callthroughscript
exten => 3,1,Authenticate(1234)
exten => 3,n,Goto(callthrough,s,1)

[callthrough]
;you enter the number here, pressing “*” during a conversation ends the call and you can dial a new number
exten => s,1,Set(NR=)
exten => s,2,Background(privacy-prompt)
exten => s,3,ResponseTimeout(10)
exten => s,4,WaitExten

exten => _X,1,Set(NR=${NR}${EXTEN})
exten => _X,2,Goto(s,3)

exten => *,1,Goto(s,1)

exten => #,1,Dial(SIP/${NR}@sipoutgoing,25,Hg)
exten => #,2,GotoIf($[${DIALSTATUS} = NOANSWER]?4)
exten => #,3,GotoIf($[${DIALSTATUS} = CONGESTION]?4:5)
exten => #,4,Playback(vm-nobodyavail)
exten => #,5,Goto(s,1)
exten => #,102,Playback(tt-allbusy)

exten => t,1,Playback(vm-goodbye)
exten => t,2,HangUp

4. Let’s use it

Now that everything is ready, you can try to use your own callthrough gateway. Dial with your mobile phone the local access number. At the prompt, enter *393 (to connect to FWD) followed by the FWD number (so in total *393123456). The call is now routed from your mobile phone to the local access number and via the FWD account you just created to your Asterisk server. The server picks up and you can for instance dial “3”. Now you have to authenticate yourself (in the example press “1234” as PIN) and then you can dial the number you want to reach. This second leg of the call goes now via your normal sip provider specified in Asterisk to its final destination.

Call For Free

By doing this, you can call home for as low as 17 cent per minute (15 cent from your mobile phone to the local access number, 2 cents per minute from the server to the destination, for instance). This is lower than the standard roaming charges (around 1,40 Euro per Minute). In some countries, there are prepaid cards that allow you to call for a fixed amount to national numbers. With this combination it is theoretically possible to call for free. As always, no warranty is given for this how-to.

If you don’t have an Asterisk server, this solution would also be possible with a calling card that has a local access number. However, all the calling card providers I used in the last few years were really unreliable and the quality of the calls was often really crappy. Here you can do everything (except for the local access number) on your own.

Asterisk, My Telephone And Operation “Busy”

Finally and after a long time, again a blog entry about Asterisk, the open-source telephone system. I haven’t been using Asterisk for a while since I haven’t had a server at hand and only my laptop and a softphone, but now I found some spare time to install the latest Ubuntu release and Asterisk on an older computer. I connected an ordinary ISDN telephone to the computer, basically using my older How-To, but this time with Beronet’s mISDN drivers instead of the bristuff.

One issue that had bothered for a long time was the fact that Asterisk cannot produce (or better that I could not make Asterisk produce) a correct “busy” signal to a SIP caller. Instead, when somebody called me via my SIP telephone number and I was talking to someone else already, the line remained dead to the caller and timed out after a while. Although there are commands like DIALSTATUS or ChanIsAvail, they don’t seem to work with a SIP call.

So I spent the whole weekend (yes, I had nothing else to do) figuring out what I could do about this. If you use it, you are responsible for any mistakes that might still be in there yourself, so this is just BETA, but for me it works perfectly. I came up with the following solution, in case someone is interested:

The theory is as follows: Suppose we have a few internal telephones, all with numbers 21XX. Now everytime a phone calls another phone, a “busy” variable is incremented. For instance, telephone 1 calls telephone 2. For both phones the busy variable is increased by one, so that busy2101=1 and busy2102=1 (2101 and 2102 are the numbers of the phones, respectively). If now a third phone (2103) calls 2101, Asterisk checks the busy variable. If it is greater than 0 (meaning that the phone is busy), it will signal the caller “busy” or route the call to the voicemail or whatever. If the busy variable is 0, it means the extension is free and the call goes through.

So why not simply use 1 for “busy” and 0 for “free” in the busy variable instead of increasing it? This was actually my first attempt, but the problem occured when the call was hung up. Then the variable was set back to 0 for both the caller and the callee, although the callee might still be in a conversation with someone else. If you then were to try the extension again, the busy variable would show 0 and thus free and the call would be routed to the extension, although being “busy”.

By incrementing the variables, it is possible to solve this problem. If 2101 calls 2102, both get 1 in their variables. If then 2103 calls 2102, 2103 gets 1 in its busy variable and checks the status of 2102’s busy variable. Even when this is busy now, the variable of 2102 is incremented again by 1 so that it becomes 2. If 2103 now hangs up the call, both variables 2103 and 2102 are reduced by 1 so that 2103 gets 0 and 2102 get 2-1=1. This means that 2102 is still busy. When 2101 ends the call with 2102, both reduce their variables by 1 and finally 2102’s busy variable becomes 0 and the extension free.

It might be a bit difficult to understand but maybe it looks clearer in the dialplan (oh, I still hate Asterisk’s syntax):

I wrote it as a macro, which you call via this:
exten => _21.,1,Macro(internalcallsetup,${EXTEN},${CALLERIDNUM})

EXTEN gives the macro the dialled extension, CALLERIDNUM gives the number of the telephone which is calling.

[macro-internalcallsetup]

; ${ARG1} = Extension
; ${ARG2} = Caller ID number
; internal calls possible, therefore both parties need to be set "busy"

;this is just to wait for further digits to be dialled (mISDN specific)
exten => s,1,Waitfordigits(3000)

;the busy variables have to be 0 before we start, therefore
;check whether variables are defined and if not so, set them 0
;thanks to the IP-Phone-Forum.de for helping me with the correct IF function
exten => s,2,GoToIF($[x${busy${ARG2}}=x]?3:4)
exten => s,3,SetGlobalVar(busy${ARG2}=0)
exten => s,4,GotoIF($[x${busy${ARG1}}=x]?5:6)
exten => s,5,SetGlobalVar(busy${ARG1}=0)

;now the caller is set busy (increment +1)
exten => s,6,SetGlobalVar(busy${ARG2}=$[${busy${ARG2}}+1])

;now we check if the callee is busy, if so we jump to 50, else ...
exten => s,n,Gotoif($["${busy${ARG1}}" > "0"]?50)

; ... we set callee busy now (increment +1)
exten => s,n,SetGlobalVar(busy${ARG1}=$[${busy${ARG1}}+1])

; ... and call
exten => s,n,Dial(SIP/${ARG1},60)
exten => s,n,Hangup

; if busy, we nevertheless increment the callee +1
exten => s,50,SetGlobalVar(busy${ARG1}=$[${busy${ARG1}}+1])

; and do whatever we like to show that he/she is busy
exten => s,n,Answer
exten => s,n,Playback(vm-nobodyavail)
exten => s,n,Busy
exten => s,n,Hangup

;now we reset the busy variables by subtracting 1 to the prior state
;when the connection is hung up
exten => h,1,SetGlobalVar(busy${ARG2}=$[${busy${ARG2}}-1])
exten => h,n,SetGlobalVar(busy${ARG1}=$[${busy${ARG1}}-1])

That’s it! I know there is this GROUP feature in Asterisk, which basically does the same (I haven’t tested it, though), but this here works as well. Of course the example above is only for internal calls, if you call externally you also need to set the caller busy. In my dialplan I have implemented this for all contexts and it seems to work so far.

You could also use the busy variables to limit the number of calls to an extension. For instance, 2103 could be allowed to only receive or call 2 numbers at a time and so on.

Happy Birthday: Amazon Turns Ten

In all my university courses that deal anyhow with the topics internet, e-commerce, e-business or online marketing, this company is most likely to be dealt with: Amazon.com, the first online book store, celebrates its 10th birthday in the coming week. Everything started on July 16th 1995 in a Seattle-base garage. To celebrate, Amazon has special offers and several “surprises“. Amongst those is a live concert that will be streamed via the company’s website.

To get to know more about the company, the New York Times has an interesting article about the “Retail Revolution“. USA Today features an interview with Amazon founder and CEO Jeff Bezos.

University anywhere

Anywhere
My Linux desktop with the Citrix client logged on

My university is currently testing in a project named “Student Desktop Anywhere” a service that allows students to log on to the university’s Citrix servers and work as if they were in the library. I am taking part in this beta test.

To log on, I have to open a website and click on a button. Then the Citrix client starts and a window pops up with exactly the same deskop and all the applications as in our library. I can access all the journals and programmes that are normally blocked for outsiders. I tested it with the Citrix client 9.0 and Mozilla Firefox running SuSE 9.2.

Also the speed is incredible. You can comfortably surf the web using the Internet Explorer of Windows 2000. When you scroll down a page, only a minimal delay is noticeable. Video and audio streams, however, don’t work. Maybe I have to configure the client accordingly. I didn’t specify a drive to map, either. It would be nice if the university were to open this service for all the students.

“Prototypical Nerds”

Wired features an article about amateur radio (also called ham radio), which is also my hobby.

Hams are characterized as being “the planet’s prototypical nerds”. Next to that, the article mentions the Hamvention in Dayton. In Europe, a similar fair is the “Ham Radio” in Friedrichshafen, Germany. I’ve been there two or three times already and its really nice to catch up with the latest developments and experience the so-called ham spirit.

Emergency Call

I was in Bonn today to search for some books in a (physical) bookstore. I was walking through the pedestrian precinct when suddenly a glass bottle was smashed on the ground. The sound was followed by someone screaming and then I saw what happened: a kind of big guy, drunk or on drugs, I’m not sure, was standing in front of a shop and shouting at a woman. He got violent and started to beat and push the woman. The scene quickly attracted other people who were just looking at what happened. The person continued his strange behavior and began to beat other people.

pic
German Police Car

Because nobody did anything, I decided to call the police. I dialed 110 with my mobile phone, Germany’s emergency number for the police. 112 would have worked as well, by the way. The call quickly went through and was picked up by a police officer. I told him what happened, he just noted my name and ordered a patrol to the location. Within 6 long minutes, two “wannabe” policemen dressed in blue suits arrived (I don’t know exactly from which organization they came, but it wasn’t real police) and urged the person to leave. He finally disappeared in a side street.

From a technical point of view, it was quite interesting to see how fast the emergency call went through. I have read a lot about how GSM networks work and in the specs of the standards, certain rules for emercency calls are defined. That is, for instance, that you don’t need a SIM card to call the police. Furthermore, emergency calls are handled with priority, even terminating non-priority calls when a cell is congested. In my case, it took only about 1 or 2 seconds to hear the dial tone. A normal call usually needs at least 5 seconds until the phone at the other end starts to ring.

Unfortunately, there is a lot of abuse of this “feature”. On some second-hand markets, where used phones are sold without a SIM card, the seller often calls one of the emergency numbers to show the potential buyer that the phone works. Needless to say that this is an absolutely unacceptable behavior. Plans exist to store the IMEI, the phone’s identification number, of the caller for a possible future prosecution.

IBM to dispose PC business?

The New York Times reports that there are, “according to people close to the negotiations”, plans at IBM to dispose the PC business branch, inlcuding desktop computers and laptops. There are “discussions” with China’s largest maker of personal computers Lenovo, one of the potential buyers. IBM is said wanting to focus more one the corporate server and business services market, which contribute more to the annual revenues than the desktop computers. However, all this is speculation and IBM has not yet commented on it.