The Newton MessagePad 2000-series devices had a little known internal slot intended for an integrated modem card that was never made by Apple. PCMCIA WiFi cards of this era do not support modern WPA2 encryption. This site outlines a project to build a WiFi board for this never-used internal serial slot that works with modern WiFi networks.

Monday, January 19, 2015

WiReach Module Connection Test

All of this work on the internal serial slot is in support of my WiFi module project.  The goal is to build an internal interface to a ConnectOne WiReach module.  I like this module for a few reasons:

  1. It supports modern wireless networking, such as WPA2.  There isn't any native way for the Newton to connect to a modern WiFi network, and likely there never will be.
  2. It supports a PPP server.  This means that the module can appear to Newton Internet Enabler (NIE) as a PPP dialup server.  In effect, you can "dial up" to a wifi network.
  3. It supports an AT command set for configuration-- so you can send a few commands from PT-100 or using the script utility in NIE to configure the module.  

I've done some testing today and found that it works really well.  A few caveats:
  • The Newton's internal 3.3v regulator is not sufficient to run the module.  This was expected, but it does mean that any design will have to have a 3.3v regulator that runs off of the battery supply lines.  Luckily the internal serial slot does provide access directly to the battery.
  • Hardware flow control seems to work.  I have a history of messing up the pinout, so I'l probably have a solder jumper that you can cut if you want to disable hardware flow control.
  • There's a giant capacitor right where I would want the module to sit.  I think that that there is enough clearance in the area, but I'm starting to be concerned about how this will all fit.
My current thinking is to use the SerPortSel3 line to control the 3.3v regulator shutdown.  Serial3 is just as fast as Serial0 (even though the specs say that Ser3 is slower, this doesn't appear to be the case,  it works fine at 119200)  I wouldn't want the module running all the time, drawing power.  SerPortSel3 would work to turn on and off power to the module.  Since no one ever connects anything to Serial3 externally, I am thinking that I might skip a tri-state bus buffer. 

Sunday, January 18, 2015

Posted to GitHub: Internal Serial Enabler

I have posted the source to "Internal Serial Enabler" - a small newton app that allows you to view and control a few of the signals of the internal serial slot on the MessagePad 2x00:
  • gpSerPortSel - the serial port 0 selection signal.  When high, the internal serial driver is disabled, leaving Serial0 available for the internal slot.
  • PortSelect - the serial port 3.  When high, Serial3 is available for the internal slot.  When low, Serial3 is dedicated for the external interconnect port.
  • General Purpose I/O - Pin 26 can either be an input or output signal.  Using the app, you can select whether you want the app to be an input or an output.  If you select 'output', you can control the signal.
The application polls all three I/O signals and updates the user interface state every 1/2 second.  This will allow you to see when other applications or NewtonOS makes changes.  The gpSerPortSel pin does toggle on and off, enabling/disabling the driver.  This is likely for power saving.

Once again, I can't credit Eckhart Köppen enough for posting the source to Newton-Blunt-Support.  It is how I learned to call arbitrary ROM functions.

This application is intended for developers working on hardware for the internal serial slot.  If you are not such a person, do not install this application.   It should be harmless for a Newton with an empty internal serial slot.  Even still, you are toggling hardware signals with undocumented ROM functions... there is the potential to do hardware damage.

You can find the source and a pre-built package on GitHub here: https://github.com/jake-b/Newton-Internal-Serial-Enabler  I have released it under GPL v2.0 and as always, use it at your own risk!

Friday, January 16, 2015

General Purpose I/O Line

Pin 26 on the internal serial slot is listed as a "General Purpose I/O".  The Internal Serial Slot Developers Guide says that this pin can be configured as either an input or output.

The question is, how is this pin connected?  What GPIO or DIO pin is it connected to?

Well the answer seems to be GPIO #9.  Again a little tweaking of Eckhart's code lets you call the relevant functions and toggle the pin.

Also, you can configure the pin as an input, and things work as expected.  From a hardware design perspective, however, this pin will likely be an output (pulled to ground) until your software configures it as an input... so your hardware should be tolerant of the pin as both an input and an output.

One interesting note, is the N2 platform overview (p 1-29) document lists this GPIO as "Serial NOT CP Enable".   This doesn't seem accurate.   Also DIO #2 is listed as "Available for Configuration to the Slot".  DIO #2 is the output we use to configure SerPortSel3.  Perhaps there is a documentation error here and these signals are reversed.  Maybe these were reversed in the final hardware design and the documents were never updated.  Its a mystery.

I also updated my little app to support the GPIO pin for both input and output.  I'll post the code to Github soon.  Really this is intended for developer use, so it is not recommended that the average user install this application on their Newton.

Wednesday, January 14, 2015

Manually controlling the SerPortSel Pins

Eckhart Köppen, author of the Blunt, the Newton bluetooth stack, has posted code on GitHub for manually controlling the SerPortSel3 signal.  His code manually controls the proper DIO pins using functions in the Newton ROM.

While this method works great for Serial3, I wanted to also control Serial0.  So I started looking at the ROM.  I found two functions in the ROM explicitly for controlling these signals:
0x0026d050 SerialPort0LineDriverConfig__16TVoyagerPlatformFUcT1
0x0026d094 SerialPort3LineDriverConfig__16TVoyagerPlatformFUcT1
I took a look at the assembly for these functions and found them to be pretty simple.  The first parameter seems to be a boolean and the second a bitfield.  I'm not exactly sure what the second parameter does, but it changes the behavior of the function when it finds the 0x20 bit set.

From what I can tell, for the Port3 function, you can leave the second parameter as 0x0 and the first parameter is a bool that controls the signal.  For the Port0 function, the first parameter the logical inverse of the signal you want, and the second parameter should be 0x20.
  • SerialPort0LineDriverConfig(0,0) // results in Port0Sel High 
  • SerialPort0LineDriverConfig(1,0) // results in Port0Sel High 
  • SerialPort0LineDriverConfig(0,0x20) // results Port0Sel High 
  • SerialPort0LineDriverConfig(1,0x20) // results Port0Sel Low 
  • SerialPort3LineDriverConfig(0,0) // results in  Port3Sel Low 
  • SerialPort3LineDriverConfig(1,0) // results in Port3Sel High 
  • SerialPort3LineDriverConfig(0,0x20) // results in Port3Sel Low 
  • SerialPort3LineDriverConfig(1,0x20) // results in Port3Sel Low
Eckhart's code is an awesome blueprint for calling arbitrary memory locations, so it was easy to modify it to call these two functions.  Putting it all together, I whipped up this little Newton application:

Still a little more work to do, but good enough for development and testing.

Incidentally, when called with the correct parameters, the assembly behind SerialPort3LineDriverConfig is virtually identical to Eckhart's code.  The SerialPort0LineDriverConfig is very similar but uses as GPIO instead of DIO.

The SerPortSel Pins

The internal serial port of the Newton MessagePad 2x00 exposes the same ports as the external interconnect.  In order to prevent two devices (one internal, one external) from diving the port at the same time, there are "Serial Port Select Pins" for Serial Channel 0 and Serial Channel 3.

The "Internal Serial Slot Designer's Guide states:

Pin 1 PortSelect:
This is the control signal to select between a  peripheral in the internal Serial SLot and the Newton Interconnect Port.  When the signal is low, the Newton Interconnect POrt may drive the Serail Port 3 Signals.  When the signal is high, the Internal Serial Slot Peripheral may drive the Serial Port 3 Signals.
Pin 8 gpSerPortSel
This signal controls the LTC 1323 line driver for Serial Port 0 that drives the 26 pin Newton Interconnect Port.  When Low, the Newton Interconnect Port can drive Serial Port 0.  When high, the internal Serial Device can drive serial port 0 on the 32 pin connector.
The signals are most critical for Serial0, which has the LTC1323 driver on the main board which will attempt to drive the signal lines unless Pin 8 is high.  For Serial3, there are few (if any) devices that ever connected to the external interconnect port and used Serial3, so the potential for conflict is less.  Even still a "good citizen" will still honor these signals.  A bus driver buffer that can tristate these signals when not selected by these logic signals should probably be used.

One interesting wrinkle is an observation by Matthias Melcher:

Serial Port 0 uses gpSerPortSel on pin 8. When gpSerPortSel switches high, the card must respond with a low on DCD (5).
Basically, Matthias has found a sort of handshake where the Newton checks to see if a modem is present, and if the modem answers properly, it will leave the modem port selected.  I have not yet reproduced this, but I have seen a 5ms pulse when connecting to Serial0 on the Newton.  This pulse may be an interrogation.  I have yet try and respond on DCD to see if the port stays high (internal port selected).

The Internal Interconnect Port

I seem to have an odd, recurring interest in the internal serial port on the MP2x00.  A few years back I tried to make an internal bluetooth module.  It worked, but I never got the RF design correct so it didn't work well.

Now, I'd like to try for an internal WiFi module.  I'm more hopeful that I can get the antenna correct by using more off the shelf components and, worst case, an external antenna.

The internal port was originally designed for an internal modem that was never produced.  Luckily, some of the design documents were leaked and are now available.  The documents give you part of the picture, but there are omissions and errors that make the process a bit more of an exercise in reverse engineering.

I wanted a breakout board that would help prototype and test the behavior of some of the GPIO pins and such.  I came up with this:

The connector is a FTE-116-01-G-DV-ES.  It is easier to find without the -ES option, FTE-116-01-G-DV-P for example is available from Newark electronics.  The ES is just an end shroud, which while a nice thing, is not strictly necessary.  I think the pins are a little longer than the original JAE connector, so it sits a little high.  The case seems to close so I'm hopeful that it'll work for an internal card as well.

I had 20 of these boards made for $15.  You'll have to solder the connector on there yourself, but if you're playing around with this sort of thing, you probably know how to handle surface mount pins of this size.


The Apple Newton is still one of my favorite gadgets.  Even now, almost 20 years later, my Newton MessagePad can do things that a modern iPad cannot.  Every six years or so I pull my Newton out of a drawer and it captures my interest.

I don't blog, but I needed a place to post some content and images.  Blogger seemed as good a place as any-- its free, and likely will be around as long as Google is.

I'm currently in one of my six year periods of fascination.  When I loose interest again and the Newton takes its place back in the drawer, this information posted here hopefully will still be available for archival purposes.