Author Topic: IBM 4704 Pingmaster DIY controller question  (Read 2211 times)

0 Members and 1 Guest are viewing this topic.

Offline chaotic_gaze

  • Thread Starter
  • Posts: 6
IBM 4704 Pingmaster DIY controller question
« on: Thu, 07 March 2019, 14:14:38 »
Hi guys,

Very sorry for a very uninformed noob questions, but here they come. (I'll try to be brief)
I've purchased this HiLetgo Pro Micro Atmega32U4 5V 16MHz Bootloadered IDE Micro USB Pro Micro Development Board Microcontroller  (I can link the amazon page, but I figured its not allowed and not trying to endorse). The board does not have any inherit reset switch or anything like that. I spent some time to even get it show up as a device in windows. Some time and many unrecorded attempts later... I finally flashed a default TMK keyboard layout for a 102 alps keyboard for atmega32u4 rev.1 onto this microcontroller using Freematics Arduino Builder. So now windows actually detects it correctly! Only problem is, arduino IDE, all other utilities I tried and windows now don't see it as arduino and see it as IBM 4704 keyboard.

That's very nice... except I was just messing around with the default keymap and would love an ability to... flush it again with keymap I actually want, utilizing all the layers etc. Is that a thing I can even do now? Does it need to be reset to factory defaults? if so, how do I do that? Is there utility I can use to now manipulate the layout once the firmware is burned in?

What do I do and how do I fix this? I mean if I lost 7 bucks its ok, but it is kinda sad that I would need to either wire custom buttons (what google seems to suggest) or something like that to make it be editable again...

Please let me know how this works.

P.S. Once again, I'm just a guy, who liked the green simple alps and bought an old stock chineese version pingmaster to sue as my daily driver. Eventually I'd love to do this again with WYSE-50 board... eventually soon but first I would love to figure out how do I fix what I gotten myself into. Heh

Thanks in advance.

Offline nevin

  • Posts: 1646
  • Location: US
Re: IBM 4704 Pingmaster DIY controller question
« Reply #1 on: Thu, 07 March 2019, 14:28:58 »
short RST to ground when you plug it in.

sorry, correction...
"When a Pro Micro is externally reset (by pulling the RST pin low), it'll only briefly (<750ms) start the bootloader before continuing on to the sketch. If you need the bootloader to run longer, resetting twice quickly will get the Pro Micro to enter bootloader mode for eight seconds."

more info: https://learn.sparkfun.com/tutorials/pro-micro--fio-v3-hookup-guide/troubleshooting-and-faq
« Last Edit: Thu, 07 March 2019, 14:31:06 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 chaotic_gaze

  • Thread Starter
  • Posts: 6
Re: IBM 4704 Pingmaster DIY controller question
« Reply #2 on: Thu, 07 March 2019, 14:55:28 »
@nevin

Thank you for the reply!
So I found this before (different PDF, but similar wording). So it will just go to bootloader for 8 seconds and than revert to original behavior? This means I would need to solder an extra wire on RST and touch it to ground twice (on exposed part) for the 8 second reset to work? Any way to do it any other way? No way to edit sketch in place? or no way to do this using an IDE?

Also say I do that, what would I need to do in IDE to reset it to blank / default?

Again, I apologies for being such a noob.

p.s. The reason why I am even asking this is because I don't have all 7 layers of keys ready to use and all macros mapped out. it would be nice to do that like a teensy editor does it (I presume) on the fly or like a commercial editors for like gaming keyboards do on the fly. I understand of course that it might just not be possible so I am not by any means  upset/ etc.

Thanks in advance everyone! ^^

Offline nevin

  • Posts: 1646
  • Location: US
Re: IBM 4704 Pingmaster DIY controller question
« Reply #3 on: Thu, 07 March 2019, 15:18:00 »
you have to enter bootloader mode to flash/program the board, it will be recognized by computer and then you can flash it.

so,
- plug it in
- use a wire to short/jump rst to ground TWICE (quickly) and the computer should recognize it. (you don't have to solder the wire, only used temporarily) you could solder a momentary switch in there if you really, really wanted
- flash/program the controller
     - you are uploading a .hex file, that is the program the pro micro runs, no, there is no way to edit the program already on the pro micro. you make your changes on the computer within the various files, compile a new hex file & upload it to the pro micro
- unpug the pro micro & plug it back in. now it should be running whatever you just flashed it with.
- done.

within the flashing program, you can wipe the chip. if you wanted to wipe it before you reprogramed it.
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 chaotic_gaze

  • Thread Starter
  • Posts: 6
Re: IBM 4704 Pingmaster DIY controller question
« Reply #4 on: Thu, 07 March 2019, 15:57:21 »
@nevin

Thank you so much! Ok so just as I thought, I would need to do this flush dance every time I need a change something, which honestly is fine, its no big deal, I just wanted to confirm. I do however have last two questions...

1. - Is there a way to flush it to some sort of simple factory default hardware? So I don't have to deal with this 8 second rule? Or once you write it the first time, you are stuck in these 8 second loops?
2. - So I've been using this "Freematics Arduino Builder" but it seem to not being able to write in time and the controller resets before I can write to it. (I might be not resetting it correctly and only getting 750ms and not 8 seconds, I'll try again of course). Is there a preferred software for this sort of thing? Anything you would recommend? Or am I using as optimal as I can software as is?
*When trying to do this initially, I couldn't figure out how to make the normal arduino IDE to just burn a hex file on to the device. So I went thru a bunch of these "helpful tools" none of which worked except for this one. At the end of the day, in case anyone runs into the same issues I did. I am pretty sure all one needs for this is the Original arduino IDE from their site, which gives all the drivers and makes the arduino show up on the com port correctly as "Leonardo on COMX". And than this Freematic arduino builder thingy which just lets you pick a hex file and burn in. It didn't do it right away and I have no idea why, because I am a noob. But yeah at the end of the day this is what did it for me.

Thanks again for all the help as it is!! ^^

Offline nevin

  • Posts: 1646
  • Location: US
Re: IBM 4704 Pingmaster DIY controller question
« Reply #5 on: Thu, 07 March 2019, 16:02:33 »
you're trying to build a converter for the pingmaster correct? (just want to verify, so i can point you in the right direction)
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 chaotic_gaze

  • Thread Starter
  • Posts: 6
Re: IBM 4704 Pingmaster DIY controller question
« Reply #6 on: Thu, 07 March 2019, 16:30:35 »
@nevin

Yep! Pingmaster (IBM 4704 protocol)

Offline nevin

  • Posts: 1646
  • Location: US
Re: IBM 4704 Pingmaster DIY controller question
« Reply #7 on: Thu, 07 March 2019, 17:41:07 »
1. you don't have to flash in 8 seconds, it just has to be recognized by the computer in that time in bootloader mode to be able to flash a new program on it. have you installed the driver for the pro micro yet? (might be part of the problem)

2. you might want to change build environments, or grab a different flasher program.     .... guessing you are on windows?

---------------------------------------------

1st, learn about your board

2nd, learn how to build the firmware (i know it seems like a lot, but you can do it) once you have a good build environment set up the rest is easy to follow.

---------------------------------------------

learn about your board

read this info about the controller
intro - https://learn.sparkfun.com/tutorials/pro-micro--fio-v3-hookup-guide/introduction
Installing: Windows - https://learn.sparkfun.com/tutorials/pro-micro--fio-v3-hookup-guide/installing-windows
Troubleshooting and FAQ - https://learn.sparkfun.com/tutorials/pro-micro--fio-v3-hookup-guide/troubleshooting-and-faq

---------------------------------------------

learn how to build the firmware

as long as you have a working build environment, you can follow this guide. it's Hasu's TMK converter code for the 4704. (TMK is a fork of QMK)
https://github.com/tmk/tmk_keyboard/tree/master/converter/ibm4704_usb
!!!  make sure you use a pull up resistor  !!!

if you don't have as working build environment, follow this guide from QMK
https://beta.docs.qmk.fm/newbs

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 chaotic_gaze

  • Thread Starter
  • Posts: 6
Re: IBM 4704 Pingmaster DIY controller question
« Reply #8 on: Thu, 07 March 2019, 18:22:04 »
Thank you I will read thru the material...

And I am sure the answer is in the resources you linked me... but I guess I will ask my last question ^^

Simultaneous key presses and other macros or macros like functionalities... they are not available thru the  web-gui version of the TMK Keyboard are they? Because as I am reading this (https://github.com/tmk/tmk_keyboard/blob/master/tmk_core/doc/keymap.md#02-layer-precedence-and-transparency) article, macros do exist and work (or so it seems?), but the online version seem to not have them.
Is it just the pingmaster doesn't support macros or, I have to write keymap firmware from "scratch" and compile it using the instruction on github?

Thanks for all the help, and I guess I'll stop asking dumb questions after this one. ^^

Offline nevin

  • Posts: 1646
  • Location: US
Re: IBM 4704 Pingmaster DIY controller question
« Reply #9 on: Thu, 07 March 2019, 21:08:24 »
not "dumb questions" at all. everybody has to start somewhere. couple years ago, i was in the same boat you are... trying to decipher how to do all these things with 3rd party firmwares. it does take some time to wade through these waters, but they're really not that deep.

- Simultaneous key presses - meaning key roll over? how many keys pressed at the same time & still register. USB default is 6 which is more than enough, unless you're laying on top of your keyboard.....
- macros are supported, not sure if they are configurable in the web configurator, i did see macro in the action dropdown on the code edit tab. i don't use them, so i'm probably not the best one to ask.
- actually, if you want to go that route... web configurator, you certainly can, saves a lot of headaches... you'll just need a flasher to get the hex file onto the micro.

--  web based configurator  --
- http://www.tmk-kbd.com/tmk_keyboard/editor/unimap/?ibm4704_usb_alps     (guessing you have the green alps SKCC variant)
- pick "IBM4704-USB Converter rev.1 for Alps 102-key" from the dropdown     (it's important you use rev.1, rev.2 will not work with your controller)
214634-0
the reason this is important is the rev.1 is a ATMega32u4, same as your controller.
the rev.2 is a ATMega32u2, not the same & won't work.

from Hasu's TMK converter thread...
TMK converters translate various old keyboard protocol into USB so that you can use the keyobard with modern computer.

How to flash firmware
Current converters(rev.2) use ATMega32u2(while rev.1 used ATMega32u4). You will have to select microcontroller in flash tool like Atmel FLIP or dfu-programmer.

To turn into flash mode press tiny button on converter PCB.

See this for detail: https://github.com/tmk/tmk_keyboard/wiki#flash-firmware

the only flasher i have experience with other than teensy is Atmel FLIP, very easy, follow link above for instructions & download

so, finish configuring your keymap & download your hex file. then download & install Atmel FLIP, flash your controller, then all you have to do is wire up the cable & connect it to the pingmaster (if you haven't already)

apologies for the extra stuff earlier, i didn't know hasu had web configurators for all of his different converters. the only one i knew of was the adb-to-usb configurator. plus, i've always done it the hard way.... i guess....

i still recommend you learn as much as you can of the info from the other sources, will help you understand how everything works together, but i can understand being overwhelmed & frustrated about not getting your 1st "custom" board quickly.

hang in there, you'll get it. :thumb:
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 chaotic_gaze

  • Thread Starter
  • Posts: 6
Re: IBM 4704 Pingmaster DIY controller question
« Reply #10 on: Mon, 18 March 2019, 15:55:59 »
Hey everyone,

So I have made the keyboard work, and even repainted it. *I know I know I am sure its sacrilege and I guess I am sorry for the pictures. but either way, thank you for the help. I still was not able to flush the firmware from the first controller I tried it on, and I will try to work on how to do that later. I think I might use a mate paint sealer to protect the keys, but honestly the feel of the painted keys is not terrible at all (at least to me). Though I guess a sealer would help to protect it long term.*

Anyways thanks guys and thanks to @nevin in particular for the replies!

Offline nevin

  • Posts: 1646
  • Location: US
Re: IBM 4704 Pingmaster DIY controller question
« Reply #11 on: Mon, 18 March 2019, 16:05:35 »
Nice!
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