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

0 Members and 1 Guest are viewing this topic.

Offline superbia

  • Posts: 133
  • Location: Republique de Croatie
Re: ADB to USB keyboard converter
« Reply #750 on: Sun, 23 July 2017, 17:32:19 »
What is the $NAME of the key "#" and when shift it gives "~" ????

I think that's:

KC_NONUS_HASH   or abbreviated   KC_NUHS

They both give me \ and | (with shift), so it's not correct.

EDIT: I don't really care about this key, since it's only a minor issue. But if anyone knows feel free to PM me.
« Last Edit: Mon, 24 July 2017, 07:05:50 by superbia »
Keebio Iris 2.8 (Alps) X Colemak Mod-DH

Offline superbia

  • Posts: 133
  • Location: Republique de Croatie
Re: ADB to USB keyboard converter
« Reply #751 on: Mon, 24 July 2017, 06:47:03 »
Steps for flashing ALL 32u4 boards (verified 24.07.2017)


COMMANDS:
More
$ make -f Makefile.teensy clean
$ make -f Makefile.teensy KEYMAP=aekii
$ avrdude -p m32u4 -c avr109 -P /dev/ttyACM0 -U flash:w:adb_usb_teensy.hex:i


NOTES:
More
1) If you need a custom layout, copy an edit a preexisting one (mine's called aekii).
2) Before executing avrdude make sure to press the reset on the MCU 3-4 times really fast to get it into bootloader mode.
3) As for dependencies, adding your user to group that accesses serial ports, rebooting after, installing git, avrdude, and I think arduino cover's pretty much everything else.
4) The converter you can either make from ebay (from $3 nonbranded to teensy branded) or purchase from hasu directly (recommended hassle free)


Complete video of the entire procedure (3 minutes long):
https://asciinema.org/a/MeAYcgFyUm1uJ8P8xtHPmorkH
Keebio Iris 2.8 (Alps) X Colemak Mod-DH

Offline tristinDLC

  • Posts: 73
  • Location: Seattle, WA
Re: ADB to USB keyboard converter
« Reply #752 on: Thu, 27 July 2017, 04:25:16 »
For now, just few things i need to setup in my keymap file:
What is the $NAME of the key "#" and when shift it gives "~" ???:eek:

Sounds like you might be using a US layout in your keymap which would have the 'Esc' register as '~' when used with 'Shift'. Can you pastebin your keymap.c?

From your picture, you have an odd board. In the US, AEKIIs had '#' as 'Shift+3' (with # being above the 3 on the cap), but in the UK the '#' was replaced by '£' (and £ being above the 3 on the cap). To get to either the '£' or the '#' hidden on each board, you would have to type 'Option+3'. Your board looks different than most so I'm not totally sure which of your keys has '#' on a sub-layer though (I do see you're in Croatia, so you have some ANSI variant I'm sure). A full shot of your board and your keymap.c should help us figure out how to get each of your keys in the right spot. If you are using the US layout in your keymap, then to get '#' you will want 'LSFT+3', but if you are using some foreign variation, then you may have more luck with 'LALT+3'.

Offline superbia

  • Posts: 133
  • Location: Republique de Croatie
Re: ADB to USB keyboard converter
« Reply #753 on: Fri, 28 July 2017, 14:39:37 »
For now, just few things i need to setup in my keymap file:
What is the $NAME of the key "#" and when shift it gives "~" ???:eek:

Sounds like you might be using a US layout in your keymap which would have the 'Esc' register as '~' when used with 'Shift'. Can you pastebin your keymap.c?

From your picture, you have an odd board. In the US, AEKIIs had '#' as 'Shift+3' (with # being above the 3 on the cap), but in the UK the '#' was replaced by '£' (and £ being above the 3 on the cap). To get to either the '£' or the '#' hidden on each board, you would have to type 'Option+3'. Your board looks different than most so I'm not totally sure which of your keys has '#' on a sub-layer though (I do see you're in Croatia, so you have some ANSI variant I'm sure). A full shot of your board and your keymap.c should help us figure out how to get each of your keys in the right spot. If you are using the US layout in your keymap, then to get '#' you will want 'LSFT+3', but if you are using some foreign variation, then you may have more luck with 'LALT+3'.

I found an alternate way to bypass the problem. Even now I have some anomalies when my pc gets auto-shutdown due to low battery, some keys swap places after it resumes from standby/hibernate. But I'm pretty much happy with the results so far. Everyone has slightly different version of keyboard so there should be minor things everyone should be able to fix (like swaping some keys). I'll show you my final aekii.c file that I'm happy with.

More
#include "keymap_common.h"


const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
    KEYMAP_EXT_ISO(
    ESC, F1,  F2,  F3,  F4,  F5,  F6,  F7,  F8,  F9,  F10, F11, F12,           PSCR,SLCK,PAUS,                   NO,
    Z,   1,   2,   3,   4,   5,   6,   7,   8,   9,   0,   MINS,EQL, BSPC,     INS, HOME,PGUP,    NLCK,EQL, PSLS,PAST,
    TAB, Q,   W,   F,   P,   B,   J,   L,   U,   Y,   SCLN,   LBRC,RBRC,ENT,      DEL, END, PGDN,    P7,  P8,  P9,  PMNS,
    BSPC,A,   R,   S,   T,   G,   K,   N,   E,   I,   O,QUOT,NUHS,                             P4,  P5,  P6,  PPLS,
    LSFT,GRV, X,   C,   D,   V,   NO,   M,   H,   COMM,DOT, SLSH,     RSFT,          UP,           P1,  P2,  P3,
    LCTL,LGUI,LALT,          SPC,                               RALT,RCTL,     LEFT,DOWN,RGHT,    P0,       PDOT,PENT
    ),
};

const action_t PROGMEM fn_actions[] = {
};

Keebio Iris 2.8 (Alps) X Colemak Mod-DH

Offline See Spot Solder

  • Posts: 12
  • Location: California
Re: ADB to USB keyboard converter
« Reply #754 on: Mon, 14 August 2017, 05:27:10 »
Hi All,

I'm following this handy little guide to convert the Apple Extended Keyboard II to USB:
http://ifixit.org/blog/4468/hack-it-better-apple-extended-keyboard-ii/

I followed all of the instructions to the letter but I have a problem. The Teensy 2 powers on when plugged as does the Keyboard Num Lock, Caps Lock and Scroll Lock LEDs. The Teensy' LED is on constantly but flashes every 10 seconds. When it flashes the mouse pointer on the screen moves about an inch to the right.

I'm still a bit new to micro controllers and Hex Code so I can't debug the issue myself, to my eyes it seems all good. I've included the code used and my wiring.

Any advice is much appreciated!

Thanks!


I'm having this same issue. Has anyone found a fix for it or know what to do? I tried the modified makefile for teensys with the same result. Is the only possibility that my keyboard is dead?
« Last Edit: Mon, 14 August 2017, 13:19:45 by See Spot Solder »

Offline Mononobe

  • Posts: 6
  • Location: HIROSHIMA pref Japan
  • Use Eng"r"ish.
Mouse sensitive
« Reply #755 on: Wed, 23 August 2017, 10:19:49 »
I'm using this converter with ADB-SQARE mouse.
Is the mouse cursor not moving smoothly, how can I adjust the sensitivity of the mouse cursor?

Offline hasu

  • Thread Starter
  • Posts: 3471
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: ADB to USB keyboard converter
« Reply #756 on: Wed, 23 August 2017, 10:46:25 »
are you sure about your converter hardware?
I remember my square mouse kind of worked well for me.

Offline hasu

  • Thread Starter
  • Posts: 3471
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: ADB to USB keyboard converter
« Reply #757 on: Wed, 23 August 2017, 11:57:26 »
I'm using this converter with ADB-SQARE mouse.
Is the mouse cursor not moving smoothly, how can I adjust the sensitivity of the mouse cursor?

If the issue comes from firmware you will be able to tune parameters here.
https://github.com/tmk/tmk_keyboard/blob/master/converter/adb_usb/matrix.c#L125-L173

Otherwise you may need to improve ADB protocol handling, implementing SRQ may help receiving mouse data more often. Check protocol documents if you are interested.
https://github.com/tmk/tmk_keyboard/blob/master/tmk_core/protocol/adb.c#L266-L272

Offline nevin

  • Posts: 1646
  • Location: US
Re: ADB to USB keyboard converter
« Reply #758 on: Wed, 23 August 2017, 19:58:16 »
I'm using this converter with ADB-SQARE mouse.
Is the mouse cursor not moving smoothly, how can I adjust the sensitivity of the mouse cursor?
Make sure the roller wheels & ball are clean and that there is not any dirt/cob webs on the other end of the roller/wheels (the fins, where they pass through the optical sensor). These old ball mice are very slow even compared to dirt cheap optical mouse (300-600dpi?)
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 Mononobe

  • Posts: 6
  • Location: HIROSHIMA pref Japan
  • Use Eng"r"ish.
Re: ADB to USB keyboard converter
« Reply #759 on: Wed, 23 August 2017, 20:48:09 »
Thanx for your advice.
Will try it in weekend, thanx a lot.

Offline applehugger

  • Posts: 10
Re: ADB to USB keyboard converter
« Reply #760 on: Wed, 06 September 2017, 18:24:37 »
Steps for flashing ALL 32u4 boards (verified 24.07.2017)

COMMANDS:
More
$ make -f Makefile.teensy clean
$ make -f Makefile.teensy KEYMAP=aekii
$ avrdude -p m32u4 -c avr109 -P /dev/ttyACM0 -U flash:w:adb_usb_teensy.hex:i


NOTES:
More
1) If you need a custom layout, copy an edit a preexisting one (mine's called aekii).
2) Before executing avrdude make sure to press the reset on the MCU 3-4 times really fast to get it into bootloader mode.
3) As for dependencies, adding your user to group that accesses serial ports, rebooting after, installing git, avrdude, and I think arduino cover's pretty much everything else.
4) The converter you can either make from ebay (from $3 nonbranded to teensy branded) or purchase from hasu directly (recommended hassle free)


Complete video of the entire procedure (3 minutes long):
https://asciinema.org/a/MeAYcgFyUm1uJ8P8xtHPmorkH

I'm desperately hoping that someone can enlighten me. I've tried and tried but I cannot build firmware for my AEK II. I keep getting the following error:
Code: [Select]
sh: 1: dfu-programmer: not found
sh: 1: dfu-programmer: not found

I get an empty folder called obj_adb_usb_teensy, but no .hex file to load onto my Teensy.

Honestly, I really don't understand why the firmware just isn't provided with this converter like it is with Soarer's converter. I've successfully used Soarer's .hex files on two keyboards and I've remapped a number of keys on my M122 terminal keyboard without issue. However, trying to convert this AEK II keyboard has taken up hours of my time that I wouldn't have wasted if I didn't have to build the firmware manually. As I'm sure anyone can tell, I'm definitely not a programmer; however, I am not new to electronics projects.

FYI, I'm running the make command within a Virtual Machine running Ubuntu Gnome. I appreciate any help anyone can offer.

Offline hasu

  • Thread Starter
  • Posts: 3471
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: ADB to USB keyboard converter
« Reply #761 on: Wed, 06 September 2017, 19:19:49 »
I'm desperately hoping that someone can enlighten me. I've tried and tried but I cannot build firmware for my AEK II. I keep getting the following error:
Code: [Select]
sh: 1: dfu-programmer: not found
sh: 1: dfu-programmer: not found
I don't think this is really your problem, you can ignore the messages and it means you don't have dfu-programmer. Install it.

Fixed this anyway, it doesn't displays the message now even if you don't have the command.
https://github.com/tmk/tmk_keyboard/commit/9d66875636614172f7323c5986bfc3cf93b15c13

Quote
I get an empty folder called obj_adb_usb_teensy, but no .hex file to load onto my Teensy.

Honestly, I really don't understand why the firmware just isn't provided with this converter like it is with Soarer's converter. I've successfully used Soarer's .hex files on two keyboards and I've remapped a number of keys on my M122 terminal keyboard without issue. However, trying to convert this AEK II keyboard has taken up hours of my time that I wouldn't have wasted if I didn't have to build the firmware manually. As I'm sure anyone can tell, I'm definitely not a programmer; however, I am not new to electronics projects.

FYI, I'm running the make command within a Virtual Machine running Ubuntu Gnome. I appreciate any help anyone can offer.

You can download binary from keymap editor and you can find the link in first post. I regret this didn't save  your and my time.

If you still need to build from source code you better post all output from make.
« Last Edit: Wed, 06 September 2017, 19:21:32 by hasu »

Offline applehugger

  • Posts: 10
Re: ADB to USB keyboard converter
« Reply #762 on: Thu, 07 September 2017, 19:47:04 »
I'm desperately hoping that someone can enlighten me. I've tried and tried but I cannot build firmware for my AEK II. I keep getting the following error:
Code: [Select]
sh: 1: dfu-programmer: not found
sh: 1: dfu-programmer: not found
I don't think this is really your problem, you can ignore the messages and it means you don't have dfu-programmer. Install it.

Fixed this anyway, it doesn't displays the message now even if you don't have the command.
https://github.com/tmk/tmk_keyboard/commit/9d66875636614172f7323c5986bfc3cf93b15c13

Quote
I get an empty folder called obj_adb_usb_teensy, but no .hex file to load onto my Teensy.

Honestly, I really don't understand why the firmware just isn't provided with this converter like it is with Soarer's converter. I've successfully used Soarer's .hex files on two keyboards and I've remapped a number of keys on my M122 terminal keyboard without issue. However, trying to convert this AEK II keyboard has taken up hours of my time that I wouldn't have wasted if I didn't have to build the firmware manually. As I'm sure anyone can tell, I'm definitely not a programmer; however, I am not new to electronics projects.

FYI, I'm running the make command within a Virtual Machine running Ubuntu Gnome. I appreciate any help anyone can offer.

You can download binary from keymap editor and you can find the link in first post. I regret this didn't save  your and my time.

If you still need to build from source code you better post all output from make.

Oh. Well now I feel rather foolish for not noticing that the firmware is available for download on the keymap editor. Thank you very much for your assistance though.
Another member kindly provided me with firmware as well; nothing is working. After some discussion with that gentleman,  we suspect that I need a pullup resistor, which I have on order. Nevertheless, it is extremely nice to have working formware to test with this keyboard. Thanks again for your help and thank you for this great little converter.

Offline GHrobson

  • Posts: 2
Re: ADB to USB keyboard converter
« Reply #763 on: Sun, 17 September 2017, 14:01:12 »
Hello Everyone.

I'm hoping one of you can help me. I'm attempting to build an ADB-USB convertor using Teensy 2.0 for a Apple Extended Keyboard II.

Last week after a lot of struggling to build an Teensy ISO firmware hex, I thought I had managed to do it - i managed to load it onto my teensy, but my other parts to actually connect it to my keyboard hadn't arrived yet so I couldn't test it. One odd thing I noticed was whenever the teensy was attached to my Mac running the firmware I built, my cursor would occasionally jump slightly to the left. I assumed that might just be because I hadn't connected my Teensy to a keyboard yet and so I just waited until the rest of my parts arrived.

Today I soldered up my adapter (with a 1k pull up resistor) and connected it to my AEK II - Nothing works at all, I can't type anything whatsoever. And also the weird cursor jumping to the left thing still happens. I used my electronic tester to make sure I wasn't shorting anything and everything seems to be fine there.

Next to try and rule things out I instead downloaded the prebuilt firmware from the TMK Keymap editor - but there isn't a Teensy option and the rev 1 and rev 2 hex files didn't seem to work either since I guess they aren't for the Teensy. Next I uploaded my built hex file to TMK Keymap editor and discovered that all my keys just said 'TRNS' which I assume to mean something went wrong when I built my own firmware. I have tried Googling to find a prebuilt version of the teensy 2.0 version of the firmware but I can't find anything.

So basically, would someone be able to supply me with an ISO Teensy firmware that is known to work so I can see if it works? I was very excited to get this going but I don't seem to be having much luck!

I apologise for how long this post is but I didn't want to leave anything out, just in case there was something obvious I missed - but based on how my firmware comes up blank on TMK Keymap editor - I assume my build was the issue!

Many thanks in advance,

Graham

Offline hasu

  • Thread Starter
  • Posts: 3471
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: ADB to USB keyboard converter
« Reply #764 on: Tue, 19 September 2017, 15:25:16 »
Graham,
Mouse cursor problem indicates your pull-up resistor is wrong, check first post again.
Rev1 firmware should works on Teensy and support ISO keyboard, you don't have to compile yourself.

Offline rich1051414

  • Posts: 353
  • Location: Decaturville, TN
Re: ADB to USB keyboard converter
« Reply #765 on: Wed, 20 September 2017, 00:14:38 »
For some reason, my pins were inverted(mirror reflection) of your guide. Is that because I cut the wrong end? I don't think so, maybe I am just looking at it from the wrong angle xD I hate dyslexia sometimes. I am using an original AEK keyboard.
On my cable, the red wire was 5v, Orange was ground, and black was data. Brown was ignored. Orange being ground is weird enough to make me question existence...
« Last Edit: Wed, 20 September 2017, 00:41:34 by rich1051414 »
Siig Minitouch with Orange Alps, Whitefox 60% Zealios 67g, Realforce 87U 55g Topre, LFK SMK/Alps TKL With SMK 2nd Gen Cherry MX mount switches, NEC APC-H412 NEC Blue Ovals, Unicomp Model-M Spacesaver, XMIT Hall Effect, WASD Code Cherry MX Clear, KBDFans75 Lubed Gateron Greens, Azio MGK L80 Kailh Brown, XD84 Pale Blue Box Kailh, NIB Pingmaster TMK Converted, KPrepublic XD96 Blue aluminum case with Jade Box Kailh

Offline GHrobson

  • Posts: 2
Re: ADB to USB keyboard converter
« Reply #766 on: Wed, 20 September 2017, 04:58:08 »
Graham,
Mouse cursor problem indicates your pull-up resistor is wrong, check first post again.
Rev1 firmware should works on Teensy and support ISO keyboard, you don't have to compile yourself.

Thanks for your assistance, I have it working now - I tried soldering the wire and resistor to the other VCC port on the Teensy and it started working right away - I can only assume I must have damaged the trace to the initial VCC port when I soldered the wire and resistor to it the first time round.

My AEK II now works perfectly.
Thank you Hasu and the nice fella who private messaged me and looked over my wiring and soldering for me!

Offline hasu

  • Thread Starter
  • Posts: 3471
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: ADB to USB keyboard converter
« Reply #767 on: Wed, 20 September 2017, 05:22:06 »
For some reason, my pins were inverted(mirror reflection) of your guide. Is that because I cut the wrong end? I don't think so, maybe I am just looking at it from the wrong angle xD I hate dyslexia sometimes. I am using an original AEK keyboard.
On my cable, the red wire was 5v, Orange was ground, and black was data. Brown was ignored. Orange being ground is weird enough to make me question existence...
which guide are you referring? first post?
I'll fix confusing part of the guide for future diyers.

you cannot depend on wire colors anytime, they are likely to be different cable by cable. use multimeter always.

Offline rich1051414

  • Posts: 353
  • Location: Decaturville, TN
Re: ADB to USB keyboard converter
« Reply #768 on: Wed, 11 October 2017, 12:11:10 »
For some reason, my pins were inverted(mirror reflection) of your guide. Is that because I cut the wrong end? I don't think so, maybe I am just looking at it from the wrong angle xD I hate dyslexia sometimes. I am using an original AEK keyboard.
On my cable, the red wire was 5v, Orange was ground, and black was data. Brown was ignored. Orange being ground is weird enough to make me question existence...
which guide are you referring? first post?
I'll fix confusing part of the guide for future diyers.

you cannot depend on wire colors anytime, they are likely to be different cable by cable. use multimeter always.
It was My mistake, I was reading the pin out diagram as if it was a male connector, and not a female.
Siig Minitouch with Orange Alps, Whitefox 60% Zealios 67g, Realforce 87U 55g Topre, LFK SMK/Alps TKL With SMK 2nd Gen Cherry MX mount switches, NEC APC-H412 NEC Blue Ovals, Unicomp Model-M Spacesaver, XMIT Hall Effect, WASD Code Cherry MX Clear, KBDFans75 Lubed Gateron Greens, Azio MGK L80 Kailh Brown, XD84 Pale Blue Box Kailh, NIB Pingmaster TMK Converted, KPrepublic XD96 Blue aluminum case with Jade Box Kailh

Offline KyleGP

  • Posts: 1
Re: ADB to USB keyboard converter
« Reply #769 on: Sat, 28 October 2017, 02:09:57 »
Hi all,

I'm new here.

Wired my Apple design keyboard upto a teensy 2.0 today.

Built and flashed the firmware with no issue.

When I plug the keyboard in, all three lights on the keyboard illuminate bright and normal for a second then turn off. The keyboard does not respond at all when I press keys. When I push the power key on the keyboard, all three lights illuminate when holding that key.

Any ideas what else I further need to do here? I've tried rebuilding the firmware, trying the unimap firmware etc.

I haven't used a pull up resistor with the teensy as I dont have a 1K resistor atm. Would this likely be the problem?
« Last Edit: Sat, 28 October 2017, 03:50:41 by KyleGP »

Offline hasu

  • Thread Starter
  • Posts: 3471
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: ADB to USB keyboard converter
« Reply #770 on: Sat, 28 October 2017, 16:07:42 »
First, you must have pull-up resistor.
Any of 1k-10k works. Without this it is difficult to debug the problem.


Offline rich1051414

  • Posts: 353
  • Location: Decaturville, TN
Re: ADB to USB keyboard converter
« Reply #771 on: Sun, 29 October 2017, 05:59:14 »
First, you must have pull-up resistor.
Any of 1k-10k works. Without this it is difficult to debug the problem.
Yep, mine wouldn't work AT ALL without a pull up resistor. I assumed I wouldn't need it because I was not going to use a mouse, but the keyboard would not function, period, until I added the pull up resistor.
Siig Minitouch with Orange Alps, Whitefox 60% Zealios 67g, Realforce 87U 55g Topre, LFK SMK/Alps TKL With SMK 2nd Gen Cherry MX mount switches, NEC APC-H412 NEC Blue Ovals, Unicomp Model-M Spacesaver, XMIT Hall Effect, WASD Code Cherry MX Clear, KBDFans75 Lubed Gateron Greens, Azio MGK L80 Kailh Brown, XD84 Pale Blue Box Kailh, NIB Pingmaster TMK Converted, KPrepublic XD96 Blue aluminum case with Jade Box Kailh

Offline Mononobe

  • Posts: 6
  • Location: HIROSHIMA pref Japan
  • Use Eng"r"ish.
Re: ADB to USB keyboard converter
« Reply #772 on: Fri, 10 November 2017, 14:48:32 »
Even if I hit the Command key on the right it will be recognized as "command key on the left"
How can I distinguish between right and left?

Offline _rubik

  • * Esteemed Elder
  • Posts: 1090
  • Location: 192.168.x.x
  • Typing on: Brutal60, Lavenders Linears, GMK Jamon
Re: ADB to USB keyboard converter
« Reply #773 on: Mon, 13 November 2017, 19:30:34 »
So I have followed this guide.. and have run into a bit of a noob issue. I have everything wired correctly (I think), with the pullup resistor.  My computer recognizes the usb device. But when I try to make and flash using dfu-programmer, I get stuck at 'waiting...'. I'm using a pro micro atmega32u4, so I double tap a reset lead to ground and the red light flashes.... Still stuck at waiting....

Any ideas?

Edit: So far I have tried:

make -f Makefile clean
make -f Makefile KEYMAP=plain
make -f Makefile KEYMAP=plain dfu

waiting.... (no matter how many times I reset the board)

--- and my alternate attempt ---

$ avrdude -p atmega32u4 -c avr109 -P /dev/tty.usbmodem81 -U flash:w:adb_usb_teensy.hex:i  (Note: my Pro Micro flashes)

Connecting to programmer: .avrdude: butterfly_recv(): programmer is not responding

avrdude: butterfly_recv(): programmer is not responding
avrdude: butterfly_recv(): programmer is not responding
avrdude: butterfly_recv(): programmer is not responding
avrdude: ser_recv(): read error: Device not configured
avrdude: butterfly_recv(): programmer is not responding
avrdude: ser_send(): write error: Device not configured
avrdude: ser_recv(): read error: Device not configured
avrdude: butterfly_recv(): programmer is not responding
Found programmer: Id = ""; type =
    Software Version = .; Hardware Version = .
avrdude: ser_send(): write error: Device not configured
avrdude: ser_recv(): read error: Device not configured
avrdude: butterfly_recv(): programmer is not responding
avrdude: ser_send(): write error: Device not configured
avrdude: ser_recv(): read error: Device not configured
avrdude: butterfly_recv(): programmer is not responding
avrdude: error: buffered memory access not supported. Maybe it isn't
a butterfly/AVR109 but a AVR910 device?
avrdude: initialization failed, rc=-1
         Double check connections and try again, or use -F to override
         this check.

avrdude: ser_send(): write error: Device not configured
avrdude: ser_recv(): read error: Device not configured
avrdude: butterfly_recv(): programmer is not responding
avrdude: error: programmer did not respond to command: leave prog mode
avrdude: ser_send(): write error: Device not configured
avrdude: ser_recv(): read error: Device not configured
avrdude: butterfly_recv(): programmer is not responding
avrdude: error: programmer did not respond to command: exit bootloader
avrdude: ser_close(): can't reset attributes for device: Device not configured

avrdude done.  Thank you.

--- and ---

$ dfu-programmer atmega32u4 flash adb_usb_teensy.hex

dfu-programmer: no device present.
« Last Edit: Mon, 13 November 2017, 20:52:21 by _rubik »
ai03 Meridian ¤ Mech 27 ¤ E8.5 ¤ Brutal60 ¤ SSK White Label ¤ HHKB Pro JP ¤ vAEK68 Alps Blues ¤ RF87u

Offline Floofs

  • Posts: 38
  • Location: Texas, USA
Re: ADB to USB keyboard converter
« Reply #774 on: Thu, 30 November 2017, 19:14:32 »
Hello all, thanks for all the hard work you have done! I'm trying to convert a M0116 to usb using teensy 2.0. I wired up the teensy to the board and I'm getting nothing. The firmware was downloaded from the keymap website and I used the teensy GUI to load the hex file. I'm very new to this kind of thing and am hoping it is something simple. Someone please help me get it working. Thanks in advance

Sent from my SAMSUNG-SM-G935A using Tapatalk


Offline twin_rotor

  • Posts: 37
  • Location: Arkansas
Re: ADB to USB keyboard converter
« Reply #775 on: Sat, 02 December 2017, 07:28:28 »
Hello all, thanks for all the hard work you have done! I'm trying to convert a M0116 to usb using teensy 2.0. I wired up the teensy to the board and I'm getting nothing. The firmware was downloaded from the keymap website and I used the teensy GUI to load the hex file. I'm very new to this kind of thing and am hoping it is something simple. Someone please help me get it working. Thanks in advance
Show Image
Show Image
Show Image


Sent from my SAMSUNG-SM-G935A using Tapatalk

I only see three wires? Either your data or clock is missing,  as you have ground and VCC wired
« Last Edit: Sat, 02 December 2017, 07:30:49 by twin_rotor »
Multitech KB-101A

Offline Floofs

  • Posts: 38
  • Location: Texas, USA
Re: ADB to USB keyboard converter
« Reply #776 on: Sat, 02 December 2017, 08:34:37 »
Hello all, thanks for all the hard work you have done! I'm trying to convert a M0116 to usb using teensy 2.0. I wired up the teensy to the board and I'm getting nothing. The firmware was downloaded from the keymap website and I used the teensy GUI to load the hex file. I'm very new to this kind of thing and am hoping it is something simple. Someone please help me get it working. Thanks in advance
Show Image
Show Image
Show Image


Sent from my SAMSUNG-SM-G935A using Tapatalk

I only see three wires? Either your data or clock is missing,  as you have ground and VCC wired
Ok I'll try that. It was my understanding that the adb converter didn't need a 4th because it was only for the power button

Sent from my SAMSUNG-SM-G935A using Tapatalk


Offline twin_rotor

  • Posts: 37
  • Location: Arkansas
Re: ADB to USB keyboard converter
« Reply #777 on: Sat, 02 December 2017, 08:41:07 »
You might be correct. I missed that it was an ADB; I've only put one together for an AT/XT keyboard and haven't looked at the ADB configuration.

EDIT: I am an idiot. Should have paid more attention.  I made the post before I was fully awake and missed which thread this was *smacks forehead*

« Last Edit: Sat, 02 December 2017, 08:45:06 by twin_rotor »
Multitech KB-101A

Offline Floofs

  • Posts: 38
  • Location: Texas, USA
Re: ADB to USB keyboard converter
« Reply #778 on: Sun, 03 December 2017, 21:16:56 »
So I got it working by downloading the hex file from https://github.com/tmk/tmk_keyboard/tree/master/converter/adb_usb/binary

For some reason the file downloaded from the keymap editor wasn't working for me. So glad it's working now though! I'm typing this on it! Woooo!! Seriously, big thanks to all the work that hasu and many others have put in. You guys are amazing.
« Last Edit: Mon, 04 December 2017, 09:12:48 by Floofs »

Offline hasu

  • Thread Starter
  • Posts: 3471
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: ADB to USB keyboard converter
« Reply #779 on: Thu, 18 January 2018, 23:51:09 »
[Firmware update]
Hi folks,
I got a report from some user about lag on typing the other day. Today I confirmed the lag problem and fixed it. Source code in github repo and firmware binary in Keyboard Editor was updated.

You can download new firmware from Keyboard Editor.
http://www.tmk-kbd.com/tmk_keyboard/editor/unimap/?adb_usb


This problem was related to  ADB mouse support and have been missed for long. Filed it and added some descriptions here. https://github.com/tmk/tmk_keyboard/issues/518

With the new firmware it reads key evernts from keyboard around twice faster than before. That being said, ADB protocol and keyboard controller is not that fast comparing with modern keyboards.

Offline myst02

  • Posts: 4
Re: ADB to USB keyboard converter
« Reply #780 on: Tue, 06 March 2018, 14:11:46 »
Hey everyone!

I'm trying to convert an AEK II to USB using a Teensy 2.0. I've downloaded the converter firmware from GitHub, compiled it and flashed it to the Teensy.

But somehow it's not working, the lights on the keyboard are off and there's no response to pressing keys. I've checked the hid_listen debug log, it shows info up to "Keyboard start." when the keyboard is plugged in, but after that, there's no debug info even when a key is pressed.

I've re-checked my wiring multiple times and it seems to be okay. I'm using the port F0 on the Teensy and I have changed it to F0 in config.h. I've attached some pictures of my wiring.

Thanks for this great project, I would be really happy if someone could help me with this :)

Offline senso

  • Posts: 47
  • Location: Portugal
Re: ADB to USB keyboard converter
« Reply #781 on: Tue, 06 March 2018, 18:29:55 »
You are missing the ground wire.

Offline myst02

  • Posts: 4
Re: ADB to USB keyboard converter
« Reply #782 on: Tue, 06 March 2018, 23:30:51 »
You are missing the ground wire.
The ground wire should be connected properly (green wire in the picture).

Are the wires connected to the right solder joints on the ADB port? I used this guide, but additionally soldered a 1k resistor. https://ifixit.org/blog/4468/hack-it-better-apple-extended-keyboard-ii/

Sent from my ONEPLUS A3003 using Tapatalk


Offline senso

  • Posts: 47
  • Location: Portugal
Re: ADB to USB keyboard converter
« Reply #783 on: Wed, 07 March 2018, 06:44:28 »
My bad, didn't notice..

What is the pull up value?

Did you also change the DDR, PORT and PIN to DDRF, PORTF and PINF?

Offline myst02

  • Posts: 4
Re: ADB to USB keyboard converter
« Reply #784 on: Wed, 07 March 2018, 07:10:02 »
My bad, didn't notice..

What is the pull up value?

Did you also change the DDR, PORT and PIN to DDRF, PORTF and PINF?
I'm using a 1k 1/8W resistor for pull-up. I've also changed the ports in config.h.

At first, I forgot to change the ports, which caused an error in debug mode and also moved my mouse left all the time.

After I changed it, there are no errors anymore, also the mouse problem has disappeared, so I'm guessing there must be some sort of connection to the keyboard. I really don't know why it won't work :(

Sent from my ONEPLUS A3003 using Tapatalk


Offline sniff

  • Posts: 2
Re: ADB to USB keyboard converter
« Reply #785 on: Wed, 07 March 2018, 23:57:19 »
First post so I apologize if I am breaking protocol or this is the wrong thread to post to :( A second apology is for the horrifically confusing way I'm about to describe a behavior I've observed :(

I am typing this out on an Apple AEK (M0115) and have a Teensy 2.0 wired up with the adb-to-usb firmware loaded (slightly modified keymap for some media controls). This has been working great for the most part, but I've noticed my keyboard dropping certain keys if I type them too quickly. I can reproduce the behavior by pressing particular key groups at the same time. I've observed the exact same behavior on an M3501 I modded with the exact same firmware and keymap.

An example is the O and P key. If I press them along with any other key in the same row (at least, the alpha keys) at the same time I get a subset of the keys (or no keys) sent to the console. Pressing I, O, and P together may register from 0 to 2 keys pressed, but never all three. I first noticed this because I type the word "report" a lot at my job and I would sometimes end up missing 3 letters in the word. The "same row" observation may be a red herring--pressing O, P and K has a similar effect.

I can do the same thing with the L and K keys. Pressing them along with another key in the same row at the same time yields anywhere from 0 to 2 keys being registered.

Same with the M and < keys.  Pressing M, <, and > together may yield 0-2 keys.

Other key groupings seem fine. For example, though O and P have issues, I can move over to Q, W, and E in the same row and press them at the same time without issue.

Does this sound familiar to anyone? I'm happy to provide any more information/images/code that could help identify the cause!

I've been building off of this commit: https://github.com/tmk/tmk_keyboard/commit/09d380d31366d3f965b376031964bfd76526f018

Thanks!
« Last Edit: Thu, 08 March 2018, 13:11:05 by sniff »

Offline hasu

  • Thread Starter
  • Posts: 3471
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: ADB to USB keyboard converter
« Reply #786 on: Thu, 08 March 2018, 00:27:01 »
sniff,
You will want to know ghost key problem on keyboard matrix.
https://www.dribin.org/dave/keyboard/one_html/

This page has key matrix of Apple Extended Keyboard II and you can know which key combination have the problem.
http://ttic.uchicago.edu/~cotter/projects/aek2/


EDIT: This problem is related to the keyboard itself, not converter. You can't solve it with converter.
« Last Edit: Thu, 08 March 2018, 00:32:52 by hasu »

Offline pixelpusher

  • * Elevated Elder
  • Posts: 4179
  • Location: Tennessee - USA
Re: ADB to USB keyboard converter
« Reply #787 on: Thu, 08 March 2018, 12:00:02 »
picked up another ADB board this week.  It's a NIB ortek keyboard with trackball:

https://www.amazon.com/gp/product/B00JE3UZS6/ref=oh_aui_detailpage_o00_s00?ie=UTF8&psc=1


The good deal here is that it actually comes with Pine white switches.  They feel very nice, indeed.  I didn't figure the trackball would work, and it doesn't.  The buttons click on it, however.

The board is decent.  Build quality is fairly budget.  I've give it a 3.5/10.

Do you think it is possible that someone could implement a way to get this trackball working over usb?  I'm torn because I'm thinking about just harvesting the switches out of it, but if the trackball worked, I would keep them in the board.

Offline sniff

  • Posts: 2
Re: ADB to USB keyboard converter
« Reply #788 on: Thu, 08 March 2018, 13:12:09 »
sniff,
You will want to know ghost key problem on keyboard matrix.
https://www.dribin.org/dave/keyboard/one_html/

This page has key matrix of Apple Extended Keyboard II and you can know which key combination have the problem.
http://ttic.uchicago.edu/~cotter/projects/aek2/


EDIT: This problem is related to the keyboard itself, not converter. You can't solve it with converter.

Thanks, those were great resources!

Offline myst02

  • Posts: 4
Re: ADB to USB keyboard converter
« Reply #789 on: Sat, 10 March 2018, 04:14:43 »
Since I've posted the last time, I soldered the 5V wire to D0 instead of F0. I also used a 1/4W resistor this time instead of an 1/8W one.
It's still not working. At first I was thinking the keyboard is faulty, but I had the opportunity to test it on an old PowerBook yesterday and it worked flawlessly, so it can't be that.

Still the same, no output in console, no debug info, no mouse jumping, nothing. Tried flashing Teensy and Unimap firmware, doesn't make a difference.
Can anybody help me with this? I don't know what to try anymore...

Offline hasu

  • Thread Starter
  • Posts: 3471
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: ADB to USB keyboard converter
« Reply #790 on: Sat, 10 March 2018, 18:03:37 »
download firmware here and flash it. If it doesn't work with this culpirt will be your wiring. Try every wire comination on ADB connector with trial and error.
http://www.tmk-kbd.com/tmk_keyboard/editor/unimap/?adb_usb_rev1

Offline ILA

  • Posts: 9
Re: ADB to USB keyboard converter
« Reply #791 on: Tue, 13 March 2018, 20:28:59 »
I am having trouble getting this to work for me. I am trying to use it with an arduino pro micro clone. As far as I can tell from this schematic I need the pin 3 which should be connected to the needed PD0.

In the terminal I ran the following commands:
Code: [Select]
make -f Makefile.rev1 clean
make -f Makefile KEYMAP=iso
avrdude -p m32u4 -c avr109 -P /dev/ttyACM0 -U flash:w:adb_usb_rev1.hex:i

I have attached the pictures of my wiring below. What I'm experiencing is the well known mouse moving a little to the left every second as well as all three leds light up. Of course, no key input.

So far I have tried the 1K, 3K3 and 10K resistors and none seem to make any difference.

Does anyone see any obvious mistakes?

Offline hasu

  • Thread Starter
  • Posts: 3471
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: ADB to USB keyboard converter
« Reply #792 on: Tue, 13 March 2018, 21:04:49 »
I am having trouble getting this to work for me. I am trying to use it with an arduino pro micro clone. As far as I can tell from this schematic I need the pin 3 which should be connected to the needed PD0.

In the terminal I ran the following commands:
Code: [Select]
make -f Makefile.rev1 clean
make -f Makefile KEYMAP=iso
avrdude -p m32u4 -c avr109 -P /dev/ttyACM0 -U flash:w:adb_usb_rev1.hex:i

I have attached the pictures of my wiring below. What I'm experiencing is the well known mouse moving a little to the left every second as well as all three leds light up. Of course, no key input.

So far I have tried the 1K, 3K3 and 10K resistors and none seem to make any difference.

Does anyone see any obvious mistakes?

You need 5V pro micro are your one is 3.3V? Probably you can mod it to 5V.

[edit] Probably you can convert 3.3V Pro Micro into 5V by shorting solder jumper J1.
« Last Edit: Tue, 13 March 2018, 21:21:40 by hasu »

Offline ILA

  • Posts: 9
Re: ADB to USB keyboard converter
« Reply #793 on: Tue, 13 March 2018, 21:37:50 »
I am having trouble getting this to work for me. I am trying to use it with an arduino pro micro clone. As far as I can tell from this schematic I need the pin 3 which should be connected to the needed PD0.

In the terminal I ran the following commands:
Code: [Select]
make -f Makefile.rev1 clean
make -f Makefile KEYMAP=iso
avrdude -p m32u4 -c avr109 -P /dev/ttyACM0 -U flash:w:adb_usb_rev1.hex:i

I have attached the pictures of my wiring below. What I'm experiencing is the well known mouse moving a little to the left every second as well as all three leds light up. Of course, no key input.

So far I have tried the 1K, 3K3 and 10K resistors and none seem to make any difference.

Does anyone see any obvious mistakes?

You need 5V pro micro are your one is 3.3V? Probably you can mod it to 5V.

[edit] Probably you can convert 3.3V Pro Micro into 5V by shorting solder jumper J1.

Must say that you've got me thinking there for a while so I decided to measure it. Measured Vcc to Gnd and you can see it's (almost) 5V.

Offline hasu

  • Thread Starter
  • Posts: 3471
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: ADB to USB keyboard converter
« Reply #794 on: Tue, 13 March 2018, 21:59:05 »
If VCC(not RAW) is 5V and crystal is 16MHz your Pro Micro is good. Then your wiring or keyboard is culprit now.

Offline ILA

  • Posts: 9
Re: ADB to USB keyboard converter
« Reply #795 on: Wed, 14 March 2018, 06:02:23 »
If VCC(not RAW) is 5V and crystal is 16MHz your Pro Micro is good. Then your wiring or keyboard is culprit now.

Indeed, it's from Vcc and the crystal is 16MHz. The wiring is shown on the pictures above. It should be OK, but a second opinion is always great to have. As for the keyboard, sadly, I don't have a way to test it as I don't have a Mac nor an oscilloscope... Anything else I could do?

The keyboard is AEKII with an ISO layout btw.
« Last Edit: Wed, 14 March 2018, 06:53:57 by ILA »

Offline hasu

  • Thread Starter
  • Posts: 3471
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: ADB to USB keyboard converter
« Reply #796 on: Wed, 14 March 2018, 07:25:32 »
If VCC(not RAW) is 5V and crystal is 16MHz your Pro Micro is good. Then your wiring or keyboard is culprit now.

Indeed, it's from Vcc and the crystal is 16MHz. The wiring is shown on the pictures above. It should be OK, but a second opinion is always great to have. As for the keyboard, sadly, I don't have a way to test it as I don't have a Mac nor an oscilloscope... Anything else I could do?

The keyboard is AEKII with an ISO layout btw.

Try to short the soder jumper even if you got 5V Pro Micro. It seems that some people had problem with old keyboard and solved with shorting.
https://deskthority.net/workshop-f7/how-to-use-a-pro-micro-as-a-cheap-controller-converter-like-soarer-s-t8448-240.html#p358362

With some internet searchs someone says 5V Pro Micro has 5V regulator for some reason. I guess the reglator may not be good enough for old power-hog keyboard and shorting the solder jumper can solve it perhaps.


Offline ILA

  • Posts: 9
Re: ADB to USB keyboard converter
« Reply #797 on: Wed, 14 March 2018, 08:49:13 »
Try to short the soder jumper even if you got 5V Pro Micro. It seems that some people had problem with old keyboard and solved with shorting.
https://deskthority.net/workshop-f7/how-to-use-a-pro-micro-as-a-cheap-controller-converter-like-soarer-s-t8448-240.html#p358362

With some internet searchs someone says 5V Pro Micro has 5V regulator for some reason. I guess the reglator may not be good enough for old power-hog keyboard and shorting the solder jumper can solve it perhaps.

Just soldered J1 and still nothing. I've even soldered a 10K resistor between Vcc and pin 3 just to be sure that the contact is good. I've measured 5.21V between Vcc and Gnd when connected to the keyboard so this shouldn't be the issue anymore. Any other ideas?

Tried it with a 3K3 resistor as well as attaching it to the rear USB, and still the same.

Offline superbia

  • Posts: 133
  • Location: Republique de Croatie
Re: ADB to USB keyboard converter
« Reply #798 on: Thu, 15 March 2018, 03:01:48 »
Try to short the soder jumper even if you got 5V Pro Micro. It seems that some people had problem with old keyboard and solved with shorting.
https://deskthority.net/workshop-f7/how-to-use-a-pro-micro-as-a-cheap-controller-converter-like-soarer-s-t8448-240.html#p358362

With some internet searchs someone says 5V Pro Micro has 5V regulator for some reason. I guess the reglator may not be good enough for old power-hog keyboard and shorting the solder jumper can solve it perhaps.

Just soldered J1 and still nothing. I've even soldered a 10K resistor between Vcc and pin 3 just to be sure that the contact is good. I've measured 5.21V between Vcc and Gnd when connected to the keyboard so this shouldn't be the issue anymore. Any other ideas?

Tried it with a 3K3 resistor as well as attaching it to the rear USB, and still the same.

Personally, seeing your LED's light up, I take it your power works (you've got 5v), and the signal is what is not working.
I'd replace the signal wire with a new wire (wires are known to be cheap and nasty), use 1k resistor.
And based on the Wiring diagram, I'd try to swap o2 and 1o and see if that makes a difference.
If it's still dead, then you didn't flash it correctly, or your pins and ports are fried.

Systematic approach to find the problem:

I. Microcontroller
More
  • Disconnect everything from your microcontroller (you only need reset button
  • Use arduino IDE to upload a blinky example to your microcontroller (increase blink time to 5 seconds, and blink the ports and pins you plan to use with your keyboard)
  • Use voltmeter to verify your pin's change from 0 to 5 volts, and vice versa


II. Firmware
More
  • Disconnect everything from your microcontroller (you only need reset button)
  • Watch and follow the asciinema video I posted few posts ago, and check if your output matches mines
  • Use voltmeter to verify the blinky firmware was overwritten


III. Wiring
More
  • Remove everything from your breadboard (you need reset button)
  • Verify all of your breadboard wires work (even when twisted around connectors)
  • Double-check all of your ports and pins on the microcontroller
  • Start connecting according to the schematic found here https://github.com/tmk/tmk_keyboard/tree/master/converter/adb_usb
  • You could try swaping o2 and 1o (always disconnect keyboard before hot-swapping wires)


tl;dr
Keebio Iris 2.8 (Alps) X Colemak Mod-DH

Offline ILA

  • Posts: 9
Re: ADB to USB keyboard converter
« Reply #799 on: Fri, 16 March 2018, 04:24:47 »
Ok, so I've tried the process all over again. I see that I've made a mistake in my original post. The second command I use is obviously "make -f Makefile.rev1 KEYMAP=iso", instead of just Makefile.

Anyway, since I have two Pro Micros at hand, one is with the J1 jumped, and the other is not. The 5 second blink sketch works as it should, but the thing I've noticed between the two boards is that the "unjumped" one outputs only 4.6V on pin 3 where the jumped one outputs a nice 4.97V so there is a definite need for the jumper.
Now, ever since day one, I've noticed that both boards behave a bit strange meaning that the blink sketch had some interference. Now I know that it's probably because it uses pin 17 for the integrated led and i just figured that the PC pings the board from time to time and that's why it blinked randomly. The second thing I've noticed is that it's registered as a Leonardo instead of a pro micro. Now that shouldn't be too surprising since the pro micro runs just a modified Leonardo bootloader, but I figured that I would reflash the bootloader just in case. I've used the Arduino as ISP method and selected the board to be the Sparcfun pro micro, 5V@16MHz and flashed it. After that, it just seems that the ROM is corrupt or not partitioned right. I can upload a small sketch like a blink sketch and right after the bootloader flash (first upload after the flash), but when I tried to upload tmk (second upload), it froze on 12% the first time. After a bootloader reflash, tmk upload froze on 10%. Third time arround on 5%, but it's not degrading, it just hangs at random... I've even tried to upload tmk on first upload, but I get the same results. Note that that is on a pro micro with jumped J1 so maybe something is going on there and I will try to flash it without J1.

The problem is that my vacation is now over, so I won't have time to work on this until April... So as much as this looked like a long report to you, it'll serve as a backlog for me to know what I've done when I get back to this.

In the meantime, I'm thinking of ordering a new pro micro from a different vendor and see if that would make any difference.

I'll get back to you as soon as I've made any progress.