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

0 Members and 1 Guest are viewing this topic.

Offline hasu

  • Thread Starter
  • Posts: 2863
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: ADB to USB keyboard converter
« Reply #600 on: Fri, 20 May 2016, 19:57:09 »
It seems Power+Pause jumps the controller into bootlaoder mode successfully but the bootloader runs keyboard application immediately for some reason.
I guess Pro Micro's bootloader checks some condition to decide if it stays in bootloader or starts application code. It is maybe magic number in somewhere in SRAM.
You have to meet the condition before jumping to bootloader with the magic key combo.

This is related to this topic.
https://github.com/tmk/tmk_keyboard/issues/256

EDIT: this codes is what you need, methink.
https://github.com/ahtn/tmk_keyboard/commit/773d609bd87d15bb48b3176209c2e2db0b2db178#diff-15c696338fb35b3fa3201e97e19ece2eR112
« Last Edit: Fri, 20 May 2016, 20:00:43 by hasu »
TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt

Offline orihalcon

  • Posts: 95
Re: ADB to USB keyboard converter
« Reply #601 on: Sun, 22 May 2016, 13:50:53 »
Yeah, that looks like what I need, though I'm not sure how to implement it.  I assume those lines need to get copied into a certain file?  Once that's done, is it the same bootloader magic combination to test if it works? Thanks!

Offline need

  • Posts: 460
Re: ADB to USB keyboard converter
« Reply #602 on: Tue, 24 May 2016, 16:51:56 »
EDIT: My other machine (Win7 32bit) works nicely ! But my daily machine (Win7 64bit) doesn't work...
Thank you hasu, it works perfectly with my ISO AEKII  :D

I've finally put everything together using a teensy, but it doesn't work.

I thought everything have went smoothly, but the keyboard doesn't register any key strokes.
When I plugged it in, the numlock, caps lock and scroll lock LED lights flashed once.

There's nothing happens when the keyboard is plugged in, only the converter is recognised by the computer. (Win7)

Here are some photos, it takes so long to install driver, but finally everything has the green tick next to them.

Thank you !
« Last Edit: Tue, 24 May 2016, 17:08:26 by need »

Offline hasu

  • Thread Starter
  • Posts: 2863
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: ADB to USB keyboard converter
« Reply #603 on: Tue, 24 May 2016, 17:22:22 »
EDIT: My other machine (Win7 32bit) works nicely ! But my daily machine (Win7 64bit) doesn't work...
Thank you hasu, it works perfectly with my ISO AEKII  :D

Congrat!
EDIT: As for Windows problem try removing all of drivers related to the converter, or chainging VID and PID.
https://github.com/tmk/tmk_keyboard/wiki/FAQ-Build#2-remove-drivers-from-device-managerwindows

BTW,
The converter supports ISO layout by autodetect layout now. I think it should work :D With this one firmware can work with both ANSI and ISO. Anyone with both keyboards, test it!
https://github.com/tmk/tmk_keyboard/commit/49f44a2aedce6d727d9e6aa7998e766b899c6eda
« Last Edit: Tue, 24 May 2016, 17:25:54 by hasu »
TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt

Offline hasu

  • Thread Starter
  • Posts: 2863
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: ADB to USB keyboard converter
« Reply #604 on: Tue, 24 May 2016, 17:29:57 »
Yeah, that looks like what I need, though I'm not sure how to implement it.  I assume those lines need to get copied into a certain file?  Once that's done, is it the same bootloader magic combination to test if it works? Thanks!

You can place it in your own keymap as athn did, or replace this function with the code.
https://github.com/tmk/tmk_keyboard/blob/master/tmk_core/common/avr/bootloader.c#L99
TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt

Offline need

  • Posts: 460
Re: ADB to USB keyboard converter
« Reply #605 on: Tue, 24 May 2016, 19:47:16 »
I tried the new firmware, but the output keys are the same...meaning some keys are incorrect on the ISO.

Or did I get this wrong?

Offline hasu

  • Thread Starter
  • Posts: 2863
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: ADB to USB keyboard converter
« Reply #606 on: Tue, 24 May 2016, 19:53:50 »
I tried the new firmware, but the output keys are the same...meaning some keys are incorrect on the ISO.

Or did I get this wrong?

I'm not sure but  thanks for your testing. Seems that we need another testers!
TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt

Offline hasu

  • Thread Starter
  • Posts: 2863
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: ADB to USB keyboard converter
« Reply #607 on: Tue, 24 May 2016, 20:29:23 »
I tried the new firmware, but the output keys are the same...meaning some keys are incorrect on the ISO.

Or did I get this wrong?

I found a bug. Can you test it again with the latest code on github?
And let me know your ISO keyboard's handler_id with using 'hid_listen' tool if possible. You will see handler_id on hid_listen at startup.
TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt

Offline need

  • Posts: 460
Re: ADB to USB keyboard converter
« Reply #608 on: Wed, 25 May 2016, 12:32:18 »
I tried the newest one, there are three two keystrokes incorrect (but I personally don't use those keys at all...)

137966-0
Sorry I don't know what those are called:
1. Both keys in RED gives the same keys as ORANGE
2.    \   in BLUE gives  `  instead
I think this is correct.
Actually I got a question, do you know why ` looks like \  on the keycap?
137973-1

For hid_listen, it got stuck here forever:
137968-2

By the way, the deleting all drivers method works like a charm, and now it's being typed on my main computer. Thanks!
« Last Edit: Wed, 25 May 2016, 13:48:12 by need »

Offline hasu

  • Thread Starter
  • Posts: 2863
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: ADB to USB keyboard converter
« Reply #609 on: Wed, 25 May 2016, 20:13:17 »
Thanks for testing this.

Quote
For hid_listen, it got stuck here forever:

Open hid_listen, after that plug-in, you will see output like this.


Listening:
handler_id: 01 -> 01
Keyboard start.

TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt

Offline vulgris

  • Posts: 3
Re: ADB to USB keyboard converter
« Reply #610 on: Fri, 27 May 2016, 09:20:32 »
Hey guys,

first of all i want to thank you for these impressive work.
It inspired me, to buy a cheap AEK II on eBay and work my own into this thing.

As far as im not good im programming stuff, I asked my friend to do the coding for me.
He took the code and compiled it and packed it on an MicroPro. He said that it is now recognized as an Converter under Linux.
I first stick it into my machine (iMac 21 2015 El Capitan) and there was no reaction at all. The code was not modified at all.

Could there be a problem with the coding? Should the code have been adapted?
Is there any problem, or why don't i get any information by plugging the converter on?

The next strange thing is that when i plug the converter on (wired as you can see in this picture) the status lamps of the AEK II flash for one sec and then get dark.
No other reaction here. I could not stroke a single key or something.





Is there any kind of wrong wiring or should i use another pull-up-resistor? (now 1K)

Would be glad if you could help me out.

Thanks so far for your help!

Offline need

  • Posts: 460
Re: ADB to USB keyboard converter
« Reply #611 on: Fri, 27 May 2016, 18:07:01 »
Quote

And let me know your ISO keyboard's handler_id with using 'hid_listen' tool if possible. You will see handler_id on hid_listen at startup.

138253-0

I just wanna know... why do you need this?
« Last Edit: Fri, 27 May 2016, 18:13:21 by need »

Offline hasu

  • Thread Starter
  • Posts: 2863
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: ADB to USB keyboard converter
« Reply #612 on: Fri, 27 May 2016, 19:27:51 »
need, thank you. handler id of your keyboard is 5 originally(and the converter changes to 3) to support extended function. You can know whether the keyboard is ANSI or ISO from the id and swap weird scan codes for ISO.
https://github.com/tmk/tmk_keyboard/issues/35
https://github.com/tmk/tmk_keyboard/commit/f43a2df7614503708818c258439d3a7c90d65e95#diff-8afe7f90ed21578b25dd1ad5fe82c810R77

vulgris, wiring looks good, I guess your board is 3.3V version? you need 5V one.
TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt

Offline vulgris

  • Posts: 3
Re: ADB to USB keyboard converter
« Reply #613 on: Sat, 28 May 2016, 06:52:49 »
Hey hasu,

thanks for the fast reply.

As far as my eBay contact described it should be a 5V version.
Any other suggestions?


Offline hasu

  • Thread Starter
  • Posts: 2863
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: ADB to USB keyboard converter
« Reply #614 on: Sat, 28 May 2016, 07:26:36 »
Is it recognized as a keyboard on your PC? If so check your wiring again. If not measure voltage of vcc with dmm to check if it is really 5v.

Sent from my Nexus 5X using Tapatalk

TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt

Offline alh84001

  • Posts: 276
  • Location: EU-HR-ZG
Re: ADB to USB keyboard converter
« Reply #615 on: Mon, 30 May 2016, 04:08:59 »
It looks to me from the pic that J1 jumper is connected, so it should be 5V.

On one of these that I have inputs simply don't work. I can program the LEDs for instance, but any input is just ignored on the I/O pins (don't know for output). @vulgris have you tried using it with any other board/firmware to check if it works?

Offline vulgris

  • Posts: 3
Re: ADB to USB keyboard converter
« Reply #616 on: Thu, 02 June 2016, 07:41:28 »
Thanks for the comments guys.

I tryed a Teensy 2.0 and everything works fine. No problem now.
Think there was a problem with the compiled code for the MicroPro.

My mac now recognizes the adb converter and all keys are functional.

The only thing that is strange is that the status lamps such as num roll or caps will not shine.
There is no reaction when Im for example activate the caps mode. This only happens under OSX (El capitan btw).

When I use the converter under Linux all the lamps are functional. The converter even switches the keyboard layout from German to English (because of my Linux OS).

Ar there any suggestions what this problem could cause and what I could do about it? Is it only a software thing?

Thanks for the great help so far! And sorry for my sh**** english =)

Offline hasu

  • Thread Starter
  • Posts: 2863
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: ADB to USB keyboard converter
« Reply #617 on: Sat, 04 June 2016, 09:56:17 »
UPDATE:
Code was updated in repository and Apple Adjustable Keyboard's volume keys are supported now.
https://github.com/tmk/tmk_keyboard/issues/130#issuecomment-223759515
TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt

Offline Aran.E99

  • Posts: 180
  • Location: United kingdom
Re: ADB to USB keyboard converter
« Reply #618 on: Thu, 23 June 2016, 19:58:00 »
hey guys,

I'm new here  :p , but certainly not to the keyboard community. I'm not a programming whiz considering i'm younger however I know soldering, and all the hardware behind the project (already done). this is a very... basic question that may have an obvious answer. basically i have my teensy 2.0 all wired up etc. but i'm not sure how to get all the code files onto my teensy. I know that a loader is necessary (i have one) but i can't seem to get it working. what i am asking is can anyone briefly guide me guide me through the steps. with the loader it wants me to import a .hex image. to do this would I get all the '.c' and '.h' files from the github page and then compile them and format it to a .hex?. sorry if i was brief but i have been up all night working this out. Also, if there are instructions somewhere, i certainly don't know about them and if that is the case, i am deeply sorry for my ignorance, i am more of a 'get it done fast' guy

Thanks a lot guys,
-Aran
SMK 2nd Gen Blue Alps mount <3

Offline Aran.E99

  • Posts: 180
  • Location: United kingdom
Re: ADB to USB keyboard converter
« Reply #619 on: Sat, 25 June 2016, 16:45:56 »
deeply sorry for my ignorance, I have found the correct way to do it realizing the tutorial was there waiting for me. either way I am about to test it.

Aran
SMK 2nd Gen Blue Alps mount <3

Offline chaos_jockey

  • Posts: 7
Re: ADB to USB keyboard converter
« Reply #620 on: Thu, 11 August 2016, 15:49:00 »
I'm ignorant, this all works with the Apple Adjustable Keyboard (and it's numpad extension) with a teensy 2.0 ++, correct?

I got it all compiled and flashed but when I hook everything up and plug it in there isn't any output. Windows detects the HID and the teensy flashes whenever I press a key.

I can post pictures of my setup but I promise you I made sure the wiring and resistor is all correct. The only different thing I did was plug jumper wires into the adb socket on the keyboard then plug 'em into a breadboard with the teensy.

I just grabbed a spare s-video cable to replace the jumper wires but it's quite long (planning on shortening it), and I don't want to harvest my only ADB cables. We'll see how that goes, just wanted to post about my complication to see if somebody could enlighten me.

I am willing to solder directly to the keyboards pcb but only as a last resort.

Offline Aran.E99

  • Posts: 180
  • Location: United kingdom
Re: ADB to USB keyboard converter
« Reply #621 on: Thu, 11 August 2016, 19:06:19 »
I'm ignorant, this all works with the Apple Adjustable Keyboard (and it's numpad extension) with a teensy 2.0 ++, correct?

I got it all compiled and flashed but when I hook everything up and plug it in there isn't any output. Windows detects the HID and the teensy flashes whenever I press a key.

I can post pictures of my setup but I promise you I made sure the wiring and resistor is all correct. The only different thing I did was plug jumper wires into the adb socket on the keyboard then plug 'em into a breadboard with the teensy.

I just grabbed a spare s-video cable to replace the jumper wires but it's quite long (planning on shortening it), and I don't want to harvest my only ADB cables. We'll see how that goes, just wanted to post about my complication to see if somebody could enlighten me.

I am willing to solder directly to the keyboards pcb but only as a last resort.

sure you have the ADB pinout correct?

maybe you have accidentally connected the wrong pin / connected to multiple pins on the teensy?
SMK 2nd Gen Blue Alps mount <3

Offline chaos_jockey

  • Posts: 7
Re: ADB to USB keyboard converter
« Reply #622 on: Fri, 12 August 2016, 09:12:11 »
I'm ignorant, this all works with the Apple Adjustable Keyboard (and it's numpad extension) with a teensy 2.0 ++, correct?

I got it all compiled and flashed but when I hook everything up and plug it in there isn't any output. Windows detects the HID and the teensy flashes whenever I press a key.

I can post pictures of my setup but I promise you I made sure the wiring and resistor is all correct. The only different thing I did was plug jumper wires into the adb socket on the keyboard then plug 'em into a breadboard with the teensy.

I just grabbed a spare s-video cable to replace the jumper wires but it's quite long (planning on shortening it), and I don't want to harvest my only ADB cables. We'll see how that goes, just wanted to post about my complication to see if somebody could enlighten me.

I am willing to solder directly to the keyboards pcb but only as a last resort.

sure you have the ADB pinout correct?

maybe you have accidentally connected the wrong pin / connected to multiple pins on the teensy?


Sent from my SM-G935V using Tapatalk


Offline Aran.E99

  • Posts: 180
  • Location: United kingdom
Re: ADB to USB keyboard converter
« Reply #623 on: Fri, 12 August 2016, 09:33:59 »
I'm ignorant, this all works with the Apple Adjustable Keyboard (and it's numpad extension) with a teensy 2.0 ++, correct?

I got it all compiled and flashed but when I hook everything up and plug it in there isn't any output. Windows detects the HID and the teensy flashes whenever I press a key.

I can post pictures of my setup but I promise you I made sure the wiring and resistor is all correct. The only different thing I did was plug jumper wires into the adb socket on the keyboard then plug 'em into a breadboard with the teensy.

I just grabbed a spare s-video cable to replace the jumper wires but it's quite long (planning on shortening it), and I don't want to harvest my only ADB cables. We'll see how that goes, just wanted to post about my complication to see if somebody could enlighten me.

I am willing to solder directly to the keyboards pcb but only as a last resort.

sure you have the ADB pinout correct?

maybe you have accidentally connected the wrong pin / connected to multiple pins on the teensy?
Show Image


Sent from my SM-G935V using Tapatalk

the wiring looks fine, maybe you have one of those 'booby trap' breadboards where the rows are connected? it's rare but i have bought faulty breadboard before off of ebay. try connecting the wires directly to the pins so that we can rule out that however its highly unlikely. if not, it may be that your code is faulty, double check you compiled correctly and that you used teensy loader correctly (unless you used something different).
SMK 2nd Gen Blue Alps mount <3

Offline chaos_jockey

  • Posts: 7
Re: ADB to USB keyboard converter
« Reply #624 on: Fri, 12 August 2016, 10:30:48 »
Attached the jumpers and resistors directly to the teensy and it hasn't made a difference. Gave hid_listen a try and here's the output:

Waiting for new device:.....
Listening:
Before init:
After init:
debug enabled.
Keyboard start.

Pressing keys doesn't do anything.

The only thing I've edited are these lines in Makefile.teensy

line   69 MCU = at90usb1286
line 124 OPT_DEFS += -DBOOTLOADER_SIZE=4096

Offline Aran.E99

  • Posts: 180
  • Location: United kingdom
Re: ADB to USB keyboard converter
« Reply #625 on: Fri, 12 August 2016, 10:45:19 »
Attached the jumpers and resistors directly to the teensy and it hasn't made a difference. Gave hid_listen a try and here's the output:

Waiting for new device:.....
Listening:
Before init:
After init:
debug enabled.
Keyboard start.

Pressing keys doesn't do anything.

The only thing I've edited are these lines in Makefile.teensy

line   69 MCU = at90usb1286
line 124 OPT_DEFS += -DBOOTLOADER_SIZE=4096

ok, that is odd. i would recommend starting the makefile from fresh in case you accidentally put down the wrong code.
SMK 2nd Gen Blue Alps mount <3

Offline chaos_jockey

  • Posts: 7
Re: ADB to USB keyboard converter
« Reply #626 on: Fri, 12 August 2016, 10:51:57 »
Attached the jumpers and resistors directly to the teensy and it hasn't made a difference. Gave hid_listen a try and here's the output:

Waiting for new device:.....
Listening:
Before init:
After init:
debug enabled.
Keyboard start.

Pressing keys doesn't do anything.

The only thing I've edited are these lines in Makefile.teensy

line   69 MCU = at90usb1286
line 124 OPT_DEFS += -DBOOTLOADER_SIZE=4096

ok, that is odd. i would recommend starting the makefile from fresh in case you accidentally put down the wrong code.
Not to sound snarky but I literally did that minutes before my last post just to make sure.

Sent from my SM-G935V using Tapatalk


Offline Aran.E99

  • Posts: 180
  • Location: United kingdom
Re: ADB to USB keyboard converter
« Reply #627 on: Fri, 12 August 2016, 11:00:33 »
Attached the jumpers and resistors directly to the teensy and it hasn't made a difference. Gave hid_listen a try and here's the output:

Waiting for new device:.....
Listening:
Before init:
After init:
debug enabled.
Keyboard start.

Pressing keys doesn't do anything.

The only thing I've edited are these lines in Makefile.teensy

line   69 MCU = at90usb1286
line 124 OPT_DEFS += -DBOOTLOADER_SIZE=4096

ok, that is odd. i would recommend starting the makefile from fresh in case you accidentally put down the wrong code.
Not to sound snarky but I literally did that minutes before my last post just to make sure.

Sent from my SM-G935V using Tapatalk

being honest, that is all i can really think of that could've gone wrong. i'm sure that your chip is supported but the only other thing i can recommend is either buying s new teensy or testing it on another pc.
SMK 2nd Gen Blue Alps mount <3

Offline chaos_jockey

  • Posts: 7
Re: ADB to USB keyboard converter
« Reply #628 on: Fri, 12 August 2016, 11:06:59 »
Attached the jumpers and resistors directly to the teensy and it hasn't made a difference. Gave hid_listen a try and here's the output:

Waiting for new device:.....
Listening:
Before init:
After init:
debug enabled.
Keyboard start.

Pressing keys doesn't do anything.

The only thing I've edited are these lines in Makefile.teensy

line   69 MCU = at90usb1286
line 124 OPT_DEFS += -DBOOTLOADER_SIZE=4096

ok, that is odd. i would recommend starting the makefile from fresh in case you accidentally put down the wrong code.
Not to sound snarky but I literally did that minutes before my last post just to make sure.

Sent from my SM-G935V using Tapatalk

being honest, that is all i can really think of that could've gone wrong. i'm sure that your chip is supported but the only other thing i can recommend is either buying s new teensy or testing it on another pc.
Aside from using a multimeter to test if it has power, is there any other way I can test if it's fried without an old Mac or buying an adb to usb adapter? Since buying one would defeat the purpose.

Has anyone wrote something that flashes the led on the teensy when a key is pressed? That could more or less test if it's fried, yeah?

Sent from my SM-G935V using Tapatalk
« Last Edit: Fri, 12 August 2016, 11:10:23 by chaos_jockey »

Offline hasu

  • Thread Starter
  • Posts: 2863
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: ADB to USB keyboard converter
« Reply #629 on: Fri, 12 August 2016, 20:06:29 »
I'm ignorant, this all works with the Apple Adjustable Keyboard (and it's numpad extension) with a teensy 2.0 ++, correct?

I got it all compiled and flashed but when I hook everything up and plug it in there isn't any output. Windows detects the HID and the teensy flashes whenever I press a key.

I can post pictures of my setup but I promise you I made sure the wiring and resistor is all correct. The only different thing I did was plug jumper wires into the adb socket on the keyboard then plug 'em into a breadboard with the teensy.

I just grabbed a spare s-video cable to replace the jumper wires but it's quite long (planning on shortening it), and I don't want to harvest my only ADB cables. We'll see how that goes, just wanted to post about my complication to see if somebody could enlighten me.

I am willing to solder directly to the keyboards pcb but only as a last resort.

sure you have the ADB pinout correct?

maybe you have accidentally connected the wrong pin / connected to multiple pins on the teensy?
Show Image


Sent from my SM-G935V using Tapatalk



I confirmed my firmware works fine with Teensy 2.0++ and Adjustable keyboard,  so I'm 99% sure that your problem is your wiring or hardware now.

Your edited Makefile looks fine, I also used Makefile.teensy just with 'MCU = at90usb1286' like yours. I think bootloader size is not matter either way.

From the pic it looks good on controller side but you could still fail to wire on connector/cable side. Or your keyboard, cable or Teensy also can have defect certainly but I guess not for some reason.

TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt

Offline chaos_jockey

  • Posts: 7
Re: ADB to USB keyboard converter
« Reply #630 on: Fri, 12 August 2016, 20:14:57 »
I'm ignorant, this all works with the Apple Adjustable Keyboard (and it's numpad extension) with a teensy 2.0 ++, correct?

I got it all compiled and flashed but when I hook everything up and plug it in there isn't any output. Windows detects the HID and the teensy flashes whenever I press a key.

I can post pictures of my setup but I promise you I made sure the wiring and resistor is all correct. The only different thing I did was plug jumper wires into the adb socket on the keyboard then plug 'em into a breadboard with the teensy.

I just grabbed a spare s-video cable to replace the jumper wires but it's quite long (planning on shortening it), and I don't want to harvest my only ADB cables. We'll see how that goes, just wanted to post about my complication to see if somebody could enlighten me.

I am willing to solder directly to the keyboards pcb but only as a last resort.

sure you have the ADB pinout correct?

maybe you have accidentally connected the wrong pin / connected to multiple pins on the teensy?
Show Image


Sent from my SM-G935V using Tapatalk



I confirmed my firmware works fine with Teensy 2.0++ and Adjustable keyboard,  so I'm 99% sure that your problem is your wiring or hardware now.

Your edited Makefile looks fine, I also used Makefile.teensy just with 'MCU = at90usb1286' like yours. I think bootloader size is not matter either way.

From the pic it looks good on controller side but you could still fail to wire on connector/cable side. Or your keyboard, cable or Teensy also can have defect certainly but I guess not for some reason.
Edit: I was looking at my svideo cable backwards.... No fault to you, Hasu. I very much appreciate your help with this.

P.S. Feeling like an idiot >.<

Sent from my SM-G935V using Tapatalk
« Last Edit: Sun, 14 August 2016, 12:07:12 by chaos_jockey »

Offline slabdabs

  • Posts: 4
Re: ADB to USB keyboard converter
« Reply #631 on: Tue, 23 August 2016, 22:21:01 »
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!



« Last Edit: Tue, 23 August 2016, 22:32:31 by slabdabs »

Offline slabdabs

  • Posts: 4
Re: ADB to USB keyboard converter
« Reply #632 on: Tue, 23 August 2016, 23:44:26 »
OH LORD
So uhhhh since I had a mega pack of resistors....


Hugest face palm ever, so now they're alive!!!!!



Offline Aran.E99

  • Posts: 180
  • Location: United kingdom
Re: ADB to USB keyboard converter
« Reply #633 on: Wed, 24 August 2016, 07:22:18 »
OH LORD
So uhhhh since I had a mega pack of resistors....
Show Image


Hugest face palm ever, so now they're alive!!!!!

Show Image

Show Image


oh
my
lord

you have a lot of keyboards xD

are they all alps switches?
SMK 2nd Gen Blue Alps mount <3

Offline slabdabs

  • Posts: 4
Re: ADB to USB keyboard converter
« Reply #634 on: Wed, 24 August 2016, 09:06:54 »
oh
my
lord

you have a lot of keyboards xD

are they all alps switches?
All of the ones in that picture aside from the few Apple I keyboards are all ALPs, so like 60ish alps boards.

Offline alh84001

  • Posts: 276
  • Location: EU-HR-ZG
Re: ADB to USB keyboard converter
« Reply #635 on: Wed, 24 August 2016, 09:18:28 »
The Adjustable keyboards are not ALPS SKCL/M though. And those smaller ones on the left are Apple Keyboard II, and not Apple ADB Keyboards I believe, and these also don't have Alps. But that lot of 50ish AEK IIs  :eek:

Offline slabdabs

  • Posts: 4
Re: ADB to USB keyboard converter
« Reply #636 on: Sun, 28 August 2016, 18:40:57 »
So, I have a 1K Ohm resistor on my adapter and using a Y splitter it appears to run two keyboards just fine!


Offline rmwatson

  • Posts: 2
Re: ADB to USB keyboard converter
« Reply #637 on: Mon, 05 September 2016, 21:29:20 »
Hi All,

Great project!

I am giving this one a go myself. Having trouble generating the HEX file on windows. Has anyone seen this error when compiling,

../../tmk_core/common/keymap.c: In function 'keymap_fn_to_action':
../../tmk_core/common/keymap.c:246: internal compiler error: in iterative_hash_expr, at tree.c:5363
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://sourceforge.net/tracker/?atid=520074&group_id=68108&func=browse> for instructions.
make: *** [obj_adb_usb_teensy/common/keymap.o] Error 1




Offline hasu

  • Thread Starter
  • Posts: 2863
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: ADB to USB keyboard converter
« Reply #638 on: Tue, 06 September 2016, 14:07:17 »
Hi All,

Great project!

I am giving this one a go myself. Having trouble generating the HEX file on windows. Has anyone seen this error when compiling,

../../tmk_core/common/keymap.c: In function 'keymap_fn_to_action':
../../tmk_core/common/keymap.c:246: internal compiler error: in iterative_hash_expr, at tree.c:5363
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://sourceforge.net/tracker/?atid=520074&group_id=68108&func=browse> for instructions.
make: *** [obj_adb_usb_teensy/common/keymap.o] Error 1





Try this.
https://github.com/tmk/tmk_keyboard/wiki/Build-firmware-on-VirtualBox
TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt

Offline rmwatson

  • Posts: 2
Re: ADB to USB keyboard converter
« Reply #639 on: Tue, 06 September 2016, 17:12:13 »
Hi All,

Great project!

I am giving this one a go myself. Having trouble generating the HEX file on windows. Has anyone seen this error when compiling,

../../tmk_core/common/keymap.c: In function 'keymap_fn_to_action':
../../tmk_core/common/keymap.c:246: internal compiler error: in iterative_hash_expr, at tree.c:5363
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://sourceforge.net/tracker/?atid=520074&group_id=68108&func=browse> for instructions.
make: *** [obj_adb_usb_teensy/common/keymap.o] Error 1





Try this.
https://github.com/tmk/tmk_keyboard/wiki/Build-firmware-on-VirtualBox

That worked. Thank you.

Offline claimempty

  • Posts: 1
Re: ADB to USB keyboard converter
« Reply #640 on: Sat, 10 September 2016, 01:59:41 »
Hi i've been struggling for the last few hours to get the a abd to usb converter teensy converter to work. The output i get out of hid_listen is this whether the keyboard is plugged in or not.
Code: [Select]
Listening:
Before init:
Scan: addr:1, reg3:FFE2
Scan: addr:2, reg3:FFE2
Scan: addr:3, reg3:FFE2
Scan: addr:4, reg3:FFE2
Scan: addr:5, reg3:FFE2
Scan: addr:6, reg3:FFE2
Scan: addr:7, reg3:FFE2
Scan: addr:8, reg3:FFE2
Scan: addr:9, reg3:FFE2
Scan: addr:10, reg3:FFE2
Scan: addr:11, reg3:FFE2
Scan: addr:12, reg3:FFE2
Scan: addr:13, reg3:FFE2
Scan: addr:14, reg3:FFE2
Scan: addr:15, reg3:FFE2
After init:
Scan: addr:1, reg3:FFE2
Scan: addr:2, reg3:FFE2
Scan: addr:3, reg3:FFE2
Scan: addr:4, reg3:FFE2
Scan: addr:5, reg3:FFE2
Scan: addr:6, reg3:FFE2
Scan: addr:7, reg3:FFE2
Scan: addr:8, reg3:FFE2
Scan: addr:9, reg3:FFE2
Scan: addr:10, reg3:FFE2
Scan: addr:11, reg3:FFE2
Scan: addr:12, reg3:FFE2
Scan: addr:13, reg3:FFE2
Scan: addr:14, reg3:FFE2
Scan: addr:15, reg3:FFE2
debug enabled.
Keyboard start.
adb_host_kbd_recv: ERROR(-30)
I think the wiring is good since the keyboard lights up when plugged in although my soldering is terrible. I also know that i have it in d1 instead of the default d0 but i think I changed the config file properly
Code: [Select]
/* ADB port setting */
#define ADB_PORT        PORTD
#define ADB_PIN         PIND
#define ADB_DDR         DDRD
#define ADB_DATA_BIT    1
//#define ADB_PSW_BIT     1       // optional
thx for the help in advance

Offline n_hof

  • Posts: 1
Re: ADB to USB keyboard converter
« Reply #641 on: Sun, 11 September 2016, 15:55:41 »


Keyboard was $3 at resale store, Micro $10 at Radio Shack. 1.7K resistor works perfectly.  Thanks to everyone who provided info in thread!

Offline djpyle

  • Posts: 9
Re: ADB to USB keyboard converter
« Reply #642 on: Fri, 23 September 2016, 21:35:52 »
Has anyone else upgraded to macOS Sierra yet? I did, and suddenly my locking caps lock is no longer working. I've tried two different keyboards and two different controllers (a Teensy and a Pro Micro clone), and I get the same results no matter what combination I use. No caps lock and no caps lock light. If I boot into my Yosemite partition though, everything works like it always has. I'm not sure what about Sierra could be causing this, but if anybody has any ideas, I'd love to get it figured out.
« Last Edit: Fri, 23 September 2016, 22:24:56 by djpyle »

Offline alh84001

  • Posts: 276
  • Location: EU-HR-ZG
Re: ADB to USB keyboard converter
« Reply #643 on: Sat, 24 September 2016, 03:36:47 »
From what I've heard, they revamped the keyboard (or the whole input?) system in Sierra. That's the reason Karabiner is not working, so it could have something to do with your issue as well.

Offline hasu

  • Thread Starter
  • Posts: 2863
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: ADB to USB keyboard converter
« Reply #644 on: Sat, 24 September 2016, 05:24:03 »
Pushing Locking caps  key actually sends press and release of caps lock in short period. No wait between them in current firmware, I guess the wait is needed in some situations.

Try place delay here and see result if possible.
https://github.com/tmk/tmk_keyboard/blob/master/tmk_core/common/action.c#L366-L369



Sent from my Nexus 5X

TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt

Offline alh84001

  • Posts: 276
  • Location: EU-HR-ZG
Re: ADB to USB keyboard converter
« Reply #645 on: Sat, 24 September 2016, 05:46:24 »
@hasu is that true of all SKCL lock keys in combination with all controllers? E.g. if I were to put a lock key into Omnikey, do you know if it would just work, or would additional converter (controller?) configuration be needed?

Offline hasu

  • Thread Starter
  • Posts: 2863
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: ADB to USB keyboard converter
« Reply #646 on: Sat, 24 September 2016, 05:58:01 »
@hasu is that true of all SKCL lock keys in combination with all controllers? E.g. if I were to put a lock key into Omnikey, do you know if it would just work, or would additional converter (controller?) configuration be needed?
Omnikey won't work with mechanical locking switch. Yes you need custom controller or converter.

Sent from my Nexus 5X

TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt

Offline djpyle

  • Posts: 9
Re: ADB to USB keyboard converter
« Reply #647 on: Sat, 24 September 2016, 10:27:03 »
Try place delay here and see result if possible.
https://github.com/tmk/tmk_keyboard/blob/master/tmk_core/common/action.c#L366-L369

Success! Including wait.h and adding a wait_ms(100) delay did the trick. Thanks, hasu!

Offline hasu

  • Thread Starter
  • Posts: 2863
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: ADB to USB keyboard converter
« Reply #648 on: Sat, 24 September 2016, 18:50:37 »
Try place delay here and see result if possible.
https://github.com/tmk/tmk_keyboard/blob/master/tmk_core/common/action.c#L366-L369

Success! Including wait.h and adding a wait_ms(100) delay did the trick. Thanks, hasu!

Nice. Thanks for reporting!
I'll add some wait on the code in repository.

EDIT: filed the issue. https://github.com/tmk/tmk_keyboard/issues/390
« Last Edit: Sat, 24 September 2016, 19:00:07 by hasu »
TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt

Offline stat

  • Posts: 5
Re: ADB to USB keyboard converter
« Reply #649 on: Mon, 26 September 2016, 03:52:34 »
Hello! Thank you for making this. I'm typing from my AEKII now, after following the instructions here: https://github.com/tmk/tmk_keyboard/blob/master/tmk_core/doc/build.md

I was trying to revisit the keymapping and possibly change the Power key to something like F16 which I can assign in AutoHotKey. I edited config.h, but kept backups of the original config.h and hex file I generated about a week ago.

When I went to re-make Makefile.rev1, I noticed that I somehow uninstalled avr-gcc. So I got the avr8-gnu-toolchain from Atmel and added its /bin folder to Path. It still didn't recognize it, so I put avr-gcc.exe in the working directory. It saw it, but couldn't find /device-specs/specs-atmega32u4, and I couldn't find a way around that. I had read that WinAVR doesn't always work, but I tried it, and I guess there was some bug so it didn't work.

I still have dfu-programmer and avr-dude, and I believe those both still work. I've been using MinGW on Windows 7. I have an atmega32u4 instead of teensy, and it seems to be working well so far.

Ultimately, this is probably a simple question but I can't remember how I did it before: what's the procedure to installing avr-gcc on Win7?