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

0 Members and 1 Guest are viewing this topic.

Offline hasu

  • Thread Starter
  • Posts: 3472
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: ADB to USB keyboard converter
« Reply #650 on: Mon, 26 September 2016, 04:14:14 »
Not sure exactly what your problem is but you may still want to check wiki for build on Windows.

Or you can just use keymap editor.

Sent from my Nexus 5X


Offline stat

  • Posts: 5
Re: ADB to USB keyboard converter
« Reply #651 on: Mon, 26 September 2016, 19:11:35 »
Not sure exactly what your problem is but you may still want to check wiki for build on Windows.

Or you can just use keymap editor.

Sent from my Nexus 5X

Thanks for the quick response! I saw the wiki, which directed me toward build.md which I have been following. I have already edited the keymap in the files. I'm using MinGW/msys for bash commands.

My problem is that I can't use avr-gcc. I have the directory downloaded from Atmel, but I can't get MinGW or my computer to recognize or use it.

I have 8-bit version 3.5.3 from here: http://www.atmel.com/tools/ATMELAVRTOOLCHAINFORWINDOWS.aspx

Offline hasu

  • Thread Starter
  • Posts: 3472
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: ADB to USB keyboard converter
« Reply #652 on: Mon, 26 September 2016, 19:44:07 »
That toolchain should work. Just configure your PATH environment variable correctly.

You don't have to move or copy tool chain.

Sent from my Nexus 5X


Offline stat

  • Posts: 5
Re: ADB to USB keyboard converter
« Reply #653 on: Mon, 26 September 2016, 21:19:51 »
That toolchain should work. Just configure your PATH environment variable correctly.

You don't have to move or copy tool chain.

Sent from my Nexus 5X

I added avr8-gnu-toolchain\bin to the path variable before, is there anything else?

Offline hasu

  • Thread Starter
  • Posts: 3472
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: ADB to USB keyboard converter
« Reply #654 on: Mon, 26 September 2016, 21:28:21 »
That toolchain should work. Just configure your PATH environment variable correctly.

You don't have to move or copy tool chain.

Sent from my Nexus 5X

I added avr8-gnu-toolchain\bin to the path variable before, is there anything else?

Did you add it in .bashrc or something?
If you are familiar with these things, I might be wrong. But if not you have to learn about basic usage of 'bash'.

Offline stat

  • Posts: 5
Re: ADB to USB keyboard converter
« Reply #655 on: Mon, 26 September 2016, 21:57:56 »
That toolchain should work. Just configure your PATH environment variable correctly.

You don't have to move or copy tool chain.

Sent from my Nexus 5X

I added avr8-gnu-toolchain\bin to the path variable before, is there anything else?

Did you add it in .bashrc or something?
If you are familiar with these things, I might be wrong. But if not you have to learn about basic usage of 'bash'.

I added it to the Windows environment variable named "Path" in system properties. I usually use git bash or cmd.exe for a command prompt, but the instructions I saw were for MinGW/Cygwin so I used the one of those two I already had.

Offline Astrobus

  • Posts: 1
Re: ADB to USB keyboard converter
« Reply #656 on: Tue, 27 September 2016, 16:30:31 »
I've spent the entire day pulling my hair out over this!  :eek:
I'm using a Pro Micro ATMega32u4, I have set in the makefile the proper chip type.
I've checked wiring with a multimeter, on my original cable end, on the female adapter I have on there now, on various ADB cables running through it.
I have a resistor added though that only seemed to solve my mouse moving.

I tested this chip with the HID_Listen blinking script so the chip itself works.
Testing it with the ADB to USB hex will recognize it *should* be a keyboard but still will not take in any inputs.

I've tried with MANY keyboards and cables, I currently have nearly 70 vintage Apple Boards in my living room so I tried a variety of them including knock off that use ADB.

I'd be happy with even incorrect inputs being sent at this point! Does anyone have suggestions or an ATMega32u4 .hex that worked for them I could try?

Edit: Forgot to add I even tried changing the Data line in the makefile and changing where it was actually soldered too. (To FD4)

Thanks!

Show Image

Show Image

Show Image


Hi do you mind telling how did you solved your problem if you did?
I am having a similar problem with my setup, I am using a Pro Micro, I was able to reflash it a few times and the led turns on when nothing is soldered to it so I assume that it is not broken.
The keyboard in the other hand is a AEK II that I bought used and have no way of knowing if it worked before or have any way to test it.
When it is wired to the pro micro the leds of the pro micro won't turn on, also the leds of the keyboard do not turn on. The device is not recognised by linux neither.

I have generated the .hex with Makefile.rev1 for old TMK Converter rev.1 because my Pro Micro is Atmega32u4 based.
I have also checked the wiring with the multimeter and it seems to be ok, the resistor is a 1 kohm one.

http://i.imgur.com/3GCy7VF.jpg
http://i.imgur.com/51DW5m9.jpg
http://i.imgur.com/Q7FQ2FR.jpg
http://i.imgur.com/wo2K91o.jpg

If anybody could give a hint where tsomeany kind of help it would be much appreciated.
« Last Edit: Tue, 27 September 2016, 16:37:05 by Astrobus »

Offline stat

  • Posts: 5
Re: ADB to USB keyboard converter
« Reply #657 on: Wed, 28 September 2016, 02:45:22 »
Hello again, I was able to make the hex file.

I can't get the 32u4 to reset though. When I short RST and GND twice, the device still shows as "Standard PS/2 Keyboard" regardless (so I can't get a COM port number). Neither avrdude nor dfu-programmer could recognize it to flash the hex file.

Offline hasu

  • Thread Starter
  • Posts: 3472
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: ADB to USB keyboard converter
« Reply #658 on: Wed, 28 September 2016, 16:42:20 »
Hello again, I was able to make the hex file.

I can't get the 32u4 to reset though. When I short RST and GND twice, the device still shows as "Standard PS/2 Keyboard" regardless (so I can't get a COM port number). Neither avrdude nor dfu-programmer could recognize it to flash the hex file.

Consult with seller or manufacturer.
I think double short method is for Sparkfun firmwarebootloader, it will work if your board use the firmwarebootloader.
Anyway, a bit off topic here.

Offline Moistgun

  • Slippery When Wet
  • * Esteemed Elder
  • Posts: 1832
Re: ADB to USB keyboard converter
« Reply #659 on: Wed, 28 September 2016, 16:44:12 »
Random post here, but I have a pretty nice adb to adb cable from an AEK that I have no use for, if anyone is interested, they can have it.
would look nice if you use a converter towards the pc side of the keyboard connection.
« Last Edit: Wed, 28 September 2016, 16:47:59 by Moistgun »

Offline Norman_the_Owl

  • Posts: 115
  • Location: New Jersey
Re: ADB to USB keyboard converter
« Reply #660 on: Wed, 16 November 2016, 18:13:37 »
Is it possible to post a generic hex file? I got hung up at the change directory step :'(

I'm apparently nowhere near competent enough to do this

I'm using a pro micro clone on windows for an AEK 2 if it matters...
« Last Edit: Wed, 16 November 2016, 18:21:41 by Norman_the_Owl »

Offline ShawnMeg

  • Posts: 144
  • Location: Parts Unknown
Re: ADB to USB keyboard converter
« Reply #661 on: Wed, 16 November 2016, 23:45:01 »
Is it possible to post a generic hex file? I got hung up at the change directory step :'(

I'm apparently nowhere near competent enough to do this

I'm using a pro micro clone on windows for an AEK 2 if it matters...

http://www.tmk-kbd.com/tmk_keyboard/editor/unimap/?adb_usb_rev1

This is much easier than trying to compile the files.  You can customize your mapping, function layers, etc.  Then, click the download button about 4/5th's of the way down to obtain your hex.  I used this about a month ago, and it worked great for my converter.


IBM Model F122 X 2 internal Soarer's || IBM Model M122 internal Soarer's || AEK II SKCM Salmon ALPS external adb_usb converter ||  AEK M0115 SKCM Orange ALPS click mod external adb_usb converter || AEK M0115 SKCM Salmon ALPS external adb_usb converter ||

Offline Norman_the_Owl

  • Posts: 115
  • Location: New Jersey
Re: ADB to USB keyboard converter
« Reply #662 on: Thu, 17 November 2016, 05:45:01 »
Is it possible to post a generic hex file? I got hung up at the change directory step :'(

I'm apparently nowhere near competent enough to do this

I'm using a pro micro clone on windows for an AEK 2 if it matters...

http://www.tmk-kbd.com/tmk_keyboard/editor/unimap/?adb_usb_rev1

This is much easier than trying to compile the files.  You can customize your mapping, function layers, etc.  Then, click the download button about 4/5th's of the way down to obtain your hex.  I used this about a month ago, and it worked great for my converter.
Ah man, really?

Why wasn't that mentioned on github  :(

Thanks, though

Offline 128keaton

  • Posts: 15
    • Homepage
Re: ADB to USB keyboard converter
« Reply #663 on: Tue, 22 November 2016, 17:15:08 »
One thing that really tripped me up using the Micro was that you should use the Makefile.rev1 while building. I just got an AEKII and made a beautiful custom key map and I'm loving it!
Ducky Shine - Gray alum (stock)
AEKIII - Gray (stock) with Arduino Micro

Offline Darkshado

  • Posts: 79
  • Location: Montréal
Re: ADB to USB keyboard converter
« Reply #664 on: Sat, 17 December 2016, 04:59:06 »
++numberOfTMKConverters; // :)

That ISO AEK II still needs quite a bit of attention, but I am typing this post with it.

I am observing the swap issue using today's master branch code, with no KEYMAP variable set in the makefile. The keys to the left of '1' and the one between 'left shift' and 'Z' are reverse of what I'd expect. I'll have to look around the code to understand what's going on.

Regards,

Darkshado

Offline hasu

  • Thread Starter
  • Posts: 3472
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: ADB to USB keyboard converter
« Reply #665 on: Sat, 17 December 2016, 17:40:11 »
++numberOfTMKConverters; // :)

That ISO AEK II still needs quite a bit of attention, but I am typing this post with it.

I am observing the swap issue using today's master branch code, with no KEYMAP variable set in the makefile. The keys to the left of '1' and the one between 'left shift' and 'Z' are reverse of what I'd expect. I'll have to look around the code to understand what's going on.

Regards,

Darkshado

ISO keyobard autodetection was implemented some ago,
the swap issue should be resolved if your keyboard is recognized as ISO by converter.
https://github.com/tmk/tmk_keyboard/blob/master/converter/adb_usb/matrix.c#L66-L78

Can you post output of 'hid_listen' at startup? I'd like to see value of ADB register 3  these lines print out.
https://github.com/tmk/tmk_keyboard/blob/master/converter/adb_usb/matrix.c#L57-L64

Offline Darkshado

  • Posts: 79
  • Location: Montréal
Re: ADB to USB keyboard converter
« Reply #666 on: Mon, 19 December 2016, 01:04:08 »
I have a fix for the problem, see pull request #416.

Sincerely,

Darkshado

Offline Norman_the_Owl

  • Posts: 115
  • Location: New Jersey
Re: ADB to USB keyboard converter
« Reply #667 on: Mon, 09 January 2017, 18:17:16 »
Every now and then I'll have this problem where my converter will either stop working completely or will output the last pressed key continuously. Does this sound like a problem with my converter, or my keyboard, or what?


The pull up resistor is 4.7k, it's all i had on hand. I tried taking some pictures but they weren't clear. I'm not concerned about the construction though, because it works most of the time (typing on it now). Can furnish with photos if you think it's necessary.

Edit: It'll work fine for hours until i start a game, and then it stops working completely. Sometimes it'll also stop outputting, wait a few seconds, and then send everything i've typed all at once. This is extremely frustrating, it behaves really erratically.
« Last Edit: Tue, 10 January 2017, 13:39:48 by Norman_the_Owl »

Offline H3NT4I

  • Posts: 57
  • 気持ちいい
Re: ADB to USB keyboard converter
« Reply #668 on: Sun, 22 January 2017, 19:52:10 »
Apple IIgs issues. Have my board wired up properly to the teensy, resistor correctly installed. Loading firmware is straight forward, Teensy flashes no problem then when I go to use it: nada. It shows up as correctly as ADB to USB converter and a HID Keyboard but no keys work whatsoever. Even tried using other .hex files from the thread but no luck, any ideas as to what I could be doing wrong? link to hardware gallery: http://imgur.com/a/03neQ

Offline hasu

  • Thread Starter
  • Posts: 3472
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: ADB to USB keyboard converter
« Reply #669 on: Sun, 22 January 2017, 20:13:34 »
WIth quick look pics I'm not sure which pin you are using for DATA.
You should use D0(PD0) pin for DATA with default configuration.

Offline H3NT4I

  • Posts: 57
  • 気持ちいい
Re: ADB to USB keyboard converter
« Reply #670 on: Sun, 22 January 2017, 21:04:33 »
sure enough, thanks hasu

WIth quick look pics I'm not sure which pin you are using for DATA.
You should use D0(PD0) pin for DATA with default configuration.

Offline H3NT4I

  • Posts: 57
  • 気持ちいい
Re: ADB to USB keyboard converter
« Reply #671 on: Thu, 26 January 2017, 22:20:34 »
I have my iigs working with ShawnMeg's posted code and it works great but my own coding is less than ideal. I have little experience so here's what i'm working with. When I run git bash and compile my custom keymap it comes out as a file with no extension. I had errors initially compiling with the function action prior but working through it looking at others code I got to this point where it's making a file just not sure where I went wrong. Will continue to read everything I can again and retrace steps. Any assistance is appreciated. 
Code: [Select]
#include "keymap_common.h"


const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
    /* M0116 Apple Standard Keyboard ANSI
    *                     +-------+
    *                     | mute  |
    *                     +-------+
    * +---+---+---+---+---+---+---+---+---+---+---+---+---+-----+ +---+---+---+---+
    * |esc| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | bks | |del| = | / | * |
    * +---------------------------------------------------------+ +---+---+---+---+
    * | tab | q | w | e | r | t | y | u | i | o | p | [ | ] |   | | 7 | 8 | 9 | + |
    * +-----------------------------------------------------+   | +---+---+---+---+
    * | Fn0  | a | s | d | f | g | h | j | k | l | ; | ' |return| | 4 | 5 | 6 | - |
    * +---------------------------------------------------------+ +---+---+---+---+
    * | shift  | z | x | c | v | b | n | m | , | . | / |  shift | | 1 | 2 | 3 |   |
    * +---------------------------------------------------------+ +-------+---|ent|
    * |cap|alt|ctrl | ` |                   | \ |lef|rig|dwn|up | |   0   | . |   |
    * +---------------------------------------------------------+ +-------+---+---+
    */
  KEYMAP_M0116_ANSI(
                                     MUTE,                                                           
       ESC, 1,   2,   3,   4,   5,   6,   7,   8,   9,   0,   MINS,EQL, BSPC,   DEL ,EQL, PSLS,PAST,
       TAB, Q,   W,   E,   R,   T,   Y,   U,   I,   O,   P,   LBRC,RBRC,        P7,  P8,  P9,  PMNS,
       FN0, A,   S,   D,   F,   G,   H,   J,   K,   L,   SCLN,QUOT,     ENT,    P4,  P5,  P6,  PPLS,
       LSFT,Z,   X,   C,   V,   B,   N,   M,   COMM,DOT, SLSH,          RSFT,   P1,  P2,  P3,       
       CAPS, LALT,LCTL,GRV,           SPC,      BSLS,LEFT,RGHT,DOWN,UP,          P0,       PDOT,PENT
),
    /* M0116 Apple Standard Keyboard ANSI
    *                     +-------+
    *                     | mute  |
    *                     +-------+
    * +---+---+---+---+---+---+---+---+---+---+---+---+---+-----+ +----+----+--+-+---+
    * |esc| F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12| bks | | ins| hom|end |prt|
    * +---------------------------------------------------------+ +----+----+----+---+
    * | tab | q | w | e | r | t | y | u | i | o | p | [ | ] |   | |    |    |    |pgu|
    * +-----------------------------------------------------+   | +----+----+----+---+
    * | Fn0  | a | s | d | f | g | h | j | k | l | ; | ' |return| |    | up |    |pgd|
    * +---------------------------------------------------------+ +----+----+----+---+
    * | shift  | z | x | c | v | b | n | m | , | . | / |  shift | |left|down|rght|   |
    * +---------------------------------------------------------+ +---------+----|   |
    * |cap|alt|ctrl| clr|                   |ply|prv|nxt|vod|vou| |         |    |   |
    * +---------------------------------------------------------+ +---------+----+---+
    */
  KEYMAP_M0116_ANSI(
                                     TRNS,                                                           
       TRNS,F1,  F2,  F3,  F4,  F5,  F6,  F7,  F8,  F9,  F10,  F11, F12,TRNS,    INS,HOME ,END ,PSCR,
       TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,         NO  ,NO  ,NO  ,PGUP,
       TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,     TRNS,    NO  ,UP  ,NO  ,PGDN,
       TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,          TRNS,    LEFT,DOWN,RGHT,     
       TRNS,TRNS,TRNS,TRNS,          TRNS,     MPLY,MPRV,MNXT,VOLD,VOLU,         NO  ,     NO  ,NO 
),
};

const action_t PROGMEM fn_actions[] = {
  [0] = ACTION_LAYER_MOMENTARY(1),             
};     

EDIT: Got it. fiddle enough days with Code and eventually you'll get there.
« Last Edit: Sun, 29 January 2017, 17:19:58 by H3NT4I »

Offline happylacquer

  • Posts: 400
  • Location: USA
  • BS Apologist
    • BHOBuds
Re: ADB to USB keyboard converter
« Reply #672 on: Sat, 04 February 2017, 03:00:18 »
I am trying to flash a Sparkfun Pro micro a friend sent me with adb_usb firmware. I can flash it with avrdude, but then when I plug it into any linux or windows machine, it doesn't recognize *any* USB as having been plugged in. What should I do? lsusb in linux shows nothing...

Edit: I have come to the conclusion that despite flashing the right adb_usb.hex, it must have flashed for a 3.3v/8mhz unit or else something else is wrong. Either way, i need to get it back so any computer can recognize it. I have been trying to do the reset procedure involving the Arduino IDE but it never finishes flashing the test program on... and I'm not sure it's seeing the right COM port either (COM3 and COM4 are always available in the menu and never change)

If the pro micro is just a piece of garbage what should i get instead?
« Last Edit: Sat, 04 February 2017, 05:19:17 by happylacquer »

Offline need

  • Posts: 460
Re: ADB to USB keyboard converter
« Reply #673 on: Sat, 04 February 2017, 19:19:23 »
Does anyone know how to turn the numpad on a M0116 into a navigation layer (pgup/pgdn, home/end) ?

Offline Tactile

  • Posts: 1433
  • Location: Portland, OR
Re: ADB to USB keyboard converter
« Reply #674 on: Sat, 04 February 2017, 19:55:07 »
If the pro micro is just a piece of garbage what should i get instead?

One of these. Or you can buy one here.
REΛLFORCE

Offline happylacquer

  • Posts: 400
  • Location: USA
  • BS Apologist
    • BHOBuds
Re: ADB to USB keyboard converter
« Reply #675 on: Sat, 04 February 2017, 23:16:38 »
If the pro micro is just a piece of garbage what should i get instead?

One of these. Or you can buy one here.

Great price, thanks a billion. About 9-10 hours total of messing with this 4 dollar pro micro and it just bricks constantly  >:D

Offline hasu

  • Thread Starter
  • Posts: 3472
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: ADB to USB keyboard converter
« Reply #676 on: Sat, 04 February 2017, 23:28:01 »
If the pro micro is just a piece of garbage what should i get instead?

One of these. Or you can buy one here.

Great price, thanks a billion. About 9-10 hours total of messing with this 4 dollar pro micro and it just bricks constantly  >:D

I don't think it is Sparkfun Pro Micro. It costs $19.95, not cheap like that.
https://www.sparkfun.com/products/12640

It is not important whether it is genuine Sparkfun or not, though.

Offline happylacquer

  • Posts: 400
  • Location: USA
  • BS Apologist
    • BHOBuds
Re: ADB to USB keyboard converter
« Reply #677 on: Sun, 05 February 2017, 01:01:03 »
If the pro micro is just a piece of garbage what should i get instead?

One of these. Or you can buy one here.

Great price, thanks a billion. About 9-10 hours total of messing with this 4 dollar pro micro and it just bricks constantly  >:D

I don't think it is Sparkfun Pro Micro. It costs $19.95, not cheap like that.
https://www.sparkfun.com/products/12640

It is not important whether it is genuine Sparkfun or not, though.

I am trying to flash adb_usb.hex with

Code: [Select]
-c avr109 -p m32u4 -F -e -I flash:w:adb_usb.hex:a -U eeprom:w:adb_usb.eep:a

With or without the eep file specified it still  bricks and will not be recognized by either windows or linux except for the 8 second bootloader window...

Offline PancakeMSTR

  • Posts: 491
Re: ADB to USB keyboard converter
« Reply #678 on: Thu, 23 February 2017, 00:33:27 »
I'm not gonna lie the instructions for doing this are cryptic, to say the least.

I have an AEKII, and an arduino pro-micro clone with an atmega32u4. What do I do? What firmware do I install and how?
   

Offline alh84001

  • Posts: 276
  • Location: EU-HR-ZG
Re: ADB to USB keyboard converter
« Reply #679 on: Thu, 23 February 2017, 08:20:01 »
@happylacquer, did you add a pull-up resistor?

@PancakeMSTR have you read everything at https://github.com/tmk/tmk_keyboard/tree/master/converter/adb_usb? For pro micro you have to use Makefile.rev1 makefile.
« Last Edit: Thu, 23 February 2017, 08:22:30 by alh84001 »

Offline PancakeMSTR

  • Posts: 491
Re: ADB to USB keyboard converter
« Reply #680 on: Thu, 23 February 2017, 11:29:40 »
@happylacquer, did you add a pull-up resistor?

@PancakeMSTR have you read everything at https://github.com/tmk/tmk_keyboard/tree/master/converter/adb_usb? For pro micro you have to use Makefile.rev1 makefile.

Yeah I've read a lot of it, didn't know I'd have to use makefile.rev1

I'm really not sure if I installed the DFG tools correctly, or crosspack, or even if my pro micro is in bootloader mode. I can't load anything on it, I'll run

make -f Makefile dfu

and then get the following

sh: dfu-programmer: command not found
sh: dfu-programmer: command not found
-n dfu-programmer: waiting
-n .
-n .


and I have not the slightest clue what this means.
   

Offline PancakeMSTR

  • Posts: 491
Re: ADB to USB keyboard converter
« Reply #681 on: Thu, 23 February 2017, 13:43:40 »
Okay, screw the Pro-micro. It's a lost cause. Which Teensy should I get? The 2.0 right? Then which version of the adb-usb converter do I need to use?

I'm gonna be honest here, the instructions are REALLY confusing. I'm honestly not even sure how to program the teensy. All I need is a hex file, right? I can make the hex file on linux/mac, then move it over to the teensy loader and that should work? Which makefile do I use?

Seriously I'm so confused.

And then how do I edit the layout? You produce a config file and somehow...this gets loaded onto whatever microcontroller I'm using?

I'm sorry I just can't parse the instructions. They are not answering questions.
« Last Edit: Thu, 23 February 2017, 13:52:33 by PancakeMSTR »
   

Offline Tactile

  • Posts: 1433
  • Location: Portland, OR
Re: ADB to USB keyboard converter
« Reply #682 on: Thu, 23 February 2017, 14:22:46 »
Okay, screw the Pro-micro. It's a lost cause. Which Teensy should I get? The 2.0 right? Then which version of the adb-usb converter do I need to use?

I'm gonna be honest here, the instructions are REALLY confusing. I'm honestly not even sure how to program the teensy. All I need is a hex file, right? I can make the hex file on linux/mac, then move it over to the teensy loader and that should work? Which makefile do I use?

Seriously I'm so confused.

And then how do I edit the layout? You produce a config file and somehow...this gets loaded onto whatever microcontroller I'm using?

I'm sorry I just can't parse the instructions. They are not answering questions.

Yes, a Teensy 2.0. And, when you have your hex file built, all you need is this to flash it.
REΛLFORCE

Offline PancakeMSTR

  • Posts: 491
Re: ADB to USB keyboard converter
« Reply #683 on: Wed, 01 March 2017, 01:30:23 »
Okay, screw the Pro-micro. It's a lost cause. Which Teensy should I get? The 2.0 right? Then which version of the adb-usb converter do I need to use?

I'm gonna be honest here, the instructions are REALLY confusing. I'm honestly not even sure how to program the teensy. All I need is a hex file, right? I can make the hex file on linux/mac, then move it over to the teensy loader and that should work? Which makefile do I use?

Seriously I'm so confused.

And then how do I edit the layout? You produce a config file and somehow...this gets loaded onto whatever microcontroller I'm using?

I'm sorry I just can't parse the instructions. They are not answering questions.

Yes, a Teensy 2.0. And, when you have your hex file built, all you need is this to flash it.


Welp, that didn't work.

I ran, on my mac,

 make -f Makefile.teensy

copied the hex file over to my windows computer, programmed the teensy, plugged everything in aaaand nothing. Keyboard doesn't work.

Wiring could be wrong, but shouldn't there be SOME indication that I've gotten this to work?
   

Offline Tactile

  • Posts: 1433
  • Location: Portland, OR
Re: ADB to USB keyboard converter
« Reply #684 on: Wed, 01 March 2017, 11:30:59 »
Welp, that didn't work.

I ran, on my mac,

 make -f Makefile.teensy

copied the hex file over to my windows computer, programmed the teensy, plugged everything in aaaand nothing. Keyboard doesn't work.

Wiring could be wrong, but shouldn't there be SOME indication that I've gotten this to work?

What shows up in Control Panel > Devices and Printers?
REΛLFORCE

Offline PancakeMSTR

  • Posts: 491
Re: ADB to USB keyboard converter
« Reply #685 on: Wed, 01 March 2017, 11:37:29 »
Welp, that didn't work.

I ran, on my mac,

 make -f Makefile.teensy

copied the hex file over to my windows computer, programmed the teensy, plugged everything in aaaand nothing. Keyboard doesn't work.

Wiring could be wrong, but shouldn't there be SOME indication that I've gotten this to work?

What shows up in Control Panel > Devices and Printers?


I'll have to check, but the computer doesn't really identify anything. No like "found keyboard" or anything.

But I haven't actually looked at what device manager says.

Suppose I plugged just the teensy in. What should device manager say? Would it indicate something different with the teensy only in versus the teensy connected to the keyboard?
« Last Edit: Wed, 01 March 2017, 11:53:58 by PancakeMSTR »
   

Offline Tactile

  • Posts: 1433
  • Location: Portland, OR
Re: ADB to USB keyboard converter
« Reply #686 on: Wed, 01 March 2017, 12:07:55 »
Not Device Manager.
Quote
Control Panel > Devices and Printers

Recognized input devices like keyboards and mice should show up here.
REΛLFORCE

Offline Tactile

  • Posts: 1433
  • Location: Portland, OR
Re: ADB to USB keyboard converter
« Reply #687 on: Wed, 01 March 2017, 12:17:29 »
When you switched from the Pro Micro to the Teensy you should have changed one or more configuration settings in the Makefile. The bootloader size for the Teensy is 512, not 4096. And check out the other settings as well, I can't remember all of them.
REΛLFORCE

Offline PancakeMSTR

  • Posts: 491
Re: ADB to USB keyboard converter
« Reply #688 on: Wed, 01 March 2017, 12:37:28 »
When you switched from the Pro Micro to the Teensy you should have changed one or more configuration settings in the Makefile. The bootloader size for the Teensy is 512, not 4096. And check out the other settings as well, I can't remember all of them.

I definitely have no clue how to do that.


I also tried generating a hex file from the layout configurator, i.e.: http://www.tmk-kbd.com/tmk_keyboard/editor/unimap/?adb_usb_rev1


I just left everything default (as is when you open the link) and then downloaded the hex file. Didn't work.


Literally all the instructions say to do is

"To program Teensy you can use teensy target:

$ make -f Makefile.teensy [KEYMAP=(plain|ansi|iso|hasu)] teensy"

One note about that, I left off "teensy" at the end because I wasn't programming the teensy through my mac. My presumption is

make -f Makefile.teensy

compiles the hex file, with the default/plain keymap. Don't know if I'm wrong about that.

What am I missing?
« Last Edit: Wed, 01 March 2017, 12:45:44 by PancakeMSTR »
   

Offline Tactile

  • Posts: 1433
  • Location: Portland, OR
Re: ADB to USB keyboard converter
« Reply #689 on: Wed, 01 March 2017, 12:52:11 »
You need to edit "Makefile" - no extension.

Change this:
Code: [Select]
# Boot Section Size in *bytes*
#   Teensy halfKay   512
#   Teensy++ halfKay 1024
#   Atmel DFU loader 4096 for TMK Converter rev.1/rev.2
#   LUFA bootloader  4096
#   USBaspLoader     2048
OPT_DEFS += -DBOOTLOADER_SIZE=4096

to this:
Code: [Select]
# Boot Section Size in *bytes*
#   Teensy halfKay   512
#   Teensy++ halfKay 1024
#   Atmel DFU loader 4096 for TMK Converter rev.1/rev.2
#   LUFA bootloader  4096
#   USBaspLoader     2048
OPT_DEFS += -DBOOTLOADER_SIZE=512
« Last Edit: Wed, 01 March 2017, 20:19:39 by Tactile »
REΛLFORCE

Offline PancakeMSTR

  • Posts: 491
Re: ADB to USB keyboard converter
« Reply #690 on: Wed, 01 March 2017, 13:00:45 »
You need to edit "Makefile" - no extension.

Change this:
Code: [Select]
Boot Section Size in *bytes*
#   Teensy halfKay   512
#   Teensy++ halfKay 1024
#   Atmel DFU loader 4096 for TMK Converter rev.1/rev.2
#   LUFA bootloader  4096
#   USBaspLoader     2048
OPT_DEFS += -DBOOTLOADER_SIZE=4096

to this:
Code: [Select]
Boot Section Size in *bytes*
#   Teensy halfKay   512
#   Teensy++ halfKay 1024
#   Atmel DFU loader 4096 for TMK Converter rev.1/rev.2
#   LUFA bootloader  4096
#   USBaspLoader     2048
OPT_DEFS += -DBOOTLOADER_SIZE=512

Okay I'll give that a try and get back to you.
   

Offline tjweir

  • * Exquisite Elder
  • Posts: 1039
  • Location: Toronto
Re: ADB to USB keyboard converter
« Reply #691 on: Wed, 01 March 2017, 13:04:02 »
When you switched from the Pro Micro to the Teensy you should have changed one or more configuration settings in the Makefile. The bootloader size for the Teensy is 512, not 4096. And check out the other settings as well, I can't remember all of them.

I definitely have no clue how to do that.


I also tried generating a hex file from the layout configurator, i.e.: http://www.tmk-kbd.com/tmk_keyboard/editor/unimap/?adb_usb_rev1


I just left everything default (as is when you open the link) and then downloaded the hex file. Didn't work.


Literally all the instructions say to do is

"To program Teensy you can use teensy target:

$ make -f Makefile.teensy [KEYMAP=(plain|ansi|iso|hasu)] teensy"

One note about that, I left off "teensy" at the end because I wasn't programming the teensy through my mac. My presumption is

make -f Makefile.teensy

compiles the hex file, with the default/plain keymap. Don't know if I'm wrong about that.

What am I missing?

Maybe go back to basics just as a test.

Grab this: https://www.pjrc.com/teensy/blink_both.zip and flash your teensy with it.  If you have a Teensy 2, then you want to load "blink_slow_Teensy2.hex" and reboot the teensy (not your machine).
Using the GUI tool that @Tactile refers to should be all you need.

Verify that your Teensy is good first.

If it is, grab a fresh copy of TMK, then:
Code: [Select]
> cd path/to/your/tmk_keyboard/converter/adb_usb
> make clean && make

After a bunch of standard informational logging, you should get something like this:
Code: [Select]
Creating load file for Flash: adb_usb_lufa.hex
avr-objcopy -O ihex -R .eeprom -R .fuse -R .lock -R .signature adb_usb_lufa.elf adb_usb_lufa.hex

Creating load file for EEPROM: adb_usb_lufa.eep
avr-objcopy -j .eeprom --set-section-flags=.eeprom="alloc,load" \
--change-section-lma .eeprom=0 --no-change-warnings -O ihex adb_usb_lufa.elf adb_usb_lufa.eep || exit 0

Creating Extended Listing: adb_usb_lufa.lss
avr-objdump -h -S -z adb_usb_lufa.elf > adb_usb_lufa.lss

Creating Symbol Table: adb_usb_lufa.sym
avr-nm -n adb_usb_lufa.elf > adb_usb_lufa.sym

Size after:
   text    data     bss     dec     hex filename
  20130      52     172   20354    4f82 adb_usb_lufa.elf

-------- end --------
You will have a file named "adb_usb_lufa.hex"

Load that on to your teensy as you did above using the GUI Loader and try your keyboard.

Offline PancakeMSTR

  • Posts: 491
Re: ADB to USB keyboard converter
« Reply #692 on: Thu, 02 March 2017, 11:45:43 »
When you switched from the Pro Micro to the Teensy you should have changed one or more configuration settings in the Makefile. The bootloader size for the Teensy is 512, not 4096. And check out the other settings as well, I can't remember all of them.

I definitely have no clue how to do that.


I also tried generating a hex file from the layout configurator, i.e.: http://www.tmk-kbd.com/tmk_keyboard/editor/unimap/?adb_usb_rev1


I just left everything default (as is when you open the link) and then downloaded the hex file. Didn't work.


Literally all the instructions say to do is

"To program Teensy you can use teensy target:

$ make -f Makefile.teensy [KEYMAP=(plain|ansi|iso|hasu)] teensy"

One note about that, I left off "teensy" at the end because I wasn't programming the teensy through my mac. My presumption is

make -f Makefile.teensy

compiles the hex file, with the default/plain keymap. Don't know if I'm wrong about that.

What am I missing?

Maybe go back to basics just as a test.

Grab this: https://www.pjrc.com/teensy/blink_both.zip and flash your teensy with it.  If you have a Teensy 2, then you want to load "blink_slow_Teensy2.hex" and reboot the teensy (not your machine).
Using the GUI tool that @Tactile refers to should be all you need.

Verify that your Teensy is good first.

If it is, grab a fresh copy of TMK, then:
Code: [Select]
> cd path/to/your/tmk_keyboard/converter/adb_usb
> make clean && make

After a bunch of standard informational logging, you should get something like this:
Code: [Select]
Creating load file for Flash: adb_usb_lufa.hex
avr-objcopy -O ihex -R .eeprom -R .fuse -R .lock -R .signature adb_usb_lufa.elf adb_usb_lufa.hex

Creating load file for EEPROM: adb_usb_lufa.eep
avr-objcopy -j .eeprom --set-section-flags=.eeprom="alloc,load" \
--change-section-lma .eeprom=0 --no-change-warnings -O ihex adb_usb_lufa.elf adb_usb_lufa.eep || exit 0

Creating Extended Listing: adb_usb_lufa.lss
avr-objdump -h -S -z adb_usb_lufa.elf > adb_usb_lufa.lss

Creating Symbol Table: adb_usb_lufa.sym
avr-nm -n adb_usb_lufa.elf > adb_usb_lufa.sym

Size after:
   text    data     bss     dec     hex filename
  20130      52     172   20354    4f82 adb_usb_lufa.elf

-------- end --------
You will have a file named "adb_usb_lufa.hex"

Load that on to your teensy as you did above using the GUI Loader and try your keyboard.

I tested blink, the teensy works fine.

I'll try your suggestion. Why use that over the teensy code?
   

Offline tjweir

  • * Exquisite Elder
  • Posts: 1039
  • Location: Toronto
Re: ADB to USB keyboard converter
« Reply #693 on: Thu, 02 March 2017, 12:06:22 »
Quote
I'll try your suggestion. Why use that over the teensy code?

To eliminate as many changes as possible.  It's also the exact way I flash my teensy.

Offline PancakeMSTR

  • Posts: 491
Re: ADB to USB keyboard converter
« Reply #694 on: Thu, 02 March 2017, 23:01:11 »
When you switched from the Pro Micro to the Teensy you should have changed one or more configuration settings in the Makefile. The bootloader size for the Teensy is 512, not 4096. And check out the other settings as well, I can't remember all of them.

I definitely have no clue how to do that.


I also tried generating a hex file from the layout configurator, i.e.: http://www.tmk-kbd.com/tmk_keyboard/editor/unimap/?adb_usb_rev1


I just left everything default (as is when you open the link) and then downloaded the hex file. Didn't work.


Literally all the instructions say to do is

"To program Teensy you can use teensy target:

$ make -f Makefile.teensy [KEYMAP=(plain|ansi|iso|hasu)] teensy"

One note about that, I left off "teensy" at the end because I wasn't programming the teensy through my mac. My presumption is

make -f Makefile.teensy

compiles the hex file, with the default/plain keymap. Don't know if I'm wrong about that.

What am I missing?

Maybe go back to basics just as a test.

Grab this: https://www.pjrc.com/teensy/blink_both.zip and flash your teensy with it.  If you have a Teensy 2, then you want to load "blink_slow_Teensy2.hex" and reboot the teensy (not your machine).
Using the GUI tool that @Tactile refers to should be all you need.

Verify that your Teensy is good first.

If it is, grab a fresh copy of TMK, then:
Code: [Select]
> cd path/to/your/tmk_keyboard/converter/adb_usb
> make clean && make

After a bunch of standard informational logging, you should get something like this:
Code: [Select]
Creating load file for Flash: adb_usb_lufa.hex
avr-objcopy -O ihex -R .eeprom -R .fuse -R .lock -R .signature adb_usb_lufa.elf adb_usb_lufa.hex

Creating load file for EEPROM: adb_usb_lufa.eep
avr-objcopy -j .eeprom --set-section-flags=.eeprom="alloc,load" \
--change-section-lma .eeprom=0 --no-change-warnings -O ihex adb_usb_lufa.elf adb_usb_lufa.eep || exit 0

Creating Extended Listing: adb_usb_lufa.lss
avr-objdump -h -S -z adb_usb_lufa.elf > adb_usb_lufa.lss

Creating Symbol Table: adb_usb_lufa.sym
avr-nm -n adb_usb_lufa.elf > adb_usb_lufa.sym

Size after:
   text    data     bss     dec     hex filename
  20130      52     172   20354    4f82 adb_usb_lufa.elf

-------- end --------
You will have a file named "adb_usb_lufa.hex"

Load that on to your teensy as you did above using the GUI Loader and try your keyboard.

Nope. I get "adb_usb.hex" but no "adb_usb_lufa.hex"

Programmed the teensy with that file anyway and it does nothing.

The file loads fine, but after rebooting the teensy it's not recognized by the computer as anything and the LED doesn't turn off.


By the way, device manager recognizes the teensy (with whatever random converter hexfile I've decided to put on it) as "ADB keyboard converter."

Also my mouse is slowly jumping to the top right corner of my monitor. Was there a fix for that? I couldn't tell.

It's working. In fact I'm typing this edit on it at this very moment. Changing that line in the makefile is what did it. Seems the pull up resistor is also quite necessary indeed. Assuredly does not work without it. Anyway, thanks for the help all, much appreciated and sorry for being so difficult.

For everyone's viewing pleasure: My crappy electronics test bench: http://imgur.com/a/K5VBi
« Last Edit: Thu, 02 March 2017, 23:39:30 by PancakeMSTR »
   

Offline tjweir

  • * Exquisite Elder
  • Posts: 1039
  • Location: Toronto
Re: ADB to USB keyboard converter
« Reply #695 on: Fri, 03 March 2017, 08:27:42 »
Glad it's working.  Hasu mentions that the pull up is a must, looks like we have another data point that confirms this. :)

Offline apprentice57

  • Posts: 4
Re: ADB to USB keyboard converter
« Reply #696 on: Tue, 14 March 2017, 00:26:25 »
Hi all.

I've been doing an internal adb-usb converter for my ANSI apple extended keyboard I. I believe the hardware modification to wire the old data/power points to my teensy 2.0 has gone correctly. However I am running into software issues when I try to flash the device.

My workflow has been to download the default configuration from http://www.tmk-kbd.com/tmk_keyboard/editor/unimap/?adb_usb_rev1 (Without modifications, I don't need anything fancy) for adb_usb rev 1 as a hex file, then to flash that hex file to my teensy using the teensy loader application.

However, once I do so there are a few keys that are mapped incorrectly.
(The label(s) on the key(s) I press) -> (The character that is produced on screen)

(shift and 2) -> "
(shift and 6) -> &
(shift and 7) -> '
(shift and 8 ) -> (
(shift and 9) -> )
(shift and 0) -> 0
( = )              -> ^
(shift and =) -> ~
( [ )             -> @
(shift and {) -> `
( ] )             -> [
(shift and ] ) -> {
( \ )              -> ]
( shift and \ ) -> }
(shift and ; )   -> +
( ' )               -> :
(shift and ')    -> *

To my knowledge, every other key is working, so this is quite bizzare! It's almost like some characters like the parenthesis and brackets are shifted right or left one key.


I do not think this is a hardware/wiring issue, because if I set these problematic keys to something that is not problematic currently (like an alpha character) then these keys work just fine producing that alpha character. Conversely, if I set keys that should be alphas normally to these problematic characters, they have the same issue.

However, if anyone suspects this is a hardware issue I'll follow up with images. I'd just prefer to avoid taking apart my setup since I have electrical tape everywhere.

What I was wondering is:

1) Has anyone run into a similar issue with the online configurator and flashing the hex file through the teensy program?
2) Would someone be willing to give me a working .hex file for their AEK? Hopefully from a ANSI AEK I and Teensy 2.0 setup.
3) Would someone be willing to flash their ANSI AEK I with the .hex file I have been using and let me know if you have any issue? The file is attached.

That and any other help would be appreciated. Thanks in advance.

EDIT: At this point I was able to compile the hex myself on my machine using the "plain" and "ansi" layouts, and flashed those with teensy loader. I get the same issue with wrong mappings, so I'm now more befuddled.

P.S. I have tried to compile the .hex file locally but I keep getting an error:
">> make -f Makefile.teensy
sh: avr-gcc: command not found
make: *** [gccversion] Error 127"
I have already installed avr from https://www.obdev.at/products/crosspack/download.html for macOS. I have also attempted to install avr via homebrew but the install has been taking an hour+ (still going) so I don't know if it is working properly.


I have also attempted to flashusing dfu-programmer instead of the teensy program, but I keep getting a "dfu-programmer: no device present." error.

Very frustrating. 3 roadblocks at once  :(.
« Last Edit: Tue, 14 March 2017, 02:06:38 by apprentice57 »

Offline hasu

  • Thread Starter
  • Posts: 3472
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: ADB to USB keyboard converter
« Reply #697 on: Tue, 14 March 2017, 07:22:00 »
What layout are you using on your OS? ANSI or one of ISO?

Sent from my Nexus 5X


Offline apprentice57

  • Posts: 4
Re: ADB to USB keyboard converter
« Reply #698 on: Tue, 14 March 2017, 09:51:29 »
What layout are you using on your OS? ANSI or one of ISO?

Sent from my Nexus 5X

Should be ANSI, I'm in the states. I've been primarily using macOS, but the issue occurs at work at my Debian computer too.

EDIT: Something must be off about the OS, you're completely right there. I hooked the keyboard to an OS that probably few others here use commonly: FreeBSD (I have a FreeNAS system), and the thing works like a charm! No incorrect mappings.

 I'll play around with configurations in macOS, cause something there is obviously the problem.

Thanks Hasu :)
« Last Edit: Tue, 14 March 2017, 09:57:27 by apprentice57 »

Offline sneaux

  • Posts: 3
Re: ADB to USB keyboard converter
« Reply #699 on: Thu, 16 March 2017, 17:14:35 »
The converter works with teensy 2.0 ++ by changing the processor in teensy makefile as everyone said. The pull up resistor was necessary with a coiled lindy cable. My only issue is that capslock doesn't really work for me at the moment. It registers, but does not act as if I've held it down when I have. At first I thought it might be because of the locking caps, so I removed the locking mechanism from the switch but that didn't help. I then commented the locking caps line of the config file, but this didn't change anything. Changing LCAP to CAP results in an undefined error, same for changing the "keycode" in the map file to match the one for CAP. I'm guessing this is what I need to understand better, but figured I would see if anyone else had a fix for this already. The output from Karabiner is this:

eventType:KeyDown         code:0x28       name:k               flags:                                   misc:KeyCode::K    characters:k   
eventType:KeyUp           code:0x28       name:k               flags:                                   misc:KeyCode::K    characters:k   
eventType:KeyDown         code:0x28       name:k               flags:                                   misc:KeyCode::K    characters:k   
eventType:KeyDown         code:0x28       name:k               flags:                                   misc:KeyCode::K    characters:k   
eventType:KeyDown         code:0x28       name:k               flags:                                   misc:KeyCode::K    characters:k   
eventType:KeyDown         code:0x28       name:k               flags:                                   misc:KeyCode::K    characters:k   
eventType:KeyDown         code:0x28       name:k               flags:                                   misc:KeyCode::K    characters:k   
eventType:KeyUp           code:0x28       name:k               flags:                                   misc:KeyCode::K    characters:k   
eventType:FlagsChanged    code:0x3f       name:Fn              flags:Fn                                 misc:KeyCode::FN    characters:   
eventType:FlagsChanged    code:0x3f       name:Fn              flags:                                   misc:KeyCode::FN    characters:
 
and this is from me pressing a character key, getting the usual up/down events. Next I briefly held the key down, and I got the expected output. For the caps which is then sent to fn, I held the key down, but got the two events immediately and no additional event upon release.