Overview of an Operational WiFiBoard

This video was made to to help @indigi_newton with troubleshooting his wifi card build. Even though the video is from the perspective of helping a single person troubleshoot a card, it is still a nice overview with a demonstration of it working in a Newton.


3D Printed Port Cover

Since the MP2x00 did not come with an internal modem (and one was never sold), each MessagePad came installed with a little plastic cover that fills the space where the RJ-11 jack would be.

This is the same cover where apple would place a “2100” sticker indicating that a MP2000 was upgraded to a 2100.
Due to an oversight, the WiFi card extended into the area where this plastic cover would sit.  (I’m not sure this could have been avoided, even if I had planned ahead)

WiFi Board v1.1

I got the revised boards and finally found some time to assemble a board.  This board adds a logic inverter to fix the flow control, and removes some extra traces for an alternate reset circuit.

To assemble the board, I had a stencil made and used it to apply solder paste.  Then I placed the components using a very simple “pick and place” rig:

Thermal Performance and Loose Ends

Thermal#

Early designs used a linear regulator to supply 3.3v from the Newton’s battery voltage.  It became pretty obvious that a linear regulator would get too hot, and so I changed it for a switching regulator.

I wanted to do a real world test.  The WiReach specs say that it can draw around 350mA peak during transmit.  I modified the Thumb sample code into a program that would output a continuous stream of ~25kB packets.  I taped a thermocouple to the regulator and ran the test for an hour or so.

An ugly fix

It is ugly, but it works:

I soldered leads to a 1-gate logic inverter.  This wasn’t easy because the part is so small.  Then connect it to 3.3v, GND, and the RTS line coming out of the WiReach.  Then I cut the RTS trace on the bottom of the board.  I connected the output of the inverter to the input of the line driver IC.

WiFi Board For Newton: A Success?

I’m going to call this one a success.

There is an error in the hardware flow control circuit, but that’s due to an error in the N2 Platform documentation.  I’ll take responsibility because I should have more thoroughly prototyped (which I thought I had, but oh well)  I’m still planning on hacking an inverter onto the board to fix the issue.

Even so. I’m chalking this one up as a success.

Subsystem Power Configuration for Fun and Profit

Up till now, I have been following Ekhart’s template for enabling the serial signals: directly calling the ROM functions to toggle SerPortSel.  The only issue with this approach is that the OS also toggles these signals when a port is opened.  This means you have to configure the signals after the serial port is opened.

Wouldn’t it be great if you could tell NewtonOS that you wanted SerPortSel to be “set to internal” when you open Serial0 or Serial3?

I dislike hardware flow control

I can’t ever seem to get the flow control lines right.   The current prototype only works with flow control disabled.

The N2 Platform docs says that the Serial3 signals are”ModemNotCTS” and “ModemNotRTS”.  The WiReach docs also use inverted signals “nCTS” and “nRTS”.  So I connected them up to each other thinking that they’re all using the same signaling logic.

But I was wrong, and I think the n2 docs are too.  It seems that the Newton’s CTS line is not inverted.  This can be verified with a  loopback.  When RX-TX are connected and RTS-CTS are connected, you will not get an echo when hardware flow control is enabled.

Serial Channel 2

The Newton’s internal serial slot exposes 3 serial channels.   Serial 1 and Serial 3 are the most interesting, as they have a full set of signals and are selectable by the selection signals.

I was searching for a way to control SerPortSel3 within software.  When you open the serial port on the Newton, it sets SerPortSel3 LOW.  I had hoped there was a parameter you could pass to the endpoint that would keep SerPortSel3 high.  (See earlier posts)
I was searching the DDK headers and I found this (HALOptions.h)
#define kHWLocExternalSerial ‘extr’
#define kHWLocBuiltInIR ‘infr’
#define kHWLocBuiltInModem ‘mdem’
#define kHWLocPCMCIASlot1 ‘slt1’
#define kHWLocPCMCIASlot2 ‘slt2’
#define kHWLocPCMCIAAnySlot ‘slot’
#define kHWLocBuiltInExtra ‘tblt’
kHWLocBuiltInExtra seemed promising.  I haven’t seen it mentioned in any of the other docs.  So I whipped up a little package to enable it as a valid modem location:
InstallScript := func(partFrame,removeFrame)
   begin
AddArraySlot(GetGlobals().ModemLocations, {title: “Modem”, id:”mdem”});
AddArraySlot(GetGlobals().ModemLocations, {title: “Extra”, id:”tblt”});
   end;
I had hoped that ‘tblt’ would open Serial3 and set SerPortSel high.  This is not the case.  It turns out that kHWLocBuiltInExtra is actually Serial Channel 2.
The n2 platform documents say that SerialChannel2 is a “low speed channel for printer support”.  I’ve also seen references that Serial2 is for keyboard.  Since Serial2 is not exposed on the external port, I don’t think that it is used for the keyboard.
In all, kHWLocBuiltInExtra is one more piece of the internal serial slot puzzle.