Author Topic: ADB to USB keyboard converter  (Read 484902 times)

0 Members and 1 Guest are viewing this topic.

Offline Noodloodle

  • Posts: 4
Re: ADB to USB keyboard converter
« Reply #1050 on: Mon, 22 February 2021, 21:10:18 »
New errors I have no ideas how to deal with. I downloaded the latest version of Cygwin and am trying to build the firmware from the Tmk_master file. Was I supposed to unzip the file or leave it zipped? I'm trying to follow the guide that you sent earlier to use with a Teensy 2.0, but when I am trying to build the firmware, the line where it asks for me to
Code: [Select]
make -f Makefile.<variant> clean it keeps erroring saying:

Code: [Select]
../../tmk_core/protocol/Lufa.mk:12: *** LUFA may be too old or not found: try 'git submodule update --init'. Stop. 262825-0

when trying this command it fails to find a repository and update the Lufa. What do I do from here? am I stuck because I have too new of a system or is there a way to get around this? Is there any way to bypass this by just getting a pre-created hex file for the ADB_USB variant that I can just flash?

Offline nevin

  • Posts: 1426
  • Location: US
Re: ADB to USB keyboard converter
« Reply #1051 on: Mon, 22 February 2021, 21:16:11 »
Use the online configurator (link in previous post). At the bottom of the configurator page you can download a hex file to flash to the teensy.
Keeb.io Viterbi, Apple m0110, Apple m0120, Apple m0110a, Apple 658-4081, Apple M1242, Apple AEK II, MK96, GH60/Pure, Cherry g84-4100, Adesso AKP-220B, Magicforce 68

Offline Noodloodle

  • Posts: 4
Re: ADB to USB keyboard converter
« Reply #1052 on: Mon, 22 February 2021, 22:12:33 »
Thank you for all the help Nevin, sorry for not seeing it the first time.

Offline nevin

  • Posts: 1426
  • Location: US
Re: ADB to USB keyboard converter
« Reply #1053 on: Tue, 23 February 2021, 07:30:31 »
No worries. It's always a bit confusing until you learn the terminology & tools when your first getting started.
Keeb.io Viterbi, Apple m0110, Apple m0120, Apple m0110a, Apple 658-4081, Apple M1242, Apple AEK II, MK96, GH60/Pure, Cherry g84-4100, Adesso AKP-220B, Magicforce 68

Offline Potatomonkey

  • Posts: 38
  • Location: Inside a WYSE keyboard
  • Tsangan best row
Re: ADB to USB keyboard converter
« Reply #1054 on: Mon, 01 March 2021, 21:21:36 »
Hey guys, I just made a converter for my AEK II and when I plug it in, the leds on the keyboard flash once, then all turn on solid. The converter is being recognized in hid_listen, but I'm not getting any scancodes or error messages. I have 6ish-k resistor between the gnd and data lines. Any ideas as to what is happening?
     

Offline nevin

  • Posts: 1426
  • Location: US
Re: ADB to USB keyboard converter
« Reply #1055 on: Tue, 02 March 2021, 08:51:28 »
not really sure, need a little more info.

what controller are you using?
which firmware did you use?
- with the adb converter there are two variants one for 32u4 (rev 1) for teensy & promicros & similar
and 32u2 (rev 2) for the one hasu sells

sounds like it didn't flash right or is not the right firmware for your controller?
Keeb.io Viterbi, Apple m0110, Apple m0120, Apple m0110a, Apple 658-4081, Apple M1242, Apple AEK II, MK96, GH60/Pure, Cherry g84-4100, Adesso AKP-220B, Magicforce 68

Offline Potatomonkey

  • Posts: 38
  • Location: Inside a WYSE keyboard
  • Tsangan best row
Re: ADB to USB keyboard converter
« Reply #1056 on: Tue, 02 March 2021, 18:49:32 »
Sorry for not clarifying, I was using the QMK variant on a promicro (32u4), however I also tried hasu's rev1 for TMK and I'm getting the same result. The keyboard still shows up correctly in hid_listen on the TMK version.

Code: [Select]
    TMK:a36eff92/LUFA
   
   
    Scan:
   
    Keyboard:
    handler: 00, ISO: no
   
    Scan:
   
    USB configured.
   
    Keyboard start.

Is the output I get from the hid_listen on the QMK toolbox, which is what i use to flash.
     

Offline Potatomonkey

  • Posts: 38
  • Location: Inside a WYSE keyboard
  • Tsangan best row
Re: ADB to USB keyboard converter
« Reply #1057 on: Tue, 02 March 2021, 19:39:50 »
ok this is kinda awkward, but after pouring over my wiring for the 15th time i noticed that the GND trace on my adb breakout was broken right by the pad, kind of embarrassing but jumping that trace fixed my issue.
     

Offline nevin

  • Posts: 1426
  • Location: US
Re: ADB to USB keyboard converter
« Reply #1058 on: Tue, 02 March 2021, 20:54:41 »
glad you figured out what it was. congrats
Keeb.io Viterbi, Apple m0110, Apple m0120, Apple m0110a, Apple 658-4081, Apple M1242, Apple AEK II, MK96, GH60/Pure, Cherry g84-4100, Adesso AKP-220B, Magicforce 68

Offline DwieDave

  • Posts: 8
Re: ADB to USB keyboard converter
« Reply #1059 on: Mon, 29 March 2021, 13:16:33 »
Hello;

Today I tried to built my own ADB Converter using a (non-official) ProMicro.
First I had issues flashing the ProMicro with the Rev.1 Firmware provided on the Keymapping website
(http://www.tmk-kbd.com/tmk_keyboard/editor/unimap/?adb_usb_rev1)
but in the end it worked out and it shows as  "ADB keyboard converter" in my system settings.

Sadly the keyboard (Apple Extended Keyboard II) is not working.
There are no lights on capslock or numpad.
Sometimes after connecting the usb cable to the ProMicro the LED
dies after some seconds and the adapter is not visible in system info anymore.


I rechecked the wiring multiple times.
Is my Apple Keyboard or my ProMicro broken?

I connected 5V to VCC; GND to GND and DATA to Pin3 on the ProMicro (labeled only with 3)
And I bridged J1 with solder.

I would be really thankful for every bit of help!
Thank you

Kind regards
Dave
« Last Edit: Mon, 29 March 2021, 13:21:03 by DwieDave »

Offline nevin

  • Posts: 1426
  • Location: US
Re: ADB to USB keyboard converter
« Reply #1060 on: Mon, 29 March 2021, 13:27:49 »
you are correct in using the rev1 firmware. 32u4

make sure you use a pull-up resistor. also check the pinout of the connector. the diagram of the connector is keyboard side (female)
https://github.com/tmk/tmk_keyboard/tree/master/converter/adb_usb
Keeb.io Viterbi, Apple m0110, Apple m0120, Apple m0110a, Apple 658-4081, Apple M1242, Apple AEK II, MK96, GH60/Pure, Cherry g84-4100, Adesso AKP-220B, Magicforce 68

Offline DwieDave

  • Posts: 8
Re: ADB to USB keyboard converter
« Reply #1061 on: Mon, 29 March 2021, 13:43:45 »
@nevin:
Thank you so much!
It's really embarrassing but I thought the
wiring diagram was for the plug and not the socket.

Just typed this reply on the AEKii  :D


Offline nevin

  • Posts: 1426
  • Location: US
Re: ADB to USB keyboard converter
« Reply #1062 on: Mon, 29 March 2021, 13:44:46 »
it happens more than you think, that's why i mentioned it.
congrats!
Keeb.io Viterbi, Apple m0110, Apple m0120, Apple m0110a, Apple 658-4081, Apple M1242, Apple AEK II, MK96, GH60/Pure, Cherry g84-4100, Adesso AKP-220B, Magicforce 68

Offline Fritz the German

  • Posts: 18
  • Location: Germany
    • My Blog
Re: ADB to USB keyboard converter
« Reply #1063 on: Sat, 03 April 2021, 13:43:07 »
I'm a little bit tempted to get an Apple Adjustable Keyboard M1242 and the corresponding separate Numeric Keypad.
But I believe that the converter doesn't support two daisy-chained ADB keyboards, correct?

Offline hasu

  • Thread Starter
  • Posts: 3256
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: ADB to USB keyboard converter
« Reply #1064 on: Sat, 03 April 2021, 21:22:27 »
It should support actutally :D
Try it and report if you have problem.

Offline godzillq25

  • Posts: 34
  • Location: australia
Re: ADB to USB keyboard converter
« Reply #1065 on: Sun, 04 April 2021, 04:14:14 »
the converter works fine and thank you sooo much for that, but i can't seem to generate a custom hex from tmk keymap editor and im only able use the standard layout.
i am i following the steps right?

edit layout
press the download button under 'Firmware Hex File Download:'
and then flash hex using qmk toolbox
i have repeated this 3-4 times

im using it for a m0116

Offline nevin

  • Posts: 1426
  • Location: US
Re: ADB to USB keyboard converter
« Reply #1066 on: Mon, 05 April 2021, 08:30:08 »
looks like the file downloads fine. are you having trouble flashing it?
- is it one you bought form hasu or one you built?
- if built, what microcontroller did you use teensy 2.0 or promicro (or similar)
    ... i'm asking because they use different bootloaders for flashing.
Keeb.io Viterbi, Apple m0110, Apple m0120, Apple m0110a, Apple 658-4081, Apple M1242, Apple AEK II, MK96, GH60/Pure, Cherry g84-4100, Adesso AKP-220B, Magicforce 68

Offline godzillq25

  • Posts: 34
  • Location: australia
Re: ADB to USB keyboard converter
« Reply #1067 on: Tue, 06 April 2021, 05:30:16 »
i built it my self using a promicro, the board works fine as a stock layout, i just cant assign a layer changer to ad volume controls on second layer

Offline nevin

  • Posts: 1426
  • Location: US
Re: ADB to USB keyboard converter
« Reply #1068 on: Tue, 06 April 2021, 09:06:41 »
i built it my self using a promicro, the board works fine as a stock layout, i just cant assign a layer changer to ad volume controls on second layer

1. double check witch version of the firmware you are using. it should be the rev.1 version for 32u4 processors
TMK Converter rev.1(ATmega32U4): [ Full-key ]
http://www.tmk-kbd.com/tmk_keyboard/editor/unimap/?adb_usb_rev1

2. delete or move any other .hex files out of the folder your browser downloads to (just in case you're grabbing the wrong one)

3. promicros can be tricky to flash, even with resetting twice in a row you only get 8 seconds to catch the bootloader
so, - edit & download the firmware
- open QMK toolbox and get it ready, select the correct firmware
- reset it twice quickly
- as soon as you see the port open up in the window, click flash.
266008-0
- wait for the confirmation message that flashing was successful
266010-1

4. if you're still having trouble, try clearing the EEPROM.
- reset twice quickly
- soon as the port is found click "Clear EEPROM"
(not sure if the ADB converter stores the keymap in EEPROM but other firmwares do, i've run into this myself with flashing new firmware while there was a previous keymap sitting in the EEPROM from VIA, so my revised keymap in the firmware was being overridden by the keymap in the EEPROM from VIA. this was a QMK keyboard not a converter though)
Keeb.io Viterbi, Apple m0110, Apple m0120, Apple m0110a, Apple 658-4081, Apple M1242, Apple AEK II, MK96, GH60/Pure, Cherry g84-4100, Adesso AKP-220B, Magicforce 68

Offline hbloub

  • Posts: 1
Re: ADB to USB keyboard converter
« Reply #1069 on: Wed, 28 April 2021, 07:51:04 »
Hey, first I'd like to thank you for making this converter that's really awesome  :thumb:. I managed to revive an AEKII which is working perfectly with a cheap pro micro.
I also have a question, although it may not really be about the converter itself. I have another AEKII that I wanted to convert, and since I had trouble making it work, I used my functioning converter with it and found out it didn't help. When I'm plugging it, the three LEDs on the keyboard turn on and nothing else happens. Do you have any idea about what I could do to check what could be wrong with the keyboard itself ?

Offline cmdrriker

  • Posts: 3
Re: ADB to USB keyboard converter
« Reply #1070 on: Thu, 06 May 2021, 00:39:02 »
I'm having a bear of a time trying to get my Teensy 2.0 to work with my old Apple Extended Keyboard model M0115.



I added pins to my Teensy so I could try various wire combinations without having to desolder if I got things wrong (preparing for something to be incorrect :().

Image of the top of the board with my 1k Ohm resistor across PD0 and VCC



Bottom of the board showing my jumper wires:



  • red - PD0
  • black - VCC
  • green - ground

I fed my jumpers into either ADB ports on my keyboard shown here:



I was unable to build the firmware because it seems that there are issues with the compiler being 64bit only on Catalina. The Teensyduino/Arduino tools are not recognizing changes made on pointers etc, make barfs on the code.

No biggie I found the V1 firmware on https://github.com/tmk/tmk_keyboard/tree/master/converter/adb_usb/binary. Using Teensy Loader for MacOS i was able to flash the board and it reports in under System Profiler as it should:



My Mac recognizes it as ADB Keyboard Converter.

However, I plug in my old ADB-E Keyboard in, and anticlimactically nothing seems to work. I went back to rearranging the wiring and it's just stone cold Steve Austin dead lol.

I used hid_listen.mac64 to profile the board and it sees the Teensy fine (also Teensyduino sees it too as well

Code: [Select]
❯ [size=14pt]./hid_listen.mac64
Waiting for device:.....
Listening:


TMK:a36eff92/LUFA


Scan:
RRRRRRRRRRRRR
Keyboard:
Rhandler: 00, ISO: no
R
Scan:
RRRRRRRRRRRRRRRR
USB configured.

Keyboard start.
RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR^C
~/Development/tmk_keyboard/converter/adb_usb master* 8s[/size]

I see that Hasu says that the RRRR nonsense being returned means that something is wrong with my wiring but I've run out of ideas as to what I'm doing wrong. Is my Teensy dead? or am I missing something not evident?

Thanks in advance for any thoughtful tips/ideas!

Regards

-riker
« Last Edit: Thu, 06 May 2021, 00:46:51 by cmdrriker »

Offline hasu

  • Thread Starter
  • Posts: 3256
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: ADB to USB keyboard converter
« Reply #1071 on: Thu, 06 May 2021, 02:20:34 »
The "R" on debug output means that the conveter didn't get any respnse to a command within specific term(500ms).
https://github.com/tmk/tmk_keyboard/blob/66e97371bacb1ad55096f0407b47f0a73fadc6c7/tmk_core/protocol/adb.c#L160-L164

This happens when connecting keyboard with converter already powered(hotplug/hotswap) because keyobard can't response to the converter during its startup. It is not error in this case. But in many other cases the "R" means that there is something wrong on your converter, keyboard or wiring setup.

I'd check that resistor value and its soldered points. I'm not familiar with that type of color codes, it looks to me brown, black, black, unknown, brown. Is that really 1K?
what if the resistor is removed?


Offline cmdrriker

  • Posts: 3
Re: ADB to USB keyboard converter
« Reply #1072 on: Fri, 07 May 2021, 21:50:29 »
The resistor is supposedly a 1K ohm... but I picked up a new Teensy2.0 and just soldered pins to VCC, PD0, & ground. Then because I misplaced the 1kΩ parts I had and used a 10kΩ part instead and it worked!

I don't know if I burned the other board, perhaps got stray solder somewhere on it, or if it was defective? Oh well!

I can't believe that after sitting in the closet after all these years that my old EK works! You know it took an entire summer of work to save up my after-school job monies to be able to afford a Mac IIcx, 13" AppleColor Monitor, & this here keyboard. My old mouse crapped out years ago lol.

What a great project Hasu! I thank you!

In health,

-Riker

Offline hasu

  • Thread Starter
  • Posts: 3256
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: ADB to USB keyboard converter
« Reply #1073 on: Fri, 07 May 2021, 22:37:35 »
Glad to hear it works with the keyboard from your school days!

In many cases this converter works without pull-up resistor, you can try removing the resistor and cleaning up solder around PD0 pin on the first Teensy.
If you still get too many "R" errors after those remedies the PD0 pin might been burned and latch-up'd.

Offline cmdrriker

  • Posts: 3
Re: ADB to USB keyboard converter
« Reply #1074 on: Fri, 07 May 2021, 23:31:23 »
Good idea about the other board. I have to get a better desolder tool, the one I have is a piece o' cr*p and then I'll try removing the mess I made. A colleague of mine gave me one of those ergonomic apple keyboards that I also have on a shelf somewhere at work so if I get that board resuscitated I'll use it with that one.

I just used the online keyboard layout tool and edited the layout to flip the squiggle key(apple) to the right and move alt leftward, reflashed the teensy and things are working great!

Another satisfied customer  :D

In health & gratitude,

-riker

Offline nevin

  • Posts: 1426
  • Location: US
Re: ADB to USB keyboard converter
« Reply #1075 on: Sat, 08 May 2021, 06:41:59 »
Quote
A colleague of mine gave me one of those ergonomic apple keyboards that I also have on a shelf somewhere at work so if I get that board resuscitated I'll use it with that one.

ahh... the apple adjustable keyboard. nice. i have one of those too, i don't have the "wings" (wrist rests) though. warning though... the switches (Alps SKFS) feel a bit different than apple's other boards. they're a low profile version of full size alps.

here's some more info on the board:
https://deskthority.net/wiki/Apple_Adjustable_Keyboard
and
http://sandy55.fc2web.com/keyboard/apple_adjustable_e.html

switch info: https://deskthority.net/wiki/Alps_SKFR/SKFS_series

if memory serves, the buttons in the outer bezel won't work with the converter (wired different (not part of the matrix) and non-standard codes), maybe the esc does... i can't remember, iit's been a couple years since i played with that one. even if a couple do work, they are not pleasant to use as they are just tiny tact switches. and with most apple boards you can't differentiate the left & right apple key as they are wired as the same key. (not sure anymore if the same applies to any of the other modifier keys). i remember using the period as a dual role Fn key (period when tapped, Fn when held)
Keeb.io Viterbi, Apple m0110, Apple m0120, Apple m0110a, Apple 658-4081, Apple M1242, Apple AEK II, MK96, GH60/Pure, Cherry g84-4100, Adesso AKP-220B, Magicforce 68

Offline hasu

  • Thread Starter
  • Posts: 3256
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: ADB to USB keyboard converter
« Reply #1076 on: Thu, 03 June 2021, 04:25:01 »
[FIRMWARE UPDATE]
Updated prebuild firmware in github repo and Keymap Editor.

With new firmware:
- Power key works on Windows as well https://github.com/tmk/tmk_keyboard/commit/a93677cbf145baf210f92a9129ded55c9ef5657b
- Fix swap issue on LAlt and LGUI(Cmd or WIn) https://github.com/tmk/tmk_keyboard/commit/ea4baf1cb6ed34a88c0d478f71d9f17ae069c3c6


Also I updated the first post about pull-up registor, 1K Ohm is recommended now.
4.7K and 10K Ohm didn't work on daisy-chain with multiple devices. See github issue, this is interesting find, methinks. https://github.com/tmk/tmk_keyboard/issues/683#issuecomment-850190574