Apple Desktop Bus (ADB) KB II

General discussions and questions abound development of code with MicroPython that is not hardware specific.
Target audience: MicroPython Users.
Post Reply
Comedicles
Posts: 9
Joined: Wed Feb 10, 2016 4:55 pm

Apple Desktop Bus (ADB) KB II

Post by Comedicles » Thu Jul 08, 2021 9:53 pm

Converting the old Apple Extended KB II to USB is a thing because many think it is the best KB ever. I have a dozen or so of them and everyone is converting using a Teensy2.0 and this C project https://github.com/tmk/tmk_keyboard/tre ... er/adb_usb

I have a load of Arduino Nano but the USB serial chip apparently can not do "real USB" protocol, whereas a Tennsy2.0 can. The project above relies on an ADB library from somewhere else and got me thinking about doing it with one of the various boards I have with uPython.

First, can the USB on the Pyboard do "real" USB? And second, are there any ADB libs? I can not find anything about using ADB and I really don't want to (will not) painstakingly translate the C project to uPython, then refactor, etc.

Anyone working on something similar? Any ideas on good staring points?

I have original Pyboard, ESP32's, DevEBox Black STM32_FVE, Lolin D32 Pro, WiPi, and STM32_F4 Discovery. In the final version I only have room for the smallest boards.

User avatar
jimmo
Posts: 2754
Joined: Tue Aug 08, 2017 1:57 am
Location: Sydney, Australia
Contact:

Re: Apple Desktop Bus (ADB) KB II

Post by jimmo » Thu Jul 08, 2021 11:43 pm

Comedicles wrote:
Thu Jul 08, 2021 9:53 pm
First, can the USB on the Pyboard do "real" USB?
Can you clarify what you mean by "real USB".

I'm guessing you're referring to whether the device just does USB serial. Technically this is real USB, but just a very specific endpoint (the CDC ACM serial, also known as VCP (virtual com port))

MicroPython's USB stack on STM32 (i.e. pyboard) let you define MSC (storage), VCP (serial) and HID (keyboard/mouse/joystick) interfaces. For your project you want HID.

Sorry I don't know anything about ADB though...

Comedicles
Posts: 9
Joined: Wed Feb 10, 2016 4:55 pm

Re: Apple Desktop Bus (ADB) KB II

Post by Comedicles » Fri Jul 09, 2021 12:11 am

Thanks for the info. Yes, HID. I guess the usual USB to serial chips do something rather simple. Or the ATmega328 on a Nano can't handle the complexity or speed?

Anyway, I'll focus on the STM32 parts and see what else I can find.

User avatar
jimmo
Posts: 2754
Joined: Tue Aug 08, 2017 1:57 am
Location: Sydney, Australia
Contact:

Re: Apple Desktop Bus (ADB) KB II

Post by jimmo » Fri Jul 09, 2021 12:40 am

Comedicles wrote:
Fri Jul 09, 2021 12:11 am
Thanks for the info. Yes, HID. I guess the usual USB to serial chips do something rather simple. Or the ATmega328 on a Nano can't handle the complexity or speed?
The atmega328 doesn't have a USB peripheral, so can only do serial. The onboard usb->serial chip is a full USB device implementation, but it just does the CDC ACM endpoint.

The atmega32u4 based boards (Leonardo, Pro Micro) do have USB though, and there are Arduino libraries for HID, etc. The pro micro is a good substitute for the nano.

Comedicles
Posts: 9
Joined: Wed Feb 10, 2016 4:55 pm

Re: Apple Desktop Bus (ADB) KB II

Post by Comedicles » Fri Jul 09, 2021 3:04 am

Thanks Jimmo. I'm ordering some Pro Micro. But I have a desire now to do it in uPython as well.

Plus I have a 20 year old Cyborg 3D Gold USB joystick I want to use on a Mac and it will need some kind of hardware fix and/or software. One the Mac it was plug-and-play with no special drivers needed until an update back in 2011 and the Cyborgs have not worked since. Perhaps another mystery for MicroPython.

Christian Walther
Posts: 169
Joined: Fri Aug 19, 2016 11:55 am

Re: Apple Desktop Bus (ADB) KB II

Post by Christian Walther » Fri Jul 09, 2021 7:04 am

The ADB specification and some supplementary documentation is linked at the bottom of https://en.wikipedia.org/wiki/Apple_Desktop_Bus. I am not aware of any MicroPython implementation (nor of any other open-source one other than TMK/QMK).

Post Reply