Jump to content

PowerBook 1xx Wireless Modem


Recommended Posts

The little Vonets VM-300 wireless bridge module I assembled for use with my Duo last week didn't really scratch the itch I have for a fully integrated, wireless networking solution, so... in my on-going quest for a portable and connected 68K, I've fixed my sights on the Global Village modem in my PB 180c. Any number of ESP2866 programmable wifi-on-chip modules would easily fit within the available space, and from the PB Developers Note PDFs, it's apparent that the internal 20-pin interface is just RS-232 with a few additional modem-related functions. Speaking of that Developers Notes, it also quite handily provides modem module geometry, pinout, and connector signals. Challenge accepted!

This is still very much in the proof-of-concept stage, but I don't see any show stoppers at the moment (please don't hesitate to burst my bubble). There are a few open-source ESP2866 SLIP implementations available and the hardware seems compatible with a bit of signal leveling and/or inverting. Speaking of hardware, of the myriad ESP2866 options available, I've zeroed in on the ESP-07S on account of its extended I/O capabilities and especially the included u.fl antenna connector. Speaking to the latter, I'm planning to route one of the bare-wire-style antennas up through the right hinge along with the inverter supply wires and affix it to the inside of the outer plastic clam-shell behind the LCD. Worry a bit about proximity to the inverter, but we'll see...

Here's a pic of the current PCB layout, which I still need to extensively bench test before sending to fab. Amazon delivered a pair of ESP-07S modules today, so that can now begin in earnest!

PB-Local_Village_v1.thumb.png.e1505e9bf91d42b37a4660cc9f25999e.png

 

All components I've spec'd are modern and readily available, even the 20-pin AMP connector (P/N 104652-2), which had me worried might be NLA. Whew! Note that I've routed the pins necessary to update the module via an FTDI interface to a 6-pin RJ11 in the same position as the original, so programming will be a simple as crimping an adapter and plugging it in :)

I still have a TON of questions to answer though... Notably:
 

  • Do I need to worry about flow control? I've routed traces for the RTS / CTS pins, but not sure they're necessary or how that will need to be implemented on the ESP2866 side.
     
  • The ESP2866 and its logic-level runs at 3.3vdc vs. the Global Village modem's 5v. I've added a linear regulator circuit (top center) for the supply and voltage divided the 5V inputs from the PowerBook, but I'm not sure if the 3.3v outputs from the ESP2866 (in particular TXD) will meet the minimum Vih requirement to be recognized as "high" on the PowerBook side. If not, I'll need either a chip-based, gate-type conversion (fast but more complicated) or diode offset (too slow?) level shifter.
     
  • DCD - Not sure what to do with the data carrier detect pin, or how the Power Manager / modem drivers use it in all cases. Thought about just tying it to GND, but that could have unexpected consequences I imagine. Instead, I sent it to an unused I/O pin on the ESP-07S and currently plan to alter the SLIP code to swing it high / low in response to active wifi connectivity? 
     
  • SPI - PB 16Xs & 18Xs, while modem hardware compatible with older 1XX generations, support "express" modems and allow for some sort of then-new-fangled higher speed signalling using more data paths called SPI. By pulling pin-16 high, various pins previously used for other functions are remapped. I drew R8 with the intention that by jumpering it high or low with a 0Ω "resistor", I could try fiddling with SPI, but given the limited info available and uphill battle I'd face to get the ESP2866 to speak that protocol, I'll almost certainly delete that bit and live with RS-232 port performance. Speaking of which...
     
  • How fast will that internal port really go? Without knowing anything about how that RS-232 is implemented, can I assume the theoretical limit has the same hardware clock 115200 / 56Kbps ceiling most legacy RS-232s do? For what I have in mind (ssh, IRC, HTTP graphics-lite browsing, etc.), 56K would be plenty fast. Guess I'll find out, but knowing the "Express" modems (those same modems that required SPI ostensibly due to internal RS-232 port speed limitations) were themselves only 14.4 / 28.8, I'm worried...
     
  • A ton of other stuff I haven't yet thought of...

 

Probably going to take a few months to develop at the speed of 15-30min here and there amidst myriad other time commitments, but at least the ball is rolling :)

Edited by sutekh
Link to post
Share on other sites

The components I've ordered are still arriving, but in the meantime I spent some time getting the board layout closer to actual. Upon further review of the "Modem card electrical interface" section of the Deverlopers Note, it became obvious that I'd need to convert logic levels down and up (Vih is 3.5v), so I added some BSS138-driven logic converters on the Tx and CTS pins, with simple voltage dividers for Rx and RTS. Not sure I'll implement flow control, but the UART supports it, so may as well leave the door open.

 

PB-Local_Village_v1.2.thumb.png.4bc34f21c675bcb014d6f18554643b4d.png

 

The biggest caveat I'm currently contemplating is that the logic board's internal 20-pin modem connector is the only RS-232 port and the only port operating at CMOS voltage levels. Testing via the external RS-422 ports is possible with some conversion, but for accurate testing I may end up soldering a ribbon cable to a 5-104652-2 (CN1) and routing it out the RJ11 port. I might just click "I'm Feeling Lucky" and send the CAM files to OSH Park as-is and have a them send me the 3 board MOQ to :)

Here's the current BOM:
 

Name Qty Ref(s) P/N PKG MFG Vendor Unit Cost Tot. Cost
ESP8266 Wifi Module 1 N/A ESP-07 N/A Ai-Thinker Amazon $5.99 $5.99
U.Fl Antnna 1 N/A 8541716906 N/A FRSky Amazon $0.45 $0.45
10uf Tantalum Capacitor 1 C1 T491A106M020AT A-Case Kemet Mouser $0.66 $0.66
0.1uf Tantalum Capacitor 1 C2 T491A104M035AT  A-Case Kemet Mouser $0.50 $0.50
PowerBook Modem Connector 1 CN1 5-104652-2  N/A TE Connectivity Mouser $4.25 $4.25
RJ11 FTDI Connector 1 CN2 43202-6101 RJ11 Molex Mouser $1.47 $1.47
ESP-07 Module Headers 2 CN3, CN4 1-2355045-0 N/A TE Connectivity Mouser $0.96 $1.92
Schottky Diode 1 D1 SD1206S040S1R0 1206 AVX Mouser $0.46 $0.46
N-Channel Signal MOSFET 1 Q1 2N7002KT7G SOT-23 ON Semi Mouser $0.18 $0.18
N-Channel Signal MOSFET 2 Q2, Q3 BSS138L SOT-23 ON Semi Mouser $0.28 $0.56
10K SMD Resistor 12 R1 RK73H2ATTD1002F 805 KOA Speer Mouser $0.10 $1.20
20K SMD Resistor 3 R2 RK73H2ATTD2002F  805 KOA Speer Mouser $0.10 $0.30
3.3v LDO Voltage Regulator 1 U1 LDL1117S33R  SOT-223 ST Micro Mouser $0.48 $0.48
                 
Total               $23.42
Edited by sutekh
Link to post
Share on other sites

You could probably get away with the WiFi modem firmware, so everything is treated like AT commands on the serial side. that way the machine would think its still a modem. 

 

anyways, Not sure why your still keeping the RJ11 jack? id replace that with an RP-SMA connector so you could install a wireless antenna on the rear, if you wanted. 

 

another thing to think about in the future is replacing the ESP8266 with a Pi zero W instead. that way, the Powerbook side would still see a serial port, but its a serial port to the Pi itself. so then Pi could run the web proxy, and other things, like the MacIPPi environment. Then you have a self-contained system without the need of a helper PC hanging by externally. :-) 

 

Caveat being the RS232 is probably not the fastest. so it would be quite slow id imagine. But hey, better than nothing. 

Edited by techknight
Link to post
Share on other sites
8 hours ago, techknight said:

You could probably get away with the WiFi modem firmware, so everything is treated like AT commands on the serial side. that way the machine would think its still a modem. 

 

It'd be interesting to try. To get that actually working, I've wondered if I'd need to implement some of the modem-specific functions like DCD, Modem.Busy, etc. that I'd planned to omit. Not sure what the driver expects...

 

8 hours ago, techknight said:

 

anyways, Not sure why your still keeping the RJ11 jack? id replace that with an RP-SMA connector so you could install a wireless antenna on the rear, if you wanted.

 

Yeah, my initial mockup had and SMA connector there, but I decided on an RJ11 as mentioned above for a couple of reasons: The port door on the back would interfere with it for one. More importantly though, I want a way to connect an FTDI cable to the device in situ for re-programming, updating, etc. that doesn't require pulling the PowerBook apart. With their fragile plastics, the less often that happens the better!

 

8 hours ago, techknight said:

 

another thing to think about in the future is replacing the ESP8266 with a Pi zero W instead. that way, the Powerbook side would still see a serial port, but its a serial port to the Pi itself. so then Pi could run the web proxy, and other things, like the MacIPPi environment. Then you have a self-contained system without the need of a helper PC hanging by externally. :-) 

 

I don't believe a helper PC should be necessary with the ESP8266 running ESP_SLIP_Router (https://github.com/martin-ger/esp_slip_router). You should just need to serial into the device via a terminal to setup the SSID, PW, etc., then use MacSLIP (or similar).

 

8 hours ago, techknight said:

 

Caveat being the RS232 is probably not the fastest. so it would be quite slow id imagine. But hey, better than nothing. 

 

Indeed this is a problem. I've really no idea what that internal port is real-world capable of without more testing. I think the fact that Apple moved to an SPI approach leveraging multiple data paths for the "Express" modems beginning with 14.4 suggests it's pretty underwhelming though. The way I'm looking at it, anything these machines can do online is "quite slow" regardless, and even modem speed should suffice for IRC, SSH, Lynx browsing, etc. It's a limitation I'm probably willing to accept for internal, modular wifi.

If it's just unacceptably slow, I've pondered remixing something like Saybur's scuznet to include an ESP2866. An all-in-one SCSI bus connected hard-drive replacement that provided SD storage and wifi would be pretty neat!

Link to post
Share on other sites
  • 1 month later...

I've been working on this in fits and starts, time allowing. I created a little ribbon cable with the 20-pin AMP 104652-2 connector on one end to facilitate online testing (shown here connected to my PB180):

 

IMG_20201006_084258.thumb.jpg.7b5b66f653f1d0b6156c4ce8955ee1a1.jpg

and built a functional representation of the proposed circuit on a breadboard:

 

IMG_20201010_015351.thumb.jpg.75d16ad2dbdaa2c82775eaf80a9f1280.jpg

 

It all works swimmingly when connected to the external RS422 port, but I'm not getting any TX signal or RX acknowledgement from the internal RS232 port. That's not to say nothing is working though. When establishing a serial connection in MacTerm, the MODEM.PWR pins go high and the reset pin pulses when the connection is closed or reset. It definitely recognizes that there's a "modem" present (meaning pin-15, MODEM.INSERT is doing its job). I'm missing something though...

 

I didn't connect every single ground pin (3 of the 20). Maybe they're all necessary? I'll try adding pin-3 to the ground bundle.

Also, and this is the theory I'm currently pinning my hopes on, I didn't connect pin-4, MODEM.BUSY (active low). Reason being, I didn't foresee a reason to ever tell the PB that my ESP2866 module was busy and to wait. If left unconnected, however, I wonder if that pin is floating low (or is pulled down internally)? That could be preventing communication. I'm going to tie MODEM.BUSY and RING.DETECT (another unconnected active-low output) to MODEM.PWR (+5vdc) and see if anything changes...

Edited by sutekh
Link to post
Share on other sites
On 10/25/2020 at 7:23 PM, techknight said:

You need a logic analyser and the original modem so you can figure out what it expects. Then with this information, it can be simulated. The PB may use some of those signals as a form of flow-control. 

Using one of the now 3 Global Village modems in my possession (after first verifying I could communicate with it unmodified of course), I cobbled together the following test unit:

 

IMG_20201026_203059.thumb.jpg.727cce63344fb1430d094b05e3883162.jpg

 

Good news: There's no fancy Modem / PowerBook initialization communication that needs to be duplicated, nor is there (assuming flow control is disabled) anything unique happening on CTS / RTS or DTR. Tx/Rx are also completely inert from boot, through connection open, and until input is sent via the terminal.

Building the above (which I also expect to come in handy during the forthcoming InterSlip portion of this project), was a worthwhile exercise though, as I found the problem preventing communication almost immediately. Pin 6 (Rx) and 8 (Tx) with no modem present are logic-low and seemed to be DOA. The modem itself, however, pulls both high once a connection is opened. The modem grounds Rx and the PB grounds Tx respectively when asserted. Seeing the Tx pin low on the PowerBook side by default (with no modem present and a connection established), I'd incorrectly assumed I was dealing with inverted logic, but this makes more sense.

I'll reconnect my test cable, pull them both high via pull-up resistors, and see what happens...

Edited by sutekh
Link to post
Share on other sites

W00t! The above outlined solution worked with a pull-up resistor on the PB Tx line (Rx is actually pulled high by the PB, in contradiction to what I cited above). Communication to the ESP module via the internal RS-232 port established!

In other good news, I'd been operating under the assumption that at a 3.3v logic level, the ESP's output would need to be level adjusted to 5v (Developer's Note puts Vih at 3.5vdc). On at least this PB 180 though, it has no issue whatsoever recognizing logic-high without it. That'll simplify the board design somewhat.

 

With serial communication established, I shifted gears to working through the necessary software components. I'm using InterSLIP on the Mac in conjunction with the Open Source ESP_Slip_Router package available here:

I built a cross-compilation environment on my personal Linux server so I could fiddle with flow-control and subnetting variations in ESP_Slip_Router, but the stock firmware packaged in the release should serve in most cases.

Once the firmware is flashed to the ESP, the initial connection requires the following steps:

  • Change the local and router IPs in MacTCP to the ESP_Slip_Router's client and self IPs respectively (in my case 192.168.2.2 and 192.168.1.1)
  • Create a profile in InterSLIP, set the port speed (57600 seems to be the fastest option), and click "Connect"
  • Telnet into the ESP (192.168.2.1:7777) and set the SSID / Password
  • Start surfing!

Subsequent connections merely require opening InterSLIP and clicking connect :) The speed, while not blazing, is certainly adequate for IRC (#68KMLA channel in the pic below), I/M, SSH, EMail, etc...

 

PXL_20201030_185721306.thumb.jpg.a55b4b35cb55c706d43eced0a74bb5ec.jpg

 

I'm going to do some further testing with flow-control just to make sure the electrical implementation is sound, make a few final revisions to the PCB layout, and send a few out to fab!

Edited by sutekh
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...