View Single Post
Old 08-25-2004, 12:49 PM   #1 (permalink)
Mark Rejhon
Retired BBF Moderator
Mark Rejhon's Avatar
Join Date: Aug 2004
Location: Ottawa, Ontario, Canada
Model: Bold
Carrier: Rogers
Posts: 4,870
Post Thanks: 1
Thanked 0 Times in 0 Posts
Default Modem Software - Appears to be a feature of OS 3.8/4.0

Please Login to Remove!

It works now! Allow me to present the first official:
HOWTO: Use BlackBerry As Modem For Laptop


Old Post Below


Several of us are interested in using a Blackberry as a modem for laptop. Blackberries hardware are intrisinically capable of doing this today, but RIM has not yet provided this feature in the software. Rumors exist that this feature may arrive on the 7290 or future BlackBerries, however, RIM may not make this feature available for older BlackBerries even though it is possible in software.

I will now call this vaporware software program "BlackberryModem" for simplicity's sake. BlackberryModem does not exist [Update: This appears to be feature in newer Blackberry 4.0 software/Blackberry Desktop 4.0], but I am going to argue in favour of why it is indeed possible:

Proof: BlackberryModem is simply a router. Router can be written in pure software.
Writing BlackBerryModem is really little different from the well-established principle of routing from one port to another. It doesn't even need to modulate/demodulate as a real modem would. One method is this could just be a fake modem running a software interpretor that accepts Hayes AT commands and all dial commands would simply display a fake CONNECT message and then turn on the routing feature. In this case, routing from Blackberry's Internet connectivity (coming from BES/MDS) to the USB port via the use of a Blackberry application. Because of the dozens of open-source TCP/IP redirection implementations available for Linux and BSD, and Linksys also provides the source code for routing TCP/IP, and also, two clients for routing TCP/IP from the Treo 600/610 GPRS connection to the serial port. Because so many solutions exists, that is my justification for calling it "easy", because of the huge amount of available source code that demonstrates routing Internet from one port to another port (with and without NAT, etc) It also confirms that this can be done in 100% software. There just needs to be a way to get it out of the USB port (Mind you, application control of the USB port will require BlackberryModem to be signed by RIM. That may, indeed, of course, be a barrier that you rightfully argue. But the point stands, is that once the permission for that hook is accomplished, it is indeed definitely possible. A tunnel layer may be required if the link is non-TCP/IP, but it is possible to tunnel IP over almost any communications link, even morse code or carrier pigeon! (Google RFC1149 for that silliness, and shockingly, a successful test (Slashdot). Funny!)

Proof: Blackberry hardware already has the minimum hardware capabilities to allow software routing.
BlackberryModem can pretty much be squeezed into the simple routing principle:
(A) There must be a way to communicate between the Blackberry and the Internet (even non TCP/IP)
(B) There must be a way to communicate between the Blackberry and the laptop (even non TCP/IP)
The answer to both of the above is yes, and therefore routing is possible in an appropriate software program. Elementary routing physics, elementary. Thereby, I have proven without a doubt that it is possible in software. The hard part is getting RIM to get an app signed to be able to access the USB port. Or getting RIM to write this software program. Now, let me try to simplify this further so that this is beyond a shadow of doubt. Blackberry routinely communicates to the Internet, and Blackberry routinely communicates to Blackberry Desktop on a laptop. That's why I say yes to both (A) and (B) above. As a crude example, it is possible to send a text file as a Note from Microsoft Outlook to the Blackberry over the USB port, then email the text file from your Blackberry. You've essentially routed a text file. Now pretend this text file is an Internet packet instead (even base64 encoded if you can't get a transparent 8-bit link). For the (B) link, a driver for the laptop may be needed to convert the non-TCP/IP to TCP/IP in realtime, and in order to bypass Blackberry Desktop. Instead of doing it in inefficient ways like routing TCP/IP packets inside Outlook Notes text, optimize the software program to do the routing to be as direct as possible, avoiding hacks, layers and other overhead as much as technically possible, and as low-latency as possible. This is possible if the app is authorized access to the USB port, which obviously means RIM needs to authorize the app. For the (A) link, the conversion to TCP/IP is already being done by BES/MDS. The Blackberry only need to route a mere 5000 bytes per second to keep up with GPRS and the Blackberry CPU is more than fast enough to keep up. Just not web browser rendering at the same time on the Blackberry screen itself. This discredits your allegation that it is potentially not possible in software. You should have left your argument to "RIM will not authorize such an app" rather than suggesting that something that's obviously technically possible is not possible (assuming you have technical knowledge of routing). Non-TCP/IP tunnels may be required, but as I've said, you can tunnel TCP/IP through almost anything, even carrier pigeons.

Proof: The Blackberry CPU is fast enough for this task.
Even though the Blackberry CPU is very slow but we only need to route data at a mere 50 kilobits per second or so. Routing uses far less CPU than web browsing. Modem simulation would simply be routing, as I've explained. The Blackberry is able to go at maximum GPRS speed during OTA downloads, while having enough CPU leftover to do other things. Routing, just like downloads/uploads, has no display-rendering requirements, which greatly speeds up things. You're just merely routing. Essentially uploading and downloading packets, in a manner of speaking. A small amount of CPU per packet is necessary for packet inspection and possibly NAT, but in this particular case NAT is not necessary since we'll rely on the gateway to do the NAT for us. This saves CPU, and the CPU utilization may be the same as a mere OTA download. The worse-case scenario would still be faster than Blackberry Browser displaying. Blackberry Browser and Blackberry WAP displays at only 10 to 15 kilobits per second because of the slow CPU, while OTA downloads actually manage to download at 50 kilobits per second or about 5 kilobytes per second.

Proof #2: The Blackberry CPU is fast enough for this task.
Did you know you only need a 386 Linux computer to route between a few ports at full Ethernet Broadband (high speed)? (Linux can be used as a NAT router using ipchains, or formerly ipmasq) But that you need a Pentium II or faster to display web graphics at full Ethernet speed? The Blackberry CPU is faster than many of the earlier versions of 386's. But the good news is that we just need to route at a mere 50 kilobits per second, not full Ethernet speed!

Proof: This has already been done for other cellphones in 100% software.
There are more than one modem simulators already available for the TREO cellphones now. They include WirelessModem and PDANet. This is done in 100% pure software.

Proof: There is a market.
The market is growing, especially among prosumers. The more valid question "is it big enough to be profitable?". Even 100 people might be enough if each of them pay $50 for a program that took only one programmer only 1 week to write and doesn't require much tech support or maintenance. On the other hand, even 1000 people won't be enough if it takes a big company to write the software. Now, that aside, let me argue that the market is getting big enough. Anybody evaluating the feasibility of writing a BlackberryModem can use the following to help their market analysis:
(1) Doing a forum search for the three words "Blackberry Modem Laptop" on RIMROAD, HowardForums, and even smaller forums such as PDAPhoneHome, you will see there is demand for this software.
(2) It is feasible for a third party to attempt this software. RIM has permitted the signed of even free open source applications such as BlackChat ICQ, and RIM has already demonstrated an increased general willingness to sign useful applications that will make more people use BlackBerry. (Note: Signing isn't necessary for plain midlets; just for BlackberryOS hooks, required to access the USB port)
(3) Test out WirelessModem or PDANet on a TREO phone if you have access to one. You'll see they're surprisingly rudimentary-looking and tiny applications that adds a very powerful feature to Treo's. Apparently the market is big enough for Treo's that multiple modem programs exist!
(4) Blackberries will have TCP/IP stacks built into them, thanks to the 4.0 release. This would reduce the barriers required to run BlackberryModem because you would not need BES/MDS. As a result, it is a given that demand for BlackberryModem would go up even further.
(5) If no third party comes forward and RIM later decides to make this component available for existing BlackBerries and is concerned about carrier complaints, they could make it optional only for BES/MDS users, or for carriers who request this feature for advertising (not all of them may want this feature). This would allay complaints by carriers about introducing unauthorized built-in features.

Title and sticky, edited by Guess
Mark Rejhon
Author of XMPP extension XEP-0301: - specification - open source