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

0 Members and 1 Guest are viewing this topic.

Offline nevin

  • Posts: 1646
  • Location: US
Re: TMK ADB to USB keyboard converter
« Reply #1200 on: Tue, 26 April 2022, 17:05:23 »
Quote
I'm using an M1-based Mac, could this be causing the issue?

i don't know. i don't have any M1 stuff to test with. do some searching in the brew or tools to see if there's an incompatibility.
do you have any other computers? build the file on your mac & flash on a different computer/laptop?

i have a friend with an M1, let me ask him if he's been able to flash anything since getting it.
edit... my friend is going to test when he can & chime in.
« Last Edit: Tue, 26 April 2022, 17:11:43 by nevin »
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 ScarletSwordfish

  • Posts: 33
Re: TMK ADB to USB keyboard converter
« Reply #1201 on: Tue, 26 April 2022, 17:36:04 »
I just tried flashing my Pro Micro with QMK Toolbox on my M1 Mac mini, and I am getting the same results as jzw95. My window looks exactly the same, with "No HID console devices connected" at the bottom, and I get no yellow text when I reset the Pro Micro. It may very well be an M1 issue.

Offline nevin

  • Posts: 1646
  • Location: US
Re: TMK ADB to USB keyboard converter
« Reply #1202 on: Tue, 26 April 2022, 17:47:04 »
... little further digging....

looks like it is a known issue
https://github.com/osx-cross/homebrew-avr/issues/220

but it looks like the issue has been resolved in GCC11 and supposedly patched in all versions...
https://github.com/osx-cross/homebrew-avr/pull/249

might have to pull GCC 11 specifically
https://github.com/osx-cross/homebrew-avr
scroll down to current versions
GCC 11.1.0 - provided as
Code: [Select]
avr-gcc@11
....not positive which you need, but give it a shot. update avr-gcc by itself.
Keeb.io Viterbi, Apple m0110, Apple m0120, Apple m0110a, Apple 658-4081, Apple M1242, Apple AEK II, MK96, GH60/Pure, Cherry g84-4100, Adesso AKP-220B, Magicforce 68

Offline hasu

  • Thread Starter
  • Posts: 3471
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: TMK ADB to USB keyboard converter
« Reply #1203 on: Tue, 26 April 2022, 19:16:43 »
• The first keypad is working great.
• The second keypad is OK too (the one with a trackball), there is just a weird things :

What's the weird things actually?


Quote
• The last one is this combo "calculator/keypad" (https://www.journaldulapin.com/2020/01/08/un-pave-numerique-qui-fait-office-de-calculatrice-en-adb/). And it will not work. When i plug the keypad, it turn on (seems OK) and there is timer. And whith the adpeter, after a few second, the timer is freezing. And nothing happen. I suppose the keypad need more energy, but even with battery, i have the same thing.

If hid_listen log doesn't show useful info what 'ADB Parser' shows would be useful.


Quote
The AlphaSmart is working great. I can send text from the word processor to my mac. The only weird thing is the Caps Lock key : the key send only "B9FF" on the log.

With iMate/OS9(OSX) the CapsLock key work well, right?

Can you get log with hot-plugging the AlphaSmart? The log doesn't show useful info much.
Please hot-plug a device basically when you get log if possible. This will show more info.

Offline hasu

  • Thread Starter
  • Posts: 3471
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: TMK ADB to USB keyboard converter
« Reply #1204 on: Tue, 26 April 2022, 20:17:10 »
And with the new firmware, i have a good news.

The infamous trackpad "GlidePoint" is working. There is a weird things on the logs, by the way : the line "M:found: reg3:6C01" is repeating, with incrementation.


To support hot-plugging the converter checks mouse and keyboard per 1sec, but this is not useful for dumb devices. I think the converter can stop this once dumb device is found. I'll fix.



Quote
I have try too with the optical ADB/Mouse, and the mouse is not working... but i have the same things on the logs.
And i have tried on a "real" Mac : the mouse seems to go to adress 10 (and not 3). Is this normal ? (i join a capture)

I didn't know ADB Parser tool, it looks great for debug!

Yes, it is what expected according to OSX source code. I think classic OS9 does same thing probably.

1. OSX checks address 3 if it finds a mouse move the mosue to empty address(F in this case).
2. The mouse is configured there(after moved) if driver is avaialble.
3. OSX check address 3 again.
        If it doesn't find mouse anymore, the last mouse is moved back to address 3.
        if it find another mouse it is moved to next empty address(probably E). and go to 2.

Keyboards are also handled in same way.

https://github.com/apple-oss-distributions/IOADBFamily/blob/IOADBFamily-6/IOADBBus/IOADBController.cpp#L278

One mouse is located at 3 and another at F in the result.
This can happen when you have physically two mouses or  a complex mouse like Kensignton.

Mouse at 3 has hadler ID:32 and this indicates that you had Kensington mouse?.



Quote
And the last one is my new mouse, an Elecom branded mouse, with the same switch than the Elecom trackball. And the same problem : a "fail" in the logs.

The Elecom mouse fails at second moving for some reason.
This is similar to NeXT mouse issue.

I'll have to revisit this issue later.

Offline jzw95

  • Posts: 11
  • Location: Edinburgh, Scotland
Re: TMK ADB to USB keyboard converter
« Reply #1205 on: Wed, 27 April 2022, 07:11:36 »
@nevin, thanks for digging further into this. I'm not sure that it is an issue with avr-gcc since I've not tried to compile any keyboard firmware – simply access the Pro Micro with the programmer, but maybe there is some related library that is causing issues with dfu-programmer. My avr-gcc (GCC9) seems to be an ARM binary:

Code: [Select]
1017 ~ » file /opt/homebrew/Cellar/avr-gcc@9/9.3.0_3/bin/avr-gcc
/opt/homebrew/Cellar/avr-gcc@9/9.3.0_3/bin/avr-gcc: Mach-O 64-bit executable arm64

but it's a good idea to be sure, so when I have some time later I'll install avr-gcc@11 specifically and see if that makes a difference.

@ScarletSwordfish I really appreciate your testing this and confirming you see the same (lack of) behaviour. I'm wondering if this has to do with the tightened security model of the M1 Macs and somehow the dfu-programmer is not being allowed access to the tty devices (or /dev at all??). I've got an old Intel-based MacBook Air and when I have a chance I'll fire it up, install the toolchain, and see if the results are any different.

Offline nevin

  • Posts: 1646
  • Location: US
Re: TMK ADB to USB keyboard converter
« Reply #1206 on: Wed, 27 April 2022, 07:40:52 »
the promicro's use caterina bootloader, avrdude flash utility to flash, not dfu util. that's what i mean, the flashing utility sounds like it was updated in those versions of avr-gcc

not sure which version of avrdude is pulled in TMK dependencies during install, avrdude might not be pulled at all during TMK install.
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 jzw95

  • Posts: 11
  • Location: Edinburgh, Scotland
Re: TMK ADB to USB keyboard converter
« Reply #1207 on: Wed, 27 April 2022, 10:06:03 »
Oh, does the caterina boot loader not support dfu-programmer? I will try avrdude, which should work since that's what the Arduino IDE is using (and the Arduino IDE was able to flash my Pro Micro). But what does QMK Toolbox use to flash? It's strange that it works for your caterina device but not my Pro Micro. That's why I thought it was maybe the M1 causing an issue.

Thanks for all the info. I'll do some testing with my Intel Mac and avrdude and post my results.

Offline nevin

  • Posts: 1646
  • Location: US
Re: TMK ADB to USB keyboard converter
« Reply #1208 on: Wed, 27 April 2022, 12:46:15 »
promicro's are caterina bootloaders. and promicro, at least the original is a Arduino device. if you have a hex file ready, you can probably use the Arduino flasher.

qmk toolbox can flash a bunch of different devices, processors, bootloaders, etc. just depends on what tools are installed that qmk toolbox can utilize.
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 jzw95

  • Posts: 11
  • Location: Edinburgh, Scotland
Re: TMK ADB to USB keyboard converter
« Reply #1209 on: Fri, 29 April 2022, 10:14:20 »
I've finally had some time to play around a bit more, and the end result is… success! I've got QMK Toolbox to recognise my Pro Micro on my M1 MacBook Pro.

I first got my 2013 Intel-based MacBook Air fired up and downloaded QMK Toolbox to it. I had to use an older version (v0.1.1) as my MacBook Air is running MacOS 10.14.6 which isn't supported by v0.2.0. But as soon as I put my Pro Micro in DFU mode, the magical yellow text appeared:

285638-0

I then installed dfu-programmer on the MacBook Air and confirmed that it doesn't work.

With the knowledge that my Pro Micro should work with QMK Toolbox, I went back to my M1 MacBook Pro. I tried a few things (removing quarantine xattrs from QMK Toolbox, running it under Rosetta) that didn't work. Then I thought I'd download the latest beta and see if that somehow had a fix, and… it worked! I've had a look through the GitHub issues for QMK Toolbox, and I can't see anything that specifically addresses the problem I was having, but possibly it is this one: [macOS] Add libhidapi #357.

In any case, the lesson for anyone who is having similar problems getting QMK Toolbox to recognise a Caterina bootloader device on an M1 Mac running MacOS 12 Monterey: download the latest beta, and it should work.

Thanks again, @nevin, for your help. Without knowing what the expected behaviour was I was struggling to figure out what to do to debug this.

Next up… I am going to try actually flashing the TMK firmware. 🥳
« Last Edit: Fri, 29 April 2022, 14:29:35 by jzw95 »

Offline nevin

  • Posts: 1646
  • Location: US
Re: TMK ADB to USB keyboard converter
« Reply #1210 on: Fri, 29 April 2022, 11:35:11 »
glad you got it working and have fun with your boards!
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 Dandu

  • Posts: 43
Re: TMK ADB to USB keyboard converter
« Reply #1211 on: Tue, 03 May 2022, 11:09:48 »
What's the weird things actually?

I was tired, sorry.

The keypad use a "shift" key for a second use of the key. The "shift" key has no scan code, but when i press the "5" key, i have FFFF FFFF scan code : the "5" key is the only key without an alternate function (i have join a photo).

Quote
If hid_listen log doesn't show useful info what 'ADB Parser' shows would be useful.

UI will try that this week with my old Mac.

Quote
With iMate/OS9(OSX) the CapsLock key work well, right?

Can you get log with hot-plugging the AlphaSmart? The log doesn't show useful info much.
Please hot-plug a device basically when you get log if possible. This will show more info.

So, with iMate, my HID app say "Keyboard Caps Lock (0x0039)" up and down, but it will not work : even if i press the key, i have nos CAPS.

I have join two logs. The first one, i have hot plug the AlphaSmart and after that, i have powered the keyboard. In the second, i have powered the keyboard, and after that, i have plugged in. The result is the same, by the way, no information.


Offline Dandu

  • Posts: 43
Re: TMK ADB to USB keyboard converter
« Reply #1212 on: Tue, 03 May 2022, 11:12:27 »
Quote
I didn't know ADB Parser tool, it looks great for debug!

Yes, it is what expected according to OSX source code. I think classic OS9 does same thing probably.

1. OSX checks address 3 if it finds a mouse move the mosue to empty address(F in this case).
2. The mouse is configured there(after moved) if driver is avaialble.
3. OSX check address 3 again.
        If it doesn't find mouse anymore, the last mouse is moved back to address 3.
        if it find another mouse it is moved to next empty address(probably E). and go to 2.

Keyboards are also handled in same way.

https://github.com/apple-oss-distributions/IOADBFamily/blob/IOADBFamily-6/IOADBBus/IOADBController.cpp#L278

One mouse is located at 3 and another at F in the result.
This can happen when you have physically two mouses or  a complex mouse like Kensignton.

Mouse at 3 has hadler ID:32 and this indicates that you had Kensington mouse?.

I will try this week too, but on the capture, i have connected only the optical USB/ADB mouse.

Quote
The Elecom mouse fails at second moving for some reason.
This is similar to NeXT mouse issue.

I'll have to revisit this issue later.

OK, thank you !

Offline hasu

  • Thread Starter
  • Posts: 3471
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: TMK ADB to USB keyboard converter
« Reply #1213 on: Wed, 04 May 2022, 09:24:11 »
What's the weird things actually?

I was tired, sorry.

The keypad use a "shift" key for a second use of the key. The "shift" key has no scan code, but when i press the "5" key, i have FFFF FFFF scan code : the "5" key is the only key without an alternate function (i have join a photo).

Confirmed that my keypad also behaves exactly as you described. My keypads was manufactured by Qtronix too.
'FFFF' is not proper scan code but not harmful.



Quote
Quote
With iMate/OS9(OSX) the CapsLock key work well, right?

Can you get log with hot-plugging the AlphaSmart? The log doesn't show useful info much.
Please hot-plug a device basically when you get log if possible. This will show more info.

So, with iMate, my HID app say "Keyboard Caps Lock (0x0039)" up and down, but it will not work : even if i press the key, i have nos CAPS.

I have join two logs. The first one, i have hot plug the AlphaSmart and after that, i have powered the keyboard. In the second, i have powered the keyboard, and after that, i have plugged in. The result is the same, by the way, no information.



Hmm,  no device info in the logs indicattes that AlphaSmart is dumb device that can't reply ADB commands.


And in the log two capslock release events(B9) happened in a row without press event(39).  This is weird and reason why it fails with iMate too. I guess AlphaSmart firmware does something tricky.

Offline hasu

  • Thread Starter
  • Posts: 3471
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: TMK ADB to USB keyboard converter
« Reply #1214 on: Fri, 06 May 2022, 02:21:39 »
Try attached firmware with :
- Pioneer and Macally keyboard
- Elecom, NeXT,  M2706 black mouse

Changed initialization of keyboard and mouse setup.


* adb_usb_rev1.hex (67.38 kB - downloaded 147 times.)

Offline hasu

  • Thread Starter
  • Posts: 3471
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: TMK ADB to USB keyboard converter
« Reply #1215 on: Sat, 21 May 2022, 00:49:33 »
I wrote ADB protocol decoder for sigrok for debug.


Sigrok ADB decoder
Cheap $10-20 Logic Analyzer that is compatible with sigrok works well for this job.

Get one and try. 1MHz sample rate is actually good enough for ADB protocol.
You can use this deocoder with sigrok PulseView to see ADB commands and data.

https://github.com/tmk/tmk_keyboard/wiki/Signal-Capture-for-debug#sigrok

Offline hasu

  • Thread Starter
  • Posts: 3471
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: TMK ADB to USB keyboard converter
« Reply #1216 on: Mon, 30 May 2022, 09:13:00 »
Updated firmware

- Address Resolution was implemented
- Improved hot-plug support

These offers better support for multiple devices on daisy chain.
You can use ANSI and ISO keyboard at same time, for example.

https://github.com/tmk/tmk_keyboard/commit/4923f09377371723c767ab884454571de0740094

Offline nevin

  • Posts: 1646
  • Location: US
Re: TMK ADB to USB keyboard converter
« Reply #1217 on: Mon, 30 May 2022, 09:54:29 »
NICE!
great work as always hasu!
Keeb.io Viterbi, Apple m0110, Apple m0120, Apple m0110a, Apple 658-4081, Apple M1242, Apple AEK II, MK96, GH60/Pure, Cherry g84-4100, Adesso AKP-220B, Magicforce 68

Offline hasu

  • Thread Starter
  • Posts: 3471
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: TMK ADB to USB keyboard converter
« Reply #1218 on: Wed, 08 June 2022, 23:00:15 »
Dandu,

Can you try attached firmware with devices that 'failed to move'?
    - Pioneer MPC-KB2
    - Kensington Optical mouse


With updated firmware Address Resoution was implemented and command timging is changed, so that the converter behaves as what Mac OSX does as possible now.
This can get better result with devices that fails to move to new address, perhaps.

* adb_usb_rev1.hex (61.71 kB - downloaded 144 times.) @8dee557

Offline Dandu

  • Posts: 43
Re: TMK ADB to USB keyboard converter
« Reply #1219 on: Thu, 09 June 2022, 02:36:30 »
Hi

I'm sorry, i'm late, i had a lot of work.

I will try the keyboard this week

Offline wujack

  • Posts: 5
Re: TMK ADB to USB keyboard converter
« Reply #1220 on: Tue, 19 July 2022, 12:35:43 »
Hi, I've just received my controller I'm wondering if I wanted to convert the controller to type-c can I solder wires from the G, +, -, V through-hole to a c3-unified usb-c daughter board? Thanks!

Offline hasu

  • Thread Starter
  • Posts: 3471
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: TMK ADB to USB keyboard converter
« Reply #1221 on: Tue, 19 July 2022, 19:31:21 »
I think so. Let us know your result.

Hi, I've just received my controller I'm wondering if I wanted to convert the controller to type-c can I solder wires from the G, +, -, V through-hole to a c3-unified usb-c daughter board? Thanks!

EDIT: Assuming what you are referring to is this: https://github.com/ai03-2725/Unified-Daughterboard

Offline wujack

  • Posts: 5
Re: TMK ADB to USB keyboard converter
« Reply #1222 on: Wed, 20 July 2022, 00:06:41 »
I think so. Let us know your result.

Hi, I've just received my controller I'm wondering if I wanted to convert the controller to type-c can I solder wires from the G, +, -, V through-hole to a c3-unified usb-c daughter board? Thanks!

EDIT: Assuming what you are referring to is this: https://github.com/ai03-2725/Unified-Daughterboard

Yup, precisely. I'll let you guys know the results!

Offline fabiobelmondo

  • Posts: 1
Re: TMK ADB to USB keyboard converter
« Reply #1223 on: Fri, 26 August 2022, 08:31:06 »
Hello, just wired up the converter for my M0118 using a pro micro and when i plug in th s-video cable i get this message in QMK Toolbox. Needless to say that the keyboard doesn't work.. Any indeas?
https://imgur.com/a/GX4KoaQ
« Last Edit: Fri, 26 August 2022, 08:33:56 by fabiobelmondo »

Offline emrebag

  • Posts: 4
Re: TMK ADB to USB keyboard converter
« Reply #1224 on: Wed, 07 December 2022, 08:16:23 »
Is there any way to add M0118 ISO layout to TMK Keymap Editor?
Right now the closest available option is using the M0110 layout on TMK keymap editor, but there is no newbie-friendly way to add the few missing keys or any guide detailing how one might do so without creating a keymap from scratch.
« Last Edit: Wed, 07 December 2022, 08:18:22 by emrebag »

Offline hasu

  • Thread Starter
  • Posts: 3471
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: TMK ADB to USB keyboard converter
« Reply #1225 on: Wed, 07 December 2022, 08:37:51 »
Is there any way to add M0118 ISO layout to TMK Keymap Editor?
Right now the closest available option is using the M0110 layout on TMK keymap editor, but there is no newbie-friendly way to add the few missing keys or any guide detailing how one might do so without creating a keymap from scratch.


You can use default keyboard layout of ADB-USB, which should have enough keys to edit keymap for M0118.
I think there is no missing key on the ADB-USB editor.

Offline emrebag

  • Posts: 4
Re: TMK ADB to USB keyboard converter
« Reply #1226 on: Wed, 07 December 2022, 11:07:00 »
Thank you for the super fast reply!
So, I'm just gonna go left to right and fill the keymap in order correct?
One problem I am running into is that the lgui and rgui seem to be paired in the default positions.
They do not correspond to the gui keys in my keymap, and I am not able to customize them separately.
Any way around this?
« Last Edit: Wed, 07 December 2022, 11:13:12 by emrebag »

Offline hasu

  • Thread Starter
  • Posts: 3471
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: TMK ADB to USB keyboard converter
« Reply #1227 on: Wed, 07 December 2022, 17:12:50 »
No, space on keymap edtor still should indicate sapce on M0118, and same for other keys.
Basically default keymap should work on M0118.

As the first post says:
On ADB Standard keyboards(M0116) left and right corresponding modifiers are logically indentical and can not be discriminated one another

I think this is your problem and limitation of the keyboard, then no solution.
« Last Edit: Wed, 07 December 2022, 17:33:14 by hasu »

Offline hasu

  • Thread Starter
  • Posts: 3471
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: TMK ADB to USB keyboard converter
« Reply #1228 on: Sat, 11 March 2023, 10:48:32 »
New firmware is available on github repo and Keymap Editor now.
Fixed Remote Wakeup bug. https://github.com/tmk/tmk_keyboard/issues/756

Offline Maigonis

  • Posts: 2
  • Location: Latvia
Re: TMK ADB to USB keyboard converter
« Reply #1229 on: Wed, 14 June 2023, 09:25:20 »
Hello!

I have an AEK (M0115).
I am trying to get an ADB to USB converter working using a ProMicro and a PCB board that holds the Mini Din 4 socket. The details of the PCB I used are here: https://68kmla.org/bb/index.php?threads/cheap-and-simple-adb-to-usb-converter.39402/.

My converter does not work. When I connect the keyboard to a PC either Windows or Linux, I have the same behavior, the lock lights flash and turn off after which the keyboard does work.

I successfully uploaded the adb-usb converter precompiled binary from the TMK firmware repository to my ProMicro. I did not change the bootloader, so the Pro Micro still contains the Caterina bootloader. I triple-checked my wiring and did continuity tests on all the pins. They are connected correctly. I also have a 1k Ohm pull-up on the data line and solder-bridged J1 to get 5.01V on VCC.

Windows and Linux both detect the Pro Micro as an HID device and show the correct Vendor ID, Manufacturer, etc. (QMK Toolbox also shows the hid-device connection).

Since the firmware seems to have been flashed correctly and the wiring seems correct, Do I assume that the keyboard is faulty? I just recently received it, the seller claimed 100% functional.
I don't have other ways to test since I don't have another keyboard or converter.

I would very much appreciate any help that anyone can provide.

Thank you!

Offline Maigonis

  • Posts: 2
  • Location: Latvia
Re: TMK ADB to USB keyboard converter
« Reply #1230 on: Wed, 14 June 2023, 14:19:44 »
Hello Again!

I have fixed the issue and now the converter works flawlessly! The issue was the pull-up resistor. I misread the markings and soldered in a 100k ohm resistor instead of 1k. Changing this solved the issue.

Offline xxhellfirexx

  • Posts: 5
Re: TMK ADB to USB keyboard converter
« Reply #1231 on: Mon, 25 September 2023, 22:44:04 »
I purchased a TMK ADB-USB converter rev2 (ATMega32u2) from Hasu a few years ago and am using it in my keyboard rotation. When using the keyboard on Mac OS 12.6, I notice it occasionally stops registering keypresses in the middle of my typing. The only way to get it working again is to reconnect the USB cable.

I tried to use Hasu's online keymap editor to generate the hex firmware file and then flash it using the Atmel Flip program. However, it did not stop this problem from happening. I used the keymap editor to remove all keyboard layers and it did not fix the problem either.

I also tried to build the firmware by following the TMK keyboard wiki instructions. However, when the firmware is flashed, the keyboard stops registering all keypresses even when the USB has been reconnected. I need to use the Atmel Flip program to flash the hex file from the online keymap editor to get it working again.

Has anyone else experienced this problem? Is there anything I can do to troubleshoot this problem? The hid_listen program for Windows and Mac does not detect the keyboard even when in bootloader mode.

Offline hasu

  • Thread Starter
  • Posts: 3471
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: TMK ADB to USB keyboard converter
« Reply #1232 on: Mon, 25 September 2023, 23:21:35 »
I don't have Mac and didn't test on the platform. It doesn't sounds like a firmware issue at this point.

I would suspect unstable connection and hardware problem.

First, you can try other USB cable and ADB cable. Also cleaning connectors may help.

Narrow down point of the problem with further tests.

- The problem happen only on Mac and never on Windows?
- The problem happen only with specific ADB keyboard? Try another keyboard if you have.


Download hid_listen here. It should work. And use firmware downloaded from Keymap Editor.
https://github.com/tmk/tmk_keyboard/wiki#debug-console

You may need to replug a few times when hid_listen doesn't recognize the converter.



Offline xxhellfirexx

  • Posts: 5
Re: TMK ADB to USB keyboard converter
« Reply #1233 on: Tue, 26 September 2023, 00:54:33 »
Thanks for the quick response Hasu. I will try swapping cables one at a time first.

Offline hasu

  • Thread Starter
  • Posts: 3471
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: TMK ADB to USB keyboard converter
« Reply #1234 on: Wed, 25 October 2023, 22:06:02 »
Updated firmware to add support for Microspeed MacTrac 2.0(old firmware/before Dec 1995).

https://github.com/tmk/tmk_keyboard/commit/bd6e208d55a62added0df658f54ffaa0256fbd59

Offline xxhellfirexx

  • Posts: 5
Re: TMK ADB to USB keyboard converter
« Reply #1235 on: Thu, 26 October 2023, 02:49:44 »
The keyboard still randomly stops accepting keypresses from Windows and Mac OS and does not work until I reconnect the USB or restart my computer.
I tried swapping the micro USB and s-video cables and also changing between USB 3.0 and USB 2.0 ports. However, these changes made no difference.

While the keyboard is not working, if I press the bootloader button, the ATmega32U2 DFU device appears in the device manager.
This means the connection is still good, but the firmware is bugged.

Is there anything else I can do to troubleshoot this? I don't have another ADB keyboard.

Offline hasu

  • Thread Starter
  • Posts: 3471
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: TMK ADB to USB keyboard converter
« Reply #1236 on: Thu, 26 October 2023, 07:48:38 »
xxhellfirexx,
your keyboard hardware or converer hardware may have a problem?
Of course, its firmware can have issue, but it is less likely, methink, because it has been tested by many users.

Are you sure the keyboard is healthy? What model no is the keyboard actually?
If you have another ADB keyboard try it so that you can know whether the covnerter works correctly.


And  check this again.

> Download hid_listen here. It should work. And use firmware downloaded from Keymap Editor.
> https://github.com/tmk/tmk_keyboard/wiki#debug-console

Checking log outputs during the problem occurs would be helpful.

« Last Edit: Thu, 26 October 2023, 07:53:05 by hasu »

Offline xxhellfirexx

  • Posts: 5
Re: TMK ADB to USB keyboard converter
« Reply #1237 on: Thu, 26 October 2023, 13:52:49 »
Hi Hasu,
I used the Web HID Listen website to record the keyboard keystrokes.
https://sekigon-gonnoc.github.io/web-hid-listen/

Every time the keyboard stops responding, the output says:
Table:
A:H  a:h
---------

I have experienced this problem two more times in Mac OS 12.6.3 and the logs are linked below.
The keyboard is an Apple Extended Keyboard 1 (M0115)
https://pastebin.com/zqcVvf7D
https://pastebin.com/itYLRmN4
« Last Edit: Thu, 26 October 2023, 13:57:20 by xxhellfirexx »

Offline hasu

  • Thread Starter
  • Posts: 3471
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: TMK ADB to USB keyboard converter
« Reply #1238 on: Thu, 26 October 2023, 18:16:36 »
This outputs means the keyboard disconnected.

Quote
A:H  a:h
---------


Assuming ADB cable is ok it can be unstable connection problem between keyboard and converter.
around sockets on keyboard or converter.

Try wiggling plug at keyboard or converter to find problem point when this happens. You don't need to replug USB side.
You will see like below when keyboard is recognized.

Quote
Table:
A:H  a:h
---------

RRRRRRRRRRRRRRR:$2:Found. R3:6301
R:$2:Move to $F. R3:6801
K:$F:Setup. R3:6E01
K:$F:Layout: ANSI

Table:
A:H  a:h
---------
F:01 2:01


I would suspect solder joints around ADB socket in keyboard first.

AEK1 has two sockets, try another socket if not yet.
Did you have the problem on both?

« Last Edit: Sat, 28 October 2023, 04:15:03 by hasu »