• Updated 2023-07-12: Hello, Guest! Welcome back, and be sure to check out this follow-up post about our outage a week or so ago.

PowerBook 1xx Wireless Modem

sutekh

Well-known member
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.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 :)

 
Last edited by a moderator:

sutekh

Well-known member
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.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




 
Last edited by a moderator:

techknight

Well-known member
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. 

 
Last edited by a moderator:

sutekh

Well-known member
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...

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!

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).

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!

 

sutekh

Well-known member
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.jpg

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

IMG_20201010_015351.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...

 
Last edited by a moderator:

techknight

Well-known member
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. 

 
Last edited by a moderator:

sutekh

Well-known member
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.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...

 
Last edited by a moderator:

sutekh

Well-known member
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.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!

 
Last edited by a moderator:

sutekh

Well-known member
Inching closer! I was able to get CTS / RTS flow control working between the two UARTs and esp_slip_router / InterSLIP. To my complete lack of surprise, it's a bit slower, and at only 57,600, I think I'd rather just deal with the occasional re-transmit. Probably not something I'll use, but hey, it's there if I need it :)

Here's the final board layout. I ordered 3 from OSH Park today!

PB-Local_Village_v1.3.png

 

sutekh

Well-known member
Huzzah, my boards arrived! I assembled two without issue aside from the diameter of the through-holes for the ESP8266 headers being a bit tight. 

PXL_20201117_225442089.jpg

More importantly, upon install in my PB180 test mule, everything lines up perfectly!

PXL_20201117_230446212.jpg

I built the following little 6-pin FTDI to RJ-11 programming dongle, and communicating with and flashing the ESP-8266 in-situ works as hoped.

PXL_20201118_035239746.jpg

Finally, and most importantly, with the ESP SLIP Router firmware flashed to the module, I was able to connect via InterSLIP, telnet into the module, set the SSID / PW, and get online without issue :D

I just finished assembling and flashing a second board, and am going to install it in my 180c and perform some speed tests...

 
Last edited by a moderator:

rplacd

Well-known member
Mazel tov! Thanks for keeping on posting your progress, sutekh – I want to do a hardware project this winter, and this thread is good inspiration.

 

techknight

Well-known member
Would be neat to modify the firmware a little bit, along with that WiFi exention that was made, and have that nice cool little wiFi symbol on the menubar 

:)

 

cheesestraws

Well-known member
Would be neat to modify the firmware a little bit, along with that WiFi exention that was made, and have that nice cool little wiFi symbol on the menubar 


Oh, yes, I hadn't even thought of that.  That would be nice.  I'd be all over doing that if I had a suitable powerbook, but alas I do not :-( .

 

techknight

Well-known member
Haha yea. I know the feeling, and of course time... i Need another project like I need a hole in the head. 

but... it would be neat. modify the WiFi extension to support the ESP8266 or other wireless modems, architecting the exchange protocol for the modem and the extension. 

 
Last edited by a moderator:

sutekh

Well-known member
Would be neat to modify the firmware a little bit, along with that WiFi exention that was made, and have that nice cool little wiFi symbol on the menubar 

:)
I like it! TBH, I don't think you'd even need to modify the esp_slip_router firmware in any way (although it'd be easy enough to do if you wanted to). From the client IP (PowerBook), you can telnet into the module unauthenticated on port 7777 and set the SSID / PW, show connection status and signal strength, etc. It's light enough weight that I don't think you'd really save much by authoring a custom API.

Back in the day, someone authored a Control Strip plugin for InterSLIP to connect / disconnect, which I'm using, so we know InterSLIP can be readily interfaced with. I certainly think someone with more 68K programming experience than I have could remix @ants utility to interface with esp_slip_router via Telnet and InterSLIP to do exactly what you're suggesting.

On an unrelated topic, one caveat I've identified is that since your connection is now NATting through the ESP8266, active mode FTP isn't an option and PASV mode performance in Fetch is pretty inconsistent. Looking for a better way to assess actual download speed / bandwidth. I really wish there was a System 7 version of something like wget or rsync. I can copy files via AppleShare, via SMB through Dave, via NFS through MacNFS, etc., but none of those give me a real-time throughput indication. I guess I could time it, but that's kind of janky. Anyone have a recommendation for a download utility that provide throughput info?
 

 
Last edited by a moderator:

sutekh

Well-known member
I've been playing with these "modems" now for a few days now, and have learned a thing or two:

  • They're as slow as expected  :)  The results I was seeing from Fetch in PASV mode are consistent with additional tests I've run grabbing files via HTTP using LYNX and iCab. Max download speed is around 2KB/s and averages more like 1500Bps--basically a 14.4 modem (which makes some sense considering that's what I replaced!). Still, as I've said before, this satisfies my requirements for IRC, SSH, Telnet, I/M, etc.)
     
  • Slip Options:


    InterSLIP 1.0.1, the only common option floating around the net, is buggy and crashes the OS if selected options aren't exactly right (port speed, flow-control settings, etc.). I managed to track down 1.0.2d2 after hours is internet scouring, and it seems to be better so far. Both work with Open Transport, so that's a bonus! I've uploaded it to the Garden here:


    https://macintoshgarden.org/apps/interslip-102d2
     

[*]MacSLIP - Lots of old docs reference this title, but it was commercial software back in the day and although you can find updaters, the base install binaries seems to have completely evaporated. I did finally manage to find an instance of 2.0.5 via an FTP search (which I then updated to the latest 2.x release of 2.0.6), and it works too, but only with MacTCP. That's a bummer, because MacSLIP is definitely more polished and feature-rich than InterSTLIP. Version 3.x of MacSLIP apparently supports OT, so if anyone has a copy, I'd dearly love to get my hands on it!
 



[*]Of the numerous available ESP8266 boards out there, I chose the ESP-07 for its u.Fl connector. Reason being, the interior of the PB plastics are coated in a metallic RF blocking film and I wanted to route a higher dBi antenna up behind the display. Here's the part I'm using, which has plenty of cable length and the signal strength is great!



Otherwise, I think that's a wrap. Only think left for me to do is head to the local Starbucks and surf on my 180c. I've appended the latest version of my PCB Gerber files if anyone wants to build their own :)

View attachment PowerBook_Wifi_Modem-v1.3.zip

 
Top