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

Wifi Extension Development Thread

ants

Well-known member
icon.png Building a Wifi Extension for 68k Macs

I've previously posted a few hardware hacking projects where I retrofitted a Vonets VM300 Wifi card into a SE/30 and a Colour Classic. They work pretty well, but configuration has always been a pain as you need to do it from a Modern Mac or PC using a web browser.

To solve this, I want to build a native Mac extension to connect to wifi networks - Ideally just like you would on a modern Mac. @hfrazier has already done a lot of groundwork on figuring out how to communicate with the VM300 using HTTP requests, and I've made a start on writing the extension.

It's on GitHub here: https://github.com/antscode/MacWifi, and a compiled version is attached to this post if you want to test it out.

So far the extension doesn't do much except look pretty:

wifi-1.png wifi-2.png

I'm hoping to incorporate the work that @hfrazier has done to actually make this functional.

View attachment MacWifi.sit

 

hfrazier

Well-known member

verydragons

New member
I adore the little drop-down menu to make this appear identical to modern Wi-Fi menus. I'm very excited to see this progress!

 

ants

Well-known member
@hfrazier the C code is fairly foreign to me too. I've been learning Mac programming in my spare time over the last year, so I'm only just getting the hang of it. I will port the code to C++, which is a lot closer to C# (i'm a .NET dev).

If you're keen to try compiling the code using Visual Studio and Retro68 that'd be great - but if you want to keep going down the Javascript route to figure out the HTTP requests and responses then that would also be very helpful.

There's some instructions on compiling Retro68 in the readme. It's a bit painful, but once it's compiled you're off and running.

 

hfrazier

Well-known member
I will port the code to C++, which is a lot closer to C# (i'm a .NET dev).
Works for me!

I code in C, C++ and C# ASP.Net Core 2 MVC for my job right now (various pieces of hardware, 16-Bit PIC, ESP32, Intel of course, all for an IoT Platform) so I'm right there with ya! Mostly 'grew up' on asp.net and java. Most of my C experience though is on the PIC in MPLabX so my knowledge may be limited...

but if you want to keep going down the Javascript route
I would say we shouldn't waste our time.. But then again... since I am, comparatively, way less familiar with the System 7 API (or whatever) then it may be more efficient for me to strip the it all down to the basics and implement it in Javascript 1.2 so that you can study it and re-implement it. We'll see how it goes. Nevertheless, this is exciting.

Tomorrow (or by early next week) I will try to get VS working with Retro68!

Edit: I also have a problem:

Until now I have been connecting my SE/30 with a MacCon just via ethernet.. I expected the Vonets to work, but even with setting it to 10MBps/HalfDuplex it does not.... I also have a 'Mystic' Color Classic with a Farallon NIC so I'll try it with that.

 
Last edited by a moderator:

ants

Well-known member
Compiling Retro68 can take hours, so ensure you've installed all of the dependencies in Cygwin. To help, I've attached a screenshot of all the packages I have installed - there's nothing more frustrating that sitting through 2 hours of compilation for it to crash out and you have to start over again. Also ensure you've got at least 9GB free on your drive - it's huge.

With your Vonets issue, are you a getting a solid link light on your ethernet card? If it's flashing, it'll be a connection issue between the card and the wifi module (which is usually fixed with 10MBs/half duplex).

If you've got a solid link light, then it'll be a TCP/IP issue. In Open Transport are you requesting an IP address via DHCP, or are you using a static IP? On both my macs I just use DHCP.

I also have a Farallon card in my Colour Classic, so if need be I can screenshot all of my settings on both the Mac and the wifi module...

cygwin.PNG

 

hfrazier

Well-known member
Ok, thanks for the tips!

Also, yes the link light seems to go off and then back on at a consistent rate... Even with manually setting it to 10M/Half Duplex makes it blink off and on... Looking like a link/connection re-try would behave.

I have the Asante MacCon for the SE/30. Which NIC do you have?

 

ants

Well-known member
I have a DaynaPort card. I also have an Excelan card but I haven't tried it out yet.

Can I just confirm that you are connecting the wifi module to your NIC via the supplied USB cable and not the RJ45 port on the wifi card? (I made that mistake at first)

From the Vonets datasheet:

vonets-connection.PNG

Failing that, perhaps the Asante card is actually full duplex? Have you tried all duplex settings in the Vonets config to see if the link light comes on solid?

 

ants

Well-known member
Small update: I had a play with issuing HTTP commands directly from a Mac application (using a HTTP client I've written in the past). The good news is that I was able to communicate with the module via http://vonets.cfg - I was worried that the DNS resolution wouldn't work on the mac, but it did.

However I hit a weird issue that's doing my head in - the web server on the Vonets card always returns a HTTP 404 not found for any page that I access via my Mac. For example, if I try a GET request to the login page: http://vonets.cfg/a.asp I get a 404 - but if I hit it from my laptop it works fine.

I traced the HTTP requests coming from the Mac using Wireshark and Fiddler - and from what I can see, they are identical to the requests from my PC.

I'll sleep on it for a few days and hopefully the solution will come to me...

 

hfrazier

Well-known member
Strange. Also sorry I've been MIA.. Been quite busy the past few weekends. It seems that it still won't work even set to full duplex... It even freezes my TCP/IP control panel for some reason. I'll keep messing with it.

One thing I noticed is that it will block out another machine if you've logged in from another and not logged out. If you had already logged in from your laptop it may be blocking it. Although I see no reason why it would be a 404 in stead of a 200 and an error message in the page so maybe that doesn't make sense.

 

hfrazier

Well-known member
Also, just thinking... there are a few other options out there. If the Vonets proves to be too difficult maybe there is a better solution. The Menu extension can continue to be developed as we search for other adapters.. or even make the extension compatible with several different adapters. I'd definitely be willing to order and test one of these.

https://www.amazon.com/IOGEAR-Universal-Ethernet-Adapter-GWU627/dp/B004UAKCS6/

https://www.amazon.com/IOGEAR-Ethernet-2-WiFi-Universal-Wireless-GWU637/

https://www.amazon.com/TP-Link-Wireless-Travel-Extender-TL-WR802N/dp/B00TQEX8BO

 

ants

Well-known member
That's a real shame that 10mb/full duplex didn't resolve the issue for you. Are you able to connect to other devices via ethernet on your SE/30?

I also discovered the same issue with logging in via multiple devices - at first I thought that was the issue, but the response code is 200 and not 404. My current thought is that it could be something more low-level, like TCP packet size or something - I'll keep playing. Weirdly, if I hit http://vonets.cfg/b.html I get a 200 response - it seems to only be the .asp pages - I don't know what to make of that?!

I agree that the extension should be able to work with multiple adapters - although I think that we might be hard-pressed to find another adapter that allows us to manually set the Speed & Duplex. The modern "autonegotiate" standard didn't come out until '95. Before buying anything, perhaps see if you can find a PDF user manual or something that describes the available settings.

 

nickpunt

Well-known member
Is it possible to use something more standard like a Raspberry Pi as a bridge? They're high quality, cheap, and likely to be supported for a long time. They could also convert HTTPS traffic to HTTP, or do web rendering with static images to make the web browsable on old systems (https://virtuallyfun.com/wordpress/2014/03/11/web-rendering-proxy-update/). OpenWRT exists for the pi as well: https://wiki.openwrt.org/toh/raspberry_pi_foundation/raspberry_pi

Not sure if it supports correct speed/duplex for old 10bt cards though.

As a broader point, there's a lot of one-off hardware to manage the variety of connectivity needs for old Macs, and it makes me wonder if there's a more general purpose way to go about solving these problems. RPi's have USB, BT, Wifi, and GPIO and are extremely well supported on the software side.

 
Last edited by a moderator:

ants

Well-known member
@nickpunt thanks for your input - it's definitely worth considering a Raspberry Pi, or maybe an Arduino board. A while back I thought these boards would be overkill - i.e when is a vintage Mac no longer a vintage Mac? But the idea of also having a HTTPS proxy inbuilt would be really cool.

I've also had a crazy idea of using a Rasberry Pi as a "poor man's accelerator" - i.e. install BasiliskII on it to run code - but I digress...

Finally, if there was a way to interface the Mac to a Raspberry Pi without the need for an Ethernet card, that would be awesome - as some cards are rare as hen's teeth... Although I'm not a hardware engineer by any means.

But for now, in an attempt to get something working, I'll keep on slogging away at the Vonets card.

 

Trash80toHP_Mini

NIGHT STALKER
Sounds like a reasonabla plan, I've been watching your progress with great interest. I hope to get my toy from Vonets up and running one day.

The Pi angle is great food for thought though. Mac emulation would probably be beyond the pale, but co-processing just about anything should be fair game. Think of Pi as an interactive DSP with Swiss Army I/O resources?

 
Top