<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="../../assets/xml/rss.xsl" media="all"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>LaForge's home page (GSM/GPRS/UMTS/LTE Protocol related)</title><link>https://laforge.gnumonks.org/</link><description>GSM/GPRS/UMTS/LTE Protocol related</description><atom:link href="https://laforge.gnumonks.org/blog/categories/gsm.xml" rel="self" type="application/rss+xml"></atom:link><language>en</language><lastBuildDate>Thu, 24 Oct 2024 20:08:49 GMT</lastBuildDate><generator>Nikola (getnikola.com)</generator><docs>http://blogs.law.harvard.edu/tech/rss</docs><item><title>Notfallwarnung im Mobilfunknetz + Cell Broadcast (Teil 2)</title><link>https://laforge.gnumonks.org/blog/20210720-smscb/</link><dc:creator>Harald Welte</dc:creator><description>&lt;p&gt;[excuse this German-language post, this is targeted at the current German public discourse]&lt;/p&gt;
&lt;p&gt;Ein paar Ergänzungen zu meinem blog-post gestern.&lt;/p&gt;
&lt;p&gt;Ich benutzt den generischen Begriff PWS statt SMSCB, weil SMSCB strikt genommen nur im 2G-System
existiert, und nur ein Layer ist, der dort für Notfallalarmierung verwendet wird.&lt;/p&gt;
&lt;section id="zu-notfallwarn-apps"&gt;
&lt;h2&gt;Zu Notfallwarn-Apps&lt;/h2&gt;
&lt;p&gt;Natürlich sind spezielle, nationale Deutsche Katastrophenschutz-Apps auch nützlich!  Aber diese sollten
allenfalls zusätzlich angeboten werden, nachdem man erstmal die grundlegende Alarmierung konform der
relevanten internationalen (und auch EU-)Standards via Cell Broadcast / PWS realisiert.  Man sagt ja auch
nicht: Nachrichtensendungen braucht man im Radio nicht mehr, weil man die bereits im Fernsehen hat.  Man will
auf allen verfügbaren Kanälen senden, und zunächst jene mit möglichst universeller Reichweite und klaren
technischen Vorteilen benutzen, bevor man dann zusätzlich auch auf anderen Kanälen alarmiert.&lt;/p&gt;
&lt;/section&gt;
&lt;section id="wie-sieht-pws-fur-mich-als-anwender-aus"&gt;
&lt;h2&gt;Wie sieht PWS für mich als Anwender aus&lt;/h2&gt;
&lt;p&gt;Hier scheint es größere Missverständnisse zu geben, wie das auf dem Telefon letztlich aussieht.  Ist ja auch
verständlich, hierzulande sieht man das nie, ausser man ist zufällig in einem Labor/Basttel-Netz z.B. auf
einer CCC-Veranstaltung unterwegs, in der das Osmocom-Projekt mal solche Nachrichten versendet hat.&lt;/p&gt;
&lt;p&gt;Die PWS (ETWS, CMAS, WEA, KPAS, EU-ALERT, ...) nachrichten werden vom Telefon empfangen, und dann je nach
Konfiguration und Priorität behandelt.  Für die USA ist im WEA vorgeschrieben, dass Alarme einer bestimmten
Prioritatsklasse (z.B. der &lt;em&gt;Presidential Level Alert&lt;/em&gt;) &lt;strong&gt;immer zwangsweise zur Anzeige gebracht werden und
immer mit einem lauten sirenenartigen Alarmton einhergehen&lt;/strong&gt;.  Es ist sogar explizit verboten, dass der
Anwender diese Alarme irgendwo ausstellen, stumm schalten o.ä. kann.   Insofern spielt es keine Rolle,
ob das Telefon gerade Lautlos gestellt ist, oder es nicht gerade unmittelbar bei mir ist.&lt;/p&gt;
&lt;p&gt;Bei manchen Geräten werden die Warnungen sogar mittels einer text2speech-Engine laut über den Lautsprecher
vorgelesen, nachdem der Alarmton erscheint.  Ob das eine regulatorische Anforderung eines der nationalen
System ist, weiss ich nicht - ich habe es jedenfalls bereits in manchen Fällen gesehen, als ich mittels
Osmocom-Software solche Alarme in privaten Labornetzen versandt habe.&lt;/p&gt;
&lt;/section&gt;
&lt;section id="noch-ein-paar-technische-details"&gt;
&lt;h2&gt;Noch ein paar technische Details&lt;/h2&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;p&gt;PWS-Nachrichten werden &lt;strong&gt;auch dann noch ausgestrahlt, wenn die Zelle ihre Netzanbindung verloren hat&lt;/strong&gt;.  Wenn
also z.B. das Glasfaserkabel zum Kernnetz bereits weg ist, aber noch Strom da ist, werden bereits vorher vom
CBC (Cell Broadcast Centre) an die Mobilfunkzelle übermittelte Warnungen entsprechend ihrer
Gültigkeitsdauer weiter autonom von der Zelle ausgesendet  Das ist wieder ein inhärenter technischer
Vorteil, der niemals mit einer App erreichbar ist, weil diese erfordert dass das komplette Mobilfunknetz mit
allen internen Verbindungen und dem Kernnetz sowie die Internetverbindung vom Netzbetreiber zum Server des
App-Anbieters durchgehend funktioniert.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;PWS-Nachrichten können zumindest technisch auch von Telefonen empfangen werden, die garnicht im Netz
eingebucht sind, oder die keine SIM eingelegt haben.  Ob dies in den Standards gefordert wird, und/oder
ob dies die jeweilige Telefonsoftware das so umsetzt, weiss ich nicht und müsste man prüfen.  Technisch
liegt es nahe, ähnlich wie das Absetzen von Notrufen, das ja auch technisch in diesen Fällen möglich ist.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/section&gt;
&lt;section id="zu-den-kosten"&gt;
&lt;h2&gt;Zu den Kosten&lt;/h2&gt;
&lt;p&gt;Wenn - wie in der idealen Welt -  das Vorhalten von Notfallalarmierung eine Vorgabe bereits zum Zeitpunkt der
Lizenzvergabe für Funkfrequenzen gewesen wäre, wäre das alles einfach ganz lautlos von Anfang an immer
unterstützt gewesen.  Keiner hätte extra Geld investieren müssen, weil diese minimale technische Vorgabe dann
ja bereits Teil der Ausschreibungen der Betreiber für den Einkauf ihres Equipments gewesen wäre.  Zudem hatten
wir ja bereits in der Vergangenheit Cell Brodacast in allen drei Deutschen Netzen, d.h. die Technik war mal
[aus ganz andern Gründen] vorhanden aber wurde irgendwann weggespart.&lt;/p&gt;
&lt;p&gt;Das jetzt nachträglich einzuführen heisst natürlich, dass es niemand eingeplant hat, und dass jeder beteiligte
am Markt sich das vergolden lassen will.  Die Hersteller freuen sich in etwa wie "Oh, Ihr wollt jetzt mehr als
ihr damals beim Einkauf spezifiziert habt? Schön, dann schreiben wir mal ein Angebot".&lt;/p&gt;
&lt;p&gt;Technisch ist das alles ein Klacks. Die komplette Entwicklung aller Bestandteile für PWS in 2G/3G/4G/5G würde
ich auf einen niedrigen einmaligen sechsstelligen Betrag schätzen.   Und das ist die einmalige Investition in
der Entwicklung, welche dann über alle Geräte/Länder/Netze umgebrochen wird.  Bei den Milliarden, die in
Entwicklung und Anschaffung von Mobilfunktechnik investiert wird, ist das ein Witz.&lt;/p&gt;
&lt;p&gt;Die Geräte wie Basisstationen aller relevanten Hersteller unterstützen natürlich von Haus aus PWS.  Die bauen
für Deutschland ja nicht andere Geräte, als jene, die in UK, NL, RO, US, ... verbaut werden.  Der Markt ist
international, die gleiche Technik steht überall.&lt;/p&gt;
&lt;p&gt;Weil man jetzt zu spät ist, wird das natürlich von allen Seiten ausgenutzt.  Jeder Basisstationshersteller
wird die Hand aufhalten und sagen, das kostet jetzt pro Zelle X EUR im Jahr zusätzliche Lizenzgebühren.  Und
die Anbieter der zentralen Komponente CBC werden auch branchenüblich die Hand aufhalten, mit satten jährlichen
Lizenzgebühren.  Und die Consultants werden auch alle die Hand aufhalten, weil es  gibt wieder etwas zu
Integrieren, zu testen, ...  Das CBC ist keine komplexe Technik.  Wenn man das einmalig als Open Source
entwickeln lässt, und in allen Netzen einsetzt, bekommt man es quasi zum Nulltarif.  Aber das würde ja
Voraussetzen, dass man sich wirklich mit der Technik befasst, versteht um welch simple Software es hier geht,
und  dass man mal andere Wege in der Beschaffung geht, als nur mal eben bei seinen existierenden 3
Lieferanten anzurufen, die sich dann eine goldene Nase verdienen wollen.&lt;/p&gt;
&lt;p&gt;In der öffentlichen Diskussion wird von 20-40 Millionen EUR gesprochen.  Das sind überzogene Forderungen der
Marktteilnehmer, nichts sonst.  Aber selbst wenn man der Meinung ist, dass man lieber das Geld zum Fenster
hinauswerfen will, statt Open Source Alternativen zu [ver]suchen, dann ist auch diese Größenordnung etwas,
dass im Vergleich zu den sonstigen Anschaffungs- und Betriebskosten eines Mobilfunknetzes verschwindend gering
ist.  Ganz zu schweigen von den Folgekosten im Bereich Bergung/Rettung, Personenschäden, etc. die sich dadurch
mittelfristig bei Katastrophen einsparen lassen.&lt;/p&gt;
&lt;p&gt;Oder anders betrachtet: Wenn sogar das wirtschaftlich viel schwächere Rumänien sich sowas leisten kann, dann
wird es wohl auch die Bundesrepublik Deutschland stemmen können.&lt;/p&gt;
&lt;/section&gt;</description><category>cellular</category><category>german</category><category>gsm</category><category>osmocom</category><guid>https://laforge.gnumonks.org/blog/20210720-smscb/</guid><pubDate>Mon, 19 Jul 2021 16:00:00 GMT</pubDate></item><item><title>Notfallwarnung im Mobilfunknetz + Cell Broadcast</title><link>https://laforge.gnumonks.org/blog/20210719-smscb/</link><dc:creator>Harald Welte</dc:creator><description>&lt;p&gt;[excuse this German-language post, this is targeted at the current German public discourse]&lt;/p&gt;
&lt;p&gt;In mehrerern Gegenden Deutschlands gab es verheerende Hochwasser, und die Öffentlichkeit diskutiert deshalb
mal wieder die gute alte Frage nach dem adäquaten Mittel der Alarmierung der Bevölkerung.&lt;/p&gt;
&lt;p&gt;Es ist einfach nur ein gigantisches Trauerspiel, wie sehr die Deutsche Politik und Verwaltung in diesem Punkt
inzwischen seit Jahrzehnten sämtliche relevanten Standards verpennt, und dann immer wieder öffentlich durch
fachlich falsche und völlig uninformierte Aussagen auffällt.&lt;/p&gt;
&lt;p&gt;Das Thema wurde vor dem aktuellen Hochwasser bereits letztes Jahr im
Rahmen des sog. WarnTag öffentlich diskutiert.  Auch hier von Seiten der
öffentlichen Hand ausschliesslich mit falschen Aussagen, wie z.B. dass
es bei Cell Broadcast Datenschutzprobleme gibt.  Dabei ist Cell
Broadcast die einzige Technologie, wo &lt;em&gt;keine&lt;/em&gt; Rückmeldung des einzelnen
Netzteilnehmers erfolgt, und das Netz nichtmal weiss, wer die Nachricht
empfangen hat, und wo dieser Empfang stattgefunden hat.  Ganz wie beim
UKW-Radio.&lt;/p&gt;
&lt;p&gt;Fakt ist, dass alle digitalen Mobilfunkstandards seit GSM/2G, d.h. seit
1991 die Möglichkeit mitbringen, effizient, schnell und datensparsam
alle Nutzer (einer bestimmten geographischen Region) mit sogenannten
&lt;em&gt;broadcast&lt;/em&gt; Nachrichten zu informieren.  Diese Technik, in GSM/2G
genannt &lt;em&gt;Cell Broacast&lt;/em&gt; (oder auch _SMSCB_), unterscheidet sich
Grundlegend von allen anderen Kommunikationsformen im Mobilfunknetz, wie
Anrufe und herkömmliche SMS (offiziell SMS-PP).  Anrufe, SMS und auch mobile Paketdaten (Internet) werden
immer für jeden Teilnehmer individuell auf ihm zugewiesenen Funkressourcen übermittelt.  Diese Ressourcen
sind beschränkt.  Es können in keinem Mobilfunknetz der Welt alle Teilnehmer gleichzeitig telefonieren, oder
gleichzeitig SMS empfangen.&lt;/p&gt;
&lt;p&gt;Stattdessen benutzt Cell Broadcast - wie der Name bereits
unmissverständlich klar macht - Einen &lt;em&gt;broadcast&lt;/em&gt;, d.h.
&lt;em&gt;Rundsendemechanismus&lt;/em&gt;.  Eine Nachricht wird einmal gesendet, benötigt
also nur eine geteilte Ressource auf der Luftschnittstelle, und wird
dann von allen Geräten im Empfangsbereich zeitgleich empfangen und
dekodiert.  Das ist wie UKW-Radio oder klassisches terrestrisches
Fernsehen.&lt;/p&gt;
&lt;p&gt;Cell Broadcast wurde bereits in den 1990er Jahren von Deutschen
Netzbetreibern benutzt.  Und zwar nicht für etwas lebensnotwendiges wie
die Notfallsignalisierung, sondern für so banale Dinge wie die Liste
jener Vorwahlen, zu denen gerade ein vergünstigter "wandernder
Ortstarif" Besteht.   Ja, sowas gab es mal bei Vodafone.  Oder bei O2
wurden über lange Zeit (aus unbekannten Gründen) die GPS-Koordinaten der
jeweiligen Basisstation als Cell Broadcast versendet.&lt;/p&gt;
&lt;p&gt;In der folgenden (nun fast abgeschalteten) Mobilfunkgeneration 3G
wurde Cell Broadcast leicht umbenannt als &lt;em&gt;Service Area Broadcast&lt;/em&gt;
beibehalten.  Schliesslich gibt es ja Länder mit - anders als in
Deutschland - funktionierender und kompetenter Regulierung des
Telekommunikationsmarktes, und die langjährig bestehenden gesetzlichen
Anforderungen solcher Länder zwingen die Netzbetreiber und auch die
Ausrüster der Neztbetreiber, neue Mobilfunkstandards so zu entwickeln,
dass die gesetzlichen Vorgaben bzgl. der Alarmierung der Bevölkerung im
Notfall funktioniert.&lt;/p&gt;
&lt;p&gt;Im Rahmen dieser Standardisierung haben eine Reihe von Ländern innerhalb
der 3GPP-Standardisierung (zuständig für 2G, 3G, 4G, 5G) sogenannte
&lt;em&gt;Public Warning Systems&lt;/em&gt; (PWS) standardisiert.  Zu diesen gehören z.B.
das Japanische ETWAS (Earthquake and Tsunami Warning System), das
Koreanische KPAS (Korean Public Alerting System), das US-Amerikanische
WEA (Wireless Emergency Alerts, früher bekannt als CMAS) und auch das &lt;a class="reference external" href="https://de.wikipedia.org/wiki/EU-Alert"&gt;EU-ALERT&lt;/a&gt; mit den nationalen
Implementationen &lt;a class="reference external" href="https://de.wikipedia.org/wiki/NL-Alert"&gt;NL-ALERT (Niederlande)&lt;/a&gt; und &lt;a class="reference external" href="https://www.gov.uk/alerts"&gt;UK-ALERT (Großbritannien)&lt;/a&gt;
sowie &lt;a class="reference external" href="https://ro-alert.ro/en/about-ro-alert/"&gt;RO-ALERT (Rumänien)&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Die zahlreichen Studien und Untersuchungen, die zur Gestaltung obiger
Systeme und der internationalen Standards im Mobilfunk geführt haben,
weisen auch nochmal nach, was sowieso vorher jedem Techniker
offensichtlich erscheint: Eine schelle Alarmierung aller Teilnehmer
(einer Region) kann nur über einen Broadcast-Mechanismus erfolgen.  In
Japan war die Zielvorgabe, die Alarmierung in Erdbebenfällen innerhalb
von weniger als 4 Sekunden an die gesamte betroffene Bevölkerung zu
übertragen.  Und das ist mit PWS möglich!&lt;/p&gt;
&lt;p&gt;Die relevanten PWS-Standards in 2G/3G/4G/5G bieten jede Menge nützliche Funktionen:&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;p&gt;Benachrichtigung in bestimmten geographischen Regionen&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Interoperable Schnittstellen, so dass Netzwerkelemente unterschiedlicher Hersteller miteinander
kommunizieren&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Konfigurierbare Benachrichtigungstexte, nicht nur in der primären Landessprache, sondern auch in mehreren
anderen Sprachen, die dann automatisch je nach Spracheinstellung des Telefons wiedergegeben werden&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Unterschiedliche Schweregrade von Alarmierungen&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Übermittlung nicht nur im Broadcast, sondern auch im Unicast an jeden Teilnehmer, der gerade in einem
Telefongespräch ist, und dessen Telefon gerade währenddessen aus technischen Gründen den Broadcast nicht
empfangen würde&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Unterschied zwischen Wiederholung einer Übertragung ohne Änderung des Inhalts und einer übertragung mit
geändertem Inhalt&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Es gibt also seit vielen Jahren internationale Standards, wie sämtliche heute eingesetzten Mobilfunktechniken
zur schnellen, effizienten und datensparsamen Alarmierung der Bevölkerung eingesetzt werden können.&lt;/p&gt;
&lt;p&gt;Es gibt zahlreiche Länder, die diese Systeme seit langem einsetzen.  Das US-Amerikanische WEA wurde nach
eigenen Angaben seit 2012 bereits mehr als 61.000 Mal benutzt, um Menschen vor Unwetter oder anderen
Katastrophen zu warnen.&lt;/p&gt;
&lt;p&gt;Sogar innerhalb der EU hat man das EU-ALERT System spezifiziert, welches weitgehend mit dem amerikanischen WEA
identisch ist, und auf die gleichen Techniken aufbaut.&lt;/p&gt;
&lt;p&gt;Und dann gibt es Länder wie Deutschland, die es seit genauso vielen Jahren vermissen lassen, durch Gesetze
oder Vorschriften&lt;/p&gt;
&lt;ol class="arabic simple"&gt;
&lt;li&gt;&lt;p&gt;die Netzbetreiber zum Betrieb dieser Broadcast-Technologien in ihrem Netz verpflichtet&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;die Netzbetreiber zur Bereitstellung von standardisierten Schnittstellen gegenüber den Behörden wie Zivilschutz / Katastrophenschutz zu verpflichten, so das diese selbständig über alle Netzbetreiber Warnungen versenden können&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;die Gerätehersteller z.B. über Vorschriften des FTEG (Gesetz über Funkanlagen und Telekommunikationsendeinrichtungen) zu Verpflichten, die PWS-Nachrichten anzuzeigen&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;In den USA, dem vermeintlich viel mehr dem Freien Markt und dem
Kapitalismus anhängenden System ist all dies der Regulierungsbehörde FCC
möglich.  In Deutschland mit seiner sozialen Marktwirtschaft ist es
anscheinend unmöglich, den Markt entsprechend zu regulieren.  Eine
solche Regulierung schafft man in Deutschland nur für wirklich wichtige
Themen wie zur Durchsetzung der Bereitstellung von Schnittstellen für
die Telekommunikationsüberwachung.  Bei so irrelevanten Themen wie dem
Katastrophenschutz und der Alarmierung der Bevölkerung braucht man den
Markt nicht zu regulieren.  Wenn die Netzbetreiber kein PWS anbieten
wollen, dann ist das einfach so Gottgegeben, und man kann da ja nichts
machen.&lt;/p&gt;
&lt;p&gt;Falls jemand sich SMSCB und PWS technisch näher ansehen will: In 2019
haben wir im Osmocom-Projekt eine Open Source Implementation des
kompletten Systems von BTS über BSC bis zum CBC, sowie der dazwischen
befindlichen Protokolle wie CBSP vorgenommen.  Dies wurde
freundlicherweise durch den Prototype Fund mit EUR 35k finanziert. Ja,
so günstig kann man die nötige Technik zumindest für eine einzelne
Mobilfunkgeneration entwickeln...&lt;/p&gt;
&lt;p&gt;Man kann also in einem selbst betriebenen Labor-Mobilfunknetz,
welches auf Open Source Software basiert mehr in Punkt standardkonformer
Notfallalarmierung, als die Deutsche Politik, Verwaltung und
Netzbetreiber zusammen hinbekommen.&lt;/p&gt;
&lt;p&gt;Wir haben in Deutschland Leute, die diese Standards in und auswendig
kennen, sogar daran mitgearbeitet haben.  Wir haben Entwickler, die
diese Standards implementiert haben.  Aber wir schaffen es nicht, das
auch mal selbst praktisch zu benutzen - das überlassen wir lieber den
anderen Ländern.  Wir lassen lieber zuerst die ganze
Katastrophenalarmierung mittels Sirenen vergammeln, machen den
Netzbetreibern keine Vorgaben, entwicklen komische Apps, die Anwender
extra installieren müssen, die prinzipbedingt nicht skalieren und beim
Test (WarnTag) nicht funktionieren.&lt;/p&gt;
&lt;p&gt;Was für eine Glanzleistung für den hochentwickelten Techhologie-Standort Deutschland.&lt;/p&gt;</description><category>cellular</category><category>german</category><category>gsm</category><category>osmocom</category><guid>https://laforge.gnumonks.org/blog/20210719-smscb/</guid><pubDate>Sun, 18 Jul 2021 16:00:00 GMT</pubDate></item><item><title>Software Freedom Podcast #3 about Free Software mobile phone communication</title><link>https://laforge.gnumonks.org/blog/20191220-fsfe-podcast-foss-cellular/</link><dc:creator>Harald Welte</dc:creator><description>&lt;p&gt;Recently I had the pleasure of being part of the 3rd incarnation of a
new podcast series by the Free Software Foundation Europe: The
&lt;a class="reference external" href="https://fsfe.org/news/podcast/"&gt;Software Freedom Podcast&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;In &lt;a class="reference external" href="https://fsfe.org/news/podcast/episode-3.en.html"&gt;episode 3&lt;/a&gt;, Matthias
and Bonnie of the FSFE are interviewing me about various high-level
topics related to [the lack of] Free Software in cellular telephony, as
well as some of the projects that I was involved in (Openmoko, Osmocom).&lt;/p&gt;
&lt;p&gt;We've also touched the current mainstream / political debate about Huawei and 5G networks,
where my position can only be summarized as:  It doesn't matter much
in which country the related proprietary software is being developed.
What we need is Free / Open Source software that can be publicly
audited, and we need a method by which the operator can ensure that
a given version of that FOSS software is actually executing on his
equipment.&lt;/p&gt;
&lt;p&gt;Thanks to the FSFE for covering such underdeveloped areas of Free
Software, and to use their podcast to distribute related information and
ideas.&lt;/p&gt;</description><category>cellular</category><category>gsm</category><category>osmocom</category><guid>https://laforge.gnumonks.org/blog/20191220-fsfe-podcast-foss-cellular/</guid><pubDate>Thu, 19 Dec 2019 16:00:00 GMT</pubDate></item><item><title>The sad state of voice support in cellular modems</title><link>https://laforge.gnumonks.org/blog/20170902-cellular_modems-voice/</link><dc:creator>Harald Welte</dc:creator><description>&lt;p&gt;Cellular modems have existed for decades and come in many shapes and kinds.  They contain the cellular
baseband processor, RF frontend, protocol stack software and anything else required to communicate with a
cellular network.  Basically &lt;em&gt;a phone without display or input&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;During the last decade or so, the vast majority of cellular modems come as LGA modules, i.e. a small PCB with
all components on the top side (and a shielding can), which has contact pads on the bottom so you can solder
it onto your mainboard.  You can obtain them from vendors such as Sierra Wireless, u-blox, Quectel, ZTE,
Huawei, Telit, Gemalto, and many others.&lt;/p&gt;
&lt;p&gt;In most cases, the vendors now also solder those modules to small adapter boards to offer the same product
in mPCIe form-factor.  Other modems are directly manufactured in mPCIe or NGFF aka m.2 form-factor.&lt;/p&gt;
&lt;p&gt;As long as those modems were still 2G / 2.5G / 2.75G, the main interconnection with the host (often some
embedded system) was a serial UART.  The Audio input/output for voice calls was made available as analog
signals, ready to connect a microphone and spekaer, as that's what the cellular chipsets were designed for in
the smartphones.  In the Openmoko phones we also interfaced the audio of the cellular modem in analog, exactly
for that reason.&lt;/p&gt;
&lt;p&gt;From 3G onwards, the primary interface towards the host is now USB, with the modem running as a USB device.
If your laptop contains a cellular modem, you will see it show up in the &lt;code class="docutils literal"&gt;lsusb&lt;/code&gt; output.&lt;/p&gt;
&lt;p&gt;From that point onwards, it would have made a lot of sense to simply expose the audio also via USB.  Simply
offer a multi-function USB device that has both whatever virutal serial ports for AT commands and network
device for IP, and add a USB Audio device to it.  It would simply show up as a "USB sound card" to the host,
with all standard drivers working as expected.  Sadly, nobody seems to have implemented this, at least not in
a supported production version of their product&lt;/p&gt;
&lt;p&gt;Instead, what some modem vendors have implemented as an ugly hack is the transport of 8kHz 16bit PCM samples
over one of the UARTs.  See for example the Quectel UC-20 or the Simcom SIM7100 which implement such a method.&lt;/p&gt;
&lt;p&gt;All the others ignore any acess to the audio stream from software to a large part.  One wonders why that is.
From a software and systems architecture perspective it would be super easy.  Instead, what most vendors do,
is to expose a digital PCM interface.  This is suboptimal in many ways:&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;p&gt;there is no mPCIe standard on which pins PCM should be exposed&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;no standard product (like laptop, router, ...) with mPCIe slot will have anything connected to those PCM
pins&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Furthermore, each manufacturer / modem seems to support a different subset of dialect of the PCM interface in
terms of&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;p&gt;voltage (almost all of them are 1.8V, while mPCIe signals normally are 3.3V logic level)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;master/slave (almost all of them insist on being a clock master)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;sample format (alaw/ulaw/linear)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;clock/bit rate (mostly 2.048 MHz, but can be as low as 128kHz)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;frame sync (mostly short frame sync that ends before the first bit of the sample)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;endianness (mostly MSB first)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;clock phase (mostly change signals at rising edge; sample at falling edge)&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;It's a real nightmare, when it could be so simple.  If they implemented USB-Audio, you could plug a cellular
modem into any board with a mPCIe slot and it would simply work.  As they don't, you need a specially designed
mainboard that implements exactly the specific dialect/version of PCM of the given modem.&lt;/p&gt;
&lt;p&gt;By the way, the most "amazing" vendor seems to be u-blox.  Their Modems support PCM audio, but only the
solder-type version.  They simply didn't route those signals to the mPCIe slot, making audio impossible to use
when using a connectorized modem.  How inconvenient.&lt;/p&gt;
&lt;section id="summary"&gt;
&lt;h2&gt;Summary&lt;/h2&gt;
&lt;p&gt;If you want to access the audio signals of a cellular modem from software, then you either&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;p&gt;have standard hardware and pick one very specific modem model and hope this is available sufficiently long during your application, or&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;build your own hardware implementing a PCM slave interface and then pick + choose your cellular modem&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;On the Osmocom &lt;a class="reference external" href="https://osmocom.org/projects/mpcie-breakout/wiki"&gt;mpcie-breakout board&lt;/a&gt; and the &lt;a class="reference external" href="https://www.sysmocom.de/products/sysmoqmod/index.html"&gt;sysmocom
QMOD board&lt;/a&gt; we have exposed the PCM related pins on
2.54mm headers to allow for some separate board to pick up that PCM and offer it to the host system.  However,
such separate board hasn't been developed so far.&lt;/p&gt;
&lt;/section&gt;</description><category>electronics</category><category>gsm</category><category>lte</category><category>osmocom</category><category>sysmocom</category><guid>https://laforge.gnumonks.org/blog/20170902-cellular_modems-voice/</guid><pubDate>Fri, 01 Sep 2017 16:00:00 GMT</pubDate></item><item><title>Returning from TelcoSecDay 2017 / General Musings</title><link>https://laforge.gnumonks.org/blog/20170321-telcosecday-2017/</link><dc:creator>Harald Welte</dc:creator><description>&lt;p&gt;I'm just on my way back from the &lt;cite&gt;Telecom Security Day 2017
&amp;lt;https://www.troopers.de/troopers17/telco-sec-day/&amp;gt;&lt;/cite&gt;, which is an
invitation-only event about telecom security issues hosted by ERNW
back-to-back with their &lt;cite&gt;Troopers 2017 &amp;lt;https://www.troopers.de/troopers17/&amp;gt;&lt;/cite&gt;
conference.&lt;/p&gt;
&lt;p&gt;I've been presenting at TelcoSecDay in previous years and hence was
again invited to join (as attendee).  The event has really gained quite
some traction.  Where early on you could find lots of IT security /
hacker crowds, the number of participants from the operator (and to
smaller extent also equipment maker) industry has been growing.&lt;/p&gt;
&lt;p&gt;The quality of talks was great, and I enjoyed meeting various familiar
faces.  It's just a pity that it's only a single day - plus I had to
head back to Berlin still today so I had to skip the dinner + social
event.&lt;/p&gt;
&lt;p&gt;When attending events like this, and seeing the interesting hacks that
people are working on, it pains me a bit that I haven't really been
doing much security work in recent years.  netfilter/iptables was at
least somewhat security related.  My work on OpenPCD / librfid was
clearly RFID security oriented, as was the work on airprobe,
OsmocomTETRA, or even the &lt;a class="reference external" href="https://media.ccc.de/v/27c3-4036-en-reverse_engineering_a_real_word_rfid_payment_system"&gt;EasyCard payment system hack&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I have the same feeling when attending Linux kernel development related
events.  I have very fond memories of working in both fields, and it was
a lot of fun.  Also, to be honest, I believe that the work in Linux
kernel land and the general IT security research was/is appreciated much
more than the endless months and years I'm now spending my time with
improving and extending the Osmocom cellular infrastructure stack.&lt;/p&gt;
&lt;p&gt;Beyond the appreciation, it's also the fact that both the IT security
and the Linux kernel communities are much larger.  There are more
people to learn from and learn with, to engage in discussions and
ping-pong ideas.  In Osmocom, the community is too small (and I have the
feeling, it's actually shrinking), and in many areas it rather seems
like I am the "ultimate resource" to ask, whether about 3GPP specs or
about Osmocom code structure.  What I'm missing is the feeling of being
part of a bigger community.  So in essence, my current role in the "Open
Source Cellular" corner can be a very lonely one.&lt;/p&gt;
&lt;p&gt;But hey, I don't want to sound more depressed than I am, this was
supposed to be a post about TelcoSecDay.  It just happens that attending
IT Security and/or Linux Kernel events makes me somewhat gloomy for the
above-mentioned reasons.&lt;/p&gt;
&lt;p&gt;Meanwhile, if you have some interesting projcets/ideas at the border
between cellular protocols/systems and security, I'd of course love to
hear if there's some way to get my hands dirty in that area again :)&lt;/p&gt;</description><category>cellular</category><category>gsm</category><category>lte</category><category>security</category><category>telecom</category><guid>https://laforge.gnumonks.org/blog/20170321-telcosecday-2017/</guid><pubDate>Tue, 21 Mar 2017 10:00:00 GMT</pubDate></item><item><title>Gory details of USIM authentication sequence numbers</title><link>https://laforge.gnumonks.org/blog/20170307-usim_sequence_numbers/</link><dc:creator>Harald Welte</dc:creator><description>&lt;p&gt;I always though I understood UMTS AKA (authentication and key
agreement), including the re-synchronization procedure.  It's been years
since I wrote tools like &lt;a class="reference external" href="http://osmocom.org/projects/osmo-sim-auth/wiki"&gt;osmo-sim-auth&lt;/a&gt; which you can use to
perform UMTS AKA with a SIM card inserted into a PC reader, i.e.
simulate what happens between the AUC (authentication center) in a
network and the USIM card.&lt;/p&gt;
&lt;p&gt;However, it is only now as the sysmocom team works on 3G support of the
dedicated &lt;a class="reference external" href="http://osmocom.org/projects/osmo-hlr"&gt;OsmoHLR&lt;/a&gt; (outside of
OsmoNITB!), that I seem to understand all the nasty little details.&lt;/p&gt;
&lt;p&gt;I always thought for re-synchronization it is sufficient to simply
increment the SQN (sequence number).  It turns out, it isn't as there is
a MSB-portion called SEQ and a lower-bit portion called IND, used for
some fancy array indexing scheme of buckets of highest-used-SEQ within
that IND bucket.&lt;/p&gt;
&lt;p&gt;If you're interested in all the dirty details and associated spec
references (the always hide the important parts in some Annex) see the
discussion between Neels and me in &lt;a class="reference external" href="https://osmocom.org/issues/1965"&gt;Osmocom redmine issue 1965&lt;/a&gt;.&lt;/p&gt;</description><category>crypto</category><category>gsm</category><category>osmocom</category><category>umts</category><guid>https://laforge.gnumonks.org/blog/20170307-usim_sequence_numbers/</guid><pubDate>Tue, 07 Mar 2017 16:00:00 GMT</pubDate></item><item><title>Cellular re-broadcast over satellite</title><link>https://laforge.gnumonks.org/blog/20170216-cellular_rebroadcast_over_sat/</link><dc:creator>Harald Welte</dc:creator><description>&lt;p&gt;I've recently attended a seminar that (among other topics) also covered
RF interference hunting.  The speaker was talking about various
real-world cases of RF interference and illustrating them in detail.&lt;/p&gt;
&lt;p&gt;Of course everyone who has any interest in RF or cellular will know
about fundamental issues of radio frequency interference.  To the
biggest part, you have&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;p&gt;cells of the same operator interfering with each other due to too
frequent frequency re-use, adjacent channel interference, etc.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;cells of different operators interfering with each other due to
intermodulation products and the like&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;cells interfering with cable TV, terrestrial TV&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;DECT interfering with cells&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;cells or microwave links interfering with SAT-TV reception&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;all types of general EMC problems&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;But what the speaker of this seminar covered was actually a cellular
base-station being re-broadcast all over Europe via a commercial
satellite (!).&lt;/p&gt;
&lt;p&gt;It is a well-known fact that most satellites in the sky are basically
just "bent pipes", i.e. they consist of a RF receiver on one frequency,
a mixer to shift the frequency, and a power amplifier.  So basically
whatever is sent up on one frequency to the satellite gets
re-transmitted back down to earth on another frequency.  This is abused
by "satellite hijacking" or "transponder hijacking" and has been covered
for decades in various publications.&lt;/p&gt;
&lt;p&gt;Ok, but how does cellular relate to this?  Well, apparently some people
are running VSAT terminals (bi-directional satellite terminals) with
improperly shielded or broken cables/connectors.  In that case, the RF
emitted from a nearby cellular base station leaks into that cable, and
will get amplified + up-converted by the block up-converter of that VSAT
terminal.&lt;/p&gt;
&lt;p&gt;The bent-pipe satellite subsequently picks this signal up and
re-transmits it all over its coverage area!&lt;/p&gt;
&lt;p&gt;I've tried to find some public documents about this, an there's
surprisingly little public information about this phenomenon.&lt;/p&gt;
&lt;p&gt;However, I could find a slide set from SES, presented at a
Satellite Interference Reduction Group: &lt;a class="reference external" href="http://data.satirg.org/wp-content/uploads/2015/11/2011a-GSM-re-Broadcast.pdf"&gt;Identifying Rebroadcast (GSM)&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;It describes a surprisingly manual and low-tech approach at hunting down
the source of the interference by using an old nokia net-monitor phone
to display the MCC/MNC/LAC/CID of the cell.  Even in 2011 there were
already open source projects such as airprobe that could have done the
job based on sampled IF data.  And I'm not even starting to consider
proprietary tools.&lt;/p&gt;
&lt;p&gt;It should be relatively simple to have a SDR that you can tune to a
given satellite transponder, and which then would look for any
GSM/UMTS/LTE carrier within its spectrum and dump their identities in a
fully automatic way.&lt;/p&gt;
&lt;p&gt;But then, maybe it really doesn't happen all that often after all to
rectify such a development...&lt;/p&gt;</description><category>gsm</category><category>satellite</category><guid>https://laforge.gnumonks.org/blog/20170216-cellular_rebroadcast_over_sat/</guid><pubDate>Wed, 15 Feb 2017 16:00:00 GMT</pubDate></item><item><title>Contribute to Osmocom 3.5G and receive a free femtocell</title><link>https://laforge.gnumonks.org/blog/20161229-osmocom_3g5_femtocell/</link><dc:creator>Harald Welte</dc:creator><description>&lt;p&gt;In 2016, Osmocom gained initial 3.5G support with osmo-iuh and the Iu
interface extensions of our libmsc and OsmoSGSN code. This means you can run
your own small open source 3.5G cellular network for SMS, Voice and Data
services.&lt;/p&gt;
&lt;p&gt;However, the project needs more contributors: Become an active
member in the Osmocom development community and get your nano3G
femtocell for free.&lt;/p&gt;
&lt;p&gt;I'm happy to announce that my company sysmocom hereby issues a call for
proposals to the general public.  Please describe in a short proposal
how you would help us improving the Osmocom project if you were to
receive one of those free femtocells.&lt;/p&gt;
&lt;p&gt;Details of this proposal can be found at
&lt;a class="reference external" href="https://sysmocom.de/downloads/accelerate_3g5_cfp.pdf"&gt;https://sysmocom.de/downloads/accelerate_3g5_cfp.pdf&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Please contact &lt;a class="reference external" href="mailto:accelerate3g5@sysmocom.de"&gt;mailto:accelerate3g5@sysmocom.de&lt;/a&gt; in case of any
questions.&lt;/p&gt;</description><category>3gpp</category><category>cellular</category><category>etsi</category><category>gsm</category><guid>https://laforge.gnumonks.org/blog/20161229-osmocom_3g5_femtocell/</guid><pubDate>Wed, 28 Dec 2016 17:00:00 GMT</pubDate></item><item><title>Accessing 3GPP specs in PDF format </title><link>https://laforge.gnumonks.org/blog/20161216-3gpp-specs-etsi-pdf/</link><dc:creator>Harald Welte</dc:creator><description>&lt;p&gt;When you work with GSM/cellular systems, the definite resource are the
specifications.  They were originally released by ETSI, later by 3GPP.&lt;/p&gt;
&lt;p&gt;The problem start with the fact that there are separate numbering
schemes.  Everyone in the cellular industry I know always uses the
GSM/3GPP TS numbering scheme, i.e. something like &lt;em&gt;3GPP TS 44.008&lt;/em&gt;.
However, ETSI assigns its own numbers to the specs, like &lt;em&gt;ETSI TS
144008&lt;/em&gt;.  Now in most cases, it is as simple s removing the '.' and
prefixing the '1' in the beginning.  However, that's not always true and
there are exceptions such as &lt;em&gt;3GPP TS 01.01&lt;/em&gt; mapping to &lt;em&gt;ETSI TS
101855&lt;/em&gt;.  To make things harder, there doesn't seem to be a
machine-readable translation table between the spec numbers, but there's
a website for spec number conversion at &lt;a class="reference external" href="http://webapp.etsi.org/key/queryform.asp"&gt;http://webapp.etsi.org/key/queryform.asp&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;When I started to work on GSM related topics somewhere between my work
at Openmoko and the start of the OpenBSC project, I manually downloaded
the PDF files of GSM specifications from the ETSI website.  This was a
cumbersome process, as you had to enter the spec number (e.g. TS 04.08)
in a search window, look for the latest version in the search results,
click on that and then click again for accessing the PDF file (rather
than a proprietary Microsoft Word file).&lt;/p&gt;
&lt;p&gt;At some point a poor girlfriend of mine was kind enough to do this
manual process for each and every 3GPP spec, and then create a
corresponding symbolic link so that you could type something like &lt;em&gt;evince
/spae/openmoko/gsm-specs/by_chapter/44.008.pdf&lt;/em&gt; into your command line
and get instant access to the respective spec.&lt;/p&gt;
&lt;p&gt;However, of course, this gets out of date over time, and by now almost a
decade has passed without a systematic update of that archive.&lt;/p&gt;
&lt;p&gt;To the rescue, 3GPP started at some long time ago to not only provide
the obnoxious M$ Word DOC files, but have deep links to ETSI.  So you
could go to &lt;a class="reference external" href="http://www.3gpp.org/DynaReport/44-series.htm"&gt;http://www.3gpp.org/DynaReport/44-series.htm&lt;/a&gt; and then click
on 44.008, and one further click you had the desired PDF, served by
ETSI (3GPP apparently never provided PDF files).&lt;/p&gt;
&lt;p&gt;However, in their infinite wisdom, at some point in 2016 the 3GPP
webmaster decided to remove those deep links.  Rather than a nice long
list of released versions of a given spec,
&lt;a class="reference external" href="http://www.3gpp.org/DynaReport/44008.htm"&gt;http://www.3gpp.org/DynaReport/44008.htm&lt;/a&gt; now points to some crappy
JavaScript tabbed page, where you can click on the version number and
then get a ZIP file with a single Word DOC file inside.  You can hardly
male it any more inconvenient and cumbersome.  The PDF links would open
immediately in modern browsers built-in JavaScript PDF viewer or your
favorite PDF viewer.  Single click to the information you want.  But no,
the PDF links had to go and replaced with ZIP file downloads that you
first need to extract, and then open in something like LibreOffice,
taking ages to load the document, rendering it improperly in a word
processor.  I don't want to edit the spec, I want to read it, &lt;em&gt;sigh&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;So since the usability of this 3GPP specification resource had been
artificially crippled, I was annoyed sufficiently well to come up with a
solution:&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;p&gt;first create a complete mirror of all ETSI TS (technical
specifications) by using a recursive &lt;cite&gt;wget&lt;/cite&gt; on
&lt;a class="reference external" href="http://www.etsi.org/deliver/etsi_ts/"&gt;http://www.etsi.org/deliver/etsi_ts/&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;then use a shell script that utilizes &lt;cite&gt;pdfgrep&lt;/cite&gt; and &lt;cite&gt;awk&lt;/cite&gt; to determine the
3GPP specification number (it is written in the title on the first
page of the document) and creating a symlink.  Now I have something
like &lt;em&gt;44.008-4.0.0.pdf -&amp;gt; ts_144008v040000p.pdf&lt;/em&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;It's such a waste of resources to have to download all those files and
then write a script using pdfgrep+awk to re-gain the same usability that
the 3GPP chose to remove from their website.  Now we can wait for ETSI
to disable indexing/recursion on their server, and easy and quick spec
access would be gone forever :/&lt;/p&gt;
&lt;p&gt;Why does nobody care about efficiency these days?&lt;/p&gt;
&lt;p&gt;If you're also an avid 3GPP spec reader, I'm publishing the rather
trivial scripts used at &lt;a class="reference external" href="http://git.osmocom.org/3gpp-etsi-pdf-links"&gt;http://git.osmocom.org/3gpp-etsi-pdf-links&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;If you have contacts to the 3GPP webmaster, please try to motivate them
to reinstate the direct PDF links.&lt;/p&gt;</description><category>3gpp</category><category>cellular</category><category>etsi</category><category>gsm</category><guid>https://laforge.gnumonks.org/blog/20161216-3gpp-specs-etsi-pdf/</guid><pubDate>Thu, 15 Dec 2016 17:00:00 GMT</pubDate></item><item><title>The IT security culture, hackers vs. industry consortia</title><link>https://laforge.gnumonks.org/blog/20161206-it_security_culture_telecoms/</link><dc:creator>Harald Welte</dc:creator><description>&lt;p&gt;In a previous life I used to do a lot of IT security work, probably even
at a time when most people had no idea what IT security actually is. I
grew up with the Chaos Computer Club, as it was a great place to meet
people with common interests, skills and ethics.  People were hacking
(aka 'doing security research') for fun, to grow their skills, to
advance society, to point out corporate stupidities and to raise
awareness about issues.&lt;/p&gt;
&lt;p&gt;I've always shared any results worth noting with the general public.
Whether it was in RFID security, on GSM security, TETRA security, etc.&lt;/p&gt;
&lt;p&gt;Even more so, I always shared the tools, creating free software
implementations of systems that - at that time - were very difficult to
impossible to access unless you worked for the vendors of related
device, who obviously had a different agenda then to disclose security
concerns to the general public.&lt;/p&gt;
&lt;p&gt;Publishing security related findings at related conferences can be
interpreted in two ways:&lt;/p&gt;
&lt;p&gt;On the one hand, presenting at a major event will add to your
credibility and reputation.  That's a nice byproduct, but that shouldn't
be the primarily reason, unless you're some kind of a egocentric stage
addict.&lt;/p&gt;
&lt;p&gt;On the other hand, presenting findings or giving any kind of
presentation or lecture at an event is a statement of support for that
event.  When I submit a presentation at a given event, I think carefully
if that topic actually matches the event.&lt;/p&gt;
&lt;p&gt;The reason that I didn't submit any talks in recent years at CCC events
is not that I didn't do technically exciting stuff that I could talk
about - or that I wouldn't have the reputation that would make people
consider my submission in the programme committee.  I just thought there
was nothing in my work relevant enough to bother the CCC attendees with.&lt;/p&gt;
&lt;p&gt;So when Holger 'zecke' Freyther and I chose to present about our recent
journeys into exploring modern cellular modems at the annual Chaos
Communications Congress, we did so because the CCC Congress is the right
audience for this talk.  We did so, because we think the people there
are the kind of community of like-minded spirits that we would like to
contribute to.  Whom we would like to give something back, for the many
years of excellent presentations and conversations had.&lt;/p&gt;
&lt;p&gt;So far so good.&lt;/p&gt;
&lt;p&gt;However, in 2016, something happened that I haven't seen yet in my 17
years of speaking at Free Software, Linux, IT Security and other
conferences: A select industry group (in this case the GSMA) asking me
out of the blue to give them the talk one month in advance at a private
industry event.&lt;/p&gt;
&lt;p&gt;I could hardly believe it.  How could they?  Who am I?  Am I spending
sleepless nights and non-existing spare time into security research of
cellular modems to give a free presentation to corporate guys at a
closed industry meeting?  The same kind of industries that create the
problems in the first place, and who don't get their act together in
building secure devices that respect people's privacy?  Certainly not.
I spend sleepless nights of hacking because I want to share the results
with my friends.  To share it with people who have the same passion,
whom I respect and trust.  To help my fellow hackers to understand
technology one step more.&lt;/p&gt;
&lt;p&gt;If that kind of request to undermine the researcher/authors initial
publication among friends is happening to me, I'm quite sure it must be
happening to other speakers at the 33C3 or other events, too.  And that
makes me very sad.  I think the initial publication is something that
connects the speaker/author with his audience.&lt;/p&gt;
&lt;p&gt;Let's hope the researchers/hackers/speakers have sufficiently strong
ethics to refuse such requests.  If certain findings are initially
published at a certain conference, then that is the initial publication.
Period.  Sure, you can ask afterwards if an author wants to repeat the
presentation (or a similar one) at other events.  But &lt;em&gt;pre-empting&lt;/em&gt; the
initial publication?  Certainly not with me.&lt;/p&gt;
&lt;p&gt;I offered the GSMA that I could talk on the importance of having FOSS
implementations of cellular protocol stacks as enabler for security
research, but apparently this was not to their interest.  Seems like all
they wanted is an exclusive heads-up on work they neither commissioned
or supported in any other way.&lt;/p&gt;
&lt;p&gt;And btw, I don't think what Holger and I will present about is all that
exciting in the first place.  More or less the standard kind of security
nightmares.  By now we are all so numbed down by nobody considering
security and/or privacy in design of IT systems, that is is hardly any
news.  IoT how it is done so far might very well be the doom of
mankind. An unstoppable tsunami of insecure and privacy-invading
devices, built on ever more complex technology with way too many
security issues.  We shall henceforth call IoT the Industry of
Thoughtlessness.&lt;/p&gt;</description><category>cellular</category><category>gsm</category><category>osmocom</category><category>security</category><guid>https://laforge.gnumonks.org/blog/20161206-it_security_culture_telecoms/</guid><pubDate>Tue, 06 Dec 2016 00:00:00 GMT</pubDate></item><item><title>EC-GSM-IoT: Enhanced Coverage GSM for IoT</title><link>https://laforge.gnumonks.org/blog/20160723-ec_gsm_iot/</link><dc:creator>Harald Welte</dc:creator><description>&lt;p&gt;In private conversation, Holger mentioned EC-GSM-IoT to me, and I had to
dig a bit into it.  It was introduced in Release 13, but if you do a web
search for it, you find surprisingly little information beyond press
releases with absolutely zero information content and no "further
reading".&lt;/p&gt;
&lt;p&gt;The primary reason for this seems to be that the feature was called
EC-EGPRS until the very late stages, when it was renamed for - believe
it or not - marketing reasons.&lt;/p&gt;
&lt;p&gt;So when searching for the right term, you actually find specification
references and change requests in the 3GPP document archives.&lt;/p&gt;
&lt;p&gt;I tried to get a very brief overview, and from what I could find, it is
centered around GERAN extension in the following ways:&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;p&gt;EC-EGPRS goal: Improve coverage by 20dB&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;New single-burst coding schemes&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;em&gt;Blind Physical Layer Repetitions&lt;/em&gt; where bursts are repeated up to 28 times without feedback from remote end&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;transmitter maintains phase coherency&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;receiver uses processing gain (like incremental redundancy?)&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;New logical channel types (EC-BCCH, EC-PCH, EC-AGC, EC-RACH, ...)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;New RLC/MAC layer messages for the EC-PDCH communication&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Power Efficient Operation (PEO)&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Introduction of eDRX (extended DRX) to allow for PCH listening
intervals from minutes up to a hour&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Relaxed Idle Mode: Important to camp on &lt;em&gt;a&lt;/em&gt; cell, not best cell.
Reduces neighbor cell monitoring requirements&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;In terms of required modifications to an existing GSM/EDGE
implementation, there will be (at least):&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;p&gt;changes to the PHY layer regarding new coding schemes, logical
channels and burst scheduling / re-transmissions&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;changes to the RLC/MAC layer in the PCU to implement the new EC
specific message types and procedures&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;changes to the BTS and BSC in terms of paging in eDRX&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;In case you're interested in more pointers on technical details, check
out the links provided at &lt;a class="reference external" href="https://osmocom.org/issues/1780"&gt;https://osmocom.org/issues/1780&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;It remains to be seen how widely this will be adopted.  Rolling this
cange out on moderm base station hardware seems technicalyl simple - but
it remains to be seen how many equipment makers implement it, and at
what cost to the operators.  But I think the key issue is whether or not
the baseband chipset makers (Intel, Qualcomm, Mediatek, ...) will
implement it anytime soon on the device side.&lt;/p&gt;
&lt;p&gt;There are no plans on implementing any of this in the Osmocom stack as
of now,but in case anyone was interested in working on this, feel free
to contact us on the &lt;a class="reference external" href="mailto:osmocom-net-gprs@lists.osmocom.org"&gt;osmocom-net-gprs@lists.osmocom.org&lt;/a&gt; mailing list.&lt;/p&gt;</description><category>gsm</category><category>osmocom</category><guid>https://laforge.gnumonks.org/blog/20160723-ec_gsm_iot/</guid><pubDate>Sat, 23 Jul 2016 04:00:00 GMT</pubDate></item><item><title>Deeper ventures into Ericsson (Packet) Abis</title><link>https://laforge.gnumonks.org/blog/20160716-ericsson_packet_abis/</link><dc:creator>Harald Welte</dc:creator><description>&lt;p&gt;Some topics keep coming back, even a number of years after first having
worked on them.  And then you start to search online using your favorite
search engine - and find &lt;a class="reference external" href="https://laforge.gnumonks.org/blog/20101129-ericsson_abis_oml"&gt;your old posts&lt;/a&gt;
on that subject are the most comprehensive publicly available
information on the subject ;)&lt;/p&gt;
&lt;p&gt;Back in 2011, I was working on some very basic support for Ericsson
RBS2xxx GSM BTSs in OpenBSC.  The major part of this was to find out the
weird dynamic detection of the signalling timeslot, as well as the fully
non-standard OM2000 protocol for OML.  Once it reached the state of a
'proof-of-concept', work at this ceased and remained in a state where
still lots of manual steps were involved in BTS bring-up.&lt;/p&gt;
&lt;p&gt;I've recently picked this topic up again, resulting in some
work-in-progress code in
&lt;a class="reference external" href="http://git.osmocom.org/openbsc/log/?h=laforge/om2000-fsm"&gt;http://git.osmocom.org/openbsc/log/?h=laforge/om2000-fsm&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Beyond classic E1 based A-bis support, I've also been looking (again) at
Ericsson Packet Abis.  Packet Abis is their understanding of Abis over
IP.  However, it is - again - much further from the 3GPP specifications
than what we're used to in the Osmocom universe.  Abis/IP as we know
consists of:&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;p&gt;RSL and OML over TCP (inside an IPA multiplex)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;RTP streams for the user plane (voice)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Gb over IP (NS over UDP/IP), as te PCU is in the BTS.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;In the Ericsson world, they decided to taka a much lower-layer approach
and decided to&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;p&gt;start with L2TP over IP (&lt;em&gt;not&lt;/em&gt; the L2TP over UDP that many people know from VPNs)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;use the IETF-standardized Pseudowire type for HDLC but use a frame
format in violation of the IETF RFCs&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Talk LAPD over L2TP for RSL and OML&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Invent a new frame format for voice codec frames called TFP and feed
that over L2TP&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Invent a new frame format for the PCU-CCU communication called P-GSL
and feed that over L2TP&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I'm not yet sure if we want to fully support that protocol stack from
OpenBSC and related projects, but in any case I've extende wireshark to
decode such protocol traces properly by&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;p&gt;Extending the L2TP dissector with Ericsson specific AVPs&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Improving my earlier pakcet-ehdlc.c with better understanding of the
protocol&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Implementing a new TFP dissector from scratch&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Implementing a new P-GSL dissector from scratch&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The resulting work can be found at &lt;a class="reference external" href="http://git.osmocom.org/wireshark/log/?h=laforge/ericsson-packet-abis"&gt;http://git.osmocom.org/wireshark/log/?h=laforge/ericsson-packet-abis&lt;/a&gt;
in case anyone is interested.  I've mostly been working with protocol
traces from RBS2409 so far, and they are decoded quite nicely for RSL,
OML, Voice and Packet data.  As far as I know, the format of the STN /
SIU of other BTS models is identical.&lt;/p&gt;
&lt;p&gt;Is anyone out there in possession of Ericsson RBS2xxx RBSs interested in
collboration on either a Packet Abis implementation, or an inteface of
the E1 or packet based CCU-PCU interface to OsmoPCU?&lt;/p&gt;</description><category>gsm</category><category>osmocom</category><category>wireshark</category><guid>https://laforge.gnumonks.org/blog/20160716-ericsson_packet_abis/</guid><pubDate>Sat, 16 Jul 2016 04:00:00 GMT</pubDate></item><item><title>Software under OSA Public License is neither Open Source nor Free Software</title><link>https://laforge.gnumonks.org/blog/20160224-oai-osa-licensing/</link><dc:creator>Harald Welte</dc:creator><description>&lt;p&gt;It seems my &lt;a class="reference external" href="http://laforge.gnumonks.org/blog/20160201-oai-osa-licensing/"&gt;recent concerns on the OpenAirInterface re-licensing&lt;/a&gt; were
not unjustified.&lt;/p&gt;
&lt;p&gt;I contacted various legal experts on Free Software legal community about
this, and the response was unanimous:  In all feedback I received, the
general opinion was that &lt;strong&gt;software under the OSA Public License V1.0 is
neither Free Software nor Open Source Software&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;The rational is, that it does not fulfill the criteria of&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;p&gt;the FSF &lt;a class="reference external" href="https://www.gnu.org/philosophy/free-sw.html"&gt;Free Software definition&lt;/a&gt;,  as the license does
not fulfill &lt;em&gt;freedom 0: The freedom to run the program as you wish,
for any purpose&lt;/em&gt; (which obviously includes commercial use)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;the Open Source Initiatives &lt;a class="reference external" href="https://opensource.org/osd-annotated"&gt;Open Source Definition&lt;/a&gt;, as the license &lt;em&gt;must not
discriminate against fields of endeavor&lt;/em&gt;, such as commercial use.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;the &lt;a class="reference external" href="https://www.debian.org/social_contract#guidelines"&gt;Debian Free Software Guidelines&lt;/a&gt;, as the DFSG
also require &lt;em&gt;no discrimination against fields of endeavor&lt;/em&gt;, such as
commercial use.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I think we as the community need to be very clear about this.  We should
not easily tolerate that people put software under restrictive licenses
but still call that software open source.  This creates a bad impression
to those not familiar with the culture and spirit of both Free Software
and Open Source.  It creates the impression that people can call
something Open Source but then still ask royalties for it, if used
commercially.&lt;/p&gt;
&lt;p&gt;It is a shame that entities like Eurecom and the OpenAirInterface
Software Association are &lt;em&gt;open-washing&lt;/em&gt; their software by calling it
Open Source when in fact it isn't.  This attitude frankly makes me sick.&lt;/p&gt;
&lt;p&gt;That's just like &lt;em&gt;green-washing&lt;/em&gt; when companies like BP are claiming
they're now an environmental friendly company just because they put some
solar panels on the roof of some building.&lt;/p&gt;</description><category>gpl</category><category>gsm</category><category>swpat</category><guid>https://laforge.gnumonks.org/blog/20160224-oai-osa-licensing/</guid><pubDate>Tue, 23 Feb 2016 16:00:00 GMT</pubDate></item><item><title>On the OpenAirInterface re-licensing</title><link>https://laforge.gnumonks.org/blog/20160201-oai-osa-licensing/</link><dc:creator>Harald Welte</dc:creator><description>&lt;p&gt;In the recent &lt;a class="reference external" href="https://fosdem.org/2016"&gt;FOSDEM 2016&lt;/a&gt; SDR Devroom, the
Q&amp;amp;A session following a &lt;a class="reference external" href="https://fosdem.org/2016/schedule/event/oai/"&gt;presentation on OpenAirInterface&lt;/a&gt; touched the topic of its
controversial licensing.  As I happen to be involved deeply with Free
Software licensing and Free Software telecom topics, I thought I might
have some things to say about this topic.  Unfortunately the Q&amp;amp;A session
was short, hence this blog post.&lt;/p&gt;
&lt;p&gt;As a side note, the presentation was actually certainly the least
technical presentation in all of the FOSDEM SDR track, and that with a
deeply technical audience.  And probably the only presentation at all at
FOSDEM talking a lot about "Strategic Industry Partners".&lt;/p&gt;
&lt;p&gt;Let me also state that I actually have respect for what OAI/OSA has been
and still is doing.  I just don't think it is attractive to the Free
Software community - and it might actually not be Free Software at all.&lt;/p&gt;
&lt;section id="openairinterface-history"&gt;
&lt;h2&gt;OpenAirInterface / History&lt;/h2&gt;
&lt;p&gt;Within &lt;a class="reference external" href="http://www.eurecom.fr/en"&gt;EURECOM&lt;/a&gt;, a group around Prof.
Raymond Knopp has been working on a Free Software implementation of all
layers of the LTE (4G) system known as &lt;a class="reference external" href="http://www.openairinterface.org/"&gt;OpenAirInterface&lt;/a&gt;.  It includes the physical layer
and goes through to the core network.&lt;/p&gt;
&lt;p&gt;The OpenAirInterface code was for many years under GPL license (GPLv2,
other parts GPLv3).  Initially the SVN repositories were not public
(despite the license), but after some friendly mails one (at least I)
could get access.&lt;/p&gt;
&lt;p&gt;I've read through the code at several points in the past, it often
seemed much more like a (quick and dirty?) proof of concept
implementation to me, than anything more general-purpose.  But then,
that might have been a wrong impression on my behalf, or it might be
that this was simply sufficient for the kind of research they wanted to
do.  After all, scientific research and FOSS often have a complicated
relationship.  Researchers naturally have their papers as primary output
of their work, and software implementations often are more like a
necessary evil than the actual goal.  But then, I digress.&lt;/p&gt;
&lt;p&gt;Now at some point in 2014, a new organization the OpenAirInterface
Software Association (OSA) was established.  The idea apparently was to
get involved with the tier-1 telecom suppliers (like Alcatel, Huawei,
Ericsson, ...) and work together on an implementation of Free Software
for future mobile data, so-called 5G technologies.&lt;/p&gt;
&lt;/section&gt;
&lt;section id="telecom-industry-and-patents"&gt;
&lt;h2&gt;Telecom Industry and Patents&lt;/h2&gt;
&lt;p&gt;In case you don't know, the classic telecom industry loves patents.
Pretty much anything and everything is patented, and the patents are
heavily enforced.  And not just between Samsung and Apple, or more
recently also Nokia and Samsung - but basically all the time.&lt;/p&gt;
&lt;p&gt;One of the big reasons why even the most simple UMTS/3G capable phones
are so much more expensive than GSM/2G is the extensive (and expensive)
list of patents Qualcomm requires every device maker to license.  In the
past, this was not even a fixed per-unit royalty, but the license
depended on the actual overall price of the phone itself.&lt;/p&gt;
&lt;p&gt;So wanting to work on a Free Software implementation of future telecom
standards &lt;em&gt;with&lt;/em&gt; active support and involvement of the telecom industry
obviously means contention in terms of patents.&lt;/p&gt;
&lt;/section&gt;
&lt;section id="re-licensing"&gt;
&lt;h2&gt;Re-Licensing&lt;/h2&gt;
&lt;p&gt;The existing GPLv2/GPLv3 license of the OpenAirInterface code of course
would have meant that contributions from the patent-holding telecom
industry would have to come with appropriate royalty-free patent
licenses.  After all, of what use is it if the software is free in terms
of copyright licensing, but then you still have the patents that make it
non-free.&lt;/p&gt;
&lt;p&gt;Now the big industry of course wouldn't want to do that, so the OSA
decided to re-license the code-base under a new license.&lt;/p&gt;
&lt;p&gt;As we apparently don't yet have sufficient existing Free Software
licenses, they decided to create a new license.  That new license (the
&lt;a class="reference external" href="http://www.openairinterface.org/?page_id=698"&gt;OSA Public License V1.0&lt;/a&gt;
not only does away with copyleft, but also does away with a normal
patent grant.&lt;/p&gt;
&lt;p&gt;This is very sad in several ways:&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;p&gt;license proliferation is always bad.  Major experts and basically all
major entities in the Free Software world (FSF, FSFE, OSI, ...) are
opposed to it and see it as a problem.  Even companies like Intel and
Google have publicly raised concern about license Proliferation.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;abandoning copyleft.  Many people particularly from a GNU/Linux
background would agree that copyleft is a fair deal.  It ensures that
everyone modifying the software will have to share such modifications
with other users in a fair way.  Nobody can create proprietary
derivatives.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;taking away the patent grant.  Even the non-copyleft Apache 2.0
License the OSA used as template has a broad patent grant, even for
commercial applications.  The OSA Public License has only a patent
grant for use in research context&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;In addition to this license change, the OSA also requires a copyright
assignment from all contributors.&lt;/p&gt;
&lt;/section&gt;
&lt;section id="consequences"&gt;
&lt;h2&gt;Consequences&lt;/h2&gt;
&lt;p&gt;What kind of effect does this have in case I want to contribute?&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;p&gt;I have to sign away my copyright.  The OSA can at any given point
in time grant anyone whatever license they want to this code.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;I have to agree to a permissive license without copyleft, i.e.
everyone else can create proprietary derivatives of my work&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;I do not even get a patent grant from the other contributors (like
the large Telecom companies).&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;So basically, I have to sign away my copyright, and I get nothing in
return.  No copyleft that ensures other people's modifications will be
available under the same license, no patent grant, and I don't even keep
my own copyright to be able to veto any future license changes.&lt;/p&gt;
&lt;p&gt;My personal opinion (and apparently those of other FOSDEM attendees) is
thus that the OAI / OSA invitation to contributions from the community
is not a very attractive one.  It might all be well and fine for large
industry and research institutes.  But I don't think the Free Software
community has much to gain in all of this.&lt;/p&gt;
&lt;p&gt;Now OSA will claim that the above is not true, and that all contributors
(including the Telecom vendors) have agreed to license their patents
under FRAND conditions to all other contributors.  It even seemed to me
that the speaker at FOSDEM believed this was something positive in any
way.  I can only laugh at that ;)&lt;/p&gt;
&lt;/section&gt;
&lt;section id="frand"&gt;
&lt;h2&gt;FRAND&lt;/h2&gt;
&lt;p&gt;FRAND (Fair, Reasonable and Non-Discriminatory) is a frequently invoked
buzzword for patent licensing schemes.  It isn't actually defined
anywhere, and is most likely just meant to sound nice to people who
don't understand what it really means.  Like, let's say, political
decision makers.&lt;/p&gt;
&lt;p&gt;In practise, it is a disaster for individuals and small/medium sized
companies.  I can tell you first hand from having tried to obtain patent
licenses from FRAND schemes before.  While they might have reasonable
per-unit royalties and they might offer those royalties to everyone,
they typically come with ridiculous minimum annual fees.&lt;/p&gt;
&lt;p&gt;For example let's say they state in their FRAND license conditions you
have to pay 1 USD per device, but a minimum of USD 100,000 per year.  Or
a similarly large one-time fee at the time of signing the contract.&lt;/p&gt;
&lt;p&gt;That's of course very fair to the large corporations, but it makes it
impossible for a small company who sells maybe 10 to 100 devices per
year, as the 100,000 / 10 then equals to USD 10k per device in terms of
royalties.  Does that sound fair and Non-Discriminatory to you?&lt;/p&gt;
&lt;/section&gt;
&lt;section id="summary"&gt;
&lt;h2&gt;Summary&lt;/h2&gt;
&lt;p&gt;OAI/OSA are trying to get a non-commercial / research-oriented foot into
the design and specification process of future mobile telecom network
standardization.   That's a big and difficult challenge.&lt;/p&gt;
&lt;p&gt;However, the decisions they have taken in terms of licensing show that
they are primarily interested in aligning with the large corporate
telecom industry, and have thus created something that isn't really Free
Software (missing non-research patent grant) and might in the end only
help the large telecom vendors to uni-directionally consume
contributions from academic research, small/medium sized companies and
individual hackers.&lt;/p&gt;
&lt;/section&gt;</description><category>gpl</category><category>gsm</category><category>swpat</category><guid>https://laforge.gnumonks.org/blog/20160201-oai-osa-licensing/</guid><pubDate>Sun, 31 Jan 2016 16:00:00 GMT</pubDate></item><item><title>32C3 is over, GSM and GPRS was running fine, osmo-iuh progress</title><link>https://laforge.gnumonks.org/blog/20151231-32c3/</link><dc:creator>Harald Welte</dc:creator><description>&lt;section id="the-32c3-gsm-network"&gt;
&lt;h2&gt;The 32C3 GSM Network&lt;/h2&gt;
&lt;p&gt;32C3 was great from the Osmocom perspective:  We could again run our own
cellular network at the event in order to perform load testing with real
users.  We had 7 BTSs running, each with a single TRX.  What was new
compared to previous years:&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;p&gt;OsmoPCU is significantly more robust and stable due to the efforts of
Jacob Erlbeck at sysmocom.  This means that GPRS is now actually still
usable in severe overload situations, like 1000 subscribers sharing
only very few kilobits.  Of course it will be slow, but at least data
still passes through as much as that's possible.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;We were using half-rate traffic channels from day 2 onwards, in order
to enhance capacity.  Phones supporting AMR-HR would use that, but
then there are lots of old phones that only do classic HR (v1).
OsmoNITB with internal MNCC handler supports TCH/H with HR and AMR for
at least five years, but the particular combination of OsmoBTS +
OsmoNITB + lcr (all master branches) was not yet deployed at previous
CCC event networks so far.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Being forced to provide classic HR codec actually revealed several bugs
in the existing code:&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;p&gt;OsmoBTS (at least with the sysmoBTS hardware) is using bit ordering
that is not compliant to what the spec says on how GSM-HR frames
should be put into RTP frames.  We didn't realize this so far, as
handing frames from one sysmoBTS to another sysmoBTS of course works,
as both use the same (wrong) bit ordering.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The ETSI reference implementation of the HR codec has lots of
global/static variables, and thus doesn't really support running
multiple transcoders in parallel.  This is however what lcr was trying
(and needing) to do, and it of course failed as state from one
transcoder instance was leaking into another.  The problem is simple,
but the solution not so simple.  If you want to avoid re-structuring
the entire code in very intrusive ways or running one thread per
transcoder instance, then the only solution was to basically memcpy()
the entire data section of the transcoding library every time you
switch the state from one transcoder instance to the other.  It's
surprisingly difficult to learn the start + size of that data section
at runtime in a portable way, though.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Thanks to our resident voice codec expert Sylvain for debugging and
fixing the above two problems.&lt;/p&gt;
&lt;p&gt;Thanks also to Daniel and Ulli for taking care of the actual logistics
of bringing + installing (+ later unmounting) all associated equipment.&lt;/p&gt;
&lt;p&gt;Thanks furthermore to Kevin who has been patiently handling the 'Level 2
Support' cases of people with various problems ending up in the GSM
room.&lt;/p&gt;
&lt;p&gt;It's great that there is a team taking care of those real-world test
networks.  We learn a lot more about our software under heavy load
situations this way.&lt;/p&gt;
&lt;/section&gt;
&lt;section id="osmo-iuh-progress-talk"&gt;
&lt;h2&gt;osmo-iuh progress + talk&lt;/h2&gt;
&lt;p&gt;I've been focussing basically full day (and night) over the week ahead
of Christmas and during Christmas to bring the osmo-iuh code into a
state where we could do a end-to-end demo with a regular phone + hNodeB
+ osmo-hnbgw + osmo-sgsn + openggsn.  Unfortunately I only got it up to
the point where we do the PDP CONTEXT ACTIVATION on the signalling
plane, with no actual user data going back and forth.  And then, for
strange reasons, I couldn't even demo that at the end of the talk.
Well, in either case, the code has made much progress.&lt;/p&gt;
&lt;p&gt;The video of the talk can be found at
&lt;a class="reference external" href="https://media.ccc.de/v/32c3-7412-running_your_own_3g_3_5g_network#video"&gt;https://media.ccc.de/v/32c3-7412-running_your_own_3g_3_5g_network#video&lt;/a&gt;&lt;/p&gt;
&lt;/section&gt;
&lt;section id="meeting-friends"&gt;
&lt;h2&gt;meeting friends&lt;/h2&gt;
&lt;p&gt;The annual CCC congress is always an event where you meet old friends
and colleagues.  It was great talking to Stefan, Dimitri, Kevin, Nico,
Sylvain, Jochen, Sec, Schneider, bunnie and many other hackers.  After
the event is over, I wish I could continue working together with all
those folks the rest of the year, too :/&lt;/p&gt;
&lt;p&gt;Some people have been missed dearly.  Absence from the CCC congress is
not acceptable.  You know who you are, if you're reading this ;)&lt;/p&gt;
&lt;/section&gt;</description><category>ccc</category><category>gsm</category><category>openbsc</category><category>osmocom</category><guid>https://laforge.gnumonks.org/blog/20151231-32c3/</guid><pubDate>Wed, 30 Dec 2015 16:00:00 GMT</pubDate></item><item><title>Anyone interested in supporting SMPP interworking at 32C3?</title><link>https://laforge.gnumonks.org/blog/20151206-32c3-smpp/</link><dc:creator>Harald Welte</dc:creator><description>&lt;p&gt;Sylvain brought this up yesterday:  Wouldn't it be nice to have some
degree of SMS interfacing from OpenBSC/OsmoNITB to the real world at
32C3?  It is something that we've never tried so far, and thus
definitely worthy of testing.&lt;/p&gt;
&lt;p&gt;Of course, full interworking is not possible without assigning public
MSISDN to all internal subscribers / 'extensions' how we call them.&lt;/p&gt;
&lt;p&gt;But what would most certainly work is to have at least outbound SMS
working by means of an external SMPP interface.&lt;/p&gt;
&lt;p&gt;The OsmoNITB-internal SMSC speaks SMPP already (in the SMSC role), so we
would need to implement some small amount of glue logic that behaves as
ESME (external SMS entity) towards both OsmoNITB as well as some
public SMS operator/reseller that speaks SMPP again.&lt;/p&gt;
&lt;p&gt;Now of course, sending SMS to public operators doesn't come for free.
So in case anyone reading this has access to SMPP at public operators,
resellers, SMS hubs, it would be interesting to see if there is a chance
for some funding/sponsoring of that experiment.&lt;/p&gt;
&lt;p&gt;Feel free to contact me if you see a way to make this happen.&lt;/p&gt;</description><category>ccc</category><category>gsm</category><category>openbsc</category><category>osmocom</category><category>sms</category><guid>https://laforge.gnumonks.org/blog/20151206-32c3-smpp/</guid><pubDate>Sat, 05 Dec 2015 16:00:00 GMT</pubDate></item><item><title>python-libsmpp works great with OsmoNITB</title><link>https://laforge.gnumonks.org/blog/20151205-python-libsmpp/</link><dc:creator>Harald Welte</dc:creator><description>&lt;p&gt;Since 2012 we have support for SMPP in OsmoNITB (the network-in-the-box
version of OpenBSC).  So far I've only used it from C and Erlang code.&lt;/p&gt;
&lt;p&gt;Yesterday I gave python-smpplib from
&lt;a class="reference external" href="https://github.com/podshumok/python-smpplib"&gt;https://github.com/podshumok/python-smpplib&lt;/a&gt; a try and it worked like a
charm.  Of course one has to get the details right (like numbering plan
indication).&lt;/p&gt;
&lt;p&gt;In case anyone is interested in interfacing OsmoNITB SMPP from python,
I've put a working example to send SMS at &lt;a class="reference external" href="http://cgit.osmocom.org/mncc-python/tree/smpp_test.py"&gt;http://cgit.osmocom.org/mncc-python/tree/smpp_test.py&lt;/a&gt;&lt;/p&gt;</description><category>gsm</category><category>osmocom</category><category>smpp</category><category>sms</category><guid>https://laforge.gnumonks.org/blog/20151205-python-libsmpp/</guid><pubDate>Fri, 04 Dec 2015 16:00:00 GMT</pubDate></item><item><title>Python tool to talk to OsmoNITB MNCC interface</title><link>https://laforge.gnumonks.org/blog/20151202-mncc-python/</link><dc:creator>Harald Welte</dc:creator><description>&lt;p&gt;I've been working on a small python tool that can be used to attach to
the MNCC interface of OsmoNITB.  It implements the 04.08 CC state
machine with our MNCC primitives, including support for RTP bridge mode
of the voice streams.&lt;/p&gt;
&lt;p&gt;The immediate first use case for this was to be able to generate MT
calls to a set of known MSISDNs and load all 14 TCH/H channels of a
single-TRX BTS.  It will connect the MT calls in pairs, so you end up
with 7 MS-to-MS calls.&lt;/p&gt;
&lt;p&gt;The first working version of the tool is available from&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;p&gt;&lt;a class="reference external" href="http://git.osmocom.org/mncc-python/"&gt;http://git.osmocom.org/mncc-python/&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;git clone git://git.osmocom.org/mncc-python&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The code is pretty hacky in some places.  That's partially due to the
fact that I'm much more familiar in the C, Perl and Erlang world than in
python.  Still I thought it's a good idea to do it in python to enable
more people to use/edit/contribute to it.&lt;/p&gt;
&lt;p&gt;I'm happy for review / cleanup suggestion by people with more Python-foo
than I have.&lt;/p&gt;
&lt;p&gt;Architecturally, I decided to do things a bit erlang-like, where we have
finite state machines in an actor models, and message passing between
the actors.  This is what happens with the GsmCallFsm()'s, which are
created by the GsmCallConnector() representing both legs of a call and
the MnccActor() that wraps the MNCC socket towards OsmoNITB.&lt;/p&gt;
&lt;p&gt;The actual encoding/decoding of MNCC messages is auto-generated from the
mncc header file #defines, enums and c-structures by means of ctypes
code generation.&lt;/p&gt;
&lt;p&gt;mncc_test.py currently drops you into a python shell where you can e.g.
start more / new calls by calling functions like &lt;em&gt;connect_call("7839",
"3802")&lt;/em&gt; from that shell.  Exiting the shell by &lt;em&gt;quit()&lt;/em&gt; or &lt;em&gt;Ctrl+C&lt;/em&gt;
will terminate all call FSMs and terminate.&lt;/p&gt;</description><category>gsm</category><category>openbsc</category><category>osmocom</category><guid>https://laforge.gnumonks.org/blog/20151202-mncc-python/</guid><pubDate>Tue, 01 Dec 2015 16:00:00 GMT</pubDate></item><item><title>GSM test network at 32C3, after all</title><link>https://laforge.gnumonks.org/blog/20151116-gsm_at_32c3/</link><dc:creator>Harald Welte</dc:creator><description>&lt;p&gt;Contrary to my blog post yesterday, it looks like we will have a private
GSM network at the CCC congress again, after all.&lt;/p&gt;
&lt;p&gt;It appears that Vodafone Germany (who was awarded the former DECT guard
band in the 2015 spectrum auctions) is not yet using it in December,
and they agreed that we can use it at the 32C3.&lt;/p&gt;
&lt;p&gt;With this approval from Vodafone Germany we can now go to the regulator
(BNetzA) and obtain the usual test license.  Given that we used to get
the license in the past, and that Vodafone has agreed, this should be a
mere formality.&lt;/p&gt;
&lt;p&gt;For the German language readers who appreciate the language of the
administration, it will be a &lt;em&gt;Frequenzzuteilung für Versuchszwecke im
nichtöffentlichen mobilen Landfunk&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;So thanks to Vodafone Germany, who enabled us at least this time to run
a network again.  By end of 2016 you can be sure they will have put
their new spectrum to use, so I'm not that optimistic that this would
be possible again.&lt;/p&gt;</description><category>ccc</category><category>gsm</category><category>osmocom</category><guid>https://laforge.gnumonks.org/blog/20151116-gsm_at_32c3/</guid><pubDate>Sun, 15 Nov 2015 16:00:00 GMT</pubDate></item><item><title>No GSM test network at 32C3</title><link>https://laforge.gnumonks.org/blog/20151115-no_gsm_at_32c3/</link><dc:creator>Harald Welte</dc:creator><description>&lt;p&gt;I currently &lt;a class="reference external" href="https://events.ccc.de/congress/2015/wiki/Static:GSM"&gt;don't assume that there will be a GSM network at the 32C3&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Ever since &lt;a class="reference external" href="http://openbsc.osmocom.org/"&gt;OpenBSC&lt;/a&gt; was created in 2008,
the annual CCC congress was a great opportunity to test OpenBSC and
related software with thousands of willing participants.  In order to do
so, we obtained a test licence from the German regulatory authority.
This was never any problem, as there was a chunk of spectrum in the
1800 MHz GSM band that was not allocated to any commercial operator, the
so-called &lt;em&gt;DECT guard band&lt;/em&gt;.  It's called that way as it was kept free
in order to ensure there is no interference between 1800 MHz GSM and the
neighboring DECT cordless telephones.&lt;/p&gt;
&lt;p&gt;Over the decades, it was determined on a EU level that this guard band
might not be necessary, or at least not if certain considerations are
taken for BTSs deployed in that band.&lt;/p&gt;
&lt;p&gt;When the German regulatory authority re-auctioned the GSM spectrum
earlier this year, they decided to also auction the frequencies of the
former DECT guard band.  The DECT guard band was awarded to Vodafone.&lt;/p&gt;
&lt;p&gt;This is a pity, as this means that people involved with cellular
research or development of cellular technology now have it significantly
harder to actually test their systems.&lt;/p&gt;
&lt;p&gt;In some other EU member states it is easier, like in the Netherlands or
the UK, where the DECT guard band was not treated like any other chunk
of the GSM bands, but put under special rules.  Not so in Germany.&lt;/p&gt;
&lt;p&gt;To make a long story short:  Without the explicit permission of any of
the commercial mobile operators, it is not possible to run a
test/experimental network like we used to ran at the annual CCC
congress.&lt;/p&gt;
&lt;p&gt;Given that&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;p&gt;the event is held in the city center (where frequencies are typically
used and re-used quite densely), and&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;an operator has nothing to gain from permitting us to test our open
source GSM/GPRS implementations,&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I think there is little chance that this will become a reality.&lt;/p&gt;
&lt;p&gt;If anyone has &lt;em&gt;really good&lt;/em&gt; contacts to the &lt;em&gt;radio network planning
team&lt;/em&gt; of a German mobile operator and wants to prove me wrong: Feel free
to contact me by e-mail.&lt;/p&gt;
&lt;p&gt;Thanks to everyone involved with the GSM team at the CCC events,
particularly Holger Freyther, Daniel Willmann, Stefan Schmidt, Jan
Luebbe, Peter Stuge, Sylvain Munaut, Kevin Redon, Andreas Eversberg,
Ulli (and everyone else whom I may have forgot, my apologies).  It's
been a pleasure!&lt;/p&gt;
&lt;p&gt;Thanks also to our friends at the POC (Phone Operation Center) who have
provided interfacing to the DECT, ISDN, analog and VoIP network at the
events.  Thanks to roh for helping with our special patch requests.
Thanks also to those entities and people who borrowed equipment (like
BTSs) in the pre-sysmocom years.&lt;/p&gt;
&lt;p&gt;So long, and thanks for all the fish!&lt;/p&gt;</description><category>ccc</category><category>gsm</category><category>osmocom</category><guid>https://laforge.gnumonks.org/blog/20151115-no_gsm_at_32c3/</guid><pubDate>Sat, 14 Nov 2015 16:00:00 GMT</pubDate></item><item><title>Osmocom Berlin meetings</title><link>https://laforge.gnumonks.org/blog/20151108-osmocom-berlin-meetings/</link><dc:creator>Harald Welte</dc:creator><description>&lt;p&gt;Back in 2012, I started the idea of having a regular, bi-weekly meeting
of people interested in mobile communications technology, not only
strictly related to the Osmocom projects and software.  This was
initially called the &lt;em&gt;Osmocom User Group Berlin&lt;/em&gt;.  The meetings were
held twice per month in the rooms of the Chaos Computer Club Berlin.&lt;/p&gt;
&lt;p&gt;There are plenty of people that were or still are involved with Osmocom
one way or another in Berlin.  Think of zecke, alphaone, 2b-as, kevin,
nion, max, prom, dexter, myself - just to name a few.&lt;/p&gt;
&lt;p&gt;Over the years, I got "too busy" and was no longer able to attend
regularly.  Some people kept it alive (thanks to dexter!), but
eventually they were discontinued in 2013.&lt;/p&gt;
&lt;p&gt;Starting in October 2015, I started a &lt;a class="reference external" href="http://openbsc.osmocom.org/trac/blog/osmug-20151007"&gt;revival&lt;/a&gt; of the
meetings, two have been held already, the third is &lt;a class="reference external" href="http://openbsc.osmocom.org/trac/blog/osmug-20151111"&gt;coming up next week
on November 11&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;I'm happy that I had the idea of re-starting the meeting.  It's good to
meet old friends and new people alike.  Both times there actually were
some &lt;em&gt;new faces&lt;/em&gt; around, most of which even had a classic professional
telecom background.&lt;/p&gt;
&lt;p&gt;In order to emphasize the focus is strictly not on Osmocom alone (
particularly not about its users only), I decided to rename the event to
the &lt;a class="reference external" href="http://openbsc.osmocom.org/trac/wiki/OsmocomMeeting/Berlin"&gt;Osmocom Meeting Berlin&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;If you're in Berlin and are interested in mobile communications
technology on the protocol and radio side of things, feel free to join us
next Wednesday.&lt;/p&gt;</description><category>gsm</category><category>mobile</category><category>osmocom</category><guid>https://laforge.gnumonks.org/blog/20151108-osmocom-berlin-meetings/</guid><pubDate>Sat, 07 Nov 2015 16:00:00 GMT</pubDate></item><item><title>Progress on the Linux kernel GTP code</title><link>https://laforge.gnumonks.org/blog/20151108-kernel-gtp/</link><dc:creator>Harald Welte</dc:creator><description>&lt;p&gt;It is always sad if you start to develop some project and then never get
around finishing it, as there are too many things to take care in
parallel.  But then, days only have 24 hours...&lt;/p&gt;
&lt;p&gt;Back in 2012 I started to write some generic Linux kernel GTP tunneling
code.  GTP is the &lt;a class="reference external" href="https://en.wikipedia.org/wiki/GPRS_Tunnelling_Protocol"&gt;GPRS Tunneling Protocol&lt;/a&gt;, a protocol
between core network elements in GPRS networks, later extended to be
used in UMTS and even LTE networks.&lt;/p&gt;
&lt;p&gt;GTP is split in a control plane for management and the user plane
carrying the actual user IP traffic of a mobile subscriber.  So if
you're reading this blog via a cellular interent connection, your data
is carried in GTP-U within the cellular core network.&lt;/p&gt;
&lt;p&gt;To me as a former Linux kernel networking developer, the user plane of
GTP (GTP-U) had always belonged into kernel space.  It is a tunneling
protocol not too different from many other tunneling protocols that
already exist (GRE, IPIP, L2TP, PPP, ...) and for the user plane, all it
does is basically add a header in one direction and remove the header in
the other direction.   User data, particularly in networks with many
subscribers and/or high bandwidth use.&lt;/p&gt;
&lt;p&gt;Also, unlike many other telecom / cellular protocols, GTP is an IP-only
protocol with no E1, Frame Relay or ATM legacy.  It also has nothing to
do with SS7, nor does it use ASN.1 syntax and/or some exotic encoding
rules.  In summary, it is nothing like any other GSM/3GPP protocol, and
looks much more of what you're used from the IETF/Internet world.&lt;/p&gt;
&lt;p&gt;Unfortunately I didn't get very far with my code back in 2012, but
luckily Pablo Neira (one of my colleagues from netfilter/iptables days)
picked it up and brought it along.  However, for some time it has been
stalled until recently it was thankfully &lt;a class="reference external" href="http://lists.osmocom.org/pipermail/openbsc/2015-October/000585.html"&gt;picked up by Andreas Schultz&lt;/a&gt;
and now receives some attention and discussion, with the clear intention
to finish + submit it for mainline inclusion.&lt;/p&gt;
&lt;p&gt;The code is now kept in a git repository at
&lt;a class="reference external" href="http://git.osmocom.org/osmo-gtp-kernel/"&gt;http://git.osmocom.org/osmo-gtp-kernel/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Thanks to Pablo and Andreas for picking this up, let's hope this is the
last coding sprint before it goes mainline and gets actually used in
production.&lt;/p&gt;</description><category>ggsn</category><category>gprs</category><category>gsm</category><category>mobile</category><category>osmocom</category><guid>https://laforge.gnumonks.org/blog/20151108-kernel-gtp/</guid><pubDate>Sat, 07 Nov 2015 16:00:00 GMT</pubDate></item><item><title>Attending HITCON and COSCUP in Taipei</title><link>https://laforge.gnumonks.org/blog/20130605-attending_hitcon_coscup/</link><dc:creator>Harald Welte</dc:creator><description>&lt;p&gt;
It is my pleasure to attend the &lt;a href="http://hitcon.org/2013/"&gt;HITCON
2013&lt;/a&gt; and &lt;a href="http://coscup.org/2013/"&gt;COSCUP 2013&lt;/a&gt;
conferences in July/August this year.  They are both in Taipei.  HITCON
is a hacker/security event, while COSCUP is a pure Free/Open Source
Software conference.
&lt;/p&gt;
&lt;p&gt;
At both events I will be speaking at the growing list of GSM related
tools that are available these days, like OpenBSC, OsmcoomBB, SIMtrace,
OsmoSGSN, OsmoBTS, OsmoSDR, etc.  As they are both FOSS projects and
useful in a security context, this fits well within the scope of both
events.
&lt;/p&gt;
&lt;p&gt;
Given that I'm going to be back to Taiwan, I'm looking very much forward
to meeting old friends and former colleagues from my Openmoko days in
Taipei.  God, do I miss those days.  While terribly stressful, they
still are the most exciting days of my career so far.
&lt;/p&gt;
&lt;p&gt;
And yes, I'm also going to use the opportunity for a continuation of my
&lt;a href="http://laforge.gnumonks.org/weblog/2012/06/10/#20120610-3day_ride_taroko_hehuanshan"&gt;motorbike riding&lt;/a&gt; in this beautiful country.
&lt;/p&gt;</description><category>gsm</category><guid>https://laforge.gnumonks.org/blog/20130605-attending_hitcon_coscup/</guid><pubDate>Tue, 04 Jun 2013 19:00:00 GMT</pubDate></item><item><title>Inside a cavity duplexer</title><link>https://laforge.gnumonks.org/blog/20121122-inside_cavity_duplexer/</link><dc:creator>Harald Welte</dc:creator><description>&lt;p&gt;
In many cellular systems (GSM or otherwise) there is a frequency duplex
between the uplink and downlink frequency band.  If you use a single
antenna to serve a BTS, then somehow you need to split the frequency
band between the Rx and Tx side by means of a &lt;i&gt;Duplexer&lt;/i&gt;.
&lt;/p&gt;
&lt;p&gt;
The most common technology for this is the so-called &lt;i&gt;Cavity
Duplexer&lt;/i&gt;.  I've used those devices (and seen them in use) for a long
time, but never really opened one so far.  The problem is that they are
finely tuned, and each mechanical change can severely impact
performance.  As I had to repair a broken SMA socket on one of them
recently, I took the chance to take a picture
&lt;/p&gt;
&lt;p&gt;
In the first picture you can see the bottom side.  This consists of a
milled aluminum block, with a series of circular cavities.  The Tx
output of the BTS is connected to the SMA socket on the bottom right,
the antenna to the SMA socket on the top side, and the Rx port to the
SMA socket on the bottom left of the picture:
&lt;/p&gt;
&lt;center&gt;&lt;img src="http://laforge.gnumonks.org/photos/cavity_duplexer_bottom.jpg"&gt;&lt;/center&gt;
&lt;p&gt;
The small cylindrical objects in the center of the cavities are not
milled from the same part, but they are separate pieces mounted by
screws from the bottom of the unit.
&lt;/p&gt;
&lt;p&gt;
The second picture shows the top section of the duplexer:
&lt;/p&gt;
&lt;center&gt;&lt;img src="http://laforge.gnumonks.org/photos/cavity_duplexer_top.jpg"&gt;&lt;/center&gt;
&lt;p&gt;
You can see a ~ 4mm aluminum plate with lots of (now empty) holes which
are for the ~ 117 screws with which the top plate is screwed against the
bottom part shown in the first picture.
&lt;/p&gt;
&lt;p&gt;
The important part, however, are the screws that you can see sticking out
of the top part.  Those are used for tuning and present "obstacles" in
the path of the waves as they pass through the cavities.
&lt;/p&gt;
&lt;p&gt;
The big miracle for me is not that there are some resonances which build
up a filter, but that you can actually transfer as much as 100W of RF
power from the Tx input through to the antenna output.
&lt;/p&gt;</description><category>gsm</category><guid>https://laforge.gnumonks.org/blog/20121122-inside_cavity_duplexer/</guid><pubDate>Wed, 21 Nov 2012 19:00:00 GMT</pubDate></item><item><title>Kevin Redon starts collaborative Osmocom project to collect terminal profile</title><link>https://laforge.gnumonks.org/blog/20120521-collaborative_terminal_profile_project/</link><dc:creator>Harald Welte</dc:creator><description>&lt;p&gt;
As Kevin Redon &lt;a href="https://geekblog.kevredon.org/?p=592"&gt;writes in
his blog&lt;/a&gt;, he has created some tools and a project for
collaboratively gathering a &lt;a href="http://terminal-profile.osmocom.org/"&gt;database&lt;/a&gt; on the &lt;i&gt;TERMINAL PROFILE&lt;/i&gt; capabilities of mobile phones.
&lt;/p&gt;
&lt;p&gt;
The terminal profile describes which particular features regarding
&lt;i&gt;proactive sim&lt;/i&gt; or &lt;i&gt;sim application toolkit&lt;/i&gt; a given phone
supports.
&lt;/p&gt;
&lt;p&gt;
This is not only important for SIM application / SIM toolkit developers,
but it is also an important factor when trying to analyze the potential
threat that can originate from a &lt;i&gt;malicious SIM card attack&lt;/i&gt;.
&lt;/p&gt;
&lt;p&gt;
I personally see no reason why my phone should ever report its GPS
position to the SIM card, or why the SIM card should be able to re-write
the nubers I'm dialling.  Yes, there are cases where such features are
useful, but then they should be explicitly enabled by the user, and the
default should be that they are all switched off.
&lt;/p&gt;
&lt;p&gt;
Who knows, after all, with some attention to this problem we might still
see a SIM firewall / proxy, that you can put between the SIM and the
phone to prevent any of those features from being (mis)used.
&lt;/p&gt;
&lt;p&gt;
So all you need to do to contribute to the database is some way how you
can read out the terminal profile from your mobile phone(s), and use
Kevin's tool to upload it to the public website.  And hwo do you read
out the terminal profile?  For example by using &lt;a href="http://simtrace.osmocom.org/"&gt;Osmocom SIMtrace&lt;/a&gt; to sniff the
communication between SIM card and phone.
&lt;/p&gt;</description><category>gsm</category><guid>https://laforge.gnumonks.org/blog/20120521-collaborative_terminal_profile_project/</guid><pubDate>Sun, 20 May 2012 19:00:00 GMT</pubDate></item><item><title>Announcing the low-power, light-weight sysmoBTS</title><link>https://laforge.gnumonks.org/blog/20120519-sysmoBTS-goes-public/</link><dc:creator>Harald Welte</dc:creator><description>&lt;p&gt;
It hasn't been a secret that when I co-started a company called &lt;a href="http://sysmocom.de/"&gt;sysmocom&lt;/a&gt; more than a year ago, it was not
about opening a webshop that sells cheap phones and DYI electronics kits
to the larger community.  Rather, it was to develop and sell exciting
products surrounding Free Software and mobile communications.
&lt;/p&gt;
&lt;p&gt;
There are of course the more or less obvious things to do, like system
integration of OpenBSC and the related software on embedded systems,
selling them as appliances including training, support and maintenance
service.
&lt;/p&gt;
&lt;p&gt;
However, we of course also want to more than that.  Today it is my
pleasure to say that the availability of our first BTS product called
&lt;b&gt;sysmoBTS&lt;/b&gt; has been officially announced.  
&lt;/p&gt;&lt;center&gt;
&lt;img src="http://www.sysmocom.de/news/sysmocom-announces-availability-of-sysmobts/image" width="33%"&gt;
&lt;/center&gt;

&lt;p&gt;
See the &lt;a href="http://www.sysmocom.de/news/sysmocom-announces-availability-of-sysmobts"&gt;
news item&lt;/a&gt;, the &lt;a href="http://www.sysmocom.de/products/sysmobts"&gt;product page&lt;/a&gt; and the
&lt;a href="http://www.sysmocom.de/downloads/sysmobts-data-sheet"&gt;data
sheet&lt;/a&gt; for more information.
&lt;/p&gt;
&lt;p&gt;
To make it very clear in the beginning:  sysmoBTS is not an open
hardware project.  The schematics and layout files are proprietary and
not disclosed publicly.  Such is the FPGA bitstream and the layer1
inside the DSP.
&lt;/p&gt;
&lt;p&gt;
However, any code running on the integrated ARM processor is available
as free software.  This includes a yocto/poky-built Embedded Linux
distribution featuring u-boot, the Linux kernel (including all kernel
modules!), the &lt;a href="http://openbsc.osmocom.org/trac/wiki/OsmoBTS"&gt;osmo-bts&lt;/a&gt; and &lt;a href="http://openbsc.osmocom.org/trac/wiki/OpenBSC"&gt;OpenBSC&lt;/a&gt; software
as well as many other Free Software packages.
&lt;/p&gt;
&lt;p&gt;
We think this is a reasonable compromise between espanding a bit from
our previous "BSC and above in Free Software" down to a "BTS Layer2 and
above" divide.  After all, if you use OpenBSC with a BTS from Siemens,
Ericsson, Nokia or ip.access, you don't have access to the source code
of anything running inside the BTS at all.
&lt;/p&gt;
&lt;p&gt;
sysmoBTS offers some great new capabilities, such as integrating the BSC
or even the entire &lt;a href="http://openbsc.osmocom.org/trac/wiki/osmo-nitb"&gt;osmo-nitb&lt;/a&gt; onto
the ARM/Linux processor inside the BTS hardware itself, creating a less
than 500gram, 10W power consuming autonomous GSM network.
&lt;/p&gt;
&lt;p&gt;
I'm going to stop marketing here, but I thought it is one of the major
milestones for sysmoocm and thus for what I've spent way too much time
on in recent months - and thus deserves to be mentioned here on this
personal blog.
&lt;/p&gt;</description><category>gsm</category><guid>https://laforge.gnumonks.org/blog/20120519-sysmoBTS-goes-public/</guid><pubDate>Fri, 18 May 2012 19:00:00 GMT</pubDate></item><item><title>Alcatel MTK phone UART pinout</title><link>https://laforge.gnumonks.org/blog/20120314-alcatel_ot980d_mtk/</link><dc:creator>Harald Welte</dc:creator><description>&lt;p&gt;
The Alcatel OT-890D is a MT6573 based smartphone.  It seems one of the
UARTs is available on test pads as seen in this picture:
&lt;/p&gt;&lt;center&gt;
&lt;img src="http://laforge.gnumonks.org/photos/alcatel_ot890d_small.jpg" width="66%"&gt;
&lt;/center&gt;

&lt;p&gt;
The voltage level is still 3.3V, so no fancy 1.8V gear is required.
&lt;/p&gt;
&lt;p&gt;
During boot, the UART is first used at 19200 bps, where it prints the
strings "MW01" and "MW02".  I then switches to 115200 bps where it
prints "READY", and finally switches to 921600 bps, where it seems to
output some mixed binary/text messages containing AT commands and
responses between AP and BP, as well as some debug information:
&lt;/p&gt;&lt;pre&gt;
�Ue� � � T+CREG=2
�Ue�!�!�!T+CSQSQ=1
�Ue�!�!�!AT+CREG=2
�Uew�"w�"w�"SQSQ=1
'Ue"""      AT+EFUN=1
      SML: Load!_Ue""""""
                         SML: Load!hU("("("
&lt;/pre&gt;

&lt;p&gt;
I haven't yet investigated if the binary between the text is some
standard HDLC framing or a TS 07.10 multiplex.
&lt;/p&gt;
&lt;p&gt;
If anyone knows more about the boot process (MW01/MW02/READY) or the
binary protocol, please let me know.
&lt;/p&gt;</description><category>gsm</category><guid>https://laforge.gnumonks.org/blog/20120314-alcatel_ot980d_mtk/</guid><pubDate>Tue, 13 Mar 2012 19:00:00 GMT</pubDate></item><item><title>More research into the Motorola Horizon macro and Mo-bis</title><link>https://laforge.gnumonks.org/blog/20120301-motorola_horizon/</link><dc:creator>Harald Welte</dc:creator><description>&lt;p&gt;
Once upon a time there was an Americans company called Motorola, and they
decided to implement GSM.  Unfortunately they decided to deviate
significantly from the specification and implement their own proprietary
back-haul protocol between BTS and BSC, called Mo-bis.  It replaces the
standardized A-bis interface.
&lt;/p&gt;
&lt;p&gt;
Today, There are plenty of phased-out &lt;a href="http://openbsc.osmocom.org/trac/wiki/Motorola_Horizon_macro"&gt;Motorola
Horizon / Horizon II macro BTSs&lt;/a&gt; that have been phased out.
Basically you can get them for scrap value, which makes them an ideal
target for GSM enthusiasts willing to run a single-cell network with
little investment.  So while there are actually people who are interested
in operating a power-consuming device roughly the size of a washing
machine in their home/office - they are normally not interested in
running a 19" rack sized Motorola BSC with it.  Also, the BSCs are much
less frequently to be found compared to the BTS.
&lt;/p&gt;
&lt;p&gt;
So it would be great to support Mo-bis from within OpenBSC.  A couple of
brave young men have set out to try the seemingly impossible.  There's
absolutely zero documentation available on that protocol, and no
wireshark support either.  However, the University of Brno (Czech) has a
functional Motorola BTS + BSC setup, and I was able to obtain protocol
traces from them and actually experiment with the equipment in their
lab.
&lt;/p&gt;
&lt;p&gt;
The entire Motorola GSM architecture seems to be over-engineered without
end.  Basically you are looking at a distributed computer from the early
1990ies.  Lots of processor cards (m68k, ppc) interconnected by HDLC
links on top of synchronous 2Mbps links with 64k timeslots.  Those links
are available e.g. on the backplane of the BTS as a &lt;i&gt;TDM highway&lt;/i&gt;.
So basically even inside the BTS, the individual processors talk over
E1 to each other.  In the BSC, there is a token ring based LAN between
some of the cards instead.  And the MCUF in the BTS even supports to
transport those proprietary inter-cpu links via fiber optic (!).
&lt;/p&gt;
&lt;p&gt;
Each processor has a 16bit identifier by which it can be addressed in
form of &lt;i&gt;physical addresses&lt;/i&gt;.  Individual processes on the
processors have fixed &lt;i&gt;process identifiers&lt;/i&gt;, and they allocate
a variety of &lt;i&gt;mailboxes&lt;/i&gt; in which they can receive messages from
remote processors.  There are routing functions at intermediate notes.
&lt;/p&gt;
&lt;p&gt;
So any process on any processor card can send messages to any mailbox of
any other process on any other processor, independent of its physical
location (locally at the BTS, or at the remote BSC, or even at remote
BTSs).
&lt;/p&gt;
&lt;p&gt;
Besides physical addresses, there are also functional addresses.  Thos
addresses are used particularly to support fail-over.  Every board in a
BTS and BSC can be fully redundant, and if you use physical addresses,
you would address one of the two redundant boards.  Using functional
addresses, you address the function they both can perform, and some
routing magic will make sure it ends up at the current active node in
the pair.
&lt;/p&gt;
&lt;p&gt;
There are multiple processors in every TRX, and a couple of processors
for each BTS, processors in the E1 line cards, etc.  Now speaking of the
actual Mo-bis interface:  It seems to be a weird mixture between 08.58
(RSL) and 08.08 (BSSAP/BSSMAP).  However, after staring at the messages
sufficiently long, I have been able to write a more or less complete
wireshark dissector for them.  Radio Channel Activation (RACH/IMM.ASS)
are for example handled directly inside the BTS, they don't exist as
transactions on the Mo-bis like they do in A-bis.
&lt;/p&gt;
&lt;p&gt;
So implementing the actual location update / MO+MT voice call and SMS
related transactions is actually not all that hard.  What makes things
really difficult is the way the BTS is initialized at startup.
Basically what resembles the OML part of standardized A-bis.
&lt;/p&gt;
&lt;p&gt;
There is a lot of low-level management and bring-up of the individual
processes and boards,  and the download of a large 500 kByte-sized BLOB
simply called &lt;i&gt;database&lt;/i&gt;.  This binary database contains literally
hundreds of configuration parameters for the BTS and its neighbors.  It
also contains sophisticated configuration of the message routers, the
switching/multiplexing of 64k timeslots on the various links,
information on redundant paths within the back-haul network, etc.
&lt;/p&gt;
&lt;p&gt;
Interestingly, using the password combination &lt;i&gt;3beatles&lt;/i&gt; and
&lt;i&gt;4stooges&lt;/i&gt; on any of the serial consoles of the BTS or BSC, you can
enter into a "god-mode" which permits you to enter the &lt;i&gt;executive
monitor (EMON)&lt;/i&gt;.  The executive is the operating system they run on
both m68k and ppc processors.  It provides access to something like a
syslog of messages from the various processes, and you can manually
generate messages that are to be sent to mailboxes of processes.  You
can inspect the object table (application programs an databases),
read/write to PCMCIA flash cards, read and write to logical and physical
memory, inspect CPU and I/O usage and much more.  In fact, the
integrated Code Object Manager (COM) even allows the processors to
synchronize their code versions and remotely boot other CPUS via HDLC
channels.
&lt;/p&gt;
&lt;p&gt;
For a communications system geek like myself, it's extremely fascinating
to see such a sophisticated and versatile system.  I only wonder why on
earth somebody would come up with something as complex, only to connect
a couple of BTSs to a BSC.   Thus, the only logical explanation is that
Motorola has developed this distributed proprietary computing system way
before they went into GSM, and they probably just recycled it as it
already existed.
&lt;/p&gt;
&lt;p&gt;
If anyone knows more about the history of this, I would be excited to
hear about it.  It literally feels like being an archaeologist.
Analyzing ancient technology from our forefathers.   But then, it only
is 20 odd years old.  The only time I had a similar feeling was when I
briefly came in touch with IBM mainframes in 2001 and looking at IBMs
SNA protocol stack.
&lt;/p&gt;</description><category>gsm</category><guid>https://laforge.gnumonks.org/blog/20120301-motorola_horizon/</guid><pubDate>Wed, 29 Feb 2012 19:00:00 GMT</pubDate></item><item><title>New OsmocomBB RSSI monitor firmware</title><link>https://laforge.gnumonks.org/blog/20120128-osmocombb_rssi/</link><dc:creator>Harald Welte</dc:creator><description>&lt;p&gt;
Jolly has been hacking up a nice new &lt;a href="http://bb.osmocom.org/trac/wiki/rssi.bin"&gt;RSSI monitoring
firmware application&lt;/a&gt; for OsmocomBB.
&lt;/p&gt;
&lt;p&gt;
I let the pictures speak for themselves:
&lt;/p&gt;&lt;center&gt;
&lt;img src="http://bb.osmocom.org/trac/raw-attachment/wiki/rssi.bin/osmocombb-rssi-arfcn.jpg"&gt;
&lt;img src="http://bb.osmocom.org/trac/raw-attachment/wiki/rssi.bin/osmocombb-rssi-spectrum.jpg"&gt;
&lt;/center&gt;

&lt;p&gt;
I really hope this trend continues and we'll get some actual user
interface in OsmocomBB at some point this year..
&lt;/p&gt;</description><category>gsm</category><category>osmocom-bb</category><guid>https://laforge.gnumonks.org/blog/20120128-osmocombb_rssi/</guid><pubDate>Fri, 27 Jan 2012 19:00:00 GMT</pubDate></item><item><title>OP25 project joins hosting on osmocom.org</title><link>https://laforge.gnumonks.org/blog/20120125-op25-osmocom-org/</link><dc:creator>Harald Welte</dc:creator><description>&lt;p&gt;
Some days ago, I noticed that the famous OP25 project (a Free Software
implementation of the APCO25 system, a digital trunked radio system) was
no longer reachable on-line.  It seems they were running this on a
desktop PC in a university. As nobody in the project still seems to be
at that university, a change in the network configuration had
accidentally rendered the website unreachable.
&lt;/p&gt;
&lt;p&gt;
After some quick e-mails, I offered to host them within the osmocom.org
family of Free Software Projects for mobile communications.  This is
when &lt;a href="http://op25.osmocom.org/"&gt;op25.osmocom.org&lt;/a&gt; was
created, and a full-site backup uploaded + installed.
&lt;/p&gt;
&lt;p&gt;
I'm really happy that we were able to do a small part to help to make
sure this valuable project remains accessible to interested parties in
the signal processing and mobile communications field.
&lt;/p&gt;</description><category>gsm</category><guid>https://laforge.gnumonks.org/blog/20120125-op25-osmocom-org/</guid><pubDate>Tue, 24 Jan 2012 19:00:00 GMT</pubDate></item><item><title>GSM Security Training at DeepSec</title><link>https://laforge.gnumonks.org/blog/20111017-gsm_scurity_workshop/</link><dc:creator>Harald Welte</dc:creator><description>&lt;p&gt;
Dieter Spaar and I will be holding yet another &lt;a href="http://deepsec.net/speaker.html#WSLOT42"&gt;GSM security training&lt;/a&gt;
on November 15/16 at this years &lt;a href="http://deepsec.net/"&gt;DeepSec&lt;/a&gt; conference in Vienna.
&lt;/p&gt;
&lt;p&gt;
We have been giving a series of successful GSM Security trainings
in-house at various operators, as well as at a variety of conferences
during the last couple of years.  If you want to beef up your knowledge
on the detailed inner workings of mobile networks, with a specific focus
on security related aspects, this training might be a great opportunity.
&lt;/p&gt;
&lt;p&gt;
You can register &lt;a href="http://deepsec.net/register.html"&gt;here&lt;/a&gt;.
Unfortunately the Early Bird discount has already expired, but you still
have a chance to book before November 2nd, after which a late booking
fee will apply.
&lt;/p&gt;</description><category>gsm</category><guid>https://laforge.gnumonks.org/blog/20111017-gsm_scurity_workshop/</guid><pubDate>Sun, 16 Oct 2011 19:00:00 GMT</pubDate></item><item><title>First OsmocomGMR code release</title><link>https://laforge.gnumonks.org/blog/20111016-osmocom_gmr/</link><dc:creator>Harald Welte</dc:creator><description>&lt;p&gt;
The &lt;a href="http://osmocom.org&amp;gt;Omsocom&amp;lt;/a&amp;gt;%20project%0Aannounces%20the%20first%20code%20release%20of%20the%20&amp;lt;a%0Ahref=" http:&gt;OsmocomGMR&lt;/a&gt; project.  GMR is
Geo Mobile Radio, the specifications for (among others) the &lt;a href="https://secure.wikimedia.org/wikipedia/en/wiki/Thuraya"&gt;Thuraya&lt;/a&gt;
satellite telephone network.
&lt;/p&gt;
&lt;p&gt;
For more details see the &lt;a href="http://bb.osmocom.org/trac/blog/gmr-release"&gt;OsmocomGMR
announcement&lt;/a&gt;.
&lt;/p&gt;
&lt;p&gt;
I still remember some years ago, when Dieter and I were first working on
some code to implement the GSM protocols, which later ended up becoming
OpenBSC.  A number of other developers joined the project ever since,
and we have a wide user base, from individuals over academia up to
commercial deployments.  Next we did GPRS, which was another journey
into a new world.  While OsmoSGSN still has some bugs here and there, it
has come a long way ever since.
&lt;/p&gt;
&lt;p&gt;
In December 2010 at 27C3 I had this crazy idea of looking into yet
another communications system (TETRA).  Just one week of coding later,
the first working code emerged and later became &lt;a href="http://tetra.osmocom.org/"&gt;OsmocomTETRA&lt;/a&gt;.  Again, history
repeated itself and what was started by one person became a
collaborative effort in very short time.
&lt;/p&gt;
&lt;p&gt;
Finally, in July 2011, I thought it would be time for yet
another communications system: ETSI GMR, used by Thuraya.  This time I
was too busy to actually write any code, but I just read specifications,
found a supplier for some equipment and got some fellow Osmocom
developers interested in it.  For weeks, the IRC channel was flooded
with daily reports about progress, new measurements/traces that had been
made and about new code that had been written.  About three months
later, the code is capable of demodulating, decoding, de-interleaving,
and it can give you a BCCH protocol trace in wirshark.
&lt;/p&gt;
&lt;p&gt;
With this pace of progess, I wonder where we might be in yet another one
or two years.  At least on my personal agenda are the following items:
&lt;/p&gt;&lt;ul&gt;
&lt;li&gt;Finish Erlang TCAP + MAP implementation, which will allow us to
implement a true HLR/AUC and finally a new MSC that can interoperate
with GSM/3G core networks&lt;/li&gt;
&lt;li&gt;Integrate OpenBSC and OpenBTS, especially now that we already have
the BTS-side A-bis implementation as part of osmo-bts&lt;/li&gt;
&lt;li&gt;Get funding to implement a GPRS/EDGE PCU, enabling osmo-bts to talk
to OsmoSGSN&lt;/li&gt;
&lt;li&gt;Work on some hardware+software interface that allows us to use the
Motorola Horizon Macro BTS with OpenBSC, or at least their TRXs (called CTU) with
osmo-bts&lt;/li&gt;
&lt;li&gt;Implement a UMA/GAN gateway (for UMA capable phones and femtocells)&lt;/li&gt;
&lt;li&gt;Support IuCS/IuPS from our MSC and SGSN for 3G Femtocells&lt;/li&gt;
&lt;li&gt;Complete the SIMtrace firmware/software to do full MITM and SIM card
emulation&lt;/li&gt;
&lt;li&gt;Work on automated regression testing for osmo-bts, OpenBSC, OsmoSGSN
and all other GSM related Osmocom components.
&lt;/li&gt;&lt;li&gt;Continue the excellent work that has been done on supporting MTK
chipsets from OsmocomBB at some point&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;
At least now you know there is never any reason to be bored.  If you
have time and are interested in helping with implementing any of this
stuff, let me know.
&lt;/p&gt;</description><category>gsm</category><guid>https://laforge.gnumonks.org/blog/20111016-osmocom_gmr/</guid><pubDate>Sat, 15 Oct 2011 19:00:00 GMT</pubDate></item><item><title>Ground-breaking research on APCO P25 security</title><link>https://laforge.gnumonks.org/blog/20110918-research_on_p25/</link><dc:creator>Harald Welte</dc:creator><description>&lt;p&gt;
While we at &lt;a href="http://tetra.osmocom.org/"&gt;OsmocomTETRA&lt;/a&gt;
have been looking &lt;i&gt;only&lt;/i&gt; at implementing the TETRA protocols as
they are (and doing a bit of sniffing on unencrypted networks),
some researchers have recently published two ground-breaking papers on
the (lack of) security in the APCO P25 radio system.
&lt;/p&gt;
&lt;p&gt;
In case you haven't heard about APCO P25: It is a digital mobile radio
system mainly used by Police in non-EU English speaking countries like
the US, Australia and New Zealand.
&lt;/p&gt;
&lt;p&gt;
You can find the respective papers &lt;a href="http://www.nicta.com.au/pub?doc=5076"&gt;here&lt;/a&gt; and &lt;a href="http://www.crypto.com/papers/p25sec.pdf"&gt;here&lt;/a&gt;.
&lt;/p&gt;
&lt;p&gt;
So apparently P25 uses either single-DES or a proprietary cipher with
only 40 bit key-length.  No, I'm not joking.  Seems like it was
developed by people who have not the slightest clue about communications
security at all.
&lt;/p&gt;
&lt;p&gt;
And guess what they used to receive and transmit P25 waveforms? Of
course the USRP and gnuradio.  This once again proves how invaluable
those tools are, not just for the FOSS community,  but also for the
communications research community.
&lt;/p&gt;</description><category>gsm</category><guid>https://laforge.gnumonks.org/blog/20110918-research_on_p25/</guid><pubDate>Sat, 17 Sep 2011 19:00:00 GMT</pubDate></item><item><title>Major bugfix release of SIMtrace firmware</title><link>https://laforge.gnumonks.org/blog/20110816-simtrace_bugfix/</link><dc:creator>Harald Welte</dc:creator><description>&lt;p&gt;
At the &lt;a href="http://events.ccc.de/camp/2011/"&gt;CCC Camp 2011&lt;/a&gt;,
the &lt;a href="http://simtrace.osmocom.org/"&gt;Osmocom SIMtrace&lt;/a&gt; project
was a major success.  Not only were something like 60 units out of our
initial batch of 100 units sold, but the SIMtrace workshop was so
successful that it had to be held three times instead of once.
&lt;/p&gt;
&lt;p&gt;
During the workshop we discovered a very annoying bug which I wasn't
able to solve immediately.  Depending on the combination of
phone/simcard used, the SIMtrace would disconnect from USB and the phone
would claim there is no SIM card inserted.
&lt;/p&gt;
&lt;p&gt;
The debugging went like this:
&lt;/p&gt;&lt;ul&gt;
&lt;li&gt;SIMtrace was resetting very early in/after the ATR&lt;/li&gt;
&lt;li&gt;the reset reason was diagnosed as being a watchdog reset&lt;/li&gt;
&lt;li&gt;the watchdog was triggered by an IRQ storm from the USART&lt;/li&gt;
&lt;li&gt;the IRQ storm was caused by the firmware not clearing some parity
error / overrun related bits&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;
However, at that point I couldn't further find the cause of the bug.  I
assumed it was related to the PPS/PTS, but couldn't really point my
finger at it.  If we sniff the PPS/PTS wrong, then of course our baud
rate is different from the real baud rate, which in turn would cause
perceived parity errors and the like.
&lt;/p&gt;
&lt;p&gt;
I'm grateful that most people still didn't loose their interest in
simtrace and happily bought the unit and/or attended the workshop.
&lt;/p&gt;
&lt;p&gt;
After a bit more debugging after the camp, I have now solved the bug.
I simply never realized that the TCK (ATR checksum byte) is only present
in cards that support T=1 as well as T=0.  However, some simpler SIM
cards like the ones that we issued for our test GSM network on the camp
only do T=0 and thus don't transmit TCK.
&lt;/p&gt;
&lt;p&gt;
The old code thus considered the first PTS/PPS byte (0xff) as the TCK,
and didn't recognize the PTS/PPS correctly.
&lt;/p&gt;
&lt;p&gt;
Firmware version v0.2 fixes this problem.  I've &lt;a href="http://lists.osmocom.org/pipermail/simtrace/2011-August/000109.html"&gt;released
the firmware update&lt;/a&gt;, now also available from the &lt;a href="http://bb.osmocom.org/trac/wiki/SIMtrace/Firmware"&gt;wiki&lt;/a&gt;
&lt;/p&gt;</description><category>gsm</category><guid>https://laforge.gnumonks.org/blog/20110816-simtrace_bugfix/</guid><pubDate>Mon, 15 Aug 2011 19:00:00 GMT</pubDate></item><item><title>Update on the GSM network at the CCC Camp 2011</title><link>https://laforge.gnumonks.org/blog/20110722-gsm_at_ccc_camp_2011/</link><dc:creator>Harald Welte</dc:creator><description>&lt;p&gt;
During the past weeks, I've been trying very hard to get to a technical
solution for the setup regarding the private GSM network that we intend
to operate at the &lt;a href="http://events.ccc.de/camp/2011/"&gt;CCC Camp
2011&lt;/a&gt;.  Unfortunately, despite puting in way too much time that I
don't have, no really good solution appeared.  There were times when I
was wondering if it would happen at all - mainly due to the lack of
properly integrated / tested RF related issues like PA, LNA, duplexer,
combiner, etc.
&lt;/p&gt;
&lt;p&gt;
But it seems just in time &lt;a href="http://lists.osmocom.org/pipermail/openbsc/2011-July/003064.html"&gt;Dieter came to the rescue&lt;/a&gt;.  So now we have
pretty much figured out the equipment and settled on a configuration.
We'll have 2 Nokia Metrosite BTS with a total of 5 TRX, each running at
5W using borrowed equipment.
&lt;/p&gt;
&lt;p&gt;
During the next 10 days, all the parts like antennas, cabling, plugs,
adapters and the BTS units themselves should arrive at my place.  Let's
hope there are no serious fuck-ups that cause something to not arrive
in time.
&lt;/p&gt;
&lt;p&gt;
So all in all, there's a 99% chance we will have a functional GSM
network.  The Nokia A-bis support in OpenBSC will be brand new, so there
might be some glitches here and there.  But then, that's part of the
fun.  I'm already very curious to see what kind of coverage we get.  I
guess if we do things right, it should reach well into Finowfurt itself,
and not just barely cover the camp grounds like we had at HAR 2009.
&lt;/p&gt;</description><category>gsm</category><guid>https://laforge.gnumonks.org/blog/20110722-gsm_at_ccc_camp_2011/</guid><pubDate>Thu, 21 Jul 2011 19:00:00 GMT</pubDate></item><item><title>On the recent THC release on the Vodafone femtocell</title><link>https://laforge.gnumonks.org/blog/20110714-vodafone_femtocell_thc/</link><dc:creator>Harald Welte</dc:creator><description>&lt;p&gt;
I am mainly posting this to prevent any more people mailing me about
this release.  There's nothing really spectacular here.
&lt;/p&gt;
&lt;p&gt;
Starting from 2009 on, the usual suspects (aka OpenBSC developers) have
been looking at various 3G femtocells, including the Vodafone one (I
have 10 of them here).  Aside from that Alcatel-Lucent design that
Vodafone uses, we've also looked at the Cisco/AT+T/ip.access design, as
well as the Ubiquisys/SFR one.  With some effort you can root all of
them, and you can then make sure they don't connect to the respective
operator but to an IP address of your choosing.
&lt;/p&gt;
&lt;p&gt;
The protocols are vendor-dependent.  The Vodafone femtocell uses a
version of RANAP (the protocol between RNC and MSC in UMTS) behind an 8
byte proprietary header.  As RANAP is specified in the 3GPP, it was
pretty easy to build a small piece of code that interacts with the unit.
&lt;/p&gt;
&lt;p&gt;
Ubiquisys (used by SFR) uses the UMA protocols, and the
Cisco/ip.access/AT+T design uses a proprietary ip.access protocol called
URSL (sort-of a "progression" of the 2G RSL to UMTS).
&lt;/p&gt;
&lt;p&gt;
Supporting them from OpenBSC is not easy.  While the call control and
SMS transfer protocols of 3G are identical to GSM, everything below
doesn't really bear much resemblance.  I would guess it would take at
least a man-month to get basic signalling, call + SMS support working,
if not more.
&lt;/p&gt;
&lt;p&gt;
Given the fact that the femtocells all speak their vendor-proprietary
dialects, and given that they often come with license terms that
only permit the use of their firmware in combination with their gateway
located at the operator network, we never thought it is a high priority
item for us to work on.
&lt;/p&gt;
&lt;p&gt;
What you also have to consider, is that their output power of 20dBm is
even less than the 200mW of typical small-scale GSM BTS, and that they
typically only support the operation of 4 concurrent phones.  Nothing
that you would be able to run e.g. a conference telephony network on.
&lt;/p&gt;
&lt;p&gt;
Furthermore, due to the wide channels (5MHz), it is very likely that all
available sprectrum has been auctioned off/licensed to commercial
operators, so it's almost impossible to get something like a test
license.  In GSM with 200kHz channels, there's often still a guard band
or some unallocated channel that can be used.
&lt;/p&gt;
&lt;p&gt;
If you really want to have some free software + femtocell based 3G
network, go ahead and do it.  The option existed for years now, ever
since femtocells started shipping to the market.  All of them are some
form of embedded Linux systems.  Rooting them isn't really different
from rooting a Linux based WiFi router / DSL modem.   So what's that
new about the THC release?  That a vendor of Linux embedded devices
chose a trivial password?  If you're surprised by that, I guess you
haven't taken apart many embedded devices then.
&lt;/p&gt;</description><category>gsm</category><guid>https://laforge.gnumonks.org/blog/20110714-vodafone_femtocell_thc/</guid><pubDate>Wed, 13 Jul 2011 19:00:00 GMT</pubDate></item><item><title>SIMtrace v1.0 prototypes are working out of the box</title><link>https://laforge.gnumonks.org/blog/20110702-simtrace_prototypes/</link><dc:creator>Harald Welte</dc:creator><description>&lt;p&gt;
After the debacle with various wrong footprints in the v0.9,
I'm very happy to announce that the &lt;a href="http://simtrace.osmocom.org/"&gt;SIMtrace&lt;/a&gt; v1.0 hardware is working
fine.  All footprints correct, schematics correct, layout/Gerber
correct.  All we had to do is solder the components, attach it to USB,
flash the firmware and use it.
&lt;/p&gt;&lt;p&gt;
&lt;/p&gt;&lt;p&gt;
Here's a picture of the board (sorry, my soldering is not very clean):
&lt;/p&gt;&lt;center&gt;
&lt;img width="33%" src="http://bb.osmocom.org/trac/raw-attachment/wiki/SIMtrace/Hardware/simtrace_10_front.jpg"&gt;
&lt;/center&gt;

&lt;p&gt;
Early next week we will be ordering a batch of 100 units from the SMT
house we have chosen.
&lt;/p&gt;</description><category>gsm</category><guid>https://laforge.gnumonks.org/blog/20110702-simtrace_prototypes/</guid><pubDate>Fri, 01 Jul 2011 19:00:00 GMT</pubDate></item><item><title>First working prototypes of Osmocom SIMtrace design</title><link>https://laforge.gnumonks.org/blog/20110622-osmocom_simtrace/</link><dc:creator>Harald Welte</dc:creator><description>&lt;p&gt;
Last winter I was working on some hardware and software that can be used
to trace the communication between a SIM card and a phone and called it
&lt;a href="http://simtrace.osmocom.org/"&gt;Osmocom SIMtrace&lt;/a&gt;.  At that
time, I was simply recycling an old OLIMEX development board for the
AT91SAM7S micro-controller.
&lt;/p&gt;
&lt;p&gt;
But since the firmware for the micro-controller, the host software as
well as the wireshark plug-in has been written now, it would be a shame
if I was they only user of the project.  Therefore, Kevin Redon and I
have spent some time in polishing and improving the design, as well as
generate some actual prototypes.
&lt;/p&gt;
&lt;p&gt;
Unfortunately a number of mistakes were made (both on the design side
but also wrong component pin-outs) so there was a need for significant
re-working.
&lt;/p&gt;
&lt;p&gt;
Nonetheless, we now have some 5 functional prototypes, a picture can be
seen &lt;a href="http://bb.osmocom.org/trac/wiki/SIMtrace/Hardware"&gt;in the
Osmocom Wiki&lt;/a&gt;, where you can also find the &lt;a href="http://bb.osmocom.org/trac/attachment/wiki/SIMtrace/Hardware/simtrace_schem_v10.pdf"&gt;schematics&lt;/a&gt;
&lt;/p&gt;
&lt;center&gt;
&lt;img width="33%" src="http://bb.osmocom.org/trac/raw-attachment/wiki/SIMtrace/Hardware/simtrace_v09_top_mid.jpg"&gt;
&lt;/center&gt;
&lt;p&gt;
We're now having a second version of the PCB built, this time hopefully
with correct footprints for all parts.  Once that is verified at the end
of next week, we will give "go" for the production of a small batch (100
units).
&lt;/p&gt;
&lt;p&gt;
Interested developers will be able to obtain the resulting hardware from
mid-August onwards.  We also expect to be offering them at the
&lt;a href="http://events.ccc.de/camp/2011/wiki/RadioVillage"&gt;Radio Village
of the 2011 CCC Camp&lt;/a&gt;.
&lt;/p&gt;
&lt;p&gt;
Tracing the SIM&amp;lt;-&amp;gt;Phone protocol can be useful in a variety of cases:
&lt;/p&gt;&lt;ul&gt;
&lt;li&gt;Observing the behavior of operator-issued SIM cards in terms of
which SIM Application Toolkit or Proactive SIM features they use.&lt;/li&gt;
&lt;li&gt;Debugging aid while developing and interoperability testing of your
own SIM toolkit applets&lt;/li&gt;
&lt;li&gt;Prototyping and development of SAT blocker or other SIM card
firewalls which restrict the security or privacy threats originating
from untrusted operator SIMs or potentially compromised SIM cards.&lt;/li&gt;
&lt;/ul&gt;</description><category>gsm</category><guid>https://laforge.gnumonks.org/blog/20110622-osmocom_simtrace/</guid><pubDate>Tue, 21 Jun 2011 19:00:00 GMT</pubDate></item><item><title>Exploring the Motorola Horizon macro BTS</title><link>https://laforge.gnumonks.org/blog/20110618-motorola_horizon_macro_db/</link><dc:creator>Harald Welte</dc:creator><description>&lt;p&gt;
Some days ago, my new 100kg toys have arrived: The Motorola horizonmacro
indoor cabinets, populated with 3 GSM 1800 TRX each.  Pictures are at
&lt;a href="http://openbsc.osmocom.org/trac/wiki/Motorola_Horizon_macro"&gt;the
openbsc.osmocom.org wiki&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
It took some time to manufacture the power cable, and specifically the
E1 cable (where I had to reverse engineer the pin-out of a 37pin sub-d
connector that the so-called BIB (balanced interface boards) use.
&lt;/p&gt;
&lt;p&gt;
The next biggest time consumer was the fact that the command line based
user interface (MMI) has three modes; MMI-ROM, MMI-RAM and emon.
Figuring out which commands to use to switch modes isn't really
something that you can easily find.  Especially the fact that the
MMI-ROM to MMI-RAM switching command has a parameter that needs to be
identical with one stored on the PCMCIA flash card (number "18" in my
case), didn't make things any easier.
&lt;/p&gt;
&lt;p&gt;
So as an intermediate summary, I can make the following comments about
the Motorola BTS and specifically A-bis architecture:
&lt;/p&gt;&lt;ul&gt;
&lt;li&gt;Motorola seems more proprietary and less specification oriented than
what I've seen so far (Ericsson, ip.access, Siemens, Nokia).&lt;/li&gt;
&lt;li&gt;They do not seem to implement a SAPI=62 OML link on A-bis at
all&lt;/li&gt;
&lt;li&gt;Thus, there is no GSM TS 12.21 compatible OML protocol at all&lt;/li&gt;
&lt;li&gt;Instead of using individual OML messages and/or attributes to set
things like ARFCN, BSIC and the like, the Motorola BSC seems to generate
one big database blob containing all parameters.  This blob is
downloaded into the BTS RAM (optionally its PCMCIA Series2 flash card).
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;
Particularly the latter part is causing quite some problems for me.  As
I don't have a Motorola BSC, I cannot generate those database files.
My BTS units come with databases on their PCMCIA flash cards.  I can
view their contents on the MMI.  However, their config (EGSM) doesn't
match the actual radio hardware that's installed.  Even after hours
spent with the MMI, there seems absolutely no way how those parameters
can be altered locally
&lt;/p&gt;
&lt;p&gt;
I also have not found any hint / documentation at all about something
like a LMT (local maintenance terminal) like other BTS vendor.  Using
such a software on a PC, you can typically configure the BTS via a RS232
line.
&lt;/p&gt;
&lt;p&gt;
So most of my hope now lies in being able to analyze dumps of those old
Series2 flash cards in order to get some hints on that database format.
&lt;/p&gt;
&lt;p&gt;
If anyone has any of the following information, it would make my day:
&lt;/p&gt;&lt;ul&gt;
&lt;li&gt;Motorola A-bis / Mo-bis protocol traces&lt;/li&gt;
&lt;li&gt;Any Motorola BTS config databases (independent of BTS model/version)&lt;/li&gt;
&lt;li&gt;The sample database files that come with a Racal 6113 Option 225&lt;/li&gt;
&lt;li&gt;Any information on the database format&lt;/li&gt;
&lt;/ul&gt;
But to be honest, I don't have much hope.  The equipment is old (about
1999), and only very few operators have been using it, as it seems.</description><category>gsm</category><guid>https://laforge.gnumonks.org/blog/20110618-motorola_horizon_macro_db/</guid><pubDate>Fri, 17 Jun 2011 19:00:00 GMT</pubDate></item><item><title>ETSI and its ridiculous fees for old archived documents</title><link>https://laforge.gnumonks.org/blog/20110607-etsi_gsm_archive_fees/</link><dc:creator>Harald Welte</dc:creator><description>&lt;p&gt;
I am currently looking for some old meeting minutes in order to
understand who was the driving force behind certain features in GSM.
&lt;/p&gt;
&lt;p&gt;
Ever since the GSM standardization had been handed over to 3GPP, all
meeting minutes are freely accessible and downloadable for everyone.
But what about the 15-20 years before that?  They remain in the ETSI
archive.
&lt;/p&gt;
&lt;p&gt;
So from April 2011, the ETSI has started to offer an archive DVD,
containing all the early CEPT and ETSI documents such as draft
standards and meeting minutes.  What a great idea.  This DVD set is
titled &lt;i&gt;A Technical History of GSM Standards&lt;/i&gt;
&lt;/p&gt;
&lt;p&gt;
But then, when you look at the price tag, you can only think "Seriously?
They must be kidding!!". They are selling it for &lt;b&gt;6,000 EUR&lt;/b&gt;.  Yes,
this is not 60 EUR, not 600 but 6,000!.  Go and see with your own eyes
at &lt;a href="http://www.etsi.org/website/webstore/"&gt;the ETSI web-shop
&lt;/a&gt;&lt;a href="http://www.etsi.org/WebSite/document/OurServices/EDS/ETSI%20GSM%20SMG%20Flyer.pdf"&gt;or
this flyer&lt;/a&gt;.
&lt;/p&gt;
&lt;p&gt;
But if that hefty price was not enough, they add an additional burden:
You have to be an ETSI member to even buy it.  And what is the cheapest
option?  Well, as an individual/small business you can join for a
&lt;a href="http://www.etsi.org/WebSite/membership/membershiplanding.aspx"&gt;&lt;i&gt;reduced&lt;/i&gt;
price of EUR 3,000 per year&lt;/a&gt;.  So in order to get access to some old
meeting minutes from the 1980ies or 1990ies, I have to pay a total of
EUR 9,000?  They must be out of their freaking minds.  Sorry, but I am
simply lacking any other words how I could put it.
&lt;/p&gt;
&lt;p&gt;
I think ETSI and the entire telecomms industry can be happy if anyone
shows an archaeological interest into ancient specification texts at
all.  Scaring them away with a more than ridiculous price tag is
certainly not going to encourage students or researchers to understand
who, how and why GSM has ended up what it is today.
&lt;/p&gt;</description><category>gsm</category><guid>https://laforge.gnumonks.org/blog/20110607-etsi_gsm_archive_fees/</guid><pubDate>Mon, 06 Jun 2011 19:00:00 GMT</pubDate></item><item><title>Looking for documentation and/or protocol traces for Motorola Horizon BTS</title><link>https://laforge.gnumonks.org/blog/20110601-motorola_horizon_1/</link><dc:creator>Harald Welte</dc:creator><description>&lt;p&gt;
It seems like I'll be getting my hands on some Motorola Horizon 1 BTS
soon.  Of course it would be great to add OpenBSC support for yet
another vendor / model.
&lt;/p&gt;
&lt;p&gt;
So if anyone out there has any information on Motorola Horizon,
I would be more than happy.  Information includes:
&lt;/p&gt;&lt;ul&gt;
&lt;li&gt;Motorola A-bis (Mo-bis) protocol traces&lt;/li&gt;
&lt;li&gt;Motorola A-bis (Mo-bis) protocol specs&lt;/li&gt;
&lt;li&gt;Installation manuals&lt;/li&gt;
&lt;li&gt;Configuration manuals&lt;/li&gt;
&lt;li&gt;Service manuals&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;
Thanks in advance!
&lt;/p&gt;</description><category>gsm</category><guid>https://laforge.gnumonks.org/blog/20110601-motorola_horizon_1/</guid><pubDate>Tue, 31 May 2011 19:00:00 GMT</pubDate></item><item><title>Finally: A parseable MAPv1 ASN.1 specification</title><link>https://laforge.gnumonks.org/blog/20110412-mapv1_available/</link><dc:creator>Harald Welte</dc:creator><description>&lt;p&gt;
After way too much work in extracting the ASN.1 text from word documents, learning
about the differences in pre-1990 ASN.1 and pre-1990 TCAP with their respective
current-day counterpart, some futile attempts with the incomplete ASN.1 grammar
files available for ANTLR3, I have finally dedicated the entire day to manually
convert the MAPv1 from ETSI TS 09.02 3.10.0 (1994) to work with present-day
TCAP and present-day ASN.1 syntax.
&lt;/p&gt;
&lt;p&gt;
The result not only passes the syntax and semantic checker, but it is accepted
by the Erlang asn1ct.  It has not been tested/validated against any test data
so far.  Just in case anyone else needs a 'working' version of MAPv1 some 20 years
after it was created, I have published the result here: &lt;a href="http://cgit.osmocom.org/cgit/asn1_docextract/tree/output/3.10.0"&gt;http://cgit.osmocom.org/cgit/asn1_docextract/tree/output/3.10.0&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
Any bugfixes/improvements/complaints are obviously welcome.
&lt;/p&gt;
&lt;p&gt;
Now I &lt;i&gt;just&lt;/i&gt; need to figure out how to properly work with the ROS/ROSE
CONTRACT class and TCAP APPLICATION-CONTEXT class to formally describe the
various application contexts, their respective MAP operations and associated
application context versions.  It's actually quite a bit surprising that the
ETSI/3GPP don't specify this formally in 29.002.  The information is contained
in the human-readable part of the document, but not in the formal ASN.1 notation.
I wonder why...
&lt;/p&gt;</description><category>gsm</category><guid>https://laforge.gnumonks.org/blog/20110412-mapv1_available/</guid><pubDate>Mon, 11 Apr 2011 19:00:00 GMT</pubDate></item><item><title>Following up on my GSM MAP archeology project</title><link>https://laforge.gnumonks.org/blog/20110409-follow_up_on_gsm_map/</link><dc:creator>Harald Welte</dc:creator><description>&lt;p&gt;
In the past weeks, I have been &lt;a href="http://laforge.gnumonks.org/weblog/2011/03/26#20110326-parsing_dos_word_files_for_gsm_map"&gt;blogging&lt;/a&gt;
about the work I've been doing in trying to recover the earlier versions of the
GSM MAP ASN.1 files in order to support it from my own Osmocom Erlang MAP code.
&lt;/p&gt;
&lt;p&gt;
After having gone through the tiresome exercise of implementing a custom MS
Word for DOS file parser to extract the ASN.1 definitions from the
3GPP-published DOC files, I tried to feed them into the Erlang asn1ct code
generator.
&lt;/p&gt;
&lt;p&gt;
Unfortunately this didn't work, as the old MAP ASN.1 references very old ITU-T
TCAP from 1988.  So I went to the ITU website.  There again a similar story.
From their asn1 website section, you can only get the &lt;a href="http://www.itu.int/ITU-T/formal-language/itu-t/q/q773/1997/TCAPMessages.html"&gt;TCAPMessages
from 1997. If you want an older format, like the &lt;/a&gt;&lt;a href="http://www.itu.int/rec/T-REC-Q.773-198811-S"&gt;Q.773 from 1988&lt;/a&gt;, you can
download a PDF file.  Most of that PDF file is actual text.  But the ASN.1
sections are included as an image, so there is no way how you can copy+paste
them.
&lt;/p&gt;
&lt;p&gt;
So there I went, and manually typed in those few pages of ASN.1 source code.
After I was finished,  I thought I had finally done enough.  Writing a
word-for-DOS parser, typing in pages of ASN.1 manually.  What more can there
be? I should be able to finally generate Erlang code for decoding and encoding
the respective messages.
&lt;/p&gt;
&lt;p&gt;
But it would be too simple if it was that easy.  The 1988 TCAP as well as the
old MAP specifications use the ASN.1 "MACRO" construct to define the individual
MAP operations.  However, as it seems the MACRO construct had been deprecated
in 1994 by the ISO  in charge of ASN.1.  Successive ISO specs for ASN.1
have completely remove the MACRO construct as similar results can be achieved
with newly-introduced &lt;i&gt;information objects&lt;/i&gt;. So of course, the Erlang
asn1ct (as well as other free software ASN.1 tools) does not support such an
antique feature.
&lt;/p&gt;
&lt;p&gt;
So here I am in the year 2011, unable to use information available in the
public ITU-T and ETSI/3GPP specifications to build a GSM MAP protocol
implementation that can deal with the messages that you encounter on real-world
SS7 links.  I guess there are now the following different approaches to proceed:
&lt;/p&gt;&lt;ul&gt;
&lt;li&gt;write a converter that translates MACRO into OBJECT&lt;/li&gt;
&lt;li&gt;manually convert the old MAP specs from MACRO to OBJECT&lt;/li&gt;
&lt;li&gt;add MACRO support to current-day ASN.1 tools&lt;/li&gt;
&lt;li&gt;find some old ASN.1 code generators that still support MACRO&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;
All in all, this is a really dissatisfying situation, and I would say it is a
failure of the standardization bodies to provide useful versions of their
specifications.  You cannot remove operations and associated message types from
a specification, while in real life even 15 years later a whole number of users
still use messages according to those (now removed) definitions.  Meanwhile, the
old specs are getting useless, because you not only deprecate but completely
remove a language construct of the formal specification language used.
&lt;/p&gt;
&lt;p&gt;
This renders the idea of having a formal specification useless.  If I first
need to write my own converters or manually convert that very same formal
specification, errors can be introduced in the translation/conversion process,
just as much as errors could have been introduced in manually writing encoding
and decoding routines based on a non-formal-specified protocol like most of the 
IETF / Internet protocols.
&lt;/p&gt;</description><category>gsm</category><guid>https://laforge.gnumonks.org/blog/20110409-follow_up_on_gsm_map/</guid><pubDate>Fri, 08 Apr 2011 19:00:00 GMT</pubDate></item><item><title>More MS Word for DOS file parsing in the name of GSM</title><link>https://laforge.gnumonks.org/blog/20110327-parsing_more_word_files_for_gsm_map/</link><dc:creator>Harald Welte</dc:creator><description>&lt;p&gt;
It seems that from TS 09.02 version 4.2.0 on, the editors have actually
put markers as "hidden text" inside the Word document, which allow
better automatic detection when a given ASN.1 module starts, is interrupted
by plain text, continues and ends.  The following screen shot (from Section 14
of the above-mentioned document) is human-readable hidden text explaining the
syntax:
&lt;/p&gt;
&lt;center&gt;
&lt;img src="http://laforge.gnumonks.org/photos/gsm_map_420_word55.png"&gt;
&lt;/center&gt;
&lt;p&gt;
So now I'm adding this format as a second option to my extraction tool.
&lt;/p&gt;
&lt;p&gt;
Please note: The tool I wrote yesterday (working fine with version 3.x.y of 09.02) 
is available from &lt;a href="http://cgit.osmocom.org/cgit/asn1_docextract/"&gt;asn1_docextract.git&lt;/a&gt;.
Later today it should also support the &amp;gt;= 4.2.0 annotations outlined in this
blog post.
&lt;/p&gt;</description><category>gsm</category><guid>https://laforge.gnumonks.org/blog/20110327-parsing_more_word_files_for_gsm_map/</guid><pubDate>Sat, 26 Mar 2011 19:00:00 GMT</pubDate></item><item><title>Implementing a custom MS Word for DOS file parser to properly do GSM SS7</title><link>https://laforge.gnumonks.org/blog/20110326-parsing_dos_word_files_for_gsm_map/</link><dc:creator>Harald Welte</dc:creator><description>&lt;p&gt;
Yes, I'm not kidding!
&lt;/p&gt;
&lt;p&gt;
In recent months, I've been writing quite a bit of GSM MAP (Mobile Application
Part) code.  MAP is the protocol used heavily in the GSM core network and
especially on the roaming interfaces between different operators.  It is
specified in &lt;a href="http://www.3gpp.org/ftp/Specs/html-info/0902.htm"&gt;GSM TS 09.02&lt;/a&gt; and later &lt;a href="http://www.3gpp.org/ftp/Specs/html-info/29002.htm"&gt;3GPP TS 29.002&lt;/a&gt;.
&lt;/p&gt;
&lt;p&gt;
The protocol specification relies on &lt;a href="https://secure.wikimedia.org/wikipedia/en/wiki/Abstract_Syntax_Notation_One"&gt;ASN.1&lt;/a&gt; description of the messages as well
as the regular BER encoding rules.  ASN.1 is this marvelous technology that
allows a protocol to be specified in an abstract and formal notation, in an
extensible way, removing all the problems of human-written marshalling code,
full of errors and differences due to different developers interpreting a
human-readable specification in different ways.
&lt;/p&gt;
&lt;p&gt;
So far so good. You think it should be simple to write a parser and generator
for MAP messages: Simply feed them into the ASN.1 compiler of your choice, it
will generate code in the target language you require.
&lt;/p&gt;
&lt;p&gt;
As long as both sides of the communication do that using exactly the same
revision of the specification (and don't make implementation mistakes), this
will work.  The reality looks very different, though :(  When I test my code
against something like one million of real-world messages captured on a
production SS7 roaming interface, it produces errors already on packet number
six of that trace.
&lt;/p&gt;
&lt;p&gt;
The problem is: The protocol designers have not specified the first versions
in a really extensible way, i.e. a given operation originally only returned
one atomic data field, and it was later extended to return a sequence of data
fields.  Thus, there is one additional level of hierarchy in the encoding.
&lt;/p&gt;
&lt;p&gt;
Not only that, but in their infinite wisdom, the designers of MAP have also
failed to include versioning information in each and every message header.
Instead, it is part of the &lt;i&gt;application context name&lt;/i&gt;, which is only
part of the first message of every conversation.
&lt;/p&gt;
&lt;p&gt;
Furthermore, different versions of the MAP specifications disagree on
whether certain fields are deemed optional or not.  This is further
complicated by somewhat strange versioning habits.  There is the Revision
number of the TS 09.02 (like 3.8.10), then there is a different version
number encoded in the corresponding ASN.1 files like 'version9(9)' and
individual operations then have v1/v2/v3 in their application context
name.
&lt;/p&gt;
&lt;p&gt;
Some even more wiser decision must have been to remove the description
of older messages from the later versions of the specifications.  So even
specifications published in the year 2000 no longer include definitions of
messages that were still part 5 years earlier.  Why does it matter? Because
today, in 2011, you still see MAP message on the international SS7 interfaces
that are encoded in some of the earliest versions of the MAP protocol!
&lt;/p&gt;
&lt;p&gt;
And if all of this was not enough, the biggest bummer is: For most of
the releases of the specification, the ASM.1 text files are not distributed
separately, but they are interspersed with human-readable text in the
actual specification documents (which can be 600 pages long, nothing you want
to cut+paste).
&lt;/p&gt;
&lt;p&gt;
Even worse: If you go to the ETSI homepage and download the PDF version of old
09.02 specs, they will actually provide a PDF with a scanned paper print-out,
i.e. no searching and no copy+pasting.
&lt;/p&gt;
&lt;p&gt;
Luckily, the 3GPP has made the history of 3.8.0 and later available &lt;a href="http://www.3gpp.org/ftp/Specs/archive/09_series/09.02/"&gt;on their FTP
server&lt;/a&gt;.  But they are in MS Word for DOS format, like they were written
originally.  This format can not be opened by OpenOffice, and as far as I
know not even by any of the Windows Word versions that MS has released in
the last 10 years.
&lt;/p&gt;
&lt;p&gt;
So what did I do?  I actually installed &lt;a href="http://download.microsoft.com/download/word97win/Wd55_be/97/WIN98/EN-US/Wd55_ben.exe"&gt;MS
Word 5.5 for DOS&lt;/a&gt; (provided as Freeware from Microsoft) and ran it in
DOSEMU, to convert the specs into RTF format.  This way I can at least open
them and look at them in a modern text processor.&lt;/p&gt;
&lt;center&gt;&lt;img src="http://laforge.gnumonks.org/photos/gsm_map_word55.png"&gt;&lt;/center&gt;
&lt;p&gt;
But this still does not solve the copy+paste problem.
&lt;/p&gt;
&lt;p&gt;
I finally found &lt;a href="http://www.winfield.demon.nl"&gt;antiword&lt;/a&gt;, but it
mainly focuses on Word for Windows files and only does rudimentary text
extraction from Word for DOS files.  But hey, there is &lt;a href="http://www.msxnet.org/word2rtf/formats/ffh-dosword5"&gt;an online copy of
chapter 16 from the File Formats Handbook&lt;/a&gt;, apparently published by
Dr.Dobb's (who remembers them!!) at some time in the past.
&lt;/p&gt;
&lt;p&gt;
So what did I do? I wrote some custom parser for those old Word/DOS files,
which parses the paragraph format descriptions and tries to identify those
sections that contain the ASN.1 code.  As they are almost the only part in the
specification that is enclosed with a border line on all four pages, this
should work pretty fine.  Early results are quite promising!
&lt;/p&gt;
&lt;p&gt;
My hope is now that the ETSI stylesheets did not change too much over time,
i.e.  that this parser will be able to extract the ASN.1 spec for all of the
protocol versions that I can find.  If that works, I can run them through
a validator, then pretty-print them and putt them all in one git tree in
chronological order.  And maybe at some point in 2011, we will have the
marvels of an &lt;a href="https://secure.wikimedia.org/wikipedia/en/wiki/Diff"&gt;unified diff&lt;/a&gt; between two different MAP versions.  The strange part is: Diff was developed in the 1970ies, GSM in the late 1980ies.  They should have known about it back then, and used a revision control system like &lt;a href="https://secure.wikimedia.org/wikipedia/en/wiki/Source_Code_Control_System"&gt;SCCS&lt;/a&gt; to record all the changes in the specification they make.
&lt;/p&gt;
&lt;p&gt;
I guess this all is a glimpse how a digital archaeologist of the 22nd century
must feel when analyzing ancient artefacts and trying to understand what the
heck his ancestors have been doing back then.
&lt;/p&gt;
&lt;p&gt;
&lt;b&gt;UPDATE:&lt;/b&gt; The tool can be found at &lt;a href="http://cgit.osmocom.org/cgit/asn1_docextract/"&gt;http://cgit.osmocom.org/cgit/asn1_docextract/&lt;/a&gt;
&lt;/p&gt;</description><category>gsm</category><guid>https://laforge.gnumonks.org/blog/20110326-parsing_dos_word_files_for_gsm_map/</guid><pubDate>Fri, 25 Mar 2011 19:00:00 GMT</pubDate></item><item><title>Starting to experiment with Anritsu MD8470A signalling generator</title><link>https://laforge.gnumonks.org/blog/20110218-playing_with_anritsu_md8470a/</link><dc:creator>Harald Welte</dc:creator><description>&lt;p&gt;
Earlier this week I was able to pick up some new equipment (aka toys) from
the customs at Berlin TXL airport.  Among other things I learned that despite
filing an &lt;i&gt;Internet-Zoll-Anmeldung (IZA)&lt;/i&gt; (Internet Customs Declaration),
online via the German customs web site, you still have to print two copies of
it on actual paper.  I only had one copy, and the customs department does not
have a copier to produce another copy.  Buerocrats :/
&lt;/p&gt;
&lt;p&gt;
In any case, I am now the proud owner of an Anritsu MD8470A signalling
generator, which is basically a small 3G (WCDMA) network on steroids, all
inside a single box.  It can do mobility management, call control, voice calls,
sms, packet data service, WAP, etc.  It even has a legacy GSM/GPRS radio, so you
can do inter-RAT hand-over between 3G and GSM.
&lt;/p&gt;
&lt;p&gt;
But what is even more exciting: It includes (proprietary) APIs that allow you
to send sequences hand-crafted messages on RRC and any layer above.  This means
it is an excellent tool for security and robustness testing of mobile phones.
&lt;/p&gt;</description><category>gsm</category><guid>https://laforge.gnumonks.org/blog/20110218-playing_with_anritsu_md8470a/</guid><pubDate>Thu, 17 Feb 2011 19:00:00 GMT</pubDate></item><item><title>Struggling with adding Ericsson RBS support to OpenBSC</title><link>https://laforge.gnumonks.org/blog/20110213-ericsson_rbs2308_om2000/</link><dc:creator>Harald Welte</dc:creator><description>&lt;p&gt;
I've been spending way too much time recently in understanding the low-level
aspects of Ericsson RBS 2000 and the associated OM2000 protocol.  The goal
here is to support this family of BTS from OpenBSC.
&lt;/p&gt;
&lt;p&gt;
The first big obstacle was that the A-bis Layer2 (LAPD) is quite different
from what we've seen with Siemens BTS before - and also from what the GSM Specs
TS 08.56 says.
&lt;/p&gt;
&lt;p&gt;
In the Ericsson A-bis, there are the following key differences regarding standard A-bis:
&lt;/p&gt;&lt;ul&gt;
&lt;li&gt;E1 timeslot is not configured statically. Instead, the BTS scans the entire E1 link and looks for SABM messages to TEI=62/SAPI=62&lt;/li&gt;
&lt;li&gt;There is no TEI manager&lt;/li&gt;
&lt;li&gt;LAPD sessions are initiated from BSC to BTS&lt;/li&gt;
&lt;li&gt;There is not only one OML connection for each BTS, but one additional OML connection for each TRX&lt;/li&gt;
&lt;li&gt;OML does not follow 08.59/12.21 but is proprietary&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;
All those parts above have now been solved.  We can initialize the A-bis link
and talk OM2000 to the DXU/IXU of Ericsson RBS 2000, and we can use that to
configure and initialize the CF (central function), as well as to configure
the IS (Interface Switch) and CON (concentrator).
&lt;/p&gt;
&lt;p&gt;
However, the IS configuration is already quite difficult.  In that
configuration you connect 1:1 mappings of various ICPs (Interface Connection
Points).  So you can connect any 64k or even 16k sub-slot of a TRX with any of
the E1 interface(s) timeslots.  However, the assignment of which TRX(TRU) is
represented by which ICP is BTS specific.  On a RBS 2401 for example, the first
TRX (TRX0) is attached to ICP 512..523 (1x 64kbps signalling + 8x16kbps traffic).
&lt;/p&gt;
&lt;p&gt;
So if we configure the IS to connect those ICPs 512..523 to the ICPs 4..15,
then we will get the TRX0 routed to Timeslot 1,2 and 3 of the first E1/T1
interface.  You can see some examples in &lt;a href="http://cosconor.fr/GSM/Divers/Equipment/Ericsson/Bss%20integration.pdf"&gt;page
89 (pdf page 115) of this document&lt;/a&gt;.  This works on the RBS 2401, but it
seems like the RBS 2308 has different ICP/DCP assignments than the generic RBS
2000 example that they are showing.
&lt;/p&gt;
&lt;p&gt;
If anyone is more familiar with the details of the Interface Switch in RBS2000,
and specifically the ICP / DCP mapping inside the RBS 2308, I would definitely
want to have a chat with you.
&lt;/p&gt;
&lt;p&gt;
If we cannot figure this out, it is impossible to bring up the per-TRX OML and
RSL links, and thus impossible to use those BTS with OpenBSC :(
&lt;/p&gt;</description><category>gsm</category><guid>https://laforge.gnumonks.org/blog/20110213-ericsson_rbs2308_om2000/</guid><pubDate>Sat, 12 Feb 2011 19:00:00 GMT</pubDate></item><item><title>SS7 work: M2UA, MTP3 and ISUP message {de,en}coding</title><link>https://laforge.gnumonks.org/blog/20110115-m2ua_mtp3_isup/</link><dc:creator>Harald Welte</dc:creator><description>&lt;p&gt;
One of my paid contracts required me to start moving directly into the GSM core
network, the SS7 domain.  While so far I had a fairly good understanding of
SCCP, TCAP and MAP (which are required for GSM/3G roaming interfaces), I've
now had to look at the actual telephony signalling side of things.
&lt;/p&gt;
&lt;p&gt;
Even in GSM networks, the gateway or inter-working MSC will translate all
the GSM TS 04.08 Call Control messages into ISUP, the &lt;i&gt;ISDN User Part&lt;/i&gt;,
originally designed for call control signalling between ISDN networks.
&lt;/p&gt;
&lt;p&gt;
As apparently always in SS7, there are many, many different standardized and
proprietary protocol stackings that can be seen in the wild.  I'm now working
on a stack that looks like IP-&amp;gt;SCTP-&amp;gt;M2UA-&amp;gt;MTP3-&amp;gt;{ISUP, SCCP-&amp;gt;TCAP-&amp;gt;MAP}.
&lt;/p&gt;
&lt;p&gt;
Luckily, for now there is no need to do any fully-fledged implementation of it,
simple message parsing and encoding routines are sufficient for the task at
hand.
&lt;/p&gt;
&lt;p&gt;
It's been about time that I'm closing those last gaps in the knowledge of
GSM core network protocols.  The only part that I'm still missing so far
is CAMEL.  I know roughly how it works, but I've never played with it or
implemented any part of it.
&lt;/p&gt;</description><category>gsm</category><guid>https://laforge.gnumonks.org/blog/20110115-m2ua_mtp3_isup/</guid><pubDate>Fri, 14 Jan 2011 19:00:00 GMT</pubDate></item><item><title>Supporting the HSL 2.75G femtocell from OpenBSC</title><link>https://laforge.gnumonks.org/blog/20110114-openbsc_hsl_femtocell_support/</link><dc:creator>Harald Welte</dc:creator><description>&lt;p&gt;
The last couple of days I've been hacking away on reverse-engineering
the proprietary Abis-over-IP variant of the &lt;a href="http://www.haysystems.com/mobile-networks/hsl-femtocell/"&gt;HSL Femtocell&lt;/a&gt;.  This is required to get
this latest newcomer in the GSM femto/picocell market to work with
our &lt;a href="http://openbsc.osmocom.org/"&gt;OpenBSC&lt;/a&gt; (and later OsmoSGSN)
software.  Progress is quite good now, apart from their custom RTP multiplexing
format, everything required for signalling, SMS and Voice is working from OpenBSC.
&lt;/p&gt;
&lt;p&gt;
The HSL Femto is a nice and powerful piece of hardware, containing a TI DaVinci
ARM+DSP chip, 128MByte DDR2 memory, a Spartan-3A FPGA and 275Ms/s DAC as well
as 65 Ms/s ADC.  Much too powerful for a single-ARFCN GSM system.  This really
looks like the vendor wants to do multi-ARFCN software updates later.  More details and some initial PCB photographs can be found &lt;a href="http://openbsc.osmocom.org/trac/wiki/HSL_Femto/Hardware"&gt;in the OpenBSC wiki&lt;/a&gt;.
&lt;/p&gt;
&lt;p&gt;
The Software side looks a bit like it is still maturing.  Most bugs I have
found so far are apparently fixed in the SR1.0.1 firmware.  The A-bis dialect
is quite different (and more simplistic) from what I've seen in any other BTS.
More details can once again be found at &lt;a href="http://openbsc.osmocom.org/trac/wiki/HSL_Femto"&gt;a page in our wiki&lt;/a&gt;.
&lt;/p&gt;
&lt;p&gt;
What's exciting is that there now is a commercially available &lt;i&gt;traditional
BTS&lt;/i&gt; product at relatively low cost.  By &lt;i&gt;traditional&lt;/i&gt; I mean it is
still only a BTS and not a Um-SIP gateway like OpenBTS.
&lt;/p&gt;
&lt;p&gt;
I hope this will enable more people to use and experiment with OpenBSC, as the
cost and availability of the ip.access nanoBTS has always been an issue for
many people without a four-digit budget available.
&lt;/p&gt;</description><category>gsm</category><guid>https://laforge.gnumonks.org/blog/20110114-openbsc_hsl_femtocell_support/</guid><pubDate>Thu, 13 Jan 2011 19:00:00 GMT</pubDate></item><item><title>OpenBSC field test at 27c3 over</title><link>https://laforge.gnumonks.org/blog/20101231-openbsc_field_test_27c3/</link><dc:creator>Harald Welte</dc:creator><description>&lt;p&gt;
During the last week I was busy with
&lt;/p&gt;&lt;ul&gt;
&lt;li&gt;December 22nd though 24th: Preparing OpenBSC to be ready for the field test at 27c3, i.e.
	&lt;ul&gt;
	&lt;li&gt;improving the output of the log at "INFO" level to be not too verbose at the expected network load&lt;/li&gt;
	&lt;li&gt;Implement the interface to LCR using a Unix domain socket rather than linking LCR with OpenBSC&lt;/li&gt;
	&lt;li&gt;Configuring all 6 BTS, put them in multi-TRX config, test the setup&lt;/li&gt;
	&lt;li&gt;Manufacturing nanoBTS stacking cable (with their weird RJ-69 plugs that you have to mill a notch off)&lt;/li&gt;
	&lt;li&gt;Install all required software on the machine that will run OpenBSC&lt;/li&gt;
	&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;December 25th and 26th: Setting up the network
	&lt;ul&gt;
	&lt;li&gt;Physically mounting the nanoBTS units&lt;/li&gt;
	&lt;li&gt;Patching cables throughout the building, installing PoE switches&lt;/li&gt;
	&lt;li&gt;Configuring LCR&lt;/li&gt;
	&lt;li&gt;Interfacing with the Phone Operation Center (POC) via E1 / DSS1
	&lt;/li&gt;&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;December 26th through 30th: Running the network
	&lt;ul&gt;
	&lt;li&gt;Fixing bugs as they appear (see e.g. &lt;a href="http://lists.gnumonks.org/pipermail/openbsc/2010-December/002326.html"&gt;zeckes mailing list post&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;Making sure users are happy&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;December 30th: De-installing the network&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;
I don't have much time now, still have to unpack lots of boxes full of gear.
However, I have finally completed my scripts to graph some of the statistical
data of the field test.  You can see the graphs &lt;a href="http://openbsc.osmocom.org/trac/wiki/FieldTests/27c3"&gt;in the OpenBSC
wiki&lt;/a&gt;.  
&lt;/p&gt;
&lt;p&gt;
Unfortunately we don't have the same body of statistical data for the previous
field tests at 25c3, 26c3 and har2009.  However, for all of those three events
we have now graphs about the IMSI/Country distribution of all the phones that
have ever tried a LOCATION UPDATE with us: &lt;a href="http://openbsc.osmocom.org/trac/wiki/FieldTests/25c3"&gt;25c3&lt;/a&gt;, &lt;a href="http://openbsc.osmocom.org/trac/wiki/FieldTests/26c3"&gt;26c3&lt;/a&gt;, &lt;a href="http://openbsc.osmocom.org/trac/wiki/FieldTests/HAR2009"&gt;HAR2009&lt;/a&gt;,
providing some nice statistics on what nationalities are attending the
respective events.
&lt;/p&gt;</description><category>gsm</category><guid>https://laforge.gnumonks.org/blog/20101231-openbsc_field_test_27c3/</guid><pubDate>Thu, 30 Dec 2010 19:00:00 GMT</pubDate></item><item><title>Interview about GSM security (in German)</title><link>https://laforge.gnumonks.org/blog/20101221-german_interview_gsm_security/</link><dc:creator>Harald Welte</dc:creator><description>&lt;p&gt;
The major Austrian newspaper &lt;a href="http://derstandard.at/"&gt;Der Standard&lt;/a&gt;
was yesterday featuring an &lt;a href="http://mobil.derstandard.at/1289609149081/WebStandard-Interview-Mobiltelefone-abhoeren-GSM-machts-leicht"&gt;an
Interview with me on GSM security related issues&lt;/a&gt;. Being in Austria, the
interview is obviously in German language, sorry for all non-German-speaking
readers of my blog.
&lt;/p&gt;</description><category>gsm</category><guid>https://laforge.gnumonks.org/blog/20101221-german_interview_gsm_security/</guid><pubDate>Mon, 20 Dec 2010 19:00:00 GMT</pubDate></item><item><title>Preparations for GSM network at 27C3 conference</title><link>https://laforge.gnumonks.org/blog/20101218-27c3_gsm/</link><dc:creator>Harald Welte</dc:creator><description>&lt;p&gt;
Behind the scenes, we've been working on preparing the experimental
GSM/GPRS/EDGE network at the &lt;a href="http://events.ccc.de/congress/2010/"&gt;27th
Chaos Communication Congress&lt;/a&gt;.  The regulatory authority was nice enough
to grant us 6 ARFCN, which we will split to 3 BTS (2 TRX each), resulting in
one BTS with 2 TRX on each of the 3 conference building floors.
&lt;/p&gt;
&lt;p&gt;
I've started a &lt;a href="http://events.ccc.de/congress/2010/wiki/GSM"&gt;page in
the 27C3 conference wiki&lt;/a&gt; about the GSM network.  Please notice that this
information is still preliminary at this point.
&lt;/p&gt;
&lt;p&gt;
The wiki page also contains &lt;a href="http://events.ccc.de/congress/2010/wiki/GSM#How_can_I_participate_in_the_network"&gt;detailed instructions on how you can participate in the test network&lt;/a&gt;.  I'm hoping a lot of you will bring a dedicated cellphone that you can put the 27C3 SIM inside and participate in the network.
&lt;/p&gt;
&lt;p&gt;
I'm particularly excited about GPRS/EDGE support.  We will be handing out
official, world-wide routed, unfiltered IPv4 addresses to each and every phone.
This means you are free to run port scans or other attacks (please: &lt;b&gt;No
DoS&lt;/b&gt;) over an unfiltered IP network directly into your mobile phone.
&lt;/p&gt;</description><category>gsm</category><guid>https://laforge.gnumonks.org/blog/20101218-27c3_gsm/</guid><pubDate>Fri, 17 Dec 2010 19:00:00 GMT</pubDate></item><item><title>Learning how GPS _really_ works in order to truly understand RRLP</title><link>https://laforge.gnumonks.org/blog/20101217-learning_about_gps/</link><dc:creator>Harald Welte</dc:creator><description>&lt;p&gt;
Back one or two years ago, when I first discovered the &lt;a href="http://en.wikipedia.org/wiki/RRLP"&gt;RRLP&lt;/a&gt; as a mechanism how operators
can get very precise GPS positioning of a mobile phone (without any authentication
or a way for the user to prevent or at least notice it), I was frankly speaking
shocked.
&lt;/p&gt;
&lt;p&gt;
We've done some experiments at HAR2009 and obtained a number of great position
fixes, mostly from iPhones.  The nice aspect of RRLP is that it is buried down
inside Layer3 of the GSM protocol stack in the baseband processor.  This is at
a much lower level than all the web or App based location based services that
are running in an application program in userspace of the application
processor.
&lt;/p&gt;
&lt;p&gt;
Now RRLP comes in a number of different flavors.  What we have done so far is
called &lt;i&gt;ms-based&lt;/i&gt; positioning, where the phone works as an autonomous GPS
receiver, pretty much like a personal navigation device or any hand-held GPS
receiver.  So the network simply asks "tell me your GPS coordinates if you know
them" and the phone will respond.  Some phones ask for assistance data in order
to do A-GPS.  But that's it.
&lt;/p&gt;
&lt;p&gt;
What has been more of a mystery to me is the &lt;i&gt;ms-assisted GPS&lt;/i&gt; RRLP mode,
where the phone just performs some measurements and forwards the resulting
data to the network.  I never really understood the details of how it works,
but always wanted to.  Last week I finally found some time to do the research
required to fully understand it:
&lt;/p&gt;
&lt;p&gt;
The network tells the phone the exact bit timing, Doppler shift and other
parameters for each of the satellites that it _knows_ the phone would be
receiving given the current cell the phone is registered to.  The phone then
performs some measurements within very narrow time/frequency/synchronization
windows, and passes back the timing of those received signals relative to the
current GSM cell signal.  Using this information, the actual position estimate
will be completely computed inside the network, not inside the phone.
&lt;/p&gt;
&lt;p&gt;
Presumably this &lt;i&gt;ms-assisted&lt;/i&gt; mode was implemented to not have to
put a full-blown GPS receiver into every phone, requiring sophisticated
processing in either hardware or software.  Also, this method should be
much quicker as the network _knows_ all the current ephemeris data and
GPS signal timing, whereas a stand-alone GPS receiver would have to take
quite a lot of effort to acquire a signal from cold-start, even if there
is some assistance data.
&lt;/p&gt;
&lt;p&gt;
Unfortunately I don't have the time to actually implement the network side for
this.  It would be a fun project, but I have already way too many of them
(and customers who only pay for other features in our Free Software GSM stack).
&lt;/p&gt;
&lt;p&gt;
There's now a &lt;a href="http://security.osmocom.org/trac/wiki/RRLP"&gt;RRLP wiki
page at security.osmocom.org&lt;/a&gt;.  As short as it is it still contains more
information about RRLP than I could find on any other public source on the
network - except the protocol specs.
&lt;/p&gt;</description><category>gsm</category><guid>https://laforge.gnumonks.org/blog/20101217-learning_about_gps/</guid><pubDate>Thu, 16 Dec 2010 19:00:00 GMT</pubDate></item><item><title>Wireshark patches enhancing IPA Abis/IP dissector accepted</title><link>https://laforge.gnumonks.org/blog/20101217-wireshark_patches_abis_ip/</link><dc:creator>Harald Welte</dc:creator><description>&lt;p&gt;
The wireshark project recently accepted two of my patches related to the
Abis/IP dissector.  The &lt;a href="https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5488"&gt;first of
them&lt;/a&gt; makes the TCP/UDP port numbers that are interpreted as IPA multiplex
a configurable preference.  This is really useful, as the actual port numbers
used in production setups seem to differ from site to site (with no real
standard port numbers and only some that are 'best practise').  Without this
patch, in many case you always need to click 'Decode as... GSM IPA' every
time you open a pcap file. 
&lt;/p&gt;
&lt;p&gt;
The &lt;a href="https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5489"&gt;second
patch&lt;/a&gt; adds support for printing the debug messages that the &lt;a href="http://www.haysystems.com/"&gt;Hay Systems Ltd.&lt;/a&gt; &lt;a href="http://www.haysystems.com/mobile-networks/hsl-femtocell/"&gt;HSL
Femtocell&lt;/a&gt; includes as stream identifier 0xDD in its Abis/IP variant.
&lt;/p&gt;
&lt;p&gt;
I hope I can find some time to clean up / finish some of the &lt;a href="http://openbsc.osmocom.org/trac/browser/wireshark"&gt;other wireshark
patches&lt;/a&gt; that we have pending for quite some time.  The main problem here
is that we imported some definitions from OpenBSC, which use gcc extensions
and are thus not permissible for wireshark inclusion.
&lt;/p&gt;</description><category>gsm</category><guid>https://laforge.gnumonks.org/blog/20101217-wireshark_patches_abis_ip/</guid><pubDate>Thu, 16 Dec 2010 19:00:00 GMT</pubDate></item><item><title>Starting to work on drivers for the Mediatek MT6139/MT6140 RF Transceiver</title><link>https://laforge.gnumonks.org/blog/20101212-mtk_rf_xceiver/</link><dc:creator>Harald Welte</dc:creator><description>&lt;p&gt;
In the last two days, I have finally started to get some initial work done on
the OsmocomBB port for the Mediatek chipsets.  My current focus is the
MT6139/6140 RF Transceiver, including stuff like setting it up for Rx and Tx,
computing the VCO/PLL dividers for all ARFCNs in 4 bands for uplink and
downlink, etc.
&lt;/p&gt;
&lt;p&gt;
Next will probably be the drivers for the MTK digital baseband BPI (baseband
parallel interface) and BSI (baseband serial interface), which are needed to
actually use the MT6139/6140 driver, as well as the antenna switch module,
power amplifier and other parts of the RF front-end.
&lt;/p&gt;
&lt;p&gt;
I'm not really testing any of this code at the moment, as I'm travelling a lot
without access to my Racal 6103 or other GSM handset testing equipment.
However, writing even untested code helps me understand the chipset better and
is a first step in the right direction.  I guess January 2011 will provide more
time to continue/complete this task.
&lt;/p&gt;</description><category>gsm</category><guid>https://laforge.gnumonks.org/blog/20101212-mtk_rf_xceiver/</guid><pubDate>Sat, 11 Dec 2010 19:00:00 GMT</pubDate></item><item><title>Trying to understand Ericsson Abis-IP + OML</title><link>https://laforge.gnumonks.org/blog/20101129-ericsson_abis_oml/</link><dc:creator>Harald Welte</dc:creator><description>&lt;p&gt;
I've recently been able to look at packet traces of an Ericsson BTS (which they
call RBS) and have been working on understanding their proprietary Abis-over-IP
protocol stacking and OML layer.
&lt;/p&gt;
&lt;p&gt;
By now, all equipment makers have migrated their BTS products from classic TDM
(E1/T1) lines to some form of IP-based back-haul.  However, the GSM specs as
published by ETSI and 3GPP still only specify the E1/T1 transport layer, and
every vendor seems to invent their own protocol for back-haul.
&lt;/p&gt;
&lt;p&gt;
What we already know (and support) is the ip.access style Abis-over-IP, where
they have their IPA multiplex layer inside TCP.  Inside that they then have
pretty straight-forward 08.58 (RSL) and 12.21 (OML) messages.
&lt;/p&gt;
&lt;p&gt;
With Ericsson, they use a stacking like this: Ethernet, IPv4, L2TP,
custom-HDLC, RSL/custom-OML.
&lt;/p&gt;
&lt;p&gt;
The custom HDLC layer (I have called it Ericsson HDLC, or short EHDLC) seems
to work quite different from all other forms of HDLC that I've seen:
&lt;/p&gt;&lt;ul&gt;
&lt;li&gt;1 Byte Address&lt;/li&gt;
&lt;li&gt;1 Byte Length (including the header!)&lt;/li&gt;
&lt;li&gt;1-2 Bytes Control&lt;/li&gt;
&lt;li&gt;n Bytes Data&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;
The Control octets are just like in any HDLC, i.e. you have U/I/UI/S Frames and
see commands like SABME, UA, RR, ...  It mostly uses a two-octet control word
that has both N(R) and N(S) for acknowledgements.  At the beginning they actually
do a XID exchange that seems compliant with ISO 8885 (if you cannot find that
document, try reading the AX.25 spec instead, its XID is compatible with ISO
8885).
&lt;/p&gt;
&lt;p&gt;
I have not fully understood the Address octet yet.  I see lots of changes in
the &lt;i&gt;upper&lt;/i&gt; three bits, and it seems there is a SAPI or TEI that is the
lower 5 bits of the octet.
&lt;/p&gt;
&lt;p&gt;
Having a length field in an HDLC header instead of any flag bytes is indeed
very uncommon to see.
&lt;/p&gt;
&lt;p&gt;
The OML layer (called OM2000) is completely proprietary and shares nothing with
the GSM specs 08.59/12.21 apart from the three byte header.  However, I have
managed to build a pretty complete dissector which you can find together with
the EHDLC code in &lt;a href="http://openbsc.osmocom.org/trac/browser/wireshark/ericsson_rbs2409.patch"&gt;this
rbs2409 patch&lt;/a&gt; which applies on top of the generic &lt;a href="http://openbsc.osmocom.org/trac/browser/wireshark/abis_oml.patch"&gt;wireshark
abis_oml.patch&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
It is my hope that this information (and particularly the dissector) will prove
a valuable resource once we add Ericsson BTS support to OpenBSC.  If there is anyone
who can provide us real BTS (RBS) hardware, please let me know :)
&lt;/p&gt;</description><category>gsm</category><guid>https://laforge.gnumonks.org/blog/20101129-ericsson_abis_oml/</guid><pubDate>Sun, 28 Nov 2010 19:00:00 GMT</pubDate></item><item><title>Announcing Osmocom SIMtrace: A smart card sniffer</title><link>https://laforge.gnumonks.org/blog/20101119-osmocom_simtrace/</link><dc:creator>Harald Welte</dc:creator><description>&lt;p&gt;
During recent weeks I started to do some work related to SIM Application
Toolkit (STK / SAT).  Debugging this kind of application is hard, as you
never really know what exactly is going on between your SIM and the phone,
and you don't have the full source code for either of them.
&lt;/p&gt;
&lt;p&gt;
Thus, the need for passively sniffing/tracing the smart card interface between
SIM and phone was born.  There are commercial solutions which are not only
prohibitively expensive, but then they are again proprietary/closed, i.e. you
cannot extend them how you want.
&lt;/p&gt;
&lt;p&gt;
There are also some free/open projects like the good old Season scanner, or the
slightly more modern &lt;a href="http://bb.osmocom.org/trac/wiki/RebelSIM_Scanner"&gt;RebelSIM Scanner&lt;/a&gt;.
However, those are really dumb and you have to manually determine the bit-rate
using an oscilloscope and then program the UART accordingly.  Furthermore, their
top speed is often limited.  None of this is really useful if you e.g. want to
test a variety of combinations between N SIM and M phones, where you don't want N*M
times of manual determination of bit-timing on an oscilloscope.
&lt;/p&gt;
&lt;p&gt;
As an alternative solution, I have now created &lt;a href="http://bb.osmocom.org/trac/wiki/SIMtrace"&gt;Osmocom SIMtrace&lt;/a&gt;.  It uses
an AT91SAM7S micro-controller as hardware interface between the SIM card
interface and USB.  It properly sniffs the RST, CLK and I/O lines of the SIM
and does auto-bauding, follows negotiation of new bit-rate negotiation via
PPS/PTS and re-assembles / segments the APDUs as they come by.
&lt;/p&gt;
&lt;p&gt;
Finally, the APDUs are picked up by a small command-line program that feeds them
into wireshark, where you can inspect them like any other communication protocol
that you're used to.
&lt;/p&gt;
&lt;p&gt;
The code is still fairly experimental, but for anyone with an interest in this
topic it should definitely be possible to reproduce my results.
&lt;/p&gt;
&lt;p&gt;
There is not much specific to SIM cards in this project, by the way.  It should
work with any ISO 7816-3 T=0 smart card.  Adding T=1 is just a matter of software,
if you need that protocol..
&lt;/p&gt;
&lt;p&gt;
And now I'm finally off to doing the actual work that I wanted to do.
&lt;/p&gt;</description><category>gsm</category><guid>https://laforge.gnumonks.org/blog/20101119-osmocom_simtrace/</guid><pubDate>Thu, 18 Nov 2010 19:00:00 GMT</pubDate></item><item><title>Initial mt6235 Linux and u-boot code available</title><link>https://laforge.gnumonks.org/blog/20101119-mt6235_linux_uboot/</link><dc:creator>Harald Welte</dc:creator><description>&lt;p&gt; As &lt;a href="http://lists.osmocom.org/pipermail/baseband-devel/2010-November/000780.html"&gt;Marcin
announced yesterday on the OsmocomBB mailing list&lt;/a&gt;, his initial u-boot and
Linux port to the MT6235 baseband processor has been pushed to the &lt;a href="http://git.osmocom.org/"&gt;git.osmocom.org&lt;/a&gt; server.  He has also
provided some instructions and pre-compiled kernel and u-boot images.
&lt;/p&gt;
&lt;p&gt;
He's now working on the NAND, SD/MMC, GPIO and LCD drivers.  If you want to
help out, feel free to contact Marcin about this.
&lt;/p&gt;
&lt;p&gt;
Meanwhile, I've been doing a bit of theoretical analysis on the GSM baseband /
RF interface of the MT6235, based on the limited documentation that is available
to the general public.  Seems like it's about time to start with practical
experiments soon..
&lt;/p&gt;</description><category>gsm</category><category>osmocom-bb</category><guid>https://laforge.gnumonks.org/blog/20101119-mt6235_linux_uboot/</guid><pubDate>Thu, 18 Nov 2010 19:00:00 GMT</pubDate></item><item><title>A brief history on the withdrawal of the A5/2 ciphering algorithm in GSM</title><link>https://laforge.gnumonks.org/blog/20101112-history_of_a52_withdrawal/</link><dc:creator>Harald Welte</dc:creator><description>&lt;p&gt;
Recently, I wanted to investigate when and how A5/2 has been withdrawn from
both GSM networks and GSM phones alike.  Unfortunately there was no existing
article discussing this history online, so I went through dozens of meeting
reports and other documents that I could find online to recover what had
happened.
&lt;/p&gt;
&lt;p&gt;
If you don't know what this is all about: It is about the &lt;a href="http://en.wikipedia.org/wiki/A5/2"&gt;A5/2&lt;/a&gt; air-interface encryption
algorithm that was used in certain GSM networks until about 2005-2007.
&lt;/p&gt;
&lt;p&gt;
A5/2 was specified as a &lt;i&gt;security by obscurity&lt;/i&gt; algorithm behind closed
doors in the late 1980ies.  It was intentionally made weaker than it's (already
weak) brother A5/1.  The idea was to sell only equipment with A5/2 to the
countries of the eastern block, while the less-weak A5/1 encryption was to
be used by the western European countries.
&lt;/p&gt;
&lt;p&gt;
A5/2 had been reverse engineered and disclosed in the late 1990ies, and has
undergone a lot of attention from cryptographers such as Ian Goldberg and David
A. Wagner.  In a 1999 paper, they already expect that it can be broken in
real-time.
&lt;/p&gt;
&lt;p&gt;
It took several more papers until in August 2003, finally, the proponents of
the GSM systems (ETSI/3GPP/GSMA) have realized that there is a problem.  And
the problem was worse than they thought:  Since they key generation for A5/1
and A5/2 is the same, a semi-active downgrade attack can be used to
retroactively break previously-recorded, encrypted A5/1 calls.  The only
solution to this problem is to remove A5/2 from all equipment, to make sure
the downgrade is not possible anymore.
&lt;/p&gt;
&lt;p&gt;
Starting from 2004 the security related working groups of 3GPP and GSMA thought
about removing A5/2, and in the following years they convinced their respective
bodies (3GPP, GSMA), and members thereof (operators, equipment makers) to fix
this problem.
&lt;/p&gt;
&lt;p&gt;
Ever since that time, it is known that using the same key generation for
different algorithms enables down-grade attacks.  However, the key generation
for the then-new A5/3 algorithm was unmodified.  So now that A5/1 has been
broken in recent years, even if the operators deploy A5/3, the same model of
down-grading attacks to A5/1 can be done again.
&lt;/p&gt;
&lt;p&gt;
I have &lt;a href="http://security.osmocom.org/trac/wiki/A52_Withdrawal"&gt;put down a time-line&lt;/a&gt; at the still mostly-empty &lt;a href="http://security.osmocom.org/"&gt;security.osmocom.org&lt;/a&gt; website.  Some of the goodies from it:
&lt;/p&gt;&lt;ul&gt;
&lt;li&gt;It took from 1999-2007 until this gaping security hole was fixed. Call that incident response!&lt;/li&gt;
&lt;li&gt;Unnamed Northern American Operators (and the PTCRB) were the biggest
blockers to remove A5/2 support from their networks.  This is particularly strange since US operators should always have had A5/1 access.&lt;/li&gt;
&lt;li&gt;As a breaking of the more secure A5/1 was already anticipated even back
then, in 2002 A5/3 was first specified.  Five years later (2007) there was &lt;i&gt;virtually no support for A5/3&lt;/i&gt; among manufacturers of GSM network equipment&lt;/li&gt;
&lt;li&gt;It took until January 2009 until the GSMA discussed A5/3 testing with mobile phone makers&lt;/li&gt;
&lt;li&gt;It took until November 2009 until there was a plug-fest testing interoperability between A5/3 enabled GSM network equipment and A5/3 enabled phones.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;
And what do we learn from all this?
&lt;/p&gt;&lt;ul&gt;
&lt;li&gt;GSM equipment manufacturers and mobile operators have shown no interest in fixing gaping holes in their security system&lt;/li&gt;
&lt;li&gt;Prior to that first A5/2 attack, they have never thought of procedures for upgrading the entire system with new ciphering systems (i.e. proactive plans for incident response)&lt;/li&gt;
&lt;li&gt;Even after the A5/2 disaster, they have not learned the slightest bit.  The same problem that was happening with A5/1 - A5/2 downgrade attacks can today be done with A5/3 - A5/1 downgrade attacks.  And this &lt;i&gt;before&lt;/i&gt; the majority of the operators has even started to use the already-7-year-old A5/3 in their production networks.&lt;/li&gt;
&lt;li&gt;The security work group of 3GPP has had a lot of insight into the actual
threats to GSM security even 10 years ago.  You can see that e.g. in the
Technical Recommendation 33.801.  But nobody wanted to hear them!&lt;/li&gt;
&lt;li&gt;Similar problems exist with the authentication algorithms.  It took 12 years from first practical attacks on COMP128v1 until the GSMA is &lt;i&gt;looking at&lt;/i&gt; withdrawing it.&lt;/li&gt;
&lt;/ul&gt;</description><category>gsm</category><guid>https://laforge.gnumonks.org/blog/20101112-history_of_a52_withdrawal/</guid><pubDate>Thu, 11 Nov 2010 19:00:00 GMT</pubDate></item><item><title>All your baseband are belong to us</title><link>https://laforge.gnumonks.org/blog/20101107-all_your_baseband_are_belong_to_us/</link><dc:creator>Harald Welte</dc:creator><description>&lt;p&gt;
I'd like to point out the &lt;a href="https://cryptolux.org/media/hack.lu-aybbabtu.pdf"&gt;slides of the talk:
All Your Baseband Are Belong To Us&lt;/a&gt; by Ralf-Philipp Weinmann.
&lt;/p&gt;
&lt;p&gt;
Ralf is one of those few people on this planet who have understood the security
implications of now being able to send arbitrary protocol frames (particularly
GSM L3 04.08 frames) to mobile phones.
&lt;/p&gt;
&lt;p&gt;
GSM protocol stacks have never been written with the assumption that somebody
might send intentionally malformatted messages on the air interface.  But at
the same time, the GSM network does not authenticate itself to the phone, i.e.
everyone who can present a network-side GSM air interface to a phone will be
able to exchange arbitrary messages with the phones.
&lt;/p&gt;
&lt;p&gt;
This problem has been outlined in all the GSM security workshops and
presentations I have been giving during recent years.  Still, apart from
Ralf-Philipp Weinmann's work, I have not seen a lot of public research in
that area.
&lt;/p&gt;
&lt;p&gt;
Exploiting and owning the baseband processor is a dangerous threat, as the
microphone and entire audio path are connected to that very processor.  Whoever
owns the baseband can turn the mobile phone into a passive surveillance device,
commonly called 'bug'.  Since application processor and baseband processor are
very far apart these days, with various layers of software in between, the
user interface will not show any indication of what the baseband processor does.
&lt;/p&gt;</description><category>gsm</category><guid>https://laforge.gnumonks.org/blog/20101107-all_your_baseband_are_belong_to_us/</guid><pubDate>Sat, 06 Nov 2010 19:00:00 GMT</pubDate></item><item><title>u-boot + Linux kernel port to Mediatek MT6235 baseband processor under way</title><link>https://laforge.gnumonks.org/blog/20101030-mt6235_linux_port/</link><dc:creator>Harald Welte</dc:creator><description>&lt;p&gt;
I am really excited about some &lt;a href="http://lists.osmocom.org/pipermail/baseband-devel/2010-October/000717.html"&gt;recent work by Marcin&lt;/a&gt; on starting a u-boot and Linux kernel port to the
Mediatek MT6235 baseband processor.
&lt;/p&gt;
&lt;p&gt;
Among GSM baseband processors, the MT6235 is a very unusual device.  Unlike
classic GSM baseband chips, it is not based on an MMU-less ARM7TDMI/ARM7EJS but
on an ARM926EJS core.  This is a full-blown ARMv5 core on which a standard Linux
kernel could run.
&lt;/p&gt;
&lt;p&gt;
The reason for the MT6235 to contain such an 'advanced' ARM core is simple: Mediatek
is producing chipsets and reference designs for very inexpensive but feature-rich
phones.  Instead of going to a full-blown (and expensive) smart-phone design
with separate ARM cores for the baseband and application processor, they simply make
the base-band processor a bit stronger than needed for the GSM stack, and run the entire
rich UI on the same cpu, including TCP/IP stack, touch-screen, web browser,
e-mail client, H.264 playback / camera recording, etc.
&lt;/p&gt;
&lt;p&gt;
The original firmware on the Mediatek chipsets is a Nucleus-kernel based software stack
which is completely proprietary.
&lt;/p&gt;
&lt;p&gt;
Now the mid-term vision for us is to have a Linux port to the MT6235, and run the OsmocomBB
Layer1 (and possibly Layer2) code inside the kernel, while the Layer3 and a user interface
program is running as application programs in userspace.
&lt;/p&gt;
&lt;p&gt;
This would allow us to do a very rich user interface (imagine network
monitoring modes, protocol tracing, manual cell selection, etc.) while still
having to care only about one processor in the system.  Furthermore, there are millions of
MT6235 based devices, so there will be no shortage of inexpensive hardware to
run this code on.
&lt;/p&gt;
&lt;p&gt;
The MT6235 also has a built-in SD/MMC controller (for storing e.g. protocol traces that you
take from the GSM network) and it has a fast, dual-mode USB2 high-speed USB controller
for connecting it with a PC
&lt;/p&gt;
&lt;p&gt;
Sure, porting our Layer1 to a completely different baseband chipset will be a lot of work,
and I don't really have any idea how long it will take us.  But I think the vision of
such a powerful device (and finally bringing OsmocomBB and the Linux kernel together)
should prove a very attractive motivational factor.
&lt;/p&gt;
&lt;p&gt;
This also means: Even if you have no clue about the GSM protocols, you can now start to
contribute to OsmocomBB:  A lot of Linux kernel drivers for e.g. SD/MMC, USB, frame-buffer,
SPI, I2C, PWM and other integrated controllers of the MT6235 need to be written.
&lt;/p&gt;
&lt;p&gt;
Like all Mediatek data sheets, the MT6235 data sheet describing all those peripherals can
be found on various places on the Web, including (but not limited to) Chinese
developer forums.
&lt;/p&gt;
&lt;p&gt;
It also seems there is at least one MT6235 based phone where JTAG and serial
console have been identified (Sciphone Dream G2), which should make debugging
and bootstrapping convenient.
&lt;/p&gt;</description><category>gsm</category><category>osmocom-bb</category><guid>https://laforge.gnumonks.org/blog/20101030-mt6235_linux_port/</guid><pubDate>Fri, 29 Oct 2010 19:00:00 GMT</pubDate></item><item><title>Job Offer: GSM baseband security research in Berlin/Germany</title><link>https://laforge.gnumonks.org/blog/20100923-job_offer_gsm_baseband_security/</link><dc:creator>Harald Welte</dc:creator><description>&lt;p&gt;
If you're following my blog because you have an interest in GSM
security related topics, there is currently a very interesting
&lt;a href="http://lists.osmocom.org/pipermail/baseband-devel/2010-September/000611.html"&gt;job offer by Frank from GSMK&lt;/a&gt;.  It is about a job doing
research into over-the-air attacks against baseband firmware in real-world
GSM/UMTS telephones.  Whoever gets the job will likely use/extend OpenBTS,
OpenBSC or other GSM foss projects.
&lt;/p&gt;
&lt;p&gt;
So if you're familiar with the GSM/3G protocol specs, have an interest
in software security / exploiting and may even have existing exposure to
OpenBSC, OpenBTS or OsmocomBB:  Please send Frank a message and apply for
what I personally consider one of the most exciting opportunities in the
IT security industry today.
&lt;/p&gt;</description><category>gsm</category><guid>https://laforge.gnumonks.org/blog/20100923-job_offer_gsm_baseband_security/</guid><pubDate>Wed, 22 Sep 2010 19:00:00 GMT</pubDate></item><item><title>Worlds first 20 minute voice call from a Free Software GSM stack on a phone</title><link>https://laforge.gnumonks.org/blog/20100814-dieter_tch_voice_call/</link><dc:creator>Harald Welte</dc:creator><description>&lt;p&gt;
As &lt;a href="http://lists.osmocom.org/pipermail/baseband-devel/2010-August/000567.html"&gt;Dieter
Spaar has pointed out in a mailing list post on the OsmocomBB developer
list&lt;/a&gt;, he has managed to get a first alpha version of TCH (Traffic Channel)
code released, supporting the FR and EFR GSM codecs.
&lt;/p&gt;
&lt;p&gt;
What this means in human readable language: He can actually make voice calls
from a mobile phone that runs the Free Software OsmocomBB GSM stack on its
baseband processor.  This is a major milestone in the history of our project.
&lt;/p&gt;
&lt;p&gt;
While Dieter has been working on the Layer1 TCH support and the setup of the
voiceband path in the analog baseband chip (audio ADC/DAC), Andreas Eversberg
has been quietly working on getting call control of Layer3 into a state where
it can do all the signalling required for mobile-originated and
mobile-terminated call.
&lt;/p&gt;
&lt;p&gt;
Combining both of their work together, they have been able to make a 20 minute
long voice call from a baseband processor running a Free Software GSM stack.
For all we know, it is the first time anything remotely like this has been done
using community-developed Free Software.  Five years ago I would have thought
it's impossible to pull this off with a small team of volunteers. I'm very
happy to see that I was wrong, and we actually could do it.  With less than
half a dozen of developers, in less than nine months of unpaid, spare-time work.
&lt;/p&gt;
&lt;p&gt;
Sure, the next weeks and months will be spent on bringing the code from alpha
level to something more stable, fixing known issues and known bugs, etc.  But
I'm confident the biggest part of the work on the OsmocomBB stack is behind us.
Big thanks to the developer team driving this project forward.
&lt;/p&gt;</description><category>gsm</category><category>osmocom-bb</category><guid>https://laforge.gnumonks.org/blog/20100814-dieter_tch_voice_call/</guid><pubDate>Fri, 13 Aug 2010 19:00:00 GMT</pubDate></item><item><title>Working on a document on smartphone hardware architecture</title><link>https://laforge.gnumonks.org/blog/20100808-smartphone_document/</link><dc:creator>Harald Welte</dc:creator><description>&lt;p&gt;
I've started to write upe some information on modern smartphone hardware
architecture.  It will be in a similar style to what I previously wrote
on feature phones and gsm modem hardware, but with a specific focus on
smpartphones, their multiple processors, memory sharing, AP/BP interface,
audio architecture, etc.
&lt;/p&gt;
&lt;p&gt;
I should have done this a long time ago.  In fact, I think I should write
more documents like that on various technical subjects.  If you want to
learn about low-level aspects of modern telephones, there is way too
little published information out there.
&lt;/p&gt;</description><category>gsm</category><guid>https://laforge.gnumonks.org/blog/20100808-smartphone_document/</guid><pubDate>Sat, 07 Aug 2010 19:00:00 GMT</pubDate></item><item><title>Official wiki page on GSMTAP created</title><link>https://laforge.gnumonks.org/blog/20100804-gsmtap_wiki_page/</link><dc:creator>Harald Welte</dc:creator><description>&lt;p&gt;
I've come up with GSMTAP about two years ago while working on &lt;a href="http://airprobe.org/"&gt;airprobe&lt;/a&gt;.  The goal was to have something
similar to what &lt;a href="http://www.radiotap.org/"&gt;radiotap&lt;/a&gt; does in
the wifi world:  A pseudo-header that adds additional information and context
that is not present in the actual message.
&lt;/p&gt;
&lt;p&gt;
Initially, GSMTAP was intended to be a separate link-layer type in the pcap
file format, but this would preclude its use in real-time protocol analysis.
So I modified it to be encapsulated in UDP packets, which are sent and received
using normal UDP/IP sockets.
&lt;/p&gt;
&lt;p&gt;
Over recent years, GSMTAP has not only been integrated into multiple programs
of the airprobe project, but is also understood by &lt;a href="http://www.wireshark.org/"&gt;wireshark&lt;/a&gt;.  OpenBTS has also decided to
adopt the format and can generate GSMTAP messages for debugging purposes.
&lt;/p&gt;
&lt;p&gt;
After creating &lt;a href="http://bb.osmocom.org/"&gt;OsmocomBB&lt;/a&gt;, it was taught
how to generate GSMTAP messages very quickly, too.
&lt;/p&gt;
&lt;p&gt;
So by now, at least when it comes to Free Software, it is definitely the
de-facto standard for capturing/transmitting and analyzing protocol messages
from the GSM air interface.
&lt;/p&gt;
&lt;p&gt;
However, until now, there has never been any official "homepage" of the GSMTAP
header.  This has changed now, &lt;a href="http://bb.osmocom.org/trac/wiki/GSMTAP"&gt;the GSMTAP homepage is now part
of the OsmocomBB wiki&lt;/a&gt;.
&lt;/p&gt;</description><category>gsm</category><guid>https://laforge.gnumonks.org/blog/20100804-gsmtap_wiki_page/</guid><pubDate>Tue, 03 Aug 2010 19:00:00 GMT</pubDate></item><item><title>Playing more with Erlang</title><link>https://laforge.gnumonks.org/blog/20100804-playing_more_with_erlang/</link><dc:creator>Harald Welte</dc:creator><description>&lt;p&gt;
Last year I started to occasionally play with Erlang.  People who know me as
die-hard C coder who tries to avoid C++, Java and Python wherever possible
will probably be surprised here now.
&lt;/p&gt;
&lt;p&gt;
I have no intention of changing my general position on programming languages. I
don't feel comfortable using something where I don't know and/or understand the
immediate impact on how this code will be executed on the actual silicon.
&lt;/p&gt;
&lt;p&gt;
However, if you have a need to play with anything that uses ASN.1, but
particularly the aligned/unaligned PER encoding variants, then it is pretty
clear that there is nothing available as Free Software that can compare to the
Erlang asn1ct/asn1rt modules.
&lt;/p&gt;
&lt;p&gt;
At that time last year I was doing some rapid prototyping with the RANAP protocol,
and the progress was quite quick.  I never had time to return to that project,
so it (and my Erlang skills) were left dormant.
&lt;/p&gt;
&lt;p&gt;
In recent weeks, I have picked Erlang up again - again to work on ASN.1 encoded
messages: This time TCAP and MAP.  While we still need the in-progress TCAP+MAP
implementation in C for OsmoSGSN, there are other tasks at hand where an
Erlang-based implementation might yield a much higher productivity.
&lt;/p&gt;
&lt;p&gt;
So right now I'm working on a program that parses/decodes and iterates through
every MAP component in a TCAP message and replaces certain fields, re-encodes
the entire message and sends it off the wire.  Once that is done, I think I'll
actually try to do a more complete TCAP server and implement a simplistic HLR
for OsmoSGSN testing.
&lt;/p&gt;</description><category>gsm</category><guid>https://laforge.gnumonks.org/blog/20100804-playing_more_with_erlang/</guid><pubDate>Tue, 03 Aug 2010 19:00:00 GMT</pubDate></item><item><title>On the recent news items about the homebrew IMSI-catcher for 1500 USD</title><link>https://laforge.gnumonks.org/blog/20100801-on_recent_news_about_imsi_catcher/</link><dc:creator>Harald Welte</dc:creator><description>&lt;p&gt;
Some news sites seem to do very limited research and present it as big
news that you can now build an IMSI-Catcher for a budget of USD 1500,
using OpenBTS and a URSP.
&lt;/p&gt;
&lt;p&gt;
Let me bring some clarity into this situation:
&lt;/p&gt;&lt;ul&gt;
&lt;li&gt;Fundamentally, an IMSI-Catcher is nothing special but a GSM base station
    (BTS) that is configured to the network country code (NCC) and mobile
    network code (MNC) of a commercial network operator.&lt;/li&gt;
&lt;li&gt;In GSM, the phone has no way to authenticate and thus verify the legitimacy
    of the mobile network.  This is like a "rogue access point" in a open
    (unencrypted/unauthenticated) WiFi network.&lt;/li&gt;
&lt;li&gt;Thus, anyone who has a device that can run as a GSM base station has the
    ability to run an IMSI catcher.&lt;/li&gt;
&lt;li&gt;There are two Free Software / Open Source projects for running your own
    GSM network, both have first been published in 2008: &lt;a href="http://openbts.sourceforge.net/"&gt;OpenBTS&lt;/a&gt; and &lt;a href="http://openbsc.osmocom.org/"&gt;OpenBSC&lt;/a&gt;.
    &lt;/li&gt;
&lt;li&gt;None of those two projects are intended to be used as an IMSI-Catcher but
    for legitimate operation of GSM networks.  However, if a user choses to
    configure the NCC and MNC of a commercial operator and allow
    "unknown/unregistered/unprovisioned IMSIs (SIMs) on his network, he will 
    effectively have an IMSI catcher.
&lt;/li&gt;&lt;li&gt;Such operation is in violation of spectrum usage regulations, even if you
    have a valid test/experimental license, since that license does not permit
    you to use somebody else's NCC/MNC.&lt;/li&gt;
&lt;li&gt;Furthermore, such operation is in violation of criminal law in most
    jurisdictions.  In Germany there is a separate offense in the criminal code,
    called &lt;a href="http://dejure.org/gesetze/StGB/317.html"&gt;Paragraph 317
Stoerung von Telekommunikationsanlagen&lt;/a&gt;, combined with &lt;a href="http://dejure.org/gesetze/StGB/202b.html"&gt;Paragraph 202b Abfangen von Daten&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Furthermore, there are certainly civil claims to be made by the affected
    operator (and its subscriber) against anyone who unlawfully operates
    such a fake base station&lt;/li&gt;
&lt;li&gt;OpenBTS and OpenBSC, as well as the problems resulting from this fake
    base station attack have been covered in a variety of conference presentations
    from 2008 through today.&lt;/li&gt;
&lt;li&gt;Thus, there is &lt;i&gt;nothing&lt;/i&gt; new about what &lt;a href="http://www.defcon.org/html/defcon-18/dc-18-speakers.html#Paget"&gt;has been presented at Defcon 18&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
Also, the theoretic basics ow how to operate an IMSI catcher are nothing new
either. There are even a number of patents covering IMSI catchers, the first
that I know of &lt;a href="https://publications.european-patent-office.org/PublicationServer/documentpdf.jsp?iDocId=5485105&amp;amp;iebug=.pdf"&gt;has
been patented by Rohde &amp;amp; Schwarz in 2003&lt;/a&gt;.  Also, see &lt;a href="http://openbts.blogspot.com/2009/04/some-comments-on-imsi-catchers.html"&gt;this blog post by OpenBTS founder David Burgess&lt;/a&gt; on this topic.
&lt;/p&gt;
&lt;p&gt;
So all that you always needed is a bit of hardware and software to send
radio waves containing messages formatted in the way how they are described
in the (equally public) &lt;a href="http://www.3gpp.org/specification-numbering"&gt;GSM specifications&lt;/a&gt; as published by ETSI and 3GPP.  Commercial, proprietary systems have existed
for a decade.  From 2008 on, there is some Free / Open Source Software to
operate GSM networks.  The situation remains unchanged in 2010.
&lt;/p&gt;
&lt;p&gt;
So please, remember this the next time somebody is trying to tell you that
this is the latest invention since sliced bread.
&lt;/p&gt;</description><category>gsm</category><guid>https://laforge.gnumonks.org/blog/20100801-on_recent_news_about_imsi_catcher/</guid><pubDate>Sat, 31 Jul 2010 19:00:00 GMT</pubDate></item><item><title>Dieter Spaar has started a blog</title><link>https://laforge.gnumonks.org/blog/20100731-dieter_spaar-blog/</link><dc:creator>Harald Welte</dc:creator><description>&lt;p&gt;
&lt;a href="http://www.mirider.com/"&gt;Dieter Spaar&lt;/a&gt;, who has been involved in
various ways with both OpenBSC and OsmocomBB has just &lt;a href="http://www.mirider.com/weblog"&gt;started a blog&lt;/a&gt;.  This is good news
and I hope this way he will get a bit more (much deserved) exposure on his
great work.
&lt;/p&gt;</description><category>gsm</category><guid>https://laforge.gnumonks.org/blog/20100731-dieter_spaar-blog/</guid><pubDate>Fri, 30 Jul 2010 19:00:00 GMT</pubDate></item><item><title>GSM Denial of Service by flooding BTS with RACH requests</title><link>https://laforge.gnumonks.org/blog/20100731-rach_dos/</link><dc:creator>Harald Welte</dc:creator><description>&lt;p&gt;
At Blackhat US 2010, there was a &lt;a href="http://www.blackhat.com/html/bh-us-10/bh-us-10-briefings.html#Grugq"&gt;Talk&lt;/a&gt;
that (among other things) apparently included the subject of a RACH DoS on
GSM base stations, implemented using my Layer1 of the &lt;a href="http://bb.osmocom.org/"&gt;OsmocomBB&lt;/a&gt; software.
&lt;/p&gt;
&lt;p&gt;
As some news sites are covering this as "news":  This vulnerability has
been long known in the field and was - to the best of my knowledge - first
demonstrated to a public audience by &lt;a href="http://www.mirider.com/resume.html"&gt;Dieter Spaar&lt;/a&gt; at the &lt;a href="https://deepsec.net/docs/speaker.html#PSLOT46"&gt;Deepsec 2009&lt;/a&gt;
conference in November 2009.  You can get his &lt;a href="http://www.mirider.com/GSM-DoS-Attack_Dieter_Spaar.pdf"&gt;slides&lt;/a&gt;.
&lt;/p&gt;
&lt;p&gt;
The difficult part for many years has not been to know about the possibility of
this weakness.  Anyone who has read the GSM air interface specification will
inevitably see that there is a limited number of RACH slots and a limited number
of dedicated channels.  Once you fill more RACH slots than the cell has dedicated
channels, and you keep re-filling them at a higher rate than the cell can expire
those dedicated channels, you have a DoS.
&lt;/p&gt;
&lt;p&gt;
So rather, the difficult part was to implement it in practise, as traditionally
all GSM baseband chipsets have been extremely closed, just like the very software
(firmware) running on them.  Today, starting from Q2/2010, it is very easy to
do a proof-of-concept implementation, as we have created OsmocomBB: An Open
Source baseband firmware.
&lt;/p&gt;
&lt;p&gt;
Dieter Spaar's implementation predates OsmocomBB development by the better part
of a year.  At that time, he had to resort to binary-patching existing proprietary
(binary-only) baseband firmware.  So I think people should recognize his effort
in doing the first practical implementation of that attack.
&lt;/p&gt;</description><category>gsm</category><guid>https://laforge.gnumonks.org/blog/20100731-rach_dos/</guid><pubDate>Fri, 30 Jul 2010 19:00:00 GMT</pubDate></item><item><title>A real-world practical A5/1 attack using airprobe and Kraken</title><link>https://laforge.gnumonks.org/blog/20100730-practical_gsm_a51_attack/</link><dc:creator>Harald Welte</dc:creator><description>&lt;p&gt;
At &lt;a href="http://www.blackhat.com/"&gt;Blackhat USA 2010&lt;/a&gt;, Karsten Nohl has been
&lt;a href="http://srlabs.de/research/decrypting_gsm/attachment/attacking-phone-privacy_karsten-nohl/"&gt;presenting
on a practical real-world A5/1 cracking attack&lt;/a&gt;.  For recent years, Karsten,
myself and others have been speaking at various opportunities, indicating that
a practical attack using readily-available information and tools from the
Internet is very possible, and that it is only a matter of time for somebody
actually does it.
&lt;/p&gt;
&lt;p&gt;
While Karsten has focused on the actual cryptographic attack, I've been putting
in some time in projects like &lt;a href="http://airprobe.org/"&gt;airprobe&lt;/a&gt; (a
GSM receiver/decoder).
&lt;/p&gt;
&lt;p&gt;
Now finally, a team of friends at the new &lt;a href="http://srlabs.de/"&gt;Security
Research Labs&lt;/a&gt; (founded by Karsten) in Berlin has put the pieces of the
puzzle together.
&lt;/p&gt;
&lt;p&gt;
Airprobe has been extended to fully support decoding of TCH/F (FACCH, SACCH and
traffic), as well as SDCCH/SACCH control channels, and to specify the timeslot
and physical channel configuration from the command line.  Using this, you can
&lt;/p&gt;&lt;ul&gt;
&lt;li&gt;decode the AGCH, wait for an IMMEDIATE ASSIGNMENT of a SDCCH&lt;/li&gt;
&lt;li&gt;decode that very SDCCH and wait until encryption is turned on&lt;/li&gt;
&lt;li&gt;dump an encrypted burst where you have sufficient known plaintext&lt;/li&gt;
&lt;li&gt;use a different program to actually recover the A5/1 ciphering key&lt;/li&gt;
&lt;li&gt;feed that key into airprobe and decrypt+decode the ASSIGNMENT COMMAND of the TCH&lt;/li&gt;
&lt;li&gt;use airprobe to decrypt+decode that assigned TCH/F&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;
The external program to recover the A5/1 ciphering key is called &lt;i&gt;Kraken&lt;/i&gt;
and is also available from &lt;a href="http://srlabs.de/research/decrypting_gsm/"&gt;the SRLabs website&lt;/a&gt;.
&lt;/p&gt;
&lt;p&gt;
So what are the limitations?  Well, so far this only works on non-hopping cells
with a single ARFCN.   The limitations are those of the receiver hardware (and
SDR software), and not really limitations of the airprobe GSM decoder or the
actual software tools.
&lt;/p&gt;
&lt;p&gt;
In the past I would have assumed that non-hopping and/or single-ARFCN cells are
rare, but in fact we can find them even inside a big city like Berlin, from at
least two of the four German GSM operators.  So that's why this attack is very
practical, no matter what the GSMA might say.
&lt;/p&gt;</description><category>gsm</category><guid>https://laforge.gnumonks.org/blog/20100730-practical_gsm_a51_attack/</guid><pubDate>Thu, 29 Jul 2010 19:00:00 GMT</pubDate></item><item><title>Implementing the TCAP protocol, heading towards OsmoSGSN SS7 support</title><link>https://laforge.gnumonks.org/blog/20100711-implementing_tcap-towards_ss7/</link><dc:creator>Harald Welte</dc:creator><description>&lt;p&gt;
The protocol by which traditional GSM core network components interact is called 
MAP (Mobile Application Part).  MAP itself is a user of the TCAP (Transaction
Capabilities Application Part) protocol, which in turn runs on a SS7 protocol
stack (i.e. SCCP over MTP or M3UA or SUA over SCTP).
&lt;/p&gt;
&lt;p&gt;
For those users of OpenBSC who have a need to interoperate with other GSM
networks (roaming), the circuit-switched part of OpenBSC has so far relied on
the use of a proprietary MSC (by means of the A interface).  This &lt;i&gt;closed&lt;/i&gt;
MSC then talks MAP/TCAP/SS7 to roaming partners.
&lt;/p&gt;
&lt;p&gt;
However, on the GPRS front, we now have OsmoSGSN.  However, as opposed to the BSC
on the circuit switched side, the SGSN directly interacts with the core GSM
network components (both of the home network and the roaming partners).
&lt;/p&gt;
&lt;p&gt;
So in order to run OsmoSGSN interacting with existing HLRs, we need to add
a MAP/TCAP/SS7 interface to it.  Once this has been done for the SGSN, we of
course can do the same for the MSC-part that is currently integrated with
OpenBSC.
&lt;/p&gt;
&lt;p&gt;
As there are existing implementations of SCTP (inside the Linux kernel) and
SUA (sualibrary), TCAP is the next step in the protocol stack that needs
to be implemented.  I've been digging into TCAP for the last week(s), and
believe I finally understood every part of its operation.
&lt;/p&gt;
&lt;p&gt;
You can think of TCAP as something that facilitates the transport of
request-response type transactions over a datagram oriented transport layer.
It intends to have lower overhead than a connection-oriented service (e.g.
establishing TCP sessions) and supports features such as aggregating multiple
user-messages (called &lt;i&gt;components&lt;/i&gt;) in a single actual transport-layer
message.  The idea is to reduce the overhead of message headers and routing.
&lt;/p&gt;
&lt;p&gt;
TCAP is (unfortunately) specified in ASN.1 and thus requires significant
effort to parse and construct.  Right now I'm using Lev Walkin's &lt;i&gt;asn1c&lt;/i&gt;
ASN.1 C code generator to generate the parser and constructor functions.  The
actual TCAP protocol logic is once again implemented in plain C, using the
various concepts and utility functions established in OpenBSC (and now part
of libosmocore).
&lt;/p&gt;
&lt;p&gt;
The implementation is making good progress and I hope I can do some early testing
in about a week from now, and successively move straight to the MAP protocol,
implementing at least those parts that we need for GPRS authentication and
attach / routing area updates.
&lt;/p&gt;</description><category>gsm</category><guid>https://laforge.gnumonks.org/blog/20100711-implementing_tcap-towards_ss7/</guid><pubDate>Sat, 10 Jul 2010 19:00:00 GMT</pubDate></item><item><title>Major update in OpenBSC GPRS/EDGE support</title><link>https://laforge.gnumonks.org/blog/20100702-gprs_quite_stable/</link><dc:creator>Harald Welte</dc:creator><description>&lt;p&gt;
Through the last couple of days, I've been in extreme bug-squashing mode for
the GPRS/EDGE code base in OpenBSC (mostly the OsmoSGSN program).  I'm now
at a point where I can reliably establish PDP contexts and access the Internet
from a variety of different phones with different baseband chipsets and
GPRS protocol stack implementations.  All so-far-known bugs regarding
fragmentation/reassembly, sequence numbering and other issues have been
fixed.  There definitely are plenty more, but we first need to find them.
&lt;/p&gt;
&lt;p&gt;
Since it's working reliably now, it's quite fascinating what the various
phones do after connecting to the GPRS network.  Like Windows Mobile phones
sending Netbios Name Service updates (and requests), which I think is funny
considering that they are sent to a network that is typically considered
to be the public Internet.
&lt;/p&gt;
&lt;p&gt;
But to be fair and not anti-Windows, my Google/Android G1 also makes some https
connections back to Google - and I don't know what they are for [yet].
&lt;/p&gt;
&lt;p&gt;
In any case, with OpenBSC, OsmoSGSN and OpenGGSN anyone interested in doing
true security (and privacy) research with mobile phones is now able to do so.
Using those programs, you can run your own GPRS+EDGE network and can see
first hand what your phones are doing on a cellular network, what kind of
data they are sending back home.  In this setup, there is no packet filtering,
NAT, deep packet inspection and no intrusion detection systems between your PC
and the IP stack on your phone.
&lt;/p&gt;</description><category>gsm</category><guid>https://laforge.gnumonks.org/blog/20100702-gprs_quite_stable/</guid><pubDate>Thu, 01 Jul 2010 19:00:00 GMT</pubDate></item><item><title>The reason why you see paging by IMSI in real-world GSM networks</title><link>https://laforge.gnumonks.org/blog/20100628-the_reason_for_paging_by_imsi/</link><dc:creator>Harald Welte</dc:creator><description>&lt;p&gt;
During my work on airprobe and OsmocomBB I've been wondering why you see
&lt;i&gt;paging by IMSI&lt;/i&gt; in real-world GSM networks.
&lt;/p&gt;
&lt;p&gt;
A quick recap: The IMSI is the world-wide unique serial number of your SIM.
Since it is easy to identify and track people, the TMSI was introduced as
a temporary identifier that is frequently re-allocated over encrypted channels.
The only reason for the TMSI to exist is to prevent tracking of a subscriber
by watching where his IMSI appears on the paging channel.
&lt;/p&gt;
&lt;p&gt;
According to the theory, the IMSI is only used when first registering to any
GSM network.  At that time, a TMSI is allocated to the SIM card in the phone,
and this TMSI is used for the next transaction(s).  Later, this TMSI is
re-allocated and re-allocated, but the IMSI shouldn't show up again in any
paging requests.
&lt;/p&gt;
&lt;p&gt;
Even if you switch mobile networks (i.e. in the roaming case), you would
once send the IMSI as part of a LOCATION UPDATE REQUEST or IDENTITY RESPONSE,
but the network has no need to page the SIM by IMSI.
&lt;/p&gt;
&lt;p&gt;
So far the theory.  If you look at the Paging Channel (PCH) of cells in
real-world networks, you see a significant (10-20%) amount of paging requests
that contain paging  by IMSI.  This seems strange on first sight, given the
theory described above.
&lt;/p&gt;
&lt;p&gt;
I have the following plausible explanation for this:
&lt;/p&gt;&lt;ul&gt;
&lt;li&gt;
The VLR keeping the IMSI-TMSI mappings doesn't have non-volatile storage.  This
means at a VLR restart, all the TMSI allocations will be lost, and the network
has to resort to paging by IMSI.
&lt;/li&gt;
&lt;li&gt;
The VLR has a limited amount of RAM, which can store a limited number of IMSI-TMSI
mappings.  Especially if the operator is interested in saving money, the amount of
memory is insufficient for all subscribers in the network.  This means, the VLR
will expire some old entries in the mapping table to store new entries.  Thus,
mobile phones whose last transaction with the GSM network was relatively long ago
are likely candidates for such VLR expiration.  Once a phone for an expired entry
needs to be paged again, paging will happen by IMSI.
&lt;/li&gt;
&lt;li&gt;
Last, but not least: GSM networks do not page a phone by the last known cell, but
by the last known location area of the phone.  A location area might be relatively
big.  This means that at any cell you will see a lot of paging messages, even for
phones that are not even anywhere near this cell.   If there is no response within
the location area, the MSC might decide to do paging on a larger radius, possibly
the entire MSC area.  Since such MSC-wide paging is likely to occur for phones
that haven't shown activity for a long time (and thus might have moved or
disappeared without properly unregistering from the network),  those are the exact
same phones for which the IMSI-TMSI mappings have expired from the VLR.  Thus,
the rate of paging-by-IMSI looks disproportionately high.
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
So the relatively high percentage of paging by IMSI vs. TMSI should not be
taken as a measurement with regard to the total number of transactions or even
the total number of subscribers.   It is simply the mechanics of the network
resulting in a distortion of those figures caused by phones that have never
properly unregistered from the network.
&lt;/p&gt;</description><category>gsm</category><guid>https://laforge.gnumonks.org/blog/20100628-the_reason_for_paging_by_imsi/</guid><pubDate>Sun, 27 Jun 2010 19:00:00 GMT</pubDate></item><item><title>Back from OpenBTS workshop</title><link>https://laforge.gnumonks.org/blog/20100627-back_from_openbts_workshop/</link><dc:creator>Harald Welte</dc:creator><description>&lt;p&gt;
I've just returned back from the &lt;a href="http://kestrelsignalprocessing.mybigcommerce.com/products/OpenBTS-Workshop-Registration,-June-23%252d27,-Pfarrkirchen,-Germany.html"&gt;First OpenBTS workshop&lt;/a&gt; held by David Burgess and hosted by Dieter Spaar in south-east Bavaria (Germany).  While I'm not involved with OpenBTS so far (except from using it occasionally), I still thought the community surrounding Free Software / Open Source in the GSM field is small enough to make me participate.
&lt;/p&gt;
&lt;p&gt;
On the request of the participants, I also did a short demonstration of both
OpenBSC and OsmocomBB.  And just like I managed to crash OpenBTS by
accidentally sending invalid messages, my OpenBSC demo crashed at some point
[due to a not-yet-known bug regarding SMS delivery.  I suppose the intrusive
changes of the BSC/MSC split are to be blamed for that.  But I don't mind,
we need that split...
&lt;/p&gt;
&lt;p&gt;
I definitely had a great time meeting the participants of the workshop.  There
definitely is a very diverse crowd with equally diverse reasons for their
interest in using and/or deploying OpenBTS.
&lt;/p&gt;
&lt;p&gt;
Finally, there was a chance to discuss the need for a common 'application interface'
in both OpenBSC and OpenBTS.  Using that interface, external applications (e.g.
implementing USSD or RRLP) could be written in a way to work with both OpenBTS
and OpenBSC.  I hope we can get started on this soon and remove another bit of
fragmentation in what is already a fairly small special interest community...
&lt;/p&gt;
&lt;p&gt;
Given the excellent weather conditions, the motorbike ride to and from the
venue went fine - despite being at 650 km distance from my home.
&lt;/p&gt;</description><category>gsm</category><guid>https://laforge.gnumonks.org/blog/20100627-back_from_openbts_workshop/</guid><pubDate>Sat, 26 Jun 2010 19:00:00 GMT</pubDate></item><item><title>Adding frequency hopping support to OpenBSC</title><link>https://laforge.gnumonks.org/blog/20100620-openbsc_frequency_hopping/</link><dc:creator>Harald Welte</dc:creator><description>&lt;p&gt;
During the last couple of days, I've been adding the bits required to support
frequency-hopping BTSs in &lt;a href="http://openbsc.osmocom.org/"&gt;OpenBSC&lt;/a&gt;.
Now everything looks great in the protocol traces - but unfortunately it still
doesn't work, at least not with the Siemens BS-11 that I have access to.
&lt;/p&gt;
&lt;p&gt;
Will continue to try to make it work.  The big advantage of having a hopping
BTS under our control is that we can define the hopping sequence - something
quite useful once we get to the point where we'd like to add frequency hopping
to the telephone-side stack (&lt;a href="http://bb.osmocom.org/"&gt;OsmocomBB&lt;/a&gt;).
&lt;/p&gt;
&lt;p&gt;
The good news is that I had to fix lots of bugs in the A-bis OML dissector
for wireshark that I wrote some time ago.  It's now much more complete
and definitely a big step further towards eventually getting it included
in wireshark mainline.
&lt;/p&gt;</description><category>gsm</category><guid>https://laforge.gnumonks.org/blog/20100620-openbsc_frequency_hopping/</guid><pubDate>Sat, 19 Jun 2010 19:00:00 GMT</pubDate></item><item><title>A fairy tale about ICCIDs, IMSIs and iPads</title><link>https://laforge.gnumonks.org/blog/20100615-iccid_imsi_ipad/</link><dc:creator>Harald Welte</dc:creator><description>&lt;p&gt;
One of the big news of the last week is AT&amp;amp;T's leak of &lt;a href="http://gawker.com/5559346/apples-worst-security-breach-114000-ipad-owners-exposed"&gt;114,000 iPad customer records including the e-mail address and ICCID&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
While that leak is certainly a big issue in itself, there are some people,
most notably Chris Paget, &lt;a href="http://www.tombom.co.uk/blog/?p=166"&gt;who
claim that this is much more serious than generally assumed&lt;/a&gt;.  The main
claim here seems to be that &lt;i&gt;...in order to translate an ICCID into an IMSI,
you need to query the HLR.&lt;/i&gt;
&lt;/p&gt;
&lt;p&gt;
I have been reading GSM protocol specifications on every level for the past
years, and never have I seen the ICCID being mentioned anywhere.  The GSM
specifications do not require this information to be stored in the HLR, and
the MAP protocol (used on the C interface between MSC and HLR, see &lt;a href="http://www.3gpp.org/ftp/specs/html-INFO/29002.htm"&gt;3GPP TS 29.002&lt;/a&gt;)
does not even know how to encode/specify it.
&lt;/p&gt;
&lt;p&gt;
Also, there is no technical need for it.  The ICCID is never used nor needed
in any part of the GSM protocol.  Also, the GSM network typically doesn't store
any information that is not absolutely necessary for its operation.  The only
identifier of a SIM card that the network protocols care about is the IMSI.
&lt;/p&gt;
&lt;p&gt;
So unless the US operators in question have either some kind of proprietary
extensions to both their HLR and the MAP protocol, there is to the best of
my knowledge no way how you can relate the ICCID to the IMSI.
&lt;/p&gt;
&lt;p&gt;
And thus, as a result, the IMSI-catcher attack described will not work since
you don't know the IMSI of the SIM card (associated with the customer record)
that you want to catch.
&lt;/p&gt;
&lt;p&gt;
If anyone can show me hard technical facts about ICCIDs being used in the HLRs
of the operators in question, I am happy to post here I was wrong.  Otherwise,
I would hope everyone else could also come down to the hard technical facts,
i.e. which particular MAP message is used for this alleged ICCID-to-IMSI query.
&lt;/p&gt;
&lt;p&gt;
&lt;b&gt;UPDATE:&lt;/b&gt; As some people have discovered, the three US operators
themselves have decided that they &lt;a href="http://www.mfi-training.com/forum/paper/SIM&amp;amp;Salsa.pdf"&gt;use the same
number to generate both the ICCID and the IMSI&lt;/a&gt;.  So if you have one, you
can compute the other. No need for HLR access, no need for the MAP protocol.
So the information leak is in fact unrelated to the GSM protocol but simply a
matter of how unfortunate those particular three operators assign their unique
identifiers.
&lt;/p&gt;</description><category>gsm</category><guid>https://laforge.gnumonks.org/blog/20100615-iccid_imsi_ipad/</guid><pubDate>Mon, 14 Jun 2010 19:00:00 GMT</pubDate></item><item><title>Wanted: Packet traces of the MAP+TCAP based C/Gc interface</title><link>https://laforge.gnumonks.org/blog/20100606-hlr_map_tcap_pcap_wanted/</link><dc:creator>Harald Welte</dc:creator><description>&lt;p&gt;
I'm looking for any example pcap files (packet traces) of the
so-called "C" and "Gc" Interfaces, i.e. the interfaces of the HLR
(Home Location Register).  If anyone has such pcap files or can generate
some, I would very much appreciate it.
&lt;/p&gt;
&lt;p&gt;
The protocol levels I'm interested in is SCCP, TCAP and MAP.  The lower
layers (MTP) are not important now.
&lt;/p&gt;
&lt;p&gt;
Specifically, I'm looking for traces of any of the following MAP operations:
&lt;/p&gt;&lt;ul&gt;
&lt;li&gt;updateLocation&lt;/li&gt;
&lt;li&gt;cancelLocation&lt;/li&gt;
&lt;li&gt;restoreData&lt;/li&gt;
&lt;li&gt;sendParameters&lt;/li&gt;
&lt;li&gt;updateGprsLocation&lt;/li&gt;
&lt;li&gt;sendAuthenticationInfo&lt;/li&gt;
&lt;li&gt;purgeMS&lt;/li&gt;
&lt;li&gt;sendRoutingInfo&lt;/li&gt;
&lt;li&gt;sendRoutingInfoForSM&lt;/li&gt;
&lt;li&gt;reportSM-DeliveryStatus&lt;/li&gt;
&lt;li&gt;readyForSM&lt;/li&gt;
&lt;li&gt;noteSubscriberPresent&lt;/li&gt;
&lt;li&gt;sendRoutingInfo&lt;/li&gt;
&lt;li&gt;anytimeInterrogation&lt;/li&gt;
&lt;li&gt;statusReport&lt;/li&gt;
&lt;li&gt;{register,erase,activate,deactivate,interrogate}SS&lt;/li&gt;
&lt;li&gt;sendIMSI&lt;/li&gt;
&lt;li&gt;sendRoutingInfoForGprs&lt;/li&gt;
&lt;li&gt;insertSubscriberData&lt;/li&gt;
&lt;li&gt;deleteSubscriberData&lt;/li&gt;
&lt;li&gt;checkIMEI&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;
If anyone is able to produce the respective traces, I would appreciate it a
lot.  I'd need them as examples to make sure I fully understand the TS 09.02 in
combination with Q.77x before actually starting to implement it...
&lt;/p&gt;</description><category>gsm</category><guid>https://laforge.gnumonks.org/blog/20100606-hlr_map_tcap_pcap_wanted/</guid><pubDate>Sat, 05 Jun 2010 19:00:00 GMT</pubDate></item><item><title>First functional HTTP transfer in my own GPRS/EDGE network</title><link>https://laforge.gnumonks.org/blog/20100603-first_working_gprs/</link><dc:creator>Harald Welte</dc:creator><description>&lt;p&gt;
Today marks the day where finally, after months of (non-full-time) work, I have
made the first successful HTTP connection through my own GPRS/EDGE network.
&lt;/p&gt;
&lt;p&gt;
Ever since we started to seriously get into &lt;a href="http://openbsc.osmocom.org/"&gt;OpenBSC&lt;/a&gt; to run GSM networks, I've been
looking forward to running GPRS networks, too.  What most people don't know:
GPRS is radically different from GSM.  It basically only shares the frequencies
and timeslot architecture of the physical layer, while having it's own layer1,
layer2 and various other protocol layers.  Also, its signalling and data completely
bypass the usual BSC and MSC components of a GSM core network.
&lt;/p&gt;
&lt;p&gt;
So what I've been working on is now called &lt;a href="http://openbsc.osmocom.org/trac/wiki/osmo-sgsn"&gt;OsmoSGSN&lt;/a&gt;.  Using
OpenBSC, you can provision an ip.access nanoBTS (or any other BTS with a Gb
Interface) to broadcast the GPRS/EDGE capabilities to the handsets.  The BTS
then establishes the Gb interface (consisting of NS and BSSGP) to the SGSN.
&lt;/p&gt;
&lt;p&gt;
The SGSN takes care of GPRS Mobility Management (GMM) and Session Management(SM)
in the signalling plane, as well as the LLC + SNDCP protocol layers.  On the
other end, it uses the GTP protocol to connect to a GGSN.  In our case, this is
the &lt;a href="http://sourceforge.net/projects/ggsn/"&gt;OpenGGSN&lt;/a&gt; project which
I &lt;a href="http://laforge.gnumonks.org/weblog/2010/05/25#20100525-openggsn_090_release"&gt;recently adopted&lt;/a&gt;.
&lt;/p&gt;
&lt;p&gt;
OpenGGSN then creates a virtual network device (tun0), through which the actual
IP packets are entering/leaving the GPRS network.  From there you can route
and/or NAT them just like any other IP packets.
&lt;/p&gt;
&lt;p&gt;
The current code is still incomplete in many places and known to be unstable. But
it's really rewarding that after a long time of development, layer after layer of
the stack, finally actual TCP/IP can be provisioned to phones.
&lt;/p&gt;
&lt;p&gt;
The code is in the current master of the openbsc git repository, but I don't
think there's much point in trying it just yet.  I suppose in a week from now
things should be much more stable.
&lt;/p&gt;</description><category>gsm</category><guid>https://laforge.gnumonks.org/blog/20100603-first_working_gprs/</guid><pubDate>Wed, 02 Jun 2010 19:00:00 GMT</pubDate></item><item><title>OpenGGSN Version 0.90 released</title><link>https://laforge.gnumonks.org/blog/20100525-openggsn_090_release/</link><dc:creator>Harald Welte</dc:creator><description>&lt;p&gt;
Only three weeks ago I &lt;a href="http://laforge.gnumonks.org/weblog/2010/05/04#20100504-openggsn"&gt;blogged
about OpenGGSN&lt;/a&gt;, a seemingly-abandoned Free Software implementation of the
GGSN node of the GPRS core network.
&lt;/p&gt;
&lt;p&gt;
Things have developed quite a bit ever since.  As the original author didn't
respond to any of my mails and sourceforge.net was not able to reach him
either, they have approved my the 'abandoned project takeover' (APT) request.
&lt;/p&gt;
&lt;p&gt;
I've now switched the project from CVS to &lt;a href="http://ggsn.git.sourceforge.net/git/gitweb.cgi?p=ggsn/ggsn;a=summary"&gt;git&lt;/a&gt;,
removed links to the non-existing openggsn.org homepage and &lt;a href="http://sourceforge.net/projects/ggsn/files/"&gt;released version 0.90&lt;/a&gt;,
containing nothing less than a fix for remote DoS vulnerability that was pending
for more than 5 years.
&lt;/p&gt;
&lt;p&gt;
So far I'm only exercising the PDP context activation/deactivation parts of
OpenGGSN from OsmoSGSN (the SGSN I write as sister-project to OpenBSC), but
I hope we can use OpenGGSN in a production GPRS network soon...
&lt;/p&gt;</description><category>gsm</category><guid>https://laforge.gnumonks.org/blog/20100525-openggsn_090_release/</guid><pubDate>Mon, 24 May 2010 19:00:00 GMT</pubDate></item><item><title>Doing even more encapsulations than the GPRS Gb interface already has</title><link>https://laforge.gnumonks.org/blog/20100519-gprs-gb-fr-gre-ip/</link><dc:creator>Harald Welte</dc:creator><description>&lt;p&gt;
Back in October 2009, &lt;a href="http://laforge.gnumonks.org/weblog/2009/10/27#20091027-implementing_gprs"&gt;I
blogged about the incredibly deep protocol stack on the GPRS Gb interface
between a BSS and the SGSN&lt;/a&gt;.
&lt;/p&gt;
&lt;p&gt;
Today I had the pleasure of implementing an even more odd variant of the Gb
interface, where NS does not get encapsulated in UDP/IP/Ethernet, but in
FrameRelay/GRE/IP/Ethernet.  The total protocol stack thus then looks
like: HTTP/TCP/IP/SNDCP/LLC/BSSGP/NS/FR/GRE/IP/Ethernet, with an optional PPP
between IP and SNDCP.  If anyone does the math to calculate the total protocol
overhead, please let me know[...
&lt;/p&gt;
&lt;p&gt;
The reason for that oddity is apparently that there are Cisco and other routers
that can encapsulate Frame Relay in GRE.  So using a old circuit-switched SGSN
with E1 interfaces and such a router, you can convert from Frame Relay on E1 to
Frame Relay on GRE/IP/Ethernet.
&lt;/p&gt;
&lt;p&gt;
Both the &lt;a href="http://openbsc.gnumonks.org/trac/wiki/osmo-gbproxy"&gt;Gb
Proxy&lt;/a&gt; as well as the upcoming OsmoSGSN use the same NS implementation,
i.e. they can now both talk NS/FR/GRE and the NS/UDP variants - even at
the same time, as the encapsulation is a property of each individual NS-VC.
&lt;/p&gt;</description><category>gsm</category><guid>https://laforge.gnumonks.org/blog/20100519-gprs-gb-fr-gre-ip/</guid><pubDate>Tue, 18 May 2010 19:00:00 GMT</pubDate></item><item><title>Back from a week of GSM/GPRS protocol coding/testing in Iceland</title><link>https://laforge.gnumonks.org/blog/20100516-a_week_of_gsm_coding-iceland/</link><dc:creator>Harald Welte</dc:creator><description>&lt;p&gt;
With only 16 hours delay (which isn't all that much considering the volcanic
ash situation) I arrived back in Berlin from one week of OpenBSC software
hacking, particularly on the GPRS side of things.
&lt;/p&gt;
&lt;p&gt;
It was really nice to see to what extent OpenBSC software is already
used at &lt;a href="http://www.on-waves.com/"&gt;On-Waves&lt;/a&gt;, providing GSM
and now also GPRS services to thousands of users.
&lt;/p&gt;
&lt;p&gt;
My work was mostly focused on the &lt;a href="http://openbsc.gnumonks.org/trac/wiki/osmo-gbproxy"&gt;Gb-Proxy&lt;/a&gt;, a
multiplexer/proxy for GPRS Gb links running the NSIP (NS-over-IP) protocol.
It combines elements of the idea of a network address translator with that of a
proxy, combined with a little bit of packet-based routing.  This really makes
me feel like I'm back to packet-switched networking, which is great.
Especially the fact that we use the VTY code from quagga and its interactive
command line sometimes lets you forget that you're not working with classic
TCP/IP routing daemons or the like ;)
&lt;/p&gt;
&lt;p&gt;
Aside from that, I continued my work on the upcoming OsmoSGSN, using which we
will be able to run an autonomous GPRS network with no dependency on external
proprietary components.  In this setup, the PCU in the BTS connects over Gb/IP
to OsmoSGSN, which then talks over GTPv1 to the OpenGGSN.
&lt;/p&gt;
&lt;p&gt;
Also, work was spent on an abstract rate_counter implementation (now part of
&lt;a href="http://bb.osmocom.org/trac/wiki/libosmocore"&gt;libosmocore&lt;/a&gt;).  The
idea is to have a counter that will count certain events (like number of
packets/bytes, number of link failures, etc), but also keep a small history
about how many of those events happened in the last second, last minute, last
hour and last day.  There is also common code to store those counters in
the database, as well as to print them on the VTY.  The new counters are
so far only used in the GB-Proxy, but they will soon likely be added to
OpenBSC (bsc_hack) and other programs of our Free Software GSM network
portfolio.
&lt;/p&gt;</description><category>gsm</category><guid>https://laforge.gnumonks.org/blog/20100516-a_week_of_gsm_coding-iceland/</guid><pubDate>Sat, 15 May 2010 19:00:00 GMT</pubDate></item><item><title>Heading for 4 days of Iceland to work on OpenBSC GPRS</title><link>https://laforge.gnumonks.org/blog/20100510-gprs-openbsc-onwaves-iceland/</link><dc:creator>Harald Welte</dc:creator><description>&lt;p&gt;
Having just returned from Croatia the day before yesterday, I'm about to head
on a four-day trip to Iceland, where I'll be doing some testing and bug fixing
of the current OpenBSC GPRS support at &lt;a href="http://www.on-waves.com/"&gt;On-Waves&lt;/a&gt;.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://zecke.blogspot.com/"&gt;Zecke&lt;/a&gt; is also going to be there, working
on other aspects of OpenBSC.  This will make the trip even more fun!
&lt;/p&gt;</description><category>gsm</category><guid>https://laforge.gnumonks.org/blog/20100510-gprs-openbsc-onwaves-iceland/</guid><pubDate>Sun, 09 May 2010 19:00:00 GMT</pubDate></item><item><title>CECT C3100: Not a phone, but a flashlight with integrated phone</title><link>https://laforge.gnumonks.org/blog/20100509-cect_c3100/</link><dc:creator>Harald Welte</dc:creator><description>&lt;p&gt;
I've seen many [mobile] phones in my life, but nothing like the CECT C3100 so
far.  It's made of the cheapest hard plastic, like cheap kids toys.  In
addition to the phone keyboard, it has a mechanical switch on its side.
If you slide that switch, five powerful bright white LEDs at the top of the
phone will turn the entire device into a flashlight.
&lt;/p&gt;
&lt;p&gt;
However, it is one of the most basic phones with one of the older/simpler MTK
baseband chips inside (MT6223).  Also, as we have determined by a &lt;a href="http://en.qi-hardware.com/wiki/CECT_C3100_Analysis"&gt;PCB delamination
analysis&lt;/a&gt;, the test pads next to the MT6223 really are its ARM JTAG pins.
&lt;/p&gt;
&lt;p&gt;
JTAG is something not commonly found in MTK phone designs, but it is definitely
a big win for bootstrapping any system-level software such as drivers on the
unit.
&lt;/p&gt;
&lt;p&gt;
Right now I don't have the time to work on MT6223, we still have many issues to
fix in the current Ti Calypso code.  But I can't wait to find time to see if
we can extend our hardware support to MTK GSM chipsets...
&lt;/p&gt;</description><category>gsm</category><category>osmocom-bb</category><guid>https://laforge.gnumonks.org/blog/20100509-cect_c3100/</guid><pubDate>Sat, 08 May 2010 19:00:00 GMT</pubDate></item><item><title>GPRS progress in OpenBSC</title><link>https://laforge.gnumonks.org/blog/20100504-gprs-update/</link><dc:creator>Harald Welte</dc:creator><description>&lt;p&gt;
In recent weeks, I have been able to pick up my work at GPRS support for
OpenBSC again.  What has been done is:
&lt;/p&gt;&lt;ul&gt;
&lt;li&gt;Add OML support to configure nanoBTS for EDGE&lt;/li&gt;
&lt;li&gt;Add RR (System Information) support to indicate EDGE support&lt;/li&gt;
&lt;li&gt;Make a OpenBSC + nanoBTS setup inter-operate with an existing SGSN&lt;/li&gt;
&lt;li&gt;Develop a proxy that can aggregate the Gb-interfaces of multiple BTS into
    one Gb link to a real SGSN.  This way the SGSN has only one Gb link
    for all the cells under the control of a BSC, as opposed to one Gb link
    for each and every BTS&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
What I'm working on now is the actual SGSN implementation.  The SGSN is
mainly responsible for GPRS mobility management (GMM) and for terminating the
Layer2 (&lt;a href="http://en.wikipedia.org/wiki/Logical_Link_Control"&gt;LLC&lt;/a&gt;)
protocol from the MS.  This is very different from circuit-switched GSM, where
Layer2 (LAPDm) already terminates at the BTS.
&lt;/p&gt;
&lt;p&gt;
The layering stack of GPRS is a real nightmare, I am sure I have indicated this
in this blog before.  The Current OsmoSGSN code (available from the regular
openbsc.git repository) implements the NS, BSSGP and LLC layers, as well as the
basic GSM 04.08 GPRS Mobility Management messages like GPRS ATTACH/DETACH
and ROUTEING AREA UPDATE. The LLC code is still somewhat limited, but for the
time being it is sufficient.
&lt;/p&gt;
&lt;p&gt;
What drove me crazy for a couple of days is the number of parameters that are
exchanged at PDP CONTEXT ATTACH time.  There are no less than 26 different
quality of service (QoS) parameters negotiated (see &lt;a href="http://openbsc.gnumonks.org/trac/browser/openbsc/include/openbsc/gsm_04_08_gprs.h"&gt;struct
gsm48_qos at the bottom of this link)&lt;/a&gt;, each of them from a wide range of
values.  It's almost impossible to imagine more than 1% of all the possible
combinations have ever been used in production networks.  The QoS parameter
negotiation works by the phone sending a list of requested parameters, to which
the SGSN responds with its selected parameters.  My first thought was: Lets
be smart and simply echo back the QoS parameters - the phone must accept what
it has requested.  That didn't work either: While the QoS structure is the same
in both ways, the actual values in uplink and downlink directions are encoded
differently.  Who on earth defines such an encoding?
&lt;/p&gt;
&lt;p&gt;
Next item was the XID exchange which is at the boundary between LLC and the
&lt;a href="http://en.wikipedia.org/wiki/SNDCP"&gt;SNDCP&lt;/a&gt; (Sub-Network Dependent
Convergence Protocol).  It works like this: The phone proposes an endless list
of parameters, which the SGSN can evaluate, and then depending on the parameter
type either negotiate up or down.  According to the spec, sending an empty XID
response should mean "I agree with all your parameters".  However, at least those
phones that I tested were not happy with that.  So I decided to simply send back
the entire XID block to the phone.  And believe it or not, as opposed to the QoS
parameters, this time it even worked
&lt;/p&gt;
&lt;p&gt;
So now I'm facing the implementation of the actual SNDCP-to-GTP interworking,
which is nothing less but the guts of the SGSN.  &lt;a href="http://en.wikipedia.org/wiki/GPRS_Tunnelling_Protocol"&gt;GTP&lt;/a&gt; is the
protocol used on the GGSN side.  At least this time, GTP is sent directly over
TCP or UDP, i.e. the stacking inside the SGSN is only one layer deep, while on
the Gb-interface it is four (NS,BSSGP,LLC,SNDCP).
&lt;/p&gt;
&lt;p&gt;
SNDCP interacts with the GPRS Mobility Management, GPRS Session Management
(both GSM 04.08 over LLC), the GTP interface to the GGSN, as well as other
parts.  I expect many pitfalls on the way to getting it working, and given
the complexity involved I have already decided to stick much closer to the
specification than I usually did with the OpenBSC work.  This means properly
implementing all the state machines with all their transitions, exceptions
and timers.  I'm sure it's going to be &lt;i&gt;"fun"&lt;/i&gt;.  The good part of it is:
Most of the SGSN will be re-used once we finally get around adding support for
3G/UMTS/WCDMA cells.
&lt;/p&gt;</description><category>gsm</category><guid>https://laforge.gnumonks.org/blog/20100504-gprs-update/</guid><pubDate>Mon, 03 May 2010 19:00:00 GMT</pubDate></item><item><title>OpenGGSN - An open source GGSN implementation</title><link>https://laforge.gnumonks.org/blog/20100504-openggsn/</link><dc:creator>Harald Welte</dc:creator><description>&lt;p&gt;
As a friend pointed out to me at exactly the right point in
time: &lt;a href="https://sourceforge.net/projects/ggsn/"&gt;there already is an Free
implementation of a GGSN&lt;/a&gt;.  In case you don't know what a GGSN is:  It is
one of the two core components of a GPRS network.
So, in order to extend a OpenBSC GSM network with GPRS support, there
are two components required: The SGSN (on which I'm working currently, project
name OsmoSGSN), and the GGSN.  Due to the good news about OpenGGSN, I'm quite
confident that I will not need to implement the latter part.
&lt;/p&gt;
&lt;p&gt;
OpenGGSN is not only a Free Software implementation of the GGSN, but it
is also licensed under GPLv2, making it compatible with the OpenBSC codebase
(which is &lt;i&gt;GPLv2 or later&lt;/i&gt;).  This means I will be able to link the
OpenGGSN-provided libgtp library (implementing both sides of the GTP protocol
between SGSN and GGSN) from OsmoSGSN, further reducing the amount of work
required to get this working.
&lt;/p&gt;
&lt;p&gt;
However, despite seeming like a fairly advanced/complete implementation of the
GGSN specification: OpenGGSN seems like a project that was abandoned many years
ago.  The latest CVS commit is from 2005, and all of the bug fixes that people
have submitted to the bug tracker have not been merged.  The homepage is defunct,
and the openggsn.org domain name seems to have been expired (and grabbed).
&lt;/p&gt;
&lt;p&gt;
I've tried to contact the author by e-mail about his intentions for the project,
let's see if there is any response.  Meanwhile, I have generated a git repository
from the OpenGGSN CVS repository at sourceforge and applied all the pending fixes
to a local branch.  See &lt;a href="http://lists.gnumonks.org/pipermail/openbsc/2010-May/001616.html"&gt;my related mailing list post&lt;/a&gt; for more information.
&lt;/p&gt;</description><category>gsm</category><guid>https://laforge.gnumonks.org/blog/20100504-openggsn/</guid><pubDate>Mon, 03 May 2010 19:00:00 GMT</pubDate></item><item><title>Working on GPRS support for OpenBSC again</title><link>https://laforge.gnumonks.org/blog/20100427-openbsc-gprs/</link><dc:creator>Harald Welte</dc:creator><description>&lt;p&gt;
This has been on my TODO list for at least the last six months or so: Growing
the experimental GPRS branch of OpenBSC into something more useful.
&lt;/p&gt;
&lt;p&gt;
Right now, you can use OpenBSC with a GPRS-capable BTS - but only if you have
an existing SGSN to serve the Gb interface of the BTS.  This somehow defeats
the point.  We want to offer a 'GSM network in a box' solution, where no other
non-free Software is required to run a fully functional small network.
&lt;/p&gt;
&lt;p&gt;
So right now I'm cleaning up the 08.16 (Network Services) Implementation,
and will move my way up through the existing 08.18 (BSSGP) and LLC code that
I wrote some time ago.
&lt;/p&gt;
&lt;p&gt;
With some luck, in a couple of weeks we should be able to run a self-sufficient
combined GSM + GPRS (+ EDGE) network out of OpenBSC.
&lt;/p&gt;</description><category>gsm</category><guid>https://laforge.gnumonks.org/blog/20100427-openbsc-gprs/</guid><pubDate>Mon, 26 Apr 2010 19:00:00 GMT</pubDate></item><item><title>Paper: Anatomy of contemporary GSM cellphones</title><link>https://laforge.gnumonks.org/blog/20100414-anatomy_of_gsm_cellphone/</link><dc:creator>Harald Welte</dc:creator><description>&lt;p&gt;
During the last days, I was working on an introductory paper on how a
GSM cellphone actually works.  It is titled &lt;a href="http://laforge.gnumonks.org/papers/gsm_phone-anatomy-latest.pdf"&gt;Anatomy
of contemporary GSM cellphone hardware&lt;/a&gt; and should provide a good
technical text for anyone who generally is into technology and
understands a bit about both software, computer architecture as well as
radio, but who still feels like he has no clue what is actually
happening inside the phone, particularly the hardware side.
&lt;/p&gt;
&lt;p&gt;
The text does not cover the GSM protocols itself, as there is much more
information available on this already.
&lt;/p&gt;
&lt;p&gt;
Feel free to let me know what you think, I'm always happy to extend or
clarify it based on your feedback.  I hope some people find the text
useful.
&lt;/p&gt;</description><category>gsm</category><guid>https://laforge.gnumonks.org/blog/20100414-anatomy_of_gsm_cellphone/</guid><pubDate>Tue, 13 Apr 2010 19:00:00 GMT</pubDate></item><item><title>OpenBTS workshop in June (Pfarrkirchen/Germany)</title><link>https://laforge.gnumonks.org/blog/20100329-openbts_workshop_june_germany/</link><dc:creator>Harald Welte</dc:creator><description>&lt;p&gt;
If you've always been interested in Open Source / Free Software GSM
using &lt;a href="http://openbts.sourceforge.net"&gt;OpenBTS&lt;/a&gt;, you might be
interested in the upcoming &lt;a href="http://kestrelsignalprocessing.mybigcommerce.com/products/OpenBTS-Workshop-Registration%2C-June-23%252d27%2C-Pfarrkirchen%2C-Germany.html"&gt;three-day
OpenBTS workshop in Pfarrkirchen/Germany&lt;/a&gt;.
&lt;/p&gt;
&lt;p&gt;
The workshop is held by OpenBTS project leader David Burgess, and will
cover subjects ranging from OpenBTS installation, configuration and
deployment down to actually extending OpenBTS with some custom code.
&lt;/p&gt;
&lt;p&gt;
p.s.: Please don't misunderstand, the workshop really is about OpenBTS
not OpenBSC - though there might be OpenBSC folks hanging around ;)
&lt;/p&gt;</description><category>gsm</category><guid>https://laforge.gnumonks.org/blog/20100329-openbts_workshop_june_germany/</guid><pubDate>Sun, 28 Mar 2010 19:00:00 GMT</pubDate></item><item><title>OsmocomBB now performing location updating procedure against GSM cell</title><link>https://laforge.gnumonks.org/blog/20100305-location_updating/</link><dc:creator>Harald Welte</dc:creator><description>&lt;p&gt;
I haven't had much time for blogging recently, too much exciting work
going on at &lt;a href="http://bb.osmocom.org/"&gt;OsmocomBB&lt;/a&gt;:
&lt;/p&gt;&lt;ul&gt;
&lt;li&gt;we now have simplistic support for Uplink (transmit) on SDCCH/4&lt;/li&gt;
&lt;li&gt;we have a minimal Layer2 (LAPDm) implementation&lt;/li&gt;
&lt;li&gt;we can send LOCATION UPDATING REQUEST to the network, and receive
    the respective response&lt;/li&gt;
&lt;li&gt;there's wireshark integration, i.e. all packets on the L1-L2 interface
    can be sent into wireshark for protocol analysis&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;
There are still many limitations, but this is a major milestone in the project:
We have working bi-directional communication from the phone to the network!
&lt;/p&gt;
&lt;p&gt;
The limitations include:
&lt;/p&gt;&lt;ul&gt;
&lt;li&gt;The cell has to use a combined CCCH (SDCCH/4 on timeslot 0)&lt;/li&gt;
&lt;li&gt;The cell has to use no encryption/authentication&lt;/li&gt;
&lt;li&gt;The layer2 is not finished, especially re-transmissions will not work yet&lt;/li&gt;
&lt;li&gt;There's no power control loop yet&lt;/li&gt;
&lt;li&gt;There's no timing advance correction&lt;/li&gt;
&lt;/ul&gt;
However, most of those are more or less simple &lt;i&gt;we know what needs to be
done, its just a matter of getting it done&lt;/i&gt; kind of tasks.  There are no big
unknowns involved, and particularly no further reverse-engineering of the hardware
is required.

&lt;p&gt;
Also, the existence of a stable bi-directional communications channel between
the network and the phone means that anyone interested in working on the higher
layers can now actually do so. Completing and testing layer2 as well as
RR/MM/CC on layer3 is a major task in itself, and it definitely requires
the lower layers to be there.
&lt;/p&gt;
&lt;p&gt;
The other good part is that development of layer2 and layer3 can happen
entirely on the host PC, where debugging is much easier and there's no need for
cross-compilation and we can use all the usual debugging options (gdb,
valgrind, ...) 
&lt;/p&gt;
&lt;p&gt;
I'm now almost heading off for holidays (starting March 10), so don't expect
any major progress from me anytime soon.  I hope other interested developers
will be able to take it from here and fill in some missing gaps until I'll get
back.
&lt;/p&gt;</description><category>gsm</category><category>osmocom-bb</category><guid>https://laforge.gnumonks.org/blog/20100305-location_updating/</guid><pubDate>Thu, 04 Mar 2010 19:00:00 GMT</pubDate></item><item><title>Looking for documentation on sunplus SPMA100B</title><link>https://laforge.gnumonks.org/blog/20100301-motorola_c155_spma100/</link><dc:creator>Harald Welte</dc:creator><description>&lt;p&gt;
In the &lt;a href="http://bb.osmocom.org/trac/wiki/MotorolaC155"&gt;Motorola/Compal C155 phone&lt;/a&gt;
supported by &lt;a href="http://bb.osmocom.org/"&gt;OsmocomBB&lt;/a&gt;, we have found a ringtone
melody chip called SPMA100B from sunplus.
&lt;/p&gt;
&lt;p&gt;
As strange as it might seem, this is the only part used in the phone for which we have
not been able to find any kind of programming information.  So if you know anything
about how to program this part from software (register map, programming manual, ...)
please let me know!
&lt;/p&gt;
&lt;p&gt;
And no, we don't need electrical/mechanical data sheets, thanks :)
&lt;/p&gt;</description><category>gsm</category><guid>https://laforge.gnumonks.org/blog/20100301-motorola_c155_spma100/</guid><pubDate>Sun, 28 Feb 2010 19:00:00 GMT</pubDate></item><item><title>Restructuring OpenBSC and OsmocomBB code</title><link>https://laforge.gnumonks.org/blog/20100220-code_restructuring/</link><dc:creator>Harald Welte</dc:creator><description>&lt;p&gt;
I've spent the better part of the day with &lt;a href="http://lists.osmocom.org/pipermail/baseband-devel/2010-February/000017.html" boring tasks like restructuring code&gt;, renaming files/functions/include paths, Makefiles, autotools and the
like.
&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;
The result of this is a new sub-project called &lt;a href="http://bb.osmocom.org/trac/wiki/libosmocore"&gt;libosmocore&lt;/a&gt; that
gathers all the shared code between the network-side GSM implementation
OpenBSC and the phone-side implementation OsmocomBB.  The library is
portable enough that it can run on a proper OS (like GNU/Linux) but
also be cross-compiled to work on the actual phone without any OS.
&lt;/p&gt;
&lt;p&gt;
On the other hand we now have a master Makefile in OsmocomBB to build
libosmocore for host PC and target (phone), as well as the osmocon
and layer2 host programs and the phone firmware itself.
&lt;/p&gt;
&lt;p&gt;
Let's hope I can now return to writing actual code...
&lt;/p&gt;</description><category>gsm</category><category>osmocom-bb</category><guid>https://laforge.gnumonks.org/blog/20100220-code_restructuring/</guid><pubDate>Fri, 19 Feb 2010 19:00:00 GMT</pubDate></item><item><title>Announcing OsmocomBB: Free Software / Open Source GSM Baseband firmware</title><link>https://laforge.gnumonks.org/blog/20100219-announcing_osmocom_bb/</link><dc:creator>Harald Welte</dc:creator><description>&lt;p&gt;
Last, but not least, I am proud to &lt;a href="http://lists.osmocom.org/pipermail/baseband-devel/2010-February/000000.html"&gt;announce&lt;/a&gt; the &lt;a href="http://bb.osmocom.org/"&gt;OsmocomBB&lt;/a&gt; project publicly.  During the last
7 weeks, a small group of skilled developers has been working on this
&lt;/p&gt;
&lt;p&gt;
It has now reached a point where we can
&lt;/p&gt;&lt;ul&gt;
&lt;li&gt;scan the spectrum for the strongest signal GSM channels&lt;/li&gt;
&lt;li&gt;lock onto them and performing AFC (automatic frequency control)&lt;/li&gt;
&lt;li&gt;decode the SCH burst to obtain BSIC and GSM frame time&lt;/li&gt;
&lt;li&gt;decode the BCCH of the cell, pass it over to the host PC and feed it into
    wireshark&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;
Since this in itself is a valuable and useful milestone of the project,
it was the ideal opportunity to take this project public.
&lt;/p&gt;
&lt;p&gt;
There's still a lot of work to be done in many areas. Most of them are not
even related to the GSM air interface.  So if you're familiar with C
development on an ARM7TDMI based microcontroller, know your way around
I2C and SPI, are familiar with the GNU toolchain for ARM and want to
help us out: Please join the &lt;a href="http://lists.osmocom.org/mailman/listinfo"&gt;baseband-devel mailing
list&lt;/a&gt; right away!
&lt;/p&gt;</description><category>gsm</category><guid>https://laforge.gnumonks.org/blog/20100219-announcing_osmocom_bb/</guid><pubDate>Thu, 18 Feb 2010 19:00:00 GMT</pubDate></item><item><title>In six weeks from bare hardware to receiving BCCHs</title><link>https://laforge.gnumonks.org/blog/20100213-six_weeks_to_bcch/</link><dc:creator>Harald Welte</dc:creator><description>&lt;p&gt;
After six weeks of full-time hacking, with the help of a few friends, we have
made it to receiving actual BCCH data from a GSM cell.
&lt;/p&gt;
&lt;p&gt;
So what does this mean?  As I have indicated publicly at the 26C3 conference:
Now, that we have managed to create a working GSM network-side implementation
(OpenBSC) during the last year, we will proceed to do the same with the phone side.
&lt;/p&gt;
&lt;p&gt;
Initially we spent quite a bit of thinking on building our own custom hardware.
But while planning for the first prototype, we realized that it would simply
distract us too much from what we actually wanted to do.  We don't want to take
care of component sourcing, prototype generations, quality assurance in
production, production testing, etc. -- All we want is to write a Free Software
GSM protocol implementation for a phone.
&lt;/p&gt;
&lt;p&gt;
Unfortunately (as usually in the industry), the silicon and device makers do
not publish sufficient documentation about their devices to enable third-party
developers to go ahead and write their own software:  The never ending 
problem of Free Software in many areas beyond more-or-less standardized
hardware like in the PC industry.
&lt;/p&gt;
&lt;p&gt;
So, if you want to write Free Software for such a device, you have two options:
&lt;/p&gt;&lt;ul&gt;
&lt;li&gt;&lt;b&gt;Reverse engineering&lt;/b&gt; the existing hardware and writing your code based on
that information&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Building your own hardware&lt;/b&gt; and then writing the software you wanted
to write.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;
I've been involved in both approaches multiple times while looking only at the
application processor (the PDA side) of mobile phones: OpenEZX and gnufiish are
two more or less abandoned projects aimed at reverse engineering.  Openmoko was
the project that had to build its own hardware as a dependency to be fulfilled
before writing software.
&lt;/p&gt;
&lt;p&gt;
If you're not a company and don't want to sell anything, the reverse
engineering approach looks more promising.  You can piggy-back on existing
hardware, don't need to take care of sourcing/production/certification/shipping
and other tedious bits.
&lt;/p&gt;
&lt;p&gt;
If you are a company and want to generate revenue, then of course you want
to build the hardware and ship it, as it is what you derive your profits
from.
&lt;/p&gt;
&lt;p&gt;
So, just to be clear on this:  Neither OpenEZX, nor gnufiish nor Openmoko were
ever about writing Free Software for the GSM baseband processor, i.e. the beast
that exchanges messages with the actual GSM operator network.  But this is what
we're working on right now.
&lt;/p&gt;
&lt;p&gt;
It's about time, don't you agree? after 19 years of only proprietary software
on the baseband chips in billions of phones, it is more than time for bringing
the shining light of Freedom into this area of computing.
&lt;/p&gt;
&lt;p&gt;
To me personally, it is the holy grail of Free Software: Driving it beyond the
PC, beyond operating systems and application programs.  Driving it into the
billions of embedded devices where everyone is stuck with proprietary software
without an alternative.  Everybody takes it for granted to run megabytes of
proprietary object code, without any memory protection, attached to an
insecure public network (GSM).  Who would do that with his PC on the Internet,
without a packet filter, application level gateways and a constant flow
of security updates of the software? Yet billions of people do that with
their phones all the time.
&lt;/p&gt;
&lt;p&gt;
I hope with our work there will be a time where the people who paid for their
phones will be able to actually own and control what it does.  If I have paid
for it, I determine what software it runs and when it send which message or
doesn't.
&lt;/p&gt;
&lt;p&gt;
Oh, getting back to what our work: It will be published as soon as it is
sufficiently stable and fit for public consumption.  You won't be able
to make phone calls yet, but we'll get there at some later point this
year.
&lt;/p&gt;</description><category>gsm</category><guid>https://laforge.gnumonks.org/blog/20100213-six_weeks_to_bcch/</guid><pubDate>Fri, 12 Feb 2010 19:00:00 GMT</pubDate></item><item><title>Symbian is Open Soruce - Really?</title><link>https://laforge.gnumonks.org/blog/20100205-symbian_open_source/</link><dc:creator>Harald Welte</dc:creator><description>&lt;p&gt;
In recent news, the Symbian Foundation announced that &lt;i&gt;"All 108 packages
containing the source code of the Symbian platform can now be downloaded from
Symbian's developer web site"&lt;/i&gt;.  This is great news!
&lt;/p&gt;&lt;p&gt;
&lt;/p&gt;&lt;p&gt;
This morning I tried to look at the parts most interesting to me: &lt;a href="http://developer.symbian.org/main/source/packages/package/index.php?pk=170"&gt;phonesrv&lt;/a&gt;
(implementing call engine, cell broadcast and SIM toolkit APIs) and &lt;a href="http://developer.symbian.org/main/source/packages/package/index.php?pk=168"&gt;poc&lt;/a&gt;
(implementing push-to-talk).  Their pages don't have the usual "source code"
tab at the bottom right which links to mercurial and tarball download pages!
&lt;/p&gt;
&lt;p&gt;
Either I'm too stupid, or I am unable to find any source code for those two
components.  I'm quite sure something essential like the API's for making phone
calls are considered part of the Symbian platform.  So how does that match
with the statement that all packages containing the Symbian platform can now
be downloaded?
&lt;/p&gt;</description><category>gsm</category><guid>https://laforge.gnumonks.org/blog/20100205-symbian_open_source/</guid><pubDate>Thu, 04 Feb 2010 19:00:00 GMT</pubDate></item><item><title>Sorry for new blog updates</title><link>https://laforge.gnumonks.org/blog/20100127-busy_with_gsm/</link><dc:creator>Harald Welte</dc:creator><description>&lt;p&gt;
I've been busy day and night, hacking away on my latest pet project in the GSM
field.  In fact, it's been a long time since I've been able to dedicate so
much time and energy into one particular project, without many distractions at
all.  The project is now finally looking quite promising and making nice
progress throughout the last three weeks.
&lt;/p&gt;
&lt;p&gt;
If progress continues, I hope in another week I'll be able to reveal what this
is all about.  I haven't felt this level of excitement since the early days of
Openmoko :)
&lt;/p&gt;</description><category>gsm</category><guid>https://laforge.gnumonks.org/blog/20100127-busy_with_gsm/</guid><pubDate>Tue, 26 Jan 2010 19:00:00 GMT</pubDate></item><item><title>Illusions about MagicJack at CES</title><link>https://laforge.gnumonks.org/blog/20100108-magicjack-femtocell/</link><dc:creator>Harald Welte</dc:creator><description>&lt;p&gt;
Many people have pointed out the &lt;a href="http://www.pcworld.com/article/186308/magicjack_harnesses_femtocell_for_voip.html"&gt;MagicJack Femtocell&lt;/a&gt; product that has been announced at CES.  I cannot really understand the big hype and news about it. Why? read further...
&lt;/p&gt;
&lt;p&gt;
On the technical side, there is hardly anything new.  Using projects like
OpenBTS or OpenBSC, you can run your own GSM network and connect it to VoIP.
Sure, the retail price of the MagicJack is much lower, but that's the economics
of scale.  As soon as OpenBSC support for one of the recent femtocells is done,
we also have a much lower cost solution to the same problem.
&lt;/p&gt;
&lt;p&gt;
On the legal and business side, I can see many problems for MagicJack:
&lt;/p&gt;&lt;ul&gt;
&lt;li&gt;To operate equipment in the GSM or 3G spectrum, you need a license.  Since
a nationwide GSM operator license is very expensive in about any country of the
world, it is economically not an option.  Selling the MagicJack devices without
a license and leaving the spectrum license to the user will not work, or at least
not long, since regulatory authorities and commercial operators are not going to
let anyone deploy systems that interfere with their networks.
&lt;/li&gt;
&lt;li&gt;
If you keep the Operator's SIM in the phone, and use that SIM on your own
network you might at least violate the terms of services of the operator.  The
SIM card normally belongs to the operator, and it is part of the users business
relationship with that operator.  As such, you can not really use it with other
networks.  Sure, if you do this at home with your OpenBTS/OpenBSC installation,
nobody will care.  But if somebody is doing this commercially, and in a way
that affects the sale of talk time of the regular operators, again it will not
take long until the commercial operator will sue you.
&lt;/li&gt;
&lt;li&gt;
Security.  If you run your phone with a "foreign" SIM, you do not know the Ki
on the SIM and thus cannot do cryptographic authentication and/or encryption.
This is a big security issue.   It is once again not an issue in your personal
testbed setup, but it is going to be one if you do this at large scale as a
mass market product.
&lt;/li&gt;
&lt;p&gt;
So, as you can see:  It's neither technically something exceptionally new,
nor is it something that has a very promising business or legal outlook.  The
only way how a product like this would work is if it is authorized by the
respective operator.  But why would the operator authorize something that will
take talk time away from his network and thus his revenue stream?
&lt;/p&gt;&lt;/ul&gt;</description><category>gsm</category><guid>https://laforge.gnumonks.org/blog/20100108-magicjack-femtocell/</guid><pubDate>Thu, 07 Jan 2010 19:00:00 GMT</pubDate></item><item><title>Planning for a GSM development board</title><link>https://laforge.gnumonks.org/blog/20100107-gsm_devel_board-planning/</link><dc:creator>Harald Welte</dc:creator><description>&lt;p&gt;
I've finally found enough spare time to work on detailed plans for a GSM
development board.  The idea here is to have a 100% open hardware design
with 100% free software that provides an inexpensive platform for GSM
related R&amp;amp;D.
&lt;/p&gt;
&lt;p&gt;
Initially the focus is on having a board that can behave like a GSM cellphone,
next steps would be to have a multi-channel frequency-hopping receiver, and
finally the option of using it as a BTS.
&lt;/p&gt;
&lt;p&gt;
The idea is fairly simple: Take a commercial off-the-shelf analog baseband and
RF circuit for GSM and attach it to a general purpose DSP, add some glue logic
and go ahead.  But the devil is in the details:
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;You want something where you can still find the parts on the market, but
which still has sufficient leaked documentation that you can write an open
source driver for it.&lt;/li&gt;
&lt;li&gt;The requirements for a MS and a BTS are quite different.  A phone never
needs to continuously receive and transmit in all timeslots, e.g.&lt;/li&gt;
&lt;li&gt;The requirement for a multi-channel frequency-hopping receiver is mainly a
high number of receiver circuits, so the solution needs to scale to a larger
number of receivers.&lt;/li&gt;
&lt;li&gt;The analog baseband circuits often have quite obscure control interfaces
which need to be driven.  Custom peripherals in programmable logic (CPLD/FPGA)
are required.&lt;/li&gt;
&lt;li&gt;The TDMA nature has strict timing requirements.  Normal processors and
software-based mechanisms are not sufficient to trigger the required events
and their sequencing at a high enough precision.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
Anyway, there is sort of a first plan now, and the next weeks and months will
be spent with refining the plans and building a first proof-of-concept
prototype.  Once that has proven to work, we want to go ahead with finishing
the design for a real board, to be manufactured in sufficient quantities for
interested parties.
&lt;/p&gt;
&lt;p&gt;
Unless you have worked in GSM phone or base station hardware design or have a
similar level of EE and DSP skills, please refrain from contacting me right
now about how to join the project.  We want to focus on getting things going
first, then make a public release at a point where there is something that
works sufficiently well that we can support a larger community of developers.
&lt;/p&gt;</description><category>gsm</category><guid>https://laforge.gnumonks.org/blog/20100107-gsm_devel_board-planning/</guid><pubDate>Wed, 06 Jan 2010 19:00:00 GMT</pubDate></item><item><title>2010-01-02 / 2pm CET: Radio Interview at Deutschlandradio</title><link>https://laforge.gnumonks.org/blog/20100102-live_at_breitband/</link><dc:creator>Harald Welte</dc:creator><description>&lt;p&gt;
The German radio station &lt;a href="http://www.dradio.de/dkultur"&gt;Deutschlandradio Kultur&lt;/a&gt; has invited
Constanze Kurz (46halbe) and myself for interviews during today's &lt;a href="http://www.breitband-online.de/index.php?id=home&amp;amp;no_cache=1&amp;amp;thema_id=896&amp;amp;run_mode=thema"&gt;Breitband
radio show&lt;/a&gt;.  We'll be talking about the 26C3, the Chaos Computer Club and -
of course - GSM [in]security.
&lt;/p&gt;</description><category>gsm</category><guid>https://laforge.gnumonks.org/blog/20100102-live_at_breitband/</guid><pubDate>Fri, 01 Jan 2010 19:00:00 GMT</pubDate></item><item><title>OpenBSC now has handover support</title><link>https://laforge.gnumonks.org/blog/20091221-openbsc_handover/</link><dc:creator>Harald Welte</dc:creator><description>&lt;p&gt;
So far, OpenBSC already implemented mobility management, i.e. keeping track of
which location area a mobile phone is locate in.  However, this only works during
&lt;i&gt;idle mode&lt;/i&gt;, i.e. while there is no actual phone call in progress.
&lt;/p&gt;
&lt;p&gt;
Throughout the last week, I've been working on getting real handover support
into OpenBSC.  This is now actually working very well! You can move from one cell
into another cell while your phone call continues just like it is supposed to do.
&lt;/p&gt;
&lt;p&gt;
The signalling part is actually not all that hard to implement.  However,
it has some dependencies on things like measurement reports, which in turn
require us to send proper neighbor lists, which in turn requires proper
generation of system information messages, etc.
&lt;/p&gt;
&lt;p&gt;
The actual order of events in a successful handover case is as follows:
&lt;/p&gt;&lt;ul&gt;
&lt;li&gt;OpenBSC send the neighbor cell information in the BCCH and SACCH&lt;/li&gt;
&lt;li&gt;OpenBSC regularly receives measurement reports from the phone, where it tells us how well neighbor
cells are being received.  OpenBSC then averages those measurements and decides&lt;/li&gt;
if or not to make a hand-over.  If it decides so, it
&lt;li&gt;allocates a channel on the new BTS&lt;/li&gt;
&lt;li&gt;waits until the BTS acknowledges this&lt;/li&gt;
&lt;li&gt;sends a HANDOVER COMMAND to the phone through the old BTS&lt;/li&gt;
&lt;li&gt;waits for HANDOVER ACCESS bursts and a HANDOVER COMPLETE on the new BTS&lt;/li&gt;
&lt;li&gt;closes the old channel on the old BTS&lt;/li&gt;
&lt;li&gt;takes care of re-routing the voice channels&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;
As indicated, the signalling part was relatively easy, and once the measurement
processing and neighbor lists were in place, this worked really quick.  What
turned out to be a much bigger PITA was the handling of the actual voice
streams.
&lt;/p&gt;
&lt;p&gt;
Let's assume you have a call from A to B, where B is changing cells and now becomes B*.
In this case, after switching cells, the speech frames from A need to be re-routed to B*
instead of B.  That's simple and works very easy.  In the other direction, switching
off B is easy.  However, a completely new channel B* suddenly sends speech
frames to A.  In case of classic TRAU frames on E1 that is simple as they don't have
any context.
&lt;/p&gt;
&lt;p&gt;
In the case of ip.access nanoBTS, the speech frames are transported using RTP.
Changing the source of your stream will change its CSRC (synchronization source
identifier), timestamps and sequence numbers.  The receiver in BTS A is not
happy at all about this.  So with handover, it is no longer possible to send RTP
streams directly between BTS's, but OpenBSC's RTP proxy needs to process the
RTP packets and hide the details of the changed source.
&lt;/p&gt;
&lt;p&gt;
This is further complicated by the fact that during handover you are losing
speech frames, somewhere between 10 and 40 in the cases that I've seen.  This means
that when sending the new RTP frames from B*, the sequence number and timestamp
needs to account for those lost frames, i.e. incremented by the respective loss
count.  Otherwise the RTP receiver in BTS A will think it is only receiving old
frames and will discard all of them.
&lt;/p&gt;
&lt;p&gt;
Luckily, all of this seems to have been sorted out now and I'm confident we will
have actual full handover at the GSM network at &lt;a href="http://events.ccc.de/congress/2009/"&gt;26th annual Chaos Communication
Congress&lt;/a&gt; in a few days from now.  We'll be running 3 BTS's with a total number
of 5 TRX's inside the conference building.
&lt;/p&gt;</description><category>gsm</category><guid>https://laforge.gnumonks.org/blog/20091221-openbsc_handover/</guid><pubDate>Sun, 20 Dec 2009 19:00:00 GMT</pubDate></item><item><title>German National Education and Research Network reports on OpenBTS and OpenBSC</title><link>https://laforge.gnumonks.org/blog/20091211-dfn_mentions_openbts_and_openbsc/</link><dc:creator>Harald Welte</dc:creator><description>&lt;p&gt;
&lt;a href="http://www.dfn.de/fileadmin/5Presse/DFNMitteilungen/heft77.pdf"&gt;Issue
77 of the regular publication "DFN Mitteilungen"&lt;/a&gt; of the German National
Research Network (&lt;a href="http://www.dfn.de/"&gt;DFN&lt;/a&gt;) reports on Open Source
software for GSM networks, specifically OpenBTS and OpenBSC.
&lt;/p&gt;
&lt;p&gt;
I'm happy to see that at least some parts in academia are now discovering this
software and use it for research purpose.  That's great news!
&lt;/p&gt;</description><category>gsm</category><guid>https://laforge.gnumonks.org/blog/20091211-dfn_mentions_openbts_and_openbsc/</guid><pubDate>Thu, 10 Dec 2009 19:00:00 GMT</pubDate></item></channel></rss>