Home of the Linux network driver for Mobitex radio modems

This is just what the title says, a kernel module which implements the MASC protocol that is required to interact with a Mobitex radio modem, and makes such modems look like network adapters to Linux.

The last I touched this code was in 2001. I've received a few bits of correspondence about it since then. For instance, I learned that it had been deployed in road monitoring stations maintained by the Netherlands transportation body.

Mobitex is a packet-switched mobile networking technology with an infrastructure in many countries. It is reliable and well-suited for certain types of applications. For more information about Mobitex, see The Mobitex Operators Association.


Here are all of the versions available for download. The 1.x series are for Linux 2.0: The 2.x series are for Linux 2.2: The 4.x series are for Linux 2.4: Be sure to let me know about your wireless adventures or misadventures.


The work on this driver started around January or February 1998. It was stable by late spring and various bug fixes and enhancements were made over the remainder of the year. Release 1.6 was put together in September 1998, and it added the important throttling code. Release 1.7 was put together in November, but not actually released until March 1999. It addresses a potential protocol deadlock problem caused by throttling data flow when the modem says that it's out of coverage via F G info frames.

In early June 1999, I finally upgraded the driver to work with Linux 2.2. I performed the work and tested using kernel 2.2.9 and released it as version 2.0 of the driver, leaving the 1.x series to support Linux 2.0. The code fork took place after some enhancements were made to 1.7 that were supposed to be released as 1.8, but I decided that moving to kernel 2.2 took precedence.

Then in release 2.1 fixed a number of significant issues related to MASC INIT frames, and added protection against a bug in certain modems which cause them to negatively acknowledge an INIT frame repeatedly. I made the signal strength polling more coordinated with coverage information.

Version 2.2 fixed serious bugs related to reentrancy. A reading of the serial and tty code in the new kernel sobered me up on a number of issues. In developing the 1.x driver series, I had been assuming that the line discipline functions are called in bottom-half context. Some of them are now true interrupts in Linux 2.2. Notably, in Linux 2.0, receive_bytes() is invoked as a task queue callout. In Linux 2.2, receive_bytes() may be called directly in the context of an interrupt service routine. I therefore added appropriate interrupt disabling protection mechanisms in the driver. In fact, I went one step further; I used the new SMP locking mechanisms in 2.2, to guard against access by multiple processors. In 2.2, the driver also acquired an ioctl() function for turning the modem off. This is used by the ttymasc tool when closing the tty. Shutting the modem off prolongs battery life, and also is a good idea in areas where radio transmissions are prohibited. Finally, the tty pushing routine has been redesigned too; the new code is easier to verify to be free of race conditions.

Version 1.8 is the first release of the driver made after the move to Linux 2.2. All of the relevant changes made between 2.0 and 2.2 were merged in to make this release. It is functionally identical to the 2.2 driver except that it's for Linux 2.0.

Version 2.3 fixes an unbounded queue growth bug which happens if the masc line discipline is left running on a tty to which no modem is attached, or the serial communication has otherwise failed. Two new ioctl functions are introduced for turning the modem's transmitter off and on, and the ttymasc tool is revamped to support the functionality. More importantly, the method for representing protocol packets has changed. The driver now uses the Mobitex Operator Association's recommended scheme for encapsulating protocol traffic, which makes it capable of handling any protocol that has an ethernet ID: IP, ARP, RARP, IPX, Appletalk---you name it. This comes at the cost of a two byte MTU decrease. And at the cost of breaking backward compatibility. The 2.3 driver is not compatible with 2.2 or less, nor with 1.8 or lower. Another feature that has been added is that for protocol traffic, the driver emulates an ethernet device by presenting ethernet header formats to the kernel, and thunking between ethernet and Mobitex headers internally. This means that stock tools such as tcpdump work in conjunction with the masc devices.

Version 1.9 updates 1.8 with the changes from 2.3.

Version 1.10 corresponds to 2.4, and 1.11 corresponds to 2.6.

In 2.5 and 1.11, I fixed a serious bug in the locking. In acquiring a critical section, the code was saving CPU flags to a shared data structure, rather than on the stack. I've never seen an actual failure manifestation of the defect; I discovered this problem mentally, while on vacation, far away from the code!

On September 19, 2001, I finally ported the driver to kernel 2.4, resulting in the 4.0 version. In the years since, I've received some correspondence from people who ported the driver to 2.6.

Return to Home page.