Author Topic: Getting started with DZ60 and QMK  (Read 15946 times)

0 Members and 1 Guest are viewing this topic.

Offline Zobeid Zuma

  • Thread Starter
  • Posts: 262
  • Location: Texas
Getting started with DZ60 and QMK
« on: Sat, 14 October 2017, 08:41:27 »
Yesterday I finally got my DZ60 PCB and built my first keyboard.  Yay!

Today cold reality sets in.  The default keymap is not useful to me, and I need to reprogram/remap it ASAP.  I've been looking at QMK and feeling very, very lost.  I can't seem to find any general overview of the process to get me oriented.  (This seems way more complicated than using Soarer's Converter to remap my old IBM XT keyboard!)

I have managed to install the build environment (on Ubuntu MATE) and I ran "make dz60-default" without errors, so that's a start.  It spat out a hidden directory called ".build" with a puzzling mix of files and sub-folders.  I'm still not sure what needs to be transferred to the keyboard or how to do it.  And once I've got that process figured out, the next step will be to edit the layout and make the keys do what I actually want.

Can anyone point me in the right direction here?

Offline TalkingTree

  • Posts: 2452
  • Location: Italy (142)
    • My projects
Re: Getting started with DZ60 and QMK
« Reply #1 on: Sat, 14 October 2017, 08:49:22 »
If you need to change your keymap it's located in ./keymaps/default/keymap.c but I haven't found any DZ60 folder in QMK nor I haven't heard of this board either.
Is it officially supported? If not, you (most likely) might need to change config.h and some other files to declare the proper pins for cols and rows and some other minor things.
My opensource projects: GH80-3000, TOAD, XMMX. Classified: stuff

Offline TalkingTree

  • Posts: 2452
  • Location: Italy (142)
    • My projects
Re: Getting started with DZ60 and QMK
« Reply #2 on: Sat, 14 October 2017, 08:55:55 »
Alright, my QMK repository was outdated. DZ60 is here, so you only need to modify the keymap found in the default subfolder.
My opensource projects: GH80-3000, TOAD, XMMX. Classified: stuff

Offline _haru

  • Formerly linuxfanatic
  • Posts: 390
  • Location: Perth, Western Australia
  • Back from the dead
Re: Getting started with DZ60 and QMK
« Reply #3 on: Sat, 14 October 2017, 09:11:33 »
AMJ60 - 45g MX White | GH60 Rev. C - Ghost Gateron Blacks | DFK101 - Alps SKCM Cream | Filco Majestouch 2 TKL - 62g Vintage MX Ergo Clear

Offline Zobeid Zuma

  • Thread Starter
  • Posts: 262
  • Location: Texas
Re: Getting started with DZ60 and QMK
« Reply #4 on: Sat, 14 October 2017, 10:02:54 »

Offline Zobeid Zuma

  • Thread Starter
  • Posts: 262
  • Location: Texas
Re: Getting started with DZ60 and QMK
« Reply #5 on: Sat, 14 October 2017, 10:04:11 »
Alright, my QMK repository was outdated. DZ60 is here, so you only need to modify the keymap found in the default subfolder.

That looks like something I can probably handle.

Now, about transferring the layout to the keyboard??

Offline TalkingTree

  • Posts: 2452
  • Location: Italy (142)
    • My projects
Re: Getting started with DZ60 and QMK
« Reply #6 on: Sat, 14 October 2017, 10:16:40 »
Now, about transferring the layout to the keyboard??
You need to compile the source and then flash it to the MCU; being it a m32u4 you can use FLIP on a Windows machine.
My opensource projects: GH80-3000, TOAD, XMMX. Classified: stuff

Offline Zobeid Zuma

  • Thread Starter
  • Posts: 262
  • Location: Texas
Re: Getting started with DZ60 and QMK
« Reply #7 on: Sat, 14 October 2017, 11:08:41 »
Now, about transferring the layout to the keyboard??
You need to compile the source and then flash it to the MCU; being it a m32u4 you can use FLIP on a Windows machine.

I DLed and tried that just now, but when I select USB communication it locks up.  I have to kill the task.

Offline TalkingTree

  • Posts: 2452
  • Location: Italy (142)
    • My projects
Re: Getting started with DZ60 and QMK
« Reply #8 on: Sat, 14 October 2017, 11:28:44 »
FLIP is handy but it's a rather unstable software. It took me a while to have it work.
Rather than spend hours and figure it out, try the dfu programmer instead.
My opensource projects: GH80-3000, TOAD, XMMX. Classified: stuff

Offline Zobeid Zuma

  • Thread Starter
  • Posts: 262
  • Location: Texas
Re: Getting started with DZ60 and QMK
« Reply #9 on: Sat, 14 October 2017, 14:28:15 »
FLIP is handy but it's a rather unstable software. It took me a while to have it work.
Rather than spend hours and figure it out, try the dfu programmer instead.

Tried that, won't run.  Says it needs something called "libusb0.dll".    :'(

Offline TalkingTree

  • Posts: 2452
  • Location: Italy (142)
    • My projects
Re: Getting started with DZ60 and QMK
« Reply #10 on: Sat, 14 October 2017, 14:35:41 »
My opensource projects: GH80-3000, TOAD, XMMX. Classified: stuff

Offline Zobeid Zuma

  • Thread Starter
  • Posts: 262
  • Location: Texas
Re: Getting started with DZ60 and QMK
« Reply #11 on: Sat, 14 October 2017, 15:00:11 »
libusb0.dll
Part of this library.

Downloaded.  Doesn't come with any recognizable installer (even though there is installer_license.txt!).  Docs are in some format called .sgml that I've never heard of before and Windows doesn't know how to read.

I'm beginning to feel like I've been led down a rabbit hole and into a maze of twisty little passages, all alike, and most of them turn out to be dead ends.  How can this be so difficult?  I have fully functional Mac, Ubuntu and Windows systems here, and I'm willing to do just about anything, but I need some software that works and instructions that I can follow.

Offline TalkingTree

  • Posts: 2452
  • Location: Italy (142)
    • My projects
Re: Getting started with DZ60 and QMK
« Reply #12 on: Sat, 14 October 2017, 15:07:35 »
Doesn't come with any recognizable installer
Oh, I'm sorry, I posted the wrong link. That was the source files. This one contains the binary. Once downloaded and uncompressed, navigate to ./bin and read the libusb-win32-bin-README.txt file to know what files to copy where according to your CPU architecture.
My opensource projects: GH80-3000, TOAD, XMMX. Classified: stuff

Offline Zobeid Zuma

  • Thread Starter
  • Posts: 262
  • Location: Texas
Re: Getting started with DZ60 and QMK
« Reply #13 on: Sat, 14 October 2017, 18:14:11 »
Good news, I got the library installed and dfu-programmer to run.

I can't get it to do anything useful, though.  I can't figure out how I'm supposed to designate the "target" device.  I read the --help instructions, then I tried digging into the Windows device manager to locate the USB bus and address.  Then I tried:

> dfu-programmer atmega32u4:00000000,00000001 read
Unsupported target 'atmega32u4:0,1'.


And then a long list of the controllers it supports.

Offline TalkingTree

  • Posts: 2452
  • Location: Italy (142)
    • My projects
Re: Getting started with DZ60 and QMK
« Reply #14 on: Sat, 14 October 2017, 18:25:15 »
Syntax as it follows. Each command on a new line:

Code: [Select]
dfu-programmer atmega32u4 erase
dfu-programmer atmega32u4 flash firmware.hex
dfu-programmer atmega32u4 reset

Clearly firmware.hex must be replaced with path and name of your firmware; it also might be necessary to replug the keyboard in after the reset command.
My opensource projects: GH80-3000, TOAD, XMMX. Classified: stuff

Offline Zobeid Zuma

  • Thread Starter
  • Posts: 262
  • Location: Texas
Re: Getting started with DZ60 and QMK
« Reply #15 on: Sat, 14 October 2017, 18:41:49 »
Syntax as it follows. Each command on a new line:

Code: [Select]
dfu-programmer atmega32u4 erase
dfu-programmer atmega32u4 flash firmware.hex
dfu-programmer atmega32u4 reset

Clearly firmware.hex must be replaced with path and name of your firmware; it also might be necessary to replug the keyboard in after the reset command.

I was trying the 'read' command just to make sure I had communication established before I tried changing anything.

> dfu-programmer atmega32u4 read
dfu-programmer: no device present.
> dfu-programmer atmega32u4 erase
dfu-programmer: no device present.


But it's definitely "present" from my viewpoint, since it's plugged in and I can type on it.  (Are we sure this is really an atmega32u4 chip, I wonder?)

EDIT:  I pulled the board and put it under a magnifying glass.  Yes, it's definitely an Atmega32u4.
« Last Edit: Sat, 14 October 2017, 19:45:11 by Zobeid Zuma »

Offline _haru

  • Formerly linuxfanatic
  • Posts: 390
  • Location: Perth, Western Australia
  • Back from the dead
Re: Getting started with DZ60 and QMK
« Reply #16 on: Sat, 14 October 2017, 22:00:17 »
Sorry, I forgot the website wasn't HTTPS. Here is a working link: http://qmkeyboard.cn/
AMJ60 - 45g MX White | GH60 Rev. C - Ghost Gateron Blacks | DFK101 - Alps SKCM Cream | Filco Majestouch 2 TKL - 62g Vintage MX Ergo Clear

Offline TalkingTree

  • Posts: 2452
  • Location: Italy (142)
    • My projects
Re: Getting started with DZ60 and QMK
« Reply #17 on: Sun, 15 October 2017, 02:36:07 »
dfu-programmer: no device present.
Between Caps Lock and A, on the back of the PCB, there's a reset push button. Press it to put the device into bootloader mode then proceed with the flashing routine.
My opensource projects: GH80-3000, TOAD, XMMX. Classified: stuff

Offline Zobeid Zuma

  • Thread Starter
  • Posts: 262
  • Location: Texas
Re: Getting started with DZ60 and QMK
« Reply #18 on: Sun, 15 October 2017, 06:34:07 »
dfu-programmer: no device present.
Between Caps Lock and A, on the back of the PCB, there's a reset push button. Press it to put the device into bootloader mode then proceed with the flashing routine.

Same result.  No device present.  I also tried holding down space-B when connecting the keyboard, which is also supposed to put it into bootloader mode, but that didn't help either.  (BTW, I installed dfu-programmer on Ubuntu MATE, but it's giving exactly the same results that I saw on the Windows system.)

Offline TalkingTree

  • Posts: 2452
  • Location: Italy (142)
    • My projects
Re: Getting started with DZ60 and QMK
« Reply #19 on: Sun, 15 October 2017, 07:55:15 »
Open Windows device manager and push the reset button, see if the list changes. You should see something like Atmel microcontroller, libusb device or ATMega32u4 in the device list.
My opensource projects: GH80-3000, TOAD, XMMX. Classified: stuff

Offline Zobeid Zuma

  • Thread Starter
  • Posts: 262
  • Location: Texas
Re: Getting started with DZ60 and QMK
« Reply #20 on: Sun, 15 October 2017, 08:29:25 »
Open Windows device manager and push the reset button, see if the list changes. You should see something like Atmel microcontroller, libusb device or ATMega32u4 in the device list.

Yes.  It appears under Other Devices as ATm32U4DFU.

Offline Zobeid Zuma

  • Thread Starter
  • Posts: 262
  • Location: Texas
Re: Getting started with DZ60 and QMK
« Reply #21 on: Sun, 15 October 2017, 08:43:34 »
That did it!  WOOHOO!!!   ;D

Once I had it listed in the Device Manager, I was able to "update drivers" and tell it to search in the USB folder that came with the FLIP software.  From that point FLIP was able to open the connection to the keyboard and reprogram it with no problem!

Working now with my new key map.   :thumb:

What a relief!  I was beginning to wonder if there was something wrong with the hardware -- but it didn't make sense when everything else was working.  Big thank you TalkingTree, for being so patient and leading me by the hand through this!

Offline TalkingTree

  • Posts: 2452
  • Location: Italy (142)
    • My projects
Re: Getting started with DZ60 and QMK
« Reply #22 on: Sun, 15 October 2017, 08:45:07 »
Open Windows device manager and push the reset button, see if the list changes. You should see something like Atmel microcontroller, libusb device or ATMega32u4 in the device list.

Yes.  It appears under Other Devices as ATm32U4DFU.
Then it's missing the drivers. It should appear under LibUSB-Win32 Devices.
Right click on it and select Update Driver Software and select the folder where the dfu-programmer is.
After that, replug your device, and try flashing. You should be good to go.
My opensource projects: GH80-3000, TOAD, XMMX. Classified: stuff

Offline TalkingTree

  • Posts: 2452
  • Location: Italy (142)
    • My projects
Re: Getting started with DZ60 and QMK
« Reply #23 on: Sun, 15 October 2017, 08:46:52 »
Perfect. I'm glad you made it. Enjoy.  :thumb:
My opensource projects: GH80-3000, TOAD, XMMX. Classified: stuff