32C3 – Approaching 20 Gbit/s of Outbound Traffic

Approaching-20-gbit12.000 people have bought tickets for the 32C3 and while they consumer a lot of data from the Internet it's easily dwarfed by the amount of data that is flowing from the congress to the outside world. How much of that are the live and recorded video streams is hard to tell but I guess it might be a fair amount. The screenshot on the left shows the state of affairs at 6 pm on day 2 of the congress:

  • Outgoing traffic keeps growing and now approaches 20 Gbit/s.
  • Incoming traffic is at 5.6 Gbit/s, 3 Gbit/s flowing to 7800 wireless devices over 146 Wi-Fi access points.

Amazing numbers and the 5 GHz Wifi is working just great for me! Only once did I have to fall back to the LTE network coverage so far which was during the intro session and key note in the huge conference hall during day 1 which can hold 3000 people. There are at least 8 Wifi access points in there which handle the load just fine at other times.

32C3 – Recommended Videos of Day 1

It's day 2 of the 32C3 in Hamburg and I'm really happy that I was able to attend in person this year. My previous tip to use a 5 GHz Wifi capable Android phone as a WiFi USB dongle for my notebook has paid out as the 2.4 GHz range is hopelessly overloaded in most places as promised. With 12.000 people attending and more streams going on in parallel than one could ever hope to follow it's total information overload so my pre-planning of what to attend paid out. In the meantime the video streams from day one are online and I can personally recommend the following ones I attended:

Towards (reasonably) trustworthy x86 laptops: Ever felt save by running Linux on your notebook? No? Well, then you probably have Coreboot as a Bios replacment and fell much better. Yes? No, have a look at the video of this session to get an idea of how Intel ME and the little microprocessors and flash in many other components of your notebook make it very hard to have trust in your hardware.

Running your own 3G/3.5G network: GSM and Osmocom are old friends and LaF0rge is working hard to bring 3G femtocells into the mix. He's almost there and if you ever wondered if you were just a bit dumb or whether ASN.1 is just a bit hard to understand, the talk will give you an answer as well. The stream's not yet online at the time of writing this but I'm sure you'll find it here by the time you read this.

How the (not so) Great Firewall discovers hidden circumvention servers: Very interesting presentation on research is presented here on how the Chinese Internet firewall actively reaches out to find out if a web server is really a web server or a hidden TOR gateway.

The Ultimate Amiga 500 Talk: For computer historians who had an Amiga of their own this 60 minute talk is a great refresher on the Amiga 500 hardware and programming. Those were the days 🙂

Lots and lots of other stuff was presented on day one is now online which will keep me busy once I'm back home as it's impossible to follow it all in real time. So head over and enjoy.

Things That Moved Me In 2015

It’s become almost a tradition for me in December each year to have a look back at what happened in the previous 12 months in the telecoms industry and in my private technology endeavors that have left long lasting impression or have marked the start of something new.  And so here we go again, in the 10th year of this blog’s existence. Yes, it has already been a decade, time passes quickly!

First lets have a look at the telecoms sector. Early in 2015, 3GPP announced that they have embarked on their voyage to 5G and have published a time table that shows what they intend to do right into the 2020s. Everybody is talking about it but nobody seems to know what it really is. NGNM has published a whitpaper containing use cases and 3GPP now looks how specifications can be enhanced and newly created to fulfill those visions. I had quite a number of posts on various aspects of 5G, such as thinking about what 5G is in the first place, debunking the 1 ms 5G myth and two looks at the use of super high frequencies beyond 5 GHz, stating that such frequency bands are only usable for transmitting data over very short distances and an opposite statement made in a very interesting IEEE paper.

On the other end of the spectrum, GSM networks are starting to be switched-off and many announcing a switch-off in the years to come. 3G also has limited lifetime left with some network operators thinking about a 2020 switch-off date. Personally, I can’t wait for GSM to be switched-off.

In recent years we have seen quite a number of network operators merging in different parts of Europe, thus reducing competition which made me wonder if Free in France will keep the title as last launched 4th network operator in Europe forever. There are certainly no signs they are going to lose that tile anytime soon.

Speaking of evolution I had a look back of how mobiles looked like a couple of years ago to show what has changed in mobile computing in the last 5 years and how that compares to the (few) changes in the desktop computer industry. Quite a contrast. And speaking of change, we are now officially past peak telephony in many countries in Europe including Germany when fixed line and mobile phone minutes are combined.

Over the clouds we haven’t peaked anywhere yet when it comes to connectivity. I had a number of positive ‘over the cloud’ connectivity experiences this year but with LTE ground to air it is likely to be topped in the future.

Back on earth with wires attached, I’ve been migrated from VDSL+ISDN at home to an all-IP connection with fixed line VoIP. Not that it had been my free will but I got quite a number of advantages from the move, including an upgrade from 25 to 50 Mbit/s in the downlink direction, from 5 to 10 Mbit/s in the uplink direction and HD-voice speech quality between fixed line and mobile.

Staying for a moment longer in the voice call domain, despite moving past peak telephony, I was really glad to get rid of Skype on the PC and to put it on a tablet where this proprietary piece of software will hopefully do less harm. On the other hand, I learned to like Skype while traveling to Asia as Skype over LTE is significantly cheaper than circuit switched voice for me while voice quality is significantly better. Not that I would install it on my mobile device that contains my private data but I rarely travel with only a single mobile device.

On the hardware side there have been a number of really important projects for my private development this year. The most important one, no doubt, has been the 4-Bit Nibbler CPU project about which I had many blog entries and on which I spend many weeks to put it together and finally realizing my dream understanding how computers really work by actually building a CPU from several chips.

On a more global scale, I was rocked by the announcement of the Raspberry Pi Zero, the first fully working computer that has been shipped as a magazine complement. This is a milestone in computing history not only for being small and cheap enough to fit onto the cover of a computer magazine. If you’ve lived under a stone for the past few months and haven’t heard of it, this is the story to check out!

When it comes to vintage computing, 2015 has also been an interesting year for me in that area, too. I’m a proud owner again of a Commodore C64 and an Amiga 500 and disk drives that take today’s SD cards instead of real 5.25 or 3.5 floppy disks have greatly helped me to explore my personal computing history and home computing history in general. The culmination in my vintage adventure has certainly been the 30th anniversary celebration of the Amiga in Neuss, Germany and the many people I met there with a similar passion for the home computers that had a significant impact on them when they were teenagers.

Before I get too nostalgic let’s better get back to 2015. My software discovery of the year has certainly been ‘Conversations’ an open source XMPP client app for Android that looks and feels very much like Whatsapp but offers privacy and confidentiality without compromising usability. I’m using it for about half a year now and in the meantime I’ve been able to convince quite a number of my friends that this is the way to communicate not only with me but also with their friends. Further on the software side, the Selfoss RSS reader continues to be an important tool I user several times a day to keep up to date with what is going on in the world. As it’s open source, I contributed some code for it as part of keeping myself current with PHP and database programming.

And last, but not least, I’ve read a couple of great books about computing this year, especially to better understand computing history and the history of free and open source software. ‘The Innovators‘ and ‘Fire in the Valley‘ comes to mind as well as ‘Rebel Code‘,  ‘Commodore – A Company on the Edge’,  ‘Amiga – The Future was here’ and ‘Diary of an 80s Computer Geek‘. And on the fiction side, I very much enjoyed ‘Chronos‘ and ‘The Martian‘, both excellent reads. As far as ‘The Martian’ is concerned, there’s a movie based on the book now, which I haven’t seen because in my opinion there’s no way it can be even half as good as the book has been. So if you haven’t seen it either, my advice is not to go for the DVD but to read the book.

There we go, this has been 2015 for me on the technology side. What a great year!

No 5 GHz Wifi in Your Notebook For 32C3? Use Your Smartphone As A Wi-Fi Dongle over USB!

Usb-tethering-wifiIt almost time for the 32C3 now and I'm on my way to attend in person this year. One thing the organizers have kept pointing out over the last few years is that due to the very limited spectrum available in the 2.4 GHz band, the network experience will be rather mediocre in this band. To get much better throughput, participants are advised to use the 5 GHz band instead. That's all nice and well but my notebook, and I guess the notebooks of many others, does not support the 5 GHz band with the built-in Wi-Fi PCI card. But there's an elegant solution!

These days even medium-priced smartphones come with 2.4 + 5 GHz Wi-Fi built in. What many people don't know is that the smartphones Internet connectivity, no matter whether it is over cellular or over Wi-Fi can be shared with a PC over USB. It's called USB tethering and can be activated in the tethering menu as shown on the left.

To make sure Wi-Fi is used as the backhaul, go to flight mode and only enable Wi-Fi on the smartphone. On the PC, disable Wi-Fi connectivity. Once the smartphone is connected to the Wi-Fi network, connect it to the PC and activate USB tethering if not already done. And that's it, your smartphone is now acting as a USB Wi-Fi dongle for your PC.

Note: I'm not sure if Windows requires a driver for this to work but on Ubuntu this works out of the box. But who uses Windows at the 32C3 anyway…

The 4-Bit Nibbler CPU and Bitscope for Layer 1 Logic Analysis Fun

Nibbler-bitscope-smAfter a closer look at how to program the 4-Bit Nibbler CPU and how to cope with its intentional limitations it was time to go one step further and have a closer look at how the hardware works one layer further down. To see the signals and how they propagate through the system a logic analyzer is needed with as many inputs as possible to trace digital signals at different places. Unfortunately, most logic analyzers I found are not cheap, costing several hundred euros even for entry level models. Another alternative would have been to buy a cheap clone hardware from China and then use it with software from the original vendor. As I don't think that's fair I never considered that approach either. But thanks to the January 2016 edition of the Linux Voice magazine I stumbled across the Bitscope Micro, a 2 channel low cost oscilloscope and 8 channel logic analyzer that costs around 120 Euros, tax and shipping included. That's quite in the range of what I was willing to spend. In addition they offer their software for Windows, the Mac and also for Linux. In other words, a perfect match for my needs.

Bitscope screenshotThe logic analyzer can sample digital signals at a rate of up to 40 MSamples/s, enough to have a decent resolution for my Nibbler board running at 2.4 MHz. Any channel can be used as a trigger with rising and falling flanks or a high and low signal level so it's possible to capture signals at a specific moment. The picture and screenshot on the left shows the Bitscope Micro connected to the Nibbler and a commented screenshot that shows how instructions are read from the ROM and put into the instruction register two clock cycles later. For the screenshot I used the blinking LED program that just uses 5 instructions to switch the LED on and off again and then jumps back to the beginning of the program. In total that is exactly 10 clock cycles in which the instructions repeat over and over. This way it's easy to find the beginning and the end of the loop when looking at the signal levels. I spent many hours analyzing traces of signals from many different parts to confirm my theoretical knowledge of how the control unit, clock and phase make the system "come alive". A wonderful exercise during which I once again learnt a lot about what makes a computer really tick.

VoLTE Roaming – S8HR in 3GPP S8HR TR 23.749

In Ocotober 2015, NTT Docomo was the first network operator who has started VoLTE Roaming based on a pre-standard implementation of the S8 Home Routing (S8HR) concept. I wrote about it at the time and speculated how they might have implemented the service as there was little official technical documentation available. In the meantime, 3GPP has continued their investigation of what is necessary to fully standardize the S8-HR concept and the details can be found in Technical Report (which is not a specification, it's just a report) TR 23.749 for 3GPP Release 14 (!). In December 2015, version 1.0.0. of the document was published that contains a number of interesting insights into what is already available and what is still missing in the specifications depending on which features an operator wants to use for VoLTE S8HR Roaming.

Dedicated Bearers for voice packets possible: At the time I wrote that if a network operator wants to play things purely on his own, VoLTE Roaming can be deployed without any interaction with the visited network operator except for the need, of course, to have a general LTE roaming requirement in place. If some more cooperation between home and visited network is put in place it is even possible to assign a dedicated bearer for voice packets by the IMS system in the home network to prefer voice packets in the network and especially on the air interface.

As shown in TR 23.749 in figure 4-2.1 this works without any additional specification work as the PCRF (Packet Control Resource Function) in the home network is told by the VoLTE IMS system in the home network to establish a dedicated bearer. The PCRF then talks to the Packet Gateway (P-GW) in the home network which in turn forwards the request to the Serving Gateway (S-GW) in the visited network. From there it goes to the LTE base station (eNodeB) and from there to the mobile device. In principle it is the same message flow as in a non-roaming scenario but the roaming interconnect has to let such configuration messages pass between P-GW and S-GW. The big advantage of the approach is that the VoLTE client on the mobile device does not have to behave differently when roaming abroad, i.e. there is no need for it to decide whether it has to wait for a dedicated bearer for the voice packets or not before proceeding the call.

Single Radio Voice Call Continuity: One of the main drawbacks off S8-HR VoLTE roaming that it is more difficult to put a mechanism in place to switched over from an IP-based LTE bearer to a circuit switched 2G or 3G channel at the edge of LTE coverage. TR. 23.749 points out that from an architectural point of view, no additional specifications are necessary for SR-VCC to work across borders in a Release 8 SR-VCC configuration. I presume, however, that quite a number of network operators have already gone to a post-Release 8 SR-VCC implementation in the network which has a number of additional components to speed up the process. For this setup, SR-VCC across borders is not possible with the current specification. Interestingly enough the 3GPP technical report excludes discussions of potential solutions from the document. In other words, it seems to be complicated enough to be put into a separate TR. It would be interesting to know of Docomo has actually implemented SR-VCC for their S8HR VoLTE roaming with Korea or if they just went ahead without it as LTE coverage is said to be pretty much deployed everywhere in Korea in the meantime anyway so there's no need for it in the first place.

There are two other topics discussed in the technical report, how emergency calls could be made properly and how to best signal to the VoLTE IMS system that the device is not at home but roaming in another country. Falling back to 2G or 3G cellular for emergency calls is a quick and working solution but the report also gives some details of how it could be done over VoLTE. If you are interested have a look at the document.

While the document had a few positive surprises for me it by and large confirms that S8HR VoLTE roaming should not be too difficult to implement and I wonder how long it will take for other network operators to follow Docomo's lead!?

Ubuntu – Have Two Windows Share the Screen

Tip of the day: Sometimes simple things can massively improve productivity! Recently I saw a friend resizing two windows on a Mac with a key combination so they each occupied exactly half of the screen. That's very helpful in many situations I thought and immediately wondered if and how that would work on Ubuntu as well. And indeed there are key combinations for resizing windows this way as well:

To set a window occupying the left half of the screen use this shortcut:

Ctrl + Super + ←

And for the right half:

Ctrl + Super + →

(Super = the W*ndows key…)

The Nibbler 4-Bit CPU Project – Learn to Love What You Don’t Have – And Work Around It

The Nibbler 4-Bit CPU board is optimized for exactly one thing: Creating a fully functional computer with a CPU split into its components with as few chips as possible to make it easy to build it and to actually understand what is going on. It does an excellent job at this and one can even learn a lot about CPU architecture design from stuff that has been left out of the design on purpose. Here are a couple of examples and how to work around the missing parts:

No stack: Whenever writing a program that does more than just switching an LED on and off it's almost certain that the program will be split up into subroutines or that one uses a library of routines built by others. To be able to jump and return to a subroutine from several places, the current content of the program counter is put on the stack to serve as a return address. In addition, all input variables to be used by the subroutine are pushed onto the stack as well. The subroutine then retrieves (“pops”) the variables from the stack, does whatever it needs to do and then executes a 'Return from Subroutine' CPU instruction. The CPU then puts the return address that was put on the stack back into the program counter which effectively returns to the main program thread. As the Nibbler does not have a stack it's not possible push the program counter and variables on the stack and return from a subroutine to various places with a single instruction at the end of the subroutine. The way to work around this is to implement a jump cascade at the end of a subroutine. Whenever the subroutine is re-used, the jump cascade has to be modified by inserting a new return target at the end. Which jump to take is written into a memory location before jumping to the subroutine. A different value is used from each jump location. In other words, if the subroutine is used in 8 places in the program there is a cascade of cmp/jz instructions at the end of the subroutine. Also, the subroutine has to be modified whenever it's used from an additional location. Not elegant at all but the only way to have subroutines without a stack. To pass variables to the subroutine, they have to be put in memory (the 'heap') at predefined locations. I'm pretty sure if somebody has never ever heard of the 'stack' concept it wouldn't take long to come up with it as it's just a pain to do just about anything without one.

No indexed addressing: One thing computers are good at is to do simple things quickly over and over again. For example, in many cases it's required to make the same calculation on consecutive input data and to put the results back into memory one after each other. Another repetitive thing is to write into a buffer, e.g. writing a string to be sent to the LCD display into a buffer, one byte (or nibble in this case) at a time. An elegant way to do this is to do repetitive things in in a loop by using an index variable to point to the current input parameters and an index variable that points to where the next output in a buffer can be written to. The way this is done on machine instruction level is called indexed addressing. An instruction to write into memory is given a base address to which the content of an index register is added. After writing to memory, the index register is increased by one and the next loop iteration begins. Thing is, there is no index register on the Nibbler and therefore no indexed addressing, again for the purpose of making the hardware as simple as possible. The only way to work around this is to do repetitive things one after another rather than in a loop. If an action needs to be repeated 20 times, no loop can be used. Instead, the same instructions have to be repeated 20 times in the code with different source and destination addresses. Like the return cascades above, the missing functionality produces very ugly code and makes more complicated stuff that requires many iterations over different input and/or output data difficult to implement on the Nibbler.

No hardware interrupts: A great way of checking for external events is to use hardware interrupts. When the CPU notices an interrupt bit being set it suspends normal program execution and automatically sets the program counter to the beginning of a service routine for that interrupt. This makes it easy, for example, to check for the user pressing a key and to react to it immediately without delay. On PCs, hardware (and software) interrupts are used for many things such as for example peripheral devices indicating that data has become available for processing. It should come as no surprise that the Nibbler does not have interrupts. Checking for key input on the Nibbler thus requires polling the single 4 bit input register to detect when a bit connected to one of the input keys changes its state. This has to be done frequently as otherwise there will be a noticeable delay between the user pressing a key and the computer reacting. In programs that use delay loops between activities, checking for key input must be done in the delay loops to avoid this lag.

No add with carry: Another thing that very much simplifies the hardware design but makes life difficult on the software side is that there is no add with carry instruction. Therefore, adding up integers that are comprised of more than a nibble requires saving the carry flag in a variable and checking for it when using the add command on the next nibble. In practice even more work has to be done because a carry bit can result from adding one value to another or from adding the carry bit to a value. Together with not having an index register makes the whole affair quite complicated in practice.

Every instruction executed in two clock cycles: One of the brilliant design choices that significantly reduces hardware complexity is to execute every instruction in exactly two clock cycles. In the first clock cycle the instruction is loaded into the FETCH register and then executed during the second clock cycle. As the first clock cycle has also advanced the program counter the new 8 bits from the program ROM will either be used as the next instruction in case the program counter is not increased during the second clock cycle for the current instruction or as the lower 8 bits in combination with another 4 bits of the current instruction and put on the address bus to use the content of a RAM cell as the second operand in an operation. Very clever but that obviously also limits the complexity of a task that can be done with an instruction. That's why more complex CPUs use a variable number of steps per instruction and a more generic addressing scheme. Needless to say that more hardware would be required for that. And on the other hand there are only 16 instructions anyway so there's little opportunity for making some of them more complex.

Lots of technical detail in this post, perhaps better understood when looking directly at the source code. I've put one of my programs I've done for the Nibbler on Github which goes into the details of all the topics mentioned above. It can be compiled and run in the Nibbler simulator or, of course, on the real hardware.

VDSL Speed Upgrade and All-IP – My ISDN Days Are Over

Decomissioned-isdn-equipmentI'm a bit nostalgic today because my ISDN telephony days are over. A few days ago, I was “upgraded” to an all-IP line at home because my network operator of choice wants to decommission its ISDN public telephone network, offer VDSL vectoring (instead of fiber connectivity, yeah, right…) and migrate everyone to Voice Over IP. For me an era comes to an end.

Back in the days at the end of the 1990's when 52 kbit/s modems for analog lines where the hype of the day I switched to an ISDN line at home so I could make phone calls and be connected to the Internet at the same time. Another plus was being able to bundle the two 64 kbit/s ISDN channels for a blazing Internet speed of 128 kbit/s. Back in the day that was not only considered ultra-fast but it actually also felt like it as web pages and stuff to download were tiny compared to the multi-megabyte downloads when accessing a single web page these days with all the adds included (if you don't have an add-blocker installed). Even when I switched from ISDN to DSL for Internet access I kept my ISDN line to benefit from several phone numbers, immediate call forwarding to other destinations on some of them and other 'digital' features that were not so easy to get on analog lines.

Now after almost 20 years, ISDN has gone. The picture on the left shows my decommissioned ISDN equipment: ISDN base phone with a DECT unit, a DECT cordless phone, DSL/ISDN splitter and an NTBA (ISDN network terminator). But to sweeten things up I got four very worthwhile things as part of the “upgrade”.

First, in anticipation of the switch, I bought a new fixed line cordless DECT (or CAT-iq as it's called today) phone a few months ago that can be connected to both ISDN and a VoIP core network which is HD-Voice capable. Not only will I have a much better voice quality to other VoIP fixed line phones in the country, but there's also an HD-Voice gateway between the VoIP fixed line network and my mobile network operator of choice's GSM and UMTS network that converts the 12.2 kbit/s WB-AMR codec used in mobile networks (G.722.2) into the 64 kbit/s wideband codec used in fixed line networks (G.722). Works great and the audio quality is much improved.

Second, my VDSL line was upgraded from 25 Mbit/s in the downlink direction and 5 Mbit/s in the uplink direction to 50 down and 10 up. I fail to be really impressed by that as my fiber line in Paris gives me 264 Mbit/s in the downlink and 48 Mbit/s in the uplink. But every bit/s counts and I did notice the increased speed immediately when I downloaded a Linux image the other day. Also, my VPN server and Owncloud server that I host at home very much benefit from the 10 Mbit/s in the uplink direction.

Third, my VDSL line is now IPv6 enabled so I will finally be able to connect to my servers over IPv6 while out and about, at least while I'm in my home country, as my mobile network operator of choice has introduced IPv4v6 connectivity this summer. Also, it will help me to better understand the IPv6 firewall features of the mobile network and my VDSL router at home. More about that in a future post.

And finally, the overall package now only costs about half of what I paid before. I'm the conservative type when it comes to connectivity so I hadn't changed my fixed line subscription in 6 years. Never change a running system…