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

0 Members and 1 Guest are viewing this topic.

Offline supermario802.1

  • Posts: 31
    • tinkerBOY
Re: ADB to USB keyboard converter
« Reply #900 on: Wed, 05 February 2020, 07:49:33 »
No probably.  Current ADB code blocks V-USB executiton and vice versa. As far as I know V-USB can take around 50us to process USB and this makes ADB things harder. If you are still interested in implemening/modify the ADB converter with V-USB yourself I'm happy to help you.

Will the adb converter work with atmega328p with v-USB?

Yes I would like to try.

Offline hasu

  • Thread Starter
  • Posts: 3472
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: ADB to USB keyboard converter
« Reply #901 on: Wed, 05 February 2020, 17:54:44 »
As such, I stand corrected: it seems the mouse is operating as designed, rather than activating context menu as a modern mouse would. In that case, I would need to remap the second button to act as "contextmenu": can TMK firmware do that? Regardless of my chances, I would still be wary of doing the bootloader process again: as I said before, all my attempts at compiling TMK manually did not work; the only firmware that worked for me was the already compiled .hex file I downloaded directly from Github.

Anyway, try hid_listen to see debug outputs from the converter.
https://www.pjrc.com/teensy/hid_listen.html

HID_Listen.exe only outputs the following after plugging in the converter:
Code: [Select]
TMK:fb84cac5+/LUFA


Scan:
 addr:3, reg3:7C01

Keyboard:
hadler: 00, ISO: no

Mouse:
Classic 200cpi

Scan:
 addr:10, reg3:7802

USB configured.

Keyboard start.

In any case, thank you very much for your reply, Hasu.

The output indicates the mouse is one-button device, it is common for Mac mouses in that era. The converter checked if the device supports Extended protocol(Multi-button) but it just speaks Classic protocol(one-button). Classic protocol doesn't require any driver while Extended protocol requires initialization process by specific device driver. "No driver needed." in manual is consistent with this result.

Yes, "Right click" provides just "drag" action for the same mouse button. The converter can't discriminate the Right/Left click because the mouse sends them as the same button action unfrotunately.

Offline hasu

  • Thread Starter
  • Posts: 3472
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: ADB to USB keyboard converter
« Reply #902 on: Wed, 05 February 2020, 17:56:23 »
No probably.  Current ADB code blocks V-USB executiton and vice versa. As far as I know V-USB can take around 50us to process USB and this makes ADB things harder. If you are still interested in implemening/modify the ADB converter with V-USB yourself I'm happy to help you.

Will the adb converter work with atmega328p with v-USB?

Yes I would like to try.

What is your hardware setup, MCU and Crystal frequency?

Offline hasu

  • Thread Starter
  • Posts: 3472
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: ADB to USB keyboard converter
« Reply #903 on: Thu, 06 February 2020, 17:51:27 »
No probably.  Current ADB code blocks V-USB executiton and vice versa. As far as I know V-USB can take around 50us to process USB and this makes ADB things harder. If you are still interested in implemening/modify the ADB converter with V-USB yourself I'm happy to help you.

Will the adb converter work with atmega328p with v-USB?

Yes I would like to try.

I just remembered blarrg's work and discovered this again. He already made ADB converter successfully with V-USB on USBASP board. Check his sequential posts around here and his github. I think you can start your project easily based on his work, instead of TMK ADB code.

https://geekhack.org/index.php?topic=14290.msg1109173#msg1109173
https://github.com/gblargg/adb-v-usb

Offline hasu

  • Thread Starter
  • Posts: 3472
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: ADB to USB keyboard converter
« Reply #904 on: Wed, 12 February 2020, 18:33:48 »
Updated firmware to fix AEK modifier key and ISO support.

On Apple Extended keyboard(and II) left and right modifier keys can be discriminated(except for 'Command' key),
but the converter had failed to support this for these 8 months since last update. Also AEK ISO support had not worked.

If you are using with AEK try new firmware. You can get from Keymap Editor or github repo.

Offline nevin

  • Posts: 1646
  • Location: US
Re: ADB to USB keyboard converter
« Reply #905 on: Wed, 12 February 2020, 23:22:15 »
great! thanks 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 Sonno

  • Posts: 7
  • Location: Italy
Re: ADB to USB keyboard converter
« Reply #906 on: Sat, 29 February 2020, 11:51:04 »
Hi I have some problems while trying to make the converter for my AEK2 with ISO layout.
Reference:

236664-0

I'm using the latest compiled rev1 hex from here https://github.com/tmk/tmk_keyboard/tree/master/converter/adb_usb/binary.

Here's my sloppy wiring, i just desoldered the 1k resistor:

236666-1  236668-2

And here's the hid_listen log:
Quote
Waiting for new device:....
Listening:


TMK:ce5e565f+/LUFA


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

Keyboard start.
RRRRRRRRRRRRRRRRRRRRRRRRRRR
RRRRRRRRRRRRRRRRRRRRRRRRRRR
RRRRRRRRRRRRRRRRRRRRR

Edited for attaching the pictures, because imgur links seem broken. :confused:
« Last Edit: Sun, 01 March 2020, 06:46:35 by Sonno »

Offline hasu

  • Thread Starter
  • Posts: 3472
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: ADB to USB keyboard converter
« Reply #907 on: Sun, 01 March 2020, 09:11:54 »
'R' errors indicate unstable/incorrect connection. On Teensy D0 pin should be used for DATA line.

Post hid_listen log again when you fix it. I like to check how ISO keyobard is detected.

Offline Sonno

  • Posts: 7
  • Location: Italy
Re: ADB to USB keyboard converter
« Reply #908 on: Sun, 01 March 2020, 17:02:21 »
'R' errors indicate unstable/incorrect connection. On Teensy D0 pin should be used for DATA line.

Post hid_listen log again when you fix it. I like to check how ISO keyobard is detected.
Thanks a lot! I only had SMD 1/4 watt resistors around, so when i got a normal one i was sure i was wiring it wrong  :confused:
So i soldered the THT component and used the correction that is used with an arduino pro micro.

Now with thw correct wiring and resistor it works almost FLAWLESSLY except some mapping errors (maybe it's windows fault? i think that because looking at my laptop's keyboard i get on screen the same character on that spot, that is different from the one on the AEK)

P.S. tomorrow i'll try to connect the mouse on the other side, thanks a lot for the help and goodnight :3
Here's the log btw!  :D

More
Waiting for new device:...
Listening:


TMK:ce5e565f+/LUFA


Scan:
 addr:2, reg3:6E05

Keyboard:
handler: 05, ISO: yes

Scan:
 addr:2, reg3:6A03

USB configured.

Keyboard start.
« Last Edit: Sun, 01 March 2020, 17:08:14 by Sonno »

Offline hasu

  • Thread Starter
  • Posts: 3472
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: ADB to USB keyboard converter
« Reply #909 on: Sun, 01 March 2020, 19:08:31 »
Thanks for the log, the converter seems to detect ISO correctly.
Legends on some of AEK keycaps show what you get on AppleII or old Mac. The converter translates AEK keys into usual USB HID keyboard baiscally without any emulation of the old Alpple system.

I'm almost sure both Windows and the converter work correctly. But let me know what the 'mapping errors' are exactly in case that is bug. And what is your keyboard layout on Windows, and AEK language?

Offline Sonno

  • Posts: 7
  • Location: Italy
Re: ADB to USB keyboard converter
« Reply #910 on: Mon, 02 March 2020, 08:52:29 »
Thanks for the log, the converter seems to detect ISO correctly.
Legends on some of AEK keycaps show what you get on AppleII or old Mac. The converter translates AEK keys into usual USB HID keyboard baiscally without any emulation of the old Alpple system.

I'm almost sure both Windows and the converter work correctly. But let me know what the 'mapping errors' are exactly in case that is bug. And what is your keyboard layout on Windows, and AEK language?

Hi, I have a UK AEK2 so it has the apple UK layout
from wikipedia:

but i have a normal italian keyboard so for example I get "è" instead of "[" and "*" instead of "}"
my keyboard for reference: 236742-0


also the when i try to connect the mouse it freaks out, the keyboard stops working (tried also to plug first the mouse and then everything to the pc) and begins to spit out errors (reg3 remains always between 7001 and 7F01) on hid_listen:
More
Waiting for device:.............
Listening:


TMK:ce5e565f+/LUFA


Scan:
 addr:2, reg3:6B05
 addr:3, reg3:7B01

Keyboard:
handler: 05, ISO: yes

Scan:
 addr:2, reg3:6F03
 addr:3, reg3:7C01

USB configured.

Keyboard start.
M:addr3 reg3: 7501
M:move fail
M:addr3 reg3: 7001
M:move fail
M:addr3 reg3: 7A01
M:move fail
M:addr3 reg3: 7A01
M:move fail
M:addr3 reg3: 7D01

SOMETIMES after a bit everything works again, also the mouse, but not always, sometimes remains stuck giving errors.

Offline hasu

  • Thread Starter
  • Posts: 3472
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: ADB to USB keyboard converter
« Reply #911 on: Mon, 02 March 2020, 18:20:57 »
Thanks for the log, the converter seems to detect ISO correctly.
Legends on some of AEK keycaps show what you get on AppleII or old Mac. The converter translates AEK keys into usual USB HID keyboard baiscally without any emulation of the old Alpple system.

I'm almost sure both Windows and the converter work correctly. But let me know what the 'mapping errors' are exactly in case that is bug. And what is your keyboard layout on Windows, and AEK language?

Hi, I have a UK AEK2 so it has the apple UK layout
from wikipedia:
Show Image


but i have a normal italian keyboard so for example I get "è" instead of "[" and "*" instead of "}"
my keyboard for reference: (Attachment Link)

I think it is normal when you use Italian layout on Windows(or other OS's). It depends on layout setting, you will get '[' and ']' on the keys if you select UK layout on your OS.



Quote
also the when i try to connect the mouse it freaks out, the keyboard stops working (tried also to plug first the mouse and then everything to the pc) and begins to spit out errors (reg3 remains always between 7001 and 7F01) on hid_listen:
More
Waiting for device:.............
Listening:


TMK:ce5e565f+/LUFA


Scan:
 addr:2, reg3:6B05
 addr:3, reg3:7B01

Keyboard:
handler: 05, ISO: yes

Scan:
 addr:2, reg3:6F03
 addr:3, reg3:7C01

USB configured.

Keyboard start.
M:addr3 reg3: 7501
M:move fail
M:addr3 reg3: 7001
M:move fail
M:addr3 reg3: 7A01
M:move fail
M:addr3 reg3: 7A01
M:move fail
M:addr3 reg3: 7D01

SOMETIMES after a bit everything works again, also the mouse, but not always, sometimes remains stuck giving errors.

It seems that initialization and configuration for mouse failed.
what's your mouse?

Offline Sonno

  • Posts: 7
  • Location: Italy
Re: ADB to USB keyboard converter
« Reply #912 on: Tue, 03 March 2020, 09:06:20 »
Quote
I think it is normal when you use Italian layout on Windows(or other OS's). It depends on layout setting, you will get '[' and ']' on the keys if you select UK layout on your OS.
Yeah, I put the correct layout while using debian and it works flawlessly (why the heck does it have the, i quote, "UK, Macintosh" layout god only knows, but now i'm sad that windows doesn't have it).

Quote
It seems that initialization and configuration for mouse failed.
what's your mouse?
I'm using an Apple Desktop Bus Mouse 2, Family No: M2706, it says it's been assembled in Ireland, no trace of date and the info are written on a plastic label instead of being carved (?) in the plastic like others of the same model.
There are no other noteworthy information, I should open it soon to clean it, tell me if I need to report anything else!

Thanks a lot for the support you're giving :D


Offline hasu

  • Thread Starter
  • Posts: 3472
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: ADB to USB keyboard converter
« Reply #914 on: Wed, 04 March 2020, 20:02:22 »
Will it work with an ADB keyboard with French layout?

It should work. I don't think French keyboard is special from converter's perspective.
what is your keyboard exactly?

Offline hasu

  • Thread Starter
  • Posts: 3472
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: ADB to USB keyboard converter
« Reply #915 on: Fri, 06 March 2020, 09:27:23 »
Quote
It seems that initialization and configuration for mouse failed.
what's your mouse?
I'm using an Apple Desktop Bus Mouse 2, Family No: M2706, it says it's been assembled in Ireland, no trace of date and the info are written on a plastic label instead of being carved (?) in the plastic like others of the same model.
There are no other noteworthy information, I should open it soon to clean it, tell me if I need to report anything else!

Thanks a lot for the support you're giving :D

Can you try attached firmware with the mouse and show me hid_listen log?
With the fixed firmware the converter won't block keyboard probably.

And I can get M2706 mouse cheap to debug this, perhaps.
There seems to be some variants of M2706, which is country your M2706 made in, Taiwan, China, Malaysia, or else?

* adb_usb_rev1.hex (62.86 kB - downloaded 128 times.)

Offline Sonno

  • Posts: 7
  • Location: Italy
Re: ADB to USB keyboard converter
« Reply #916 on: Sun, 08 March 2020, 06:27:56 »
Quote
Can you try attached firmware with the mouse and show me hid_listen log?
With the fixed firmware the converter won't block keyboard probably.
Sorry for the real late reply, I tested it today, now the mouse still doesn't work, but at least the keyboard works and doesn't hang xD
Also the log is different but it still keeps printing errors with only reg3 changing (having debug and/or debug mouse active doesn't change much):
More
M:TMP: reg3:7101
M:EXT: reg3:7D01
M:Classic 100cpi
M:POL: fail reg3:7801

Scan:
 addr:2, reg3:6C03
 addr:15, reg3:7701

Quote
And I can get M2706 mouse cheap to debug this, perhaps.
There seems to be some variants of M2706, which is country your M2706 made in, Taiwan, China, Malaysia, or else?
My mouse only says "Assembled in Ireland" also seems difficult to open without damaging it.
237285-0

Offline Findecanor

  • Posts: 5036
  • Location: Koriko
Re: ADB to USB keyboard converter
« Reply #917 on: Sun, 08 March 2020, 06:51:53 »
My mouse only says "Assembled in Ireland" also seems difficult to open without damaging it.
Made by Mitsumi, as indicated by the serial number starting with 'M'.
If you'd need to open it there should be two screws under the printed label, but is that really necessary?

Offline hasu

  • Thread Starter
  • Posts: 3472
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: ADB to USB keyboard converter
« Reply #918 on: Sun, 08 March 2020, 06:57:21 »
Sonno,
Thanks.
Hmm, the mouse fails to change address in init process for some reason.

Ah, I missed that you already referred to Ireland in previous post.  It is what I wanted.
I'll debug the issue on M2706 when I can obtain the mouse.

Offline Sonno

  • Posts: 7
  • Location: Italy
Re: ADB to USB keyboard converter
« Reply #919 on: Sun, 08 March 2020, 10:08:00 »
I'll debug the issue on M2706 when I can obtain the mouse.
Uhm ok, there's something else I can do in the meantime to help?

Offline hasu

  • Thread Starter
  • Posts: 3472
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: ADB to USB keyboard converter
« Reply #920 on: Fri, 13 March 2020, 09:45:11 »
Sonno,
I couldn't find exact same model as yours here in Japan and got M2706 assembled in Taiwan instead.



The mouse works well as long as I tested and couldn't reproduce the issue. It is specific to M2706 assembled in Ireland perhaps.

Code: [Select]
Waiting for new device:..                                                                                                                                                                                                             [0/1885]
Listening:


TMK:a4d4f149+/LUFA


Scan:
 addr:3, reg3:6E01


Keyboard:
handler: 00, ISO: no

Scan:
 addr:3, reg3:6801


USB configured.

Keyboard start.
M:TMP: reg3:6801
M:EXT: reg3:6602
M:Classic 200cpi
M:POL: done

Scan:
 addr:10, reg3:6802

M:[81 81 00 00 00]
M:[B:00 X:1(1) Y:1(1) A:1]
M:[82 80 00 00 00]
M:[B:00 X:0(0) Y:4(2) A:2]
M:[81 80 00 00 00]
M:[B:00 X:0(0) Y:1(1) A:1]

Offline Sonno

  • Posts: 7
  • Location: Italy
Re: ADB to USB keyboard converter
« Reply #921 on: Fri, 13 March 2020, 11:02:35 »
Sonno,
I couldn't find exact same model as yours here in Japan and got M2706 assembled in Taiwan instead.

The mouse works well as long as I tested and couldn't reproduce the issue. It is specific to M2706 assembled in Ireland perhaps.

Uhm, if you know how to open it tell me, so i can check if there are differences inside. xD

Offline nevin

  • Posts: 1646
  • Location: US
Re: ADB to USB keyboard converter
« Reply #922 on: Fri, 13 March 2020, 11:20:20 »
Should be a single swrew under the sticker
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 plaquette

  • Posts: 7
Re: ADB to USB keyboard converter
« Reply #923 on: Sat, 21 March 2020, 07:16:37 »
hi everyone!

i thought i use this time of social distancing to revive my old keyboard.

i soldered everything as i was supposed to on the teensy 2.0.

as of now, some keys work fully, some are dead and some are inbetween since they produce an output which is not matched with the keyboard. it is a german keyboard in case thats a useful information.

would be great if you could help me fixing it.

best & many thanks in advance,

p.

Offline hasu

  • Thread Starter
  • Posts: 3472
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: ADB to USB keyboard converter
« Reply #924 on: Sat, 21 March 2020, 21:25:21 »
hi everyone!

i thought i use this time of social distancing to revive my old keyboard.

i soldered everything as i was supposed to on the teensy 2.0.

as of now, some keys work fully, some are dead and some are inbetween since they produce an output which is not matched with the keyboard. it is a german keyboard in case thats a useful information.

would be great if you could help me fixing it.

best & many thanks in advance,

p.

What model number of your keyobard actually?
I'd say the red keys have hardware fault unless you are sure the keyboard works well.
You will have to take apart completely to clean switches if it has membrane switches.

This just converts ADB keyboards into normal USB keyboards, some keys don't always match to keycap ledgend and how the keys regsiter depends on your keyboard layout on OS. What layout are you using?

Offline plaquette

  • Posts: 7
Re: ADB to USB keyboard converter
« Reply #925 on: Sun, 22 March 2020, 03:27:30 »
the family number reads: M0487
- serial number: MM132PN503N

i compiled the firmware with the following layouts: KEYMAP=M0116_ANSI, KEYMAP=M0118_ISO as well as the regular adb_usb_rev1_unimap.hex version.

but i never got any response form the keys mentioned above.

i don't know if it was in working condition.

but it seems quite strange that certain rows won't respond...

thanks!

best, p.

Offline hasu

  • Thread Starter
  • Posts: 3472
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: ADB to USB keyboard converter
« Reply #926 on: Sun, 22 March 2020, 03:41:14 »
Keyboard is not everlast. The keyboard seems to me have something wrong on those keys.
Clean up the key switches thoroughly, or just get another one.

Offline plaquette

  • Posts: 7
Re: ADB to USB keyboard converter
« Reply #927 on: Sun, 22 March 2020, 04:15:35 »
alright - i'll start cleaning :)

what layout would you recommend?

Offline plaquette

  • Posts: 7
Re: ADB to USB keyboard converter
« Reply #928 on: Sun, 22 March 2020, 06:07:35 »
i guess its no as clean as i can get it
- still no response from the dead keys :(

is there anything else i could try?

best, p.

Offline hasu

  • Thread Starter
  • Posts: 3472
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: ADB to USB keyboard converter
« Reply #929 on: Sun, 22 March 2020, 07:20:44 »
as the first post  says, hid_listen may help you.

Offline plaquette

  • Posts: 7
Re: ADB to USB keyboard converter
« Reply #930 on: Sun, 22 March 2020, 08:15:48 »
sorry i forgot to mention
- i tried this, but only received a response from the keys i marked green...

best p.

Offline plaquette

  • Posts: 7
Re: ADB to USB keyboard converter
« Reply #931 on: Sun, 22 March 2020, 11:20:44 »
http://www.keyboard-layout-editor.com/#/layouts/fb6d2e7d8b753bedffaae1eb9016542b

this is the layout i want to reproduce in the end.

best, p.

Offline hasu

  • Thread Starter
  • Posts: 3472
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: ADB to USB keyboard converter
« Reply #932 on: Sun, 22 March 2020, 20:24:28 »
http://www.keyboard-layout-editor.com/#/layouts/fb6d2e7d8b753bedffaae1eb9016542b

this is the layout i want to reproduce in the end.

best, p.

Select the most suitable keyboard layout on OS and tweek keys on converter firmware by write C code or edit keyboard. Also use tool like AHK or Karabiner on OS if needed.


sorry i forgot to mention
- i tried this, but only received a response from the keys i marked green...

best p.


I guess your keyboard is faulty and converter can do nothing with it.
You will need to buy other keyboard in decent condition if you can fix it.

Offline plaquette

  • Posts: 7
Re: ADB to USB keyboard converter
« Reply #933 on: Wed, 25 March 2020, 03:28:34 »
hi - i tried to access the PCB directly with some wire and it shows, the dead keys stay dead and the other ones react as if i pushed the key. so i guess its safe to say, the PCB is dead :(

Offline gnho

  • Posts: 147
  • Location: ATX/US
Re: ADB to USB keyboard converter
« Reply #934 on: Wed, 01 April 2020, 00:38:20 »
I am using an M0116 and having problem changing the right shift to up when tapped. What's stranger is that it shows up as left shift on QMK configurator. Does it mean that I have to change both left and right shifts to make it work? Thanks!

https://bit.ly/2yq743V

Haha... okay it did work... problem solved...
« Last Edit: Wed, 01 April 2020, 00:40:05 by gnho »

Offline hasu

  • Thread Starter
  • Posts: 3472
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: ADB to USB keyboard converter
« Reply #935 on: Wed, 01 April 2020, 00:55:56 »
I am using an M0116 and having problem changing the right shift to up when tapped. What's stranger is that it shows up as left shift on QMK configurator. Does it mean that I have to change both left and right shifts to make it work? Thanks!

https://bit.ly/2yq743V

Haha... okay it did work... problem solved...

Post how you solved for future reference.

Offline gnho

  • Posts: 147
  • Location: ATX/US
Re: ADB to USB keyboard converter
« Reply #936 on: Wed, 01 April 2020, 22:14:31 »
Here's the solution:

https://bit.ly/2UBhg2j

For people who want to change the arrow keys to a more conventional arrangement. Note that I also use the tap key action to put a layer key and a ctrl key in the right corner.

Offline bibobim

  • Posts: 22
Re: ADB to USB keyboard converter
« Reply #937 on: Thu, 16 April 2020, 15:06:38 »
Hello everyone, I am trying to convert an Apple M0116 to usb using Teensy 2.0++ and I have trouble with a firmware. 

I don't have any coding experience so I try to follow hasu's step on Github but I keep stucking when trying to make .hex file. After moving the tmk_keyboard folder to my username folder, I try to do make- command but it kept saying "LUFA may be too old or not found" no matter what I put in. I think I downloaded all the neccessary tool but I have no idea how to check them. Running the hid_listen, the program did not respond anything.

I am using Windows and Cygwin terminal when doing the command line. I also adjust the Makefile Bootloader size to 1024 (for Teensy ++). For the wiring, I am using a 10k pull-up resistor between data and 5V.


« Last Edit: Thu, 16 April 2020, 15:08:26 by bibobim »

Offline hasu

  • Thread Starter
  • Posts: 3472
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: ADB to USB keyboard converter
« Reply #938 on: Thu, 16 April 2020, 16:20:11 »
What error you get exactly when running make?

Offline bibobim

  • Posts: 22
Re: ADB to USB keyboard converter
« Reply #939 on: Thu, 16 April 2020, 17:23:22 »
What error you get exactly when running make?

Hi hasu,
When I’m running make, it shows “LUFA may be too old or not found”. I don’t know what I did incorrectly. If you need any pic for clarification, please let me know.  Thanks

Offline hasu

  • Thread Starter
  • Posts: 3472
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: ADB to USB keyboard converter
« Reply #940 on: Thu, 16 April 2020, 17:43:56 »
Get/update to the latest source code.
I believe you should  see "LUFA may be too old or not found: try 'git submodule update --init'".

Offline bibobim

  • Posts: 22
Re: ADB to USB keyboard converter
« Reply #941 on: Thu, 16 April 2020, 18:15:50 »
Get/update to the latest source code.
I believe you should  see "LUFA may be too old or not found: try 'git submodule update --init'".

Yes, that's exactly what I constantly get while doing a make command.
I just download the master folder again but I still get the same problem. I notice there are some changes in tmk_core/protocol/lufa.mk 28 days ago so it might be the cause?

Offline hasu

  • Thread Starter
  • Posts: 3472
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: ADB to USB keyboard converter
« Reply #942 on: Thu, 16 April 2020, 18:22:30 »
Oh, I am confused.
Didn't  'git submodule update --init' work for you?

Yes, you seems to have the latest source codes.

Offline bibobim

  • Posts: 22
Re: ADB to USB keyboard converter
« Reply #943 on: Thu, 16 April 2020, 19:32:01 »
Oh, I am confused.
Didn't  'git submodule update --init' work for you?

Yes, you seems to have the latest source codes.

What would be the command that I should put in the terminal? Is it
$ make -git submodule update --init
 
Sorry for the whole bunch of silly questions. I've never done anything like this before  :'(

Offline hasu

  • Thread Starter
  • Posts: 3472
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: ADB to USB keyboard converter
« Reply #944 on: Thu, 16 April 2020, 20:04:47 »
Oh, I am confused.
Didn't  'git submodule update --init' work for you?

Yes, you seems to have the latest source codes.

What would be the command that I should put in the terminal? Is it
$ make -git submodule update --init
 
Sorry for the whole bunch of silly questions. I've never done anything like this before  :'(

Hmm,
Install 'git' command and change directry to 'tmk_keyboard' then 'git submodule update --init' should work.

What are you trying building firmware for? Prebuilt firmware is not enough for your need?
« Last Edit: Thu, 16 April 2020, 20:43:53 by hasu »

Offline bibobim

  • Posts: 22
Re: ADB to USB keyboard converter
« Reply #945 on: Thu, 16 April 2020, 20:39:05 »
I thought the prebuilt firmware is for ATmega32u2 and Atmega32u4 so I presume I have to make my own .hex file for my Teensy ++ to work. My model is AT90USB1286.
Previously, I downloaded the hex file from http://www.tmk-kbd.com/tmk_keyboard/editor/unimap/?adb_usb then flashed it using teensy loader but it did't work.
I would appreciate if you can make the hex file in keyboard editor and send me for my model. Thanks

Offline hasu

  • Thread Starter
  • Posts: 3472
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: ADB to USB keyboard converter
« Reply #946 on: Thu, 16 April 2020, 20:45:40 »
Ah, right. Not available for that model.
You have to build firmware yourself.

EDIT: It should be fun to learn git and compiler things. There are many great resources for them on the internet.
And I believe you have plenty of time at home these days unless you work for medical serivce or public health.
Let me know in that case, I'm happy to build firmware for you.
« Last Edit: Thu, 16 April 2020, 20:55:40 by hasu »

Offline bibobim

  • Posts: 22
Re: ADB to USB keyboard converter
« Reply #947 on: Thu, 16 April 2020, 21:40:26 »
Ah, right. Not available for that model.
You have to build firmware yourself.

EDIT: It should be fun to learn git and compiler things. There are many great resources for them on the internet.
And I believe you have plenty of time at home these days unless you work for medical serivce or public health.
Let me know in that case, I'm happy to build firmware for you.
I will try to learn how to do this for now.

Sooo I am able to clone and use git command to update the submodule and proceed to the next step. Now when I use
$ make -f Makefile clean

everything proceeds but after that, when I am using
$ make -f Makefile

it gives me  this
../../tmk_core/protocol/lufa/lufa.c:651: warning: implicit declaration of functi
on 'clock_prescale_set'
../../tmk_core/protocol/lufa/lufa.c:651: error: 'clock_div_1' undeclared (first
use in this function)
../../tmk_core/protocol/lufa/lufa.c:651: error: (Each undeclared identifier is r
eported only once
../../tmk_core/protocol/lufa/lufa.c:651: error: for each function it appears in.
)
make: *** [obj_adb_usb/protocol/lufa/lufa.o] Error 1

What should I do in this case?

« Last Edit: Thu, 16 April 2020, 21:45:17 by bibobim »

Offline hasu

  • Thread Starter
  • Posts: 3472
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: ADB to USB keyboard converter
« Reply #948 on: Thu, 16 April 2020, 23:11:43 »
From the error messages compiler doesn't seem to find declaration of 'clock_prescale_set' and 'clock_div_1' for some reason.

Frist, you can use github.com search feature to check if those words are defined somewhere in tmk_firmware repository. Enter the word in text box at top of this page and then click 'in this repository' button.
https://github.com/tmk/tmk_keyboard

Hmm, they are used in tmk_firmware but not defined there. There is no useful info in this case.

I use google when I don't have clear idea. Google is your friend and extremely useful in particular when in trouble.
Google with 'clock_prescale_set' or 'clock_div_1', it will lead you to avr-libc pages.

https://www.nongnu.org/avr-libc/user-manual/group__avr__power.html

Now we get to know that those words are defined in avr-libc.

Did you install avr-libc? If so what is its version?
« Last Edit: Thu, 16 April 2020, 23:15:39 by hasu »

Offline bibobim

  • Posts: 22
Re: ADB to USB keyboard converter
« Reply #949 on: Fri, 17 April 2020, 16:01:26 »
<Deleted>
« Last Edit: Fri, 17 April 2020, 16:25:05 by bibobim »