Author Topic: Looking for direction on an uncommon case (probably)  (Read 21033 times)

0 Members and 1 Guest are viewing this topic.

Offline socratisator

  • Thread Starter
  • Posts: 41
  • Location: France
Looking for direction on an uncommon case (probably)
« on: Wed, 02 October 2019, 12:47:04 »
Hello,
I'm looking for help here because it seems to be the best place around the Web.
Some context for starting.
One day, my CM Storm keyboard started acting odd : half of the keys "worked" but sending random character, the other half did not print anything at all. I dissassembled it but everything was looking fine, changed USB port, changed PC, no luck...so I concluded that the daughter board was the culprit - some sort of corrupt firmware maybe.

I hate discard repairable stuff, so I decided to try and fix it, but no spare parts are available of course.
I made the keyboard matrix :

I bought a teensy++ 2.0 board (https://www.pjrc.com/store/teensypp.html) as I needed 25 inputs.
The board is compatible with Arduino developpement kit, it's recognized and I succesfully loaded simple programs in it.
At this point, I search the Web in quest of simple and efficent code that I could use but I lost track... I found simple examples with 3x3 matrix, "ready to load" code but for reference keyboards (mostly 60%).
Maybe this post from Hasu could help but it's quitte daunting and I'm not even sure it could solve my problem : https://geekhack.org/index.php?PHPSESSID=hfc1pl5didskncbjc98g41obrs77dudo&topic=41989.0
I'm sure something simple already exists, I'm ready to learn and spend times, I just need guidance !

Offline socratisator

  • Thread Starter
  • Posts: 41
  • Location: France
Re: Looking for direction on an uncommon case (probably)
« Reply #1 on: Sat, 05 October 2019, 00:56:37 »
No one is inspired by my questions or is it too vague ? If necessary I can provide more details of photos.

Offline suicidal_orange

  • * Global Moderator
  • Posts: 4771
  • Location: England
Re: Looking for direction on an uncommon case (probably)
« Reply #2 on: Sat, 05 October 2019, 04:43:58 »
Welcome to geekhack, sorry I missed this.  Haven't had a puzzle board in a while and usually they're fun working it all out but you've done half the work already and someone else has probably done it all!  As you successfully mapped the matrix it seems that it's not damaged so the new controller was the correct route.

If you want an easy (though not so fun) fix you could probably* buy a controller from bpiphany, if not you can find which one would fit your keyboard and copy the wiring using your Teensy and just borrow the firmware.  If it's not there you have all the info to make your own config but there's no point reinventing the wheel.

There are a couple of firmwares you can use, my personal favourite is EasyAVR as I like the GUI but TMK is more popular.

Any questions please ask, I'll be around all weekend :)


*Maybe you have a new model that's not supported, there's no other reason not to.
120/100g linear Zealio R1  
GMK Hyperfuse
'Split everything' perfection  
MX Clear
SA Hack'd by Geeks     
EasyAVR mod

Offline socratisator

  • Thread Starter
  • Posts: 41
  • Location: France
Re: Looking for direction on an uncommon case (probably)
« Reply #3 on: Sat, 05 October 2019, 12:55:20 »
Many thanks for your reply  :thumb:
I came accross the site http://bathroomepiphanies.com, but considering the asymmetry of the snow flakes (http://bathroomepiphanies.com/controllers/flake/Frosty_Flake_20130602.jpg), I'm almost certain it cannot fit in the CM Storm :
.
I'll dig into the links you posted.
Thanks again.



Offline suicidal_orange

  • * Global Moderator
  • Posts: 4771
  • Location: England
Re: Looking for direction on an uncommon case (probably)
« Reply #4 on: Sat, 05 October 2019, 13:49:36 »
Ah didn't notice you had a fullsize board, I shouldn't post first thing in the morning :))  The Frosty Flake may fit leaving a gap down the right hand side but not sure it will work as it's made for a Quick Fire Rapid which is a TKL board (no numberpad) which yours clearly isn't.

You have the Teensy anyway so may as well use it, you can still borrow and extend the firmware as the matrix looks similar if not identical.  Seems you like to play so I'll leave you to it, don't forget to find where the LEDs connect too if you want them to work.
120/100g linear Zealio R1  
GMK Hyperfuse
'Split everything' perfection  
MX Clear
SA Hack'd by Geeks     
EasyAVR mod

Offline socratisator

  • Thread Starter
  • Posts: 41
  • Location: France
Re: Looking for direction on an uncommon case (probably)
« Reply #5 on: Sun, 06 October 2019, 01:48:31 »
Sorry, I realize that I forgot to mention other "details"  :-[
- this is indeed a full size keyboard plus a column of 5 Macro keys (I'm planning to get rid of them in the end)

- this is a french layout !
I cannot find a way to map - for exemple - "GREATER SIGN" an "LOWER SIGN" in the same key.
Is there a workaround ? Google, for now, is telling me "NOPE".

Offline suicidal_orange

  • * Global Moderator
  • Posts: 4771
  • Location: England
Re: Looking for direction on an uncommon case (probably)
« Reply #6 on: Sun, 06 October 2019, 04:59:36 »
Of course there's a way round - ignore it!

There is no such thing as a French keyboard nor any other layout, keyboards send keycodes which your operating system converts to letters and symbols according to whatever language you've set it to.  What you need to do is pretend you have an ISO-UK keyboard so the greater/lower than is called something like 'non US backslash' and the key next to enter is 'non US hashmark'.  All the letters that don't match QWERTY boards will be 'wrong' too, but they will work.

If you do want two random characters on the same key you can do pretty much anything using layers and modifiers but on a fullsize you probably don't need to.  Get it working first :thumb:
120/100g linear Zealio R1  
GMK Hyperfuse
'Split everything' perfection  
MX Clear
SA Hack'd by Geeks     
EasyAVR mod

Offline socratisator

  • Thread Starter
  • Posts: 41
  • Location: France
Re: Looking for direction on an uncommon case (probably)
« Reply #7 on: Sun, 06 October 2019, 09:16:09 »
You're absolutly right !
I need to find thoses old flat IDE cables and do some soldering beforehand, then I'll try the default full size layout. The tweaking for last.
My old keyboard is lying around for about 6 months now, i should have post in this forum sooner  :)

Offline socratisator

  • Thread Starter
  • Posts: 41
  • Location: France
Re: Looking for direction on an uncommon case (probably)
« Reply #8 on: Tue, 22 October 2019, 10:08:35 »
I'm back !
Took my time to do the wiring (actually the longer part was to remove the previously soldered pins in the teensy board).
Here some photos (i'm quitte happy with the result - clean cable management and not so bad soldering) :





I followed thoses steps for the software part :
1) Install latest version of Arduino (https://www.arduino.cc/en/Main/Software)
2) Install latest version teensyArduino (https://www.pjrc.com/teensy/td_download.html)
3) Installer Easy AVR (https://github.com/dhowland/EasyAVR)
4) Run easykeymap.exe
5) Create a new layout and select your board -or- open a previously saved layout (File menu -> .json file)
6) Modify your layout by clicking a button and pressing the new key you want mapped, or selecting the scancode from the selection dialog
7) Save your layout (File menu -> generate .json file)
8) Build your firmware into a .hex file (Build menu -> cm_storm.hex)
9) Start teensy.exe (arduino-1.8.9\hardware\tools\teensy.exe)
10) Press button on teensy board
11) Go to File > Open HEX file > C:\Users\nihilist\Documents\Clavier\cm_storm.hex
12) Press button Program (loading success)

Here is the mapping between the pins on the keyboard and the teensy controler:


I found it logical that nothing happens when I press keys on my newly porgrammed keyboard, I didn't specify which I/O to "listen" to, but how to do that ? Once again I need some help.



Offline socratisator

  • Thread Starter
  • Posts: 41
  • Location: France
Re: Looking for direction on an uncommon case (probably)
« Reply #9 on: Thu, 24 October 2019, 02:17:12 »
I searched the documentation and source code in the Git repository, reference to AVR_AT90USB1286 which is the chip on the teensy++ 2.0 that I used is here (the author says it's supported), but I still can't find where to look to define my custom mapping of I/O. Should I ask directly to metalliqaz ? His thread on Easy AVR looks dead  :(

Offline suicidal_orange

  • * Global Moderator
  • Posts: 4771
  • Location: England
Re: Looking for direction on an uncommon case (probably)
« Reply #10 on: Thu, 24 October 2019, 18:39:54 »
Sorry, not been around much and missed this. Soldering looks good and you have your mapping so nearly there :thumb:

I'm not at my computer at the moment but at 5) you're looking for something like 'add a board' in the file menu, which will take you through a wizard which includes listing your row/column pins (and selecting the chip?) This will save a file in C:/users/[your username]/.EasyAVR which you will need to open in a text editor, the chip is near the top and you need to use... JUMBO ?  Definitely not SIXTY which is the default as you need lots of pins.

If you have a look on github you can find the other CM Storm config files and at the bottom is a long section of the keys positions in the matrix - if you order your pins the same as the ones in that file you can copy/paste the keys into yours.

Not sure any of that makes much sense, it's been a while so I'll have to have a look. You can post in the EasyAVR thread, metaliqaz may return or someone else may help quicker than me but I'll be around over the weekend.
120/100g linear Zealio R1  
GMK Hyperfuse
'Split everything' perfection  
MX Clear
SA Hack'd by Geeks     
EasyAVR mod

Offline socratisator

  • Thread Starter
  • Posts: 41
  • Location: France
Re: Looking for direction on an uncommon case (probably)
« Reply #11 on: Fri, 25 October 2019, 08:29:31 »
You don't have to apologize, I told you, I'm not at all in a hurry  ;)
In EasyAVR "File > Define Keyboard..." start the wizard - read the documentation but totaly missed that - that ask for 1) Chip type 2) Rows pins 3) Columns pins.
After that, went to http://www.keyboard-layout-editor.com as stated to create my layout and downloaded it (JSON file).
Gave the JSON file in the final step of the wizard
Opened the .py file generated to check the chip :
Code: [Select]
import easykeymap.templates.AT90USB1286_16MHz_FULLSIZE as firmware
from easykeymap.ioports import *
from easykeymap.helper import make_matrix_config, make_led_config
There is a JUMBO option but FULLSIZE  seems ok too (?) so kept it like that.

At this point, it's starting to make little sens to me  :-[
I've got a json file and a python file, but how to use them ?
I tried to resume the steps in my post from 22 October, loaded the json file in EasyAVR but encountered an error probably due to the idioms of french alphabet (à,è,é,ç)
[/url][/img]
Edit: in fact the error appears even if I load a strictly english keyboard layout.

I don't want to bother you, but I'm not sure the EasyAVR thread is a good idea, it ends on a question unanswered.


Offline socratisator

  • Thread Starter
  • Posts: 41
  • Location: France
Re: Looking for direction on an uncommon case (probably)
« Reply #12 on: Fri, 25 October 2019, 08:31:03 »
Screwed up the link for error message :

Offline yui

  • Posts: 1082
  • Location: 127.0.0.1 (in azerty)
Re: Looking for direction on an uncommon case (probably)
« Reply #13 on: Fri, 25 October 2019, 08:41:48 »
for me, with a very limited knowledge of python, looks to be an encoding problem, your python script might be for example encoded in utf-8 or the windows-1252 (west European and used for US as well) char-set but python is trying to open it in the other one, or in strait ascii. As 0x90 lands into control characters land in utf-8 i would guess that your script is not utf-8, i do not know how to switch encoding and decoding in python but if you can find, i'd guess it could fix your issue.
vi vi vi - the roman number of the beast (Plan9 fortune)

Offline socratisator

  • Thread Starter
  • Posts: 41
  • Location: France
Re: Looking for direction on an uncommon case (probably)
« Reply #14 on: Fri, 25 October 2019, 12:07:45 »
Thanks for the insight Yui.
I checked the python file generated : C:\Users\nihilist\.EasyAVR\boards\cm_storm.py encoding is UTF-8.
The path showed in error does not exists "C:\Users\dave\..." seems like an hard coded path but that doesn't match with "UnicodeDecodeError", should have been "FileNotFound" or something like that.
Searched for "cp1252.py" and found it in "C:\Users\nihilist\AppData\Local\Programs\Python\Python37-32\Lib\encodings\cp1252.py", error point to line 23 which is :
Code: [Select]
return codecs.charmap_decode(input,self.errors,decoding_table)[0]
"charmap_decode" function is not in this file but the header refers to a TXT file:
Code: [Select]
Python Character Mapping Codec cp1252 generated from 'MAPPINGS/VENDORS/MICSFT/WINDOWS/CP1252.TXT' with gencodec.py
This file however, cannot be found  :mad:
I'll try to clean uninstall/install Python on my system.

Offline suicidal_orange

  • * Global Moderator
  • Posts: 4771
  • Location: England
Re: Looking for direction on an uncommon case (probably)
« Reply #15 on: Fri, 25 October 2019, 15:57:00 »
The error messages are often random and meaningless - EasyAVR is a program with character :))

Once you've gone through the wizard you can do 5) as you did before and whatever you called your board will be an option in the list of boards.  Don't forget when making your layout you have an ISO-UK board - French characters wont work.  I remember FULLSIZE only lets you have 5 rows and you need more so JUMBO sounds good AT90USB1286_16MHz_COSTAR is what you need.  Then it should compile and load, though the letters will be all over the place due to the crazy matrix layout.
« Last Edit: Fri, 25 October 2019, 16:46:19 by suicidal_orange »
120/100g linear Zealio R1  
GMK Hyperfuse
'Split everything' perfection  
MX Clear
SA Hack'd by Geeks     
EasyAVR mod

Offline socratisator

  • Thread Starter
  • Posts: 41
  • Location: France
Re: Looking for direction on an uncommon case (probably)
« Reply #16 on: Sat, 26 October 2019, 04:23:30 »
Uninstalled completly Python from my pc as installation guide says EasyAVR works in "standalone" mode (http://dhowland.github.io/EasyAVR/build/html/install.html)
Considering the size of my matrix (8/17), you're absolutly right Suicidal_Orange, I need to set template as COSTAR :
Code: [Select]
import easykeymap.templates.AT90USB1286_16MHz_COSTAR as firmwareProof here, from the extract of __init__.py :
Code: [Select]
matrix_dims = {
    'SQUARE': (12, 12),
    'JUMBO': (7, 24),
    'FULLSIZE': (6, 22),
    'COSTAR': (8, 18),
    'TKL': (6, 17),
    'SIXTY': (5, 15),
    'PAD': (6, 6),
    'CARD': (1, 6)
}
Also changed parameters as follow :
Code: [Select]
num_rows = 8
num_cols = 17
And redo the mapping of all the keys (tedious task for sure).

Launch easykeymap.exe again, "File > New..." I can see the new board (\o/)

Then load the JSON made at the very begining without error (that means the site http://www.keyboard-layout-editor.com generate an incompatible file with my system :()
Restart at step #8, generate an .hex file and load it successfully in chip using teensy loader.
But in the end, nothing happens when I press the keys  :'(

Offline suicidal_orange

  • * Global Moderator
  • Posts: 4771
  • Location: England
Re: Looking for direction on an uncommon case (probably)
« Reply #17 on: Sat, 26 October 2019, 05:02:42 »
You went through and mapped all the keys?  Wow, you are keen!  As mentioned above I think it would have been quicker to re-order your pins to match the main section of the other boards but whatever, it's done.

The final thing the firmware can't guess is which way the diodes are connected - in every handwire guide it says to connect them across the rows but the crazy Filco designers?  Of course they did something different.  Sounds like your board will magically spring to life if you set

Code: [Select]
strobe_cols = True
120/100g linear Zealio R1  
GMK Hyperfuse
'Split everything' perfection  
MX Clear
SA Hack'd by Geeks     
EasyAVR mod

Offline socratisator

  • Thread Starter
  • Posts: 41
  • Location: France
Re: Looking for direction on an uncommon case (probably)
« Reply #18 on: Sat, 26 October 2019, 07:11:45 »
Not that keen actually  :rolleyes:
If you look at the matrix in my 1st post, you'll see that it's not about switching rows and columns, the guy that did the wiring was a real sadist.
Anyway, thanks to your help I got result... of sort : now, when I press a key, ANY KEY, it opens an Office welcoming Windows :

It makes no sense at all, and more disturbing is that it reminds me the symptoms of my keyboard before I went to the trouble of replacing the controller  :eek:

Offline suicidal_orange

  • * Global Moderator
  • Posts: 4771
  • Location: England
Re: Looking for direction on an uncommon case (probably)
« Reply #19 on: Sat, 26 October 2019, 07:28:28 »
Oh I know - my Ducky was made by the same sadist but it was more fun to fix because the controller wasn't socketed so it took hours with a multimeter to work out what was connected to what, and I had to solder wires to random places as the pins on the chip were too small to solder to.  Had someone told me it was the same as a Filco I could have cheated by using one key from each row as in their config and seeing what happened, though I was a complete newbie then so wouldn't have known to...



Is it really any key?  What does Aqua Key Test think you're pressing?

If you want to post your config I'll have a look but sounds like everything's right.  Is there any chance someone damaged your keyboard?
« Last Edit: Sat, 26 October 2019, 07:31:30 by suicidal_orange »
120/100g linear Zealio R1  
GMK Hyperfuse
'Split everything' perfection  
MX Clear
SA Hack'd by Geeks     
EasyAVR mod

Offline socratisator

  • Thread Starter
  • Posts: 41
  • Location: France
Re: Looking for direction on an uncommon case (probably)
« Reply #20 on: Sat, 26 October 2019, 09:44:42 »
Lol, guess you too had your share of playing with multimeter  ;D
I'm pretty sure it's every key, but i'll try the "Aqua Key Test".
For now, here is the python file :
Code: [Select]
"""
Keyboard definition for the CM Storm custom keyboard.
Auto-generated from 'C:\\Users\\nihilist\\Documents\\Clavier\\fr.json'
"""

#
# READ THIS
#
# This file contains a description of the various parameters that
# must be defined in order to completely describe the new keyboard.
# This file must be correct for the firmware to work, however if
# if is incorrect reprogramming the board won't cause any damage.
#
# This tool that created this file did not have all the information
# needed to make a perfect config.  Check over all the data for
# correctness.  Definitely make sure to fix the matix rows/columns in
# keyboard_definition, which are almost certainly wrong.
#
# This file uses two helper functions to make the configuration
# easier.  For more complicated hardware, it may be necessary to
# set the parameters by hand.  Look at other configs, such as
# boards/sigma.py, for examples if you want to try it.
#

# The first decision you have to make is to choose a hardware
# build.  A handwire board using a Teensy2.0 will probably want
# ATmega32U4_16MHz_TKL or ATmega32U4_16MHz_SIXTY.  The sizes are
# defined in the templates/__init__.py file of the keymapper.
# Leave the rest of the imports like they are here.

import easykeymap.templates.AT90USB1286_16MHz_COSTAR as firmware
from easykeymap.ioports import *
from easykeymap.helper import make_matrix_config, make_led_config


# The name of the board in the "New" dialog

description = "CM Storm v2"

# Unique string to identify THIS exact hardware layout.  If you change
# this file after saving layouts in the GUI, bump the unique_id to
# tell the tool that the old save files should not be used.  (prevents
# corrupted builds)

unique_id = "CM_STORM_001"

# The name of the .cfg file the system will try to find for altered
# layout options.  See the configs subdir of the keymapper.

cfg_name = "cm_storm"


# Hand-wired boards usually use Teensy controllers.  Set this to
# True to make sure that the bootloader works.

teensy = True

# If your board has an exposed switch for going into the bootloader,
# you can set this to True and the system won't prompt you to add a
# BOOT key to your layout.

hw_boot_key = True


# The number of rows and columns in the matrix.  In a hand-wired board
# each of these will correspond to a single pin.

num_rows = 8
num_cols = 17


# Keyboards work by scanning a matrix to check each key.  The scan
# works by setting an active row/column (strobing) and then reading
# the status of every switch that crosses it (sensing).
# strobe_cols tells the firmware which direction you have your diodes
# installed.  If diodes go from column to row, then strobe_cols must
# be False.  If diodes go from row to column, then strobe_cols must be
# True.

strobe_cols = True

# strobe_low tells the firmware if a row/column should be activated
# by pulling the pin high or low.  Hand-wired boards will almost always
# use strobe_low = True

strobe_low = True


# The matrix_hardware, matrix_strobe, matrix_sense parameters tell
# the firmware how to initialize the ports, what pins must be set
# for each row/column, and what order to strobe/sense.  These are
# complicated and are explained fully elsewhere.  It is easiest to
# configure the matrix by using the make_matrix_config function as
# shown below.  Just customize 'rows' and 'cols' for your project.

matrix_hardware, matrix_strobe, matrix_sense = make_matrix_config(
    strobe_cols=strobe_cols,
    strobe_low=strobe_low,
    rows=[F0, F1, F2, F3, F4, F5, F6, F7],
    cols=[B7, D0, D1, D2, D3, D4, D5, D6, D7, C0, C1, C2, C3, C4, C5, C6, C7],
    device=firmware.device
)


# The num_leds, num_ind, led_hardware, backlighting, num_bl_enab,
# and bl_modes parameters tell the firmware how to operate the LEDs
# for indicators (for example, Caps Lock) and for backlighting.  In
# order to fine-tune the configs, these may have to be defined manually
# but it is easiest to use make_led_config.
# LED_DRIVER_PULLUP is used when the pin is connected to the anode of
# the LED and the cathode is connected to ground.
# LED_DRIVER_PULLDOWN is used when the pin is connected to the cathode
# of the LED and the anode is connected to the power supply.
# Hand-wired boards will usually want to use LED_DRIVER_PULLDOWN.
# If there are no backlights, just leave the list empty (ie. just []).

num_leds, num_ind, led_hardware, backlighting, num_bl_enab, bl_modes = make_led_config(
    led_pins = [],
    led_dir=LED_DRIVER_PULLDOWN,
    backlight_pins = [],
    backlight_dir=LED_DRIVER_PULLDOWN
)


# Define the default assignments of the indicator LEDs.  The length
# of this list must equal the length of led_pins.  For each LED, the
# first string is the description of the key shown in the GUI.  The
# second string is the default function assigned to that LED.  LED
# functions must be strings as defined in led_assignments of gui.py.
# Choices are 'Num Lock', 'Caps Lock', 'Scroll Lock', 'Compose', 'Kana',
# 'Win Lock', 'Fn1 Active', 'Fn2 Active', 'Fn3 Active', 'Fn4 Active',
# 'Fn5 Active', 'Fn6 Active', 'Fn7 Active', 'Fn8 Active', 'Fn9 Active',
# 'Any Fn Active', 'Recording', 'USB Init', 'USB Error', 'USB Suspend',
# 'USB Normal', 'Backlight', and 'Unassigned'.

led_definition = []


# Define your layout.  This is a list of rows.  Each row is a list
# of keys.  Each key is a tuple of three items.  First item is a tuple
# defining the width,height of the key.  If it is just a number, it
# will be a space instead of a key.  All units are in quarter key lengths,
# so a standard key would be (4,4).  Second item is a tuple defining the
# row,column in the matrix for that key.  Third item is the default scancode
# for that key, from scancodes.py.  If a row is a number instead of a list,
# it will just make a vertical spacer.
# ((key width, key height), (matrix row, matrix column), 'default mapping')

keyboard_definition = [[((4, 4), (4, 13), 'HID_KEYBOARD_SC_ESCAPE'),
  (4, None, '0'),
  ((4, 4), (1, 3), 'HID_KEYBOARD_SC_F1'),
  ((4, 4), (1, 14), 'HID_KEYBOARD_SC_F2'),
  ((4, 4), (6, 14), 'HID_KEYBOARD_SC_F3'),
  ((4, 4), (4, 14), 'HID_KEYBOARD_SC_F4'),
  (2, None, '0'),
  ((4, 4), (0, 2), 'HID_KEYBOARD_SC_F5'),
  ((4, 4), (4, 5), 'HID_KEYBOARD_SC_F6'),
  ((4, 4), (6, 16), 'HID_KEYBOARD_SC_F7'),
  ((4, 4), (1, 16), 'HID_KEYBOARD_SC_F8'),
  (2, None, '0'),
  ((4, 4), (1, 12), 'HID_KEYBOARD_SC_F9'),
  ((4, 4), (0, 12), 'HID_KEYBOARD_SC_F10'),
  ((4, 4), (4, 12), 'HID_KEYBOARD_SC_F11'),
  ((4, 4), (2, 12), 'HID_KEYBOARD_SC_F12'),
  (1, None, '0'),
  ((4, 4), (0, 6), 'HID_KEYBOARD_SC_PRINT_SCREEN'),
  ((4, 4), (7, 6), 'HID_KEYBOARD_SC_SCROLL_LOCK'),
  ((4, 4), (7, 2), 'HID_KEYBOARD_SC_PAUSE')],
 2,
 [((4, 4), (1, 13), '0'),
  ((4, 4), (0, 13), '0'),
  ((4, 4), (0, 3), '0'),
  ((4, 4), (0, 14), '0'),
  ((4, 4), (0, 4), '0'),
  ((4, 4), (1, 4), '0'),
  ((4, 4), (1, 15), '0'),
  ((4, 4), (0, 15), '0'),
  ((4, 4), (0, 5), '0'),
  ((4, 4), (0, 16), '0'),
  ((4, 4), (0, 7), '0'),
  ((4, 4), (1, 7), '0'),
  ((4, 4), (1, 5), '0'),
  ((8, 4), (6, 12), 'HID_KEYBOARD_SC_BACKSPACE'),
  (1, None, '0'),
  ((4, 4), (1, 10), 'HID_KEYBOARD_SC_INSERT'),
  ((4, 4), (1, 8), 'HID_KEYBOARD_SC_HOME'),
  ((4, 4), (1, 9), 'HID_KEYBOARD_SC_PAGE_UP'),
  (1, None, '0'),
  ((4, 4), (3, 11), 'HID_KEYBOARD_SC_NUM_LOCK'),
  ((4, 4), (3, 10), 'HID_KEYBOARD_SC_KEYPAD_SLASH'),
  ((4, 4), (3, 9), 'HID_KEYBOARD_SC_KEYPAD_ASTERISK'),
  ((4, 4), (2, 9), 'HID_KEYBOARD_SC_KEYPAD_MINUS')],
 [((6, 4), (6, 13), 'HID_KEYBOARD_SC_TAB'),
  ((4, 4), (7, 13), 'HID_KEYBOARD_SC_A'),
  ((4, 4), (7, 3), 'HID_KEYBOARD_SC_Z'),
  ((4, 4), (7, 14), 'HID_KEYBOARD_SC_E'),
  ((4, 4), (7, 4), 'HID_KEYBOARD_SC_R'),
  ((4, 4), (6, 4), 'HID_KEYBOARD_SC_T'),
  ((4, 4), (6, 15), 'HID_KEYBOARD_SC_Y'),
  ((4, 4), (7, 15), 'HID_KEYBOARD_SC_U'),
  ((4, 4), (7, 5), 'HID_KEYBOARD_SC_I'),
  ((4, 4), (7, 16), 'HID_KEYBOARD_SC_O'),
  ((4, 4), (7, 7), 'HID_KEYBOARD_SC_P'),
  ((4, 4), (6, 0), '0'),
  ((4, 4), (6, 5), '0'),
  (1, None, '0'),
  ((5, 8), (3, 12), 'HID_KEYBOARD_SC_ENTER'),
  (1, None, '0'),
  ((4, 4), (1, 11), 'HID_KEYBOARD_SC_DELETE'),
  ((4, 4), (0, 8), 'HID_KEYBOARD_SC_END'),
  ((4, 4), (0, 9), 'HID_KEYBOARD_SC_PAGE_DOWN'),
  (1, None, '0'),
  ((4, 4), (7, 11), 'HID_KEYBOARD_SC_KEYPAD_7_AND_HOME'),
  ((4, 4), (7, 10), 'HID_KEYBOARD_SC_KEYPAD_8_AND_UP_ARROW'),
  ((4, 4), (7, 9), 'HID_KEYBOARD_SC_KEYPAD_9_AND_PAGE_UP'),
  ((4, 8), (7, 8), 'HID_KEYBOARD_SC_KEYPAD_PLUS')],
 [((7, 4), (6, 3), 'HID_KEYBOARD_SC_CAPS_LOCK'),
  ((4, 4), (5, 13), 'HID_KEYBOARD_SC_Q'),
  ((4, 4), (5, 3), 'HID_KEYBOARD_SC_S'),
  ((4, 4), (5, 14), 'HID_KEYBOARD_SC_D'),
  ((4, 4), (5, 4), 'HID_KEYBOARD_SC_F'),
  ((4, 4), (4, 4), 'HID_KEYBOARD_SC_G'),
  ((4, 4), (4, 15), 'HID_KEYBOARD_SC_H'),
  ((4, 4), (5, 15), 'HID_KEYBOARD_SC_J'),
  ((4, 4), (5, 5), 'HID_KEYBOARD_SC_K'),
  ((4, 4), (5, 16), 'HID_KEYBOARD_SC_L'),
  ((4, 4), (5, 7), 'HID_KEYBOARD_SC_M'),
  ((4, 4), (4, 7), '0'),
  ((4, 4), (5, 12), '0'),
  (-19, None, '0'),
  ((4, 4), (6, 11), 'HID_KEYBOARD_SC_KEYPAD_4_AND_LEFT_ARROW'),
  ((4, 4), (6, 10), 'HID_KEYBOARD_SC_KEYPAD_5'),
  ((4, 4), (6, 9), 'HID_KEYBOARD_SC_KEYPAD_6_AND_RIGHT_ARROW')],
 [((5, 4), (6, 1), 'HID_KEYBOARD_SC_LEFT_SHIFT'),
  ((4, 4), (4, 3), '0'),
  ((4, 4), (3, 13), 'HID_KEYBOARD_SC_W'),
  ((4, 4), (3, 3), 'HID_KEYBOARD_SC_X'),
  ((4, 4), (3, 14), 'HID_KEYBOARD_SC_C'),
  ((4, 4), (3, 4), 'HID_KEYBOARD_SC_V'),
  ((4, 4), (2, 4), 'HID_KEYBOARD_SC_B'),
  ((4, 4), (2, 15), 'HID_KEYBOARD_SC_N'),
  ((4, 4), (3, 15), '0'),
  ((4, 4), (3, 5), '0'),
  ((4, 4), (3, 16), '0'),
  ((4, 4), (2, 7), '0'),
  ((11, 4), (5, 1), 'HID_KEYBOARD_SC_RIGHT_SHIFT'),
  (5, None, '0'),
  ((4, 4), (4, 8), 'HID_KEYBOARD_SC_UP_ARROW'),
  (5, None, '0'),
  ((4, 4), (5, 11), 'HID_KEYBOARD_SC_KEYPAD_1_AND_END'),
  ((4, 4), (5, 10), 'HID_KEYBOARD_SC_KEYPAD_2_AND_DOWN_ARROW'),
  ((4, 4), (5, 9), 'HID_KEYBOARD_SC_KEYPAD_3_AND_PAGE_DOWN'),
  ((4, 8), (5, 8), 'HID_KEYBOARD_SC_KEYPAD_ENTER')],
 [((5, 4), (1, 2), 'HID_KEYBOARD_SC_LEFT_CONTROL'),
  ((5, 4), (6, 6), 'HID_KEYBOARD_SC_LEFT_GUI'),
  ((5, 4), (4, 6), 'HID_KEYBOARD_SC_LEFT_ALT'),
  ((25, 4), (4, 11), 'HID_KEYBOARD_SC_SPACE'),
  ((5, 4), (2, 6), 'HID_KEYBOARD_SC_RIGHT_ALT'),
  ((5, 4), (5, 0), 'HID_KEYBOARD_SC_RIGHT_GUI'),
  ((5, 4), (2, 16), 'HID_KEYBOARD_SC_APPLICATION'),
  ((5, 4), (3, 2), 'HID_KEYBOARD_SC_RIGHT_CONTROL'),
  (-1, None, '0'),
  ((4, 4), (2, 8), 'HID_KEYBOARD_SC_LEFT_ARROW'),
  ((4, 4), (2, 11), 'HID_KEYBOARD_SC_DOWN_ARROW'),
  ((4, 4), (2, 10), 'HID_KEYBOARD_SC_RIGHT_ARROW'),
  (-1, None, '0'),
  ((8, 4), (4, 10), 'HID_KEYBOARD_SC_KEYPAD_0_AND_INSERT'),
  ((4, 4), (4, 9), 'HID_KEYBOARD_SC_KEYPAD_DOT_AND_DELETE')]]


# Just leave this here as-is.
KMAC_key = None

Offline socratisator

  • Thread Starter
  • Posts: 41
  • Location: France
Re: Looking for direction on an uncommon case (probably)
« Reply #21 on: Sat, 26 October 2019, 09:56:46 »
Aqua Key Test says for every key :
 
Dark grey means the key is still pressed, and yellow show the last pressed key... all that with one stroke  :eek:

Offline suicidal_orange

  • * Global Moderator
  • Posts: 4771
  • Location: England
Re: Looking for direction on an uncommon case (probably)
« Reply #22 on: Sat, 26 October 2019, 11:33:10 »
That is strange, those keys aren't connected according to your config file so even if it's wrong they shouldn't activate at the same time.

Is there any chance you crushed your wires on the switch pins causing a short when you closed the case?  That would cause certain keys to register but I can't think of any way of producing a press and release, let alone two.

Oh, one thing I thought I mentioned but just looked back and I didn't - pin D6 is dodgy as it has an LED attached to it.  Column 7 doesn't feature in your problem keys either but probably best to move it.  And then it hit me while looking where you could move it without messing up your tidy wiring - your 'Teensy' may be a fake.  It's very similar and even worked with the official loader when most don't but it's missing the hole next to E4 and E5 and one of the traces that go round the button is missing, among other minor differences, compare the pics 3/4 down this page.  The worst thing about fakes is you never know quite what you get so hopefully I'm wrong and the above fixes it :(
120/100g linear Zealio R1  
GMK Hyperfuse
'Split everything' perfection  
MX Clear
SA Hack'd by Geeks     
EasyAVR mod

Offline socratisator

  • Thread Starter
  • Posts: 41
  • Location: France
Re: Looking for direction on an uncommon case (probably)
« Reply #23 on: Sat, 26 October 2019, 12:36:01 »
I did not put back the plastic case, so crushing the wires is very unlikely.
Is rewiring D6 and D7 to F0 and F1 respectively, acceptable ?
When you say "Column 7 doesn't feature in your problem keys either but probably best to move it" you mean D5 (the 7th element in columns table) ?
I concede, I bougth my teensy2++ on aliexpress, so it's surely unofficial, but feed back were good (here is the link https://www.aliexpress.com/item/32975352827.html?spm=a2g0s.9042311.0.0.3a3a4c4d6wChOQ).
Another thing very, very odd : when I press a key from the macro column on the left side (keys M1 to M5 here https://www.techpowerup.com/img/13-10-15/CM_Storm_Trigger-Z_01.jpg), I get the same behaviour but I didn't even bother finding the matrix for thoses keys even less doing the wiring, I wanted to get rid of them !!!
Is a shortcut can really do that or the fake chip more realistic ? In case of a shortcut, if I post detailled pictures of the board, can someone points the source of the problem ?

Offline suicidal_orange

  • * Global Moderator
  • Posts: 4771
  • Location: England
Re: Looking for direction on an uncommon case (probably)
« Reply #24 on: Sun, 27 October 2019, 05:37:49 »
I meant the column D6 is connected to.  Either I can't count (likely, I'm stupid at the moment due to illness) or you count like a human not a keyboard controller *checks file* phew, it's not me.  As you may have noticed while mapping keys the first column is column 0 so D6 is column 7.

F0 and F1 should be fine as replacements but who knows.  Get the multimeter out and see where the LED is connected - one end will go to 5v or ground and the other to a named pin, and one of those connections will be via a resistor.   The named pin is the one to avoid.

I still can't think of anything that could cause unconnected switches to activate though, especially not the unmapped (macro) keys.  Have you tried shorting a row to a column directly on the teensy?

I don't think pictures will help as usually you're looking for dead keys not randomly activating ones.  I suppose multiple shorts could do it but your soldering looks tidy so not likely.
120/100g linear Zealio R1  
GMK Hyperfuse
'Split everything' perfection  
MX Clear
SA Hack'd by Geeks     
EasyAVR mod

Offline socratisator

  • Thread Starter
  • Posts: 41
  • Location: France
Re: Looking for direction on an uncommon case (probably)
« Reply #25 on: Mon, 28 October 2019, 15:39:40 »
Ok, Im the stupid one and counting like human (reassuring in one sense).
I can confirm that D6 is the I/O linked to the LED so I'll do as stated in my last post.
I've unsoldered the macro keys column and I will wire one key directly into pins F0 and F1 for testing.
I hope you're getting better !

Offline socratisator

  • Thread Starter
  • Posts: 41
  • Location: France
Re: Looking for direction on an uncommon case (probably)
« Reply #26 on: Sat, 02 November 2019, 09:04:10 »
I'm back !
I soldered directly a key into pins E0, E1 (instead of F0, F1, a mistake in my last post). Then edited the python file like this :
    #rows=[F0, F1, F2, F3, F4, F5, F6, F7],
    rows=[F0, F1, F2, F3, F4, F5, F6, E0],
    #cols=[B7, D0, D1, D2, D3, D4, D5, D6, D7, C0, C1, C2, C3, C4, C5, C6, C7],
    cols=[B7, D0, D1, D2, D3, D4, D5, D6, D7, C0, C1, C2, C3, C4, C5, C6, E1],
I substitued F7 for E0 and C7 for E1, so that my extra key "coordonate" is E0 - E1 in the keyboard matrix
Then changed the entry responsible for "F1" in the list keyboard_definition to map a "A" associated with my extra key:
...
  #((4, 4), (1, 3), 'HID_KEYBOARD_SC_F1'),
  ((4, 4), (7, 16), 'HID_KEYBOARD_SC_A'),
...
Once opened in EasyAVR, strangely, the new key shows "O" (I changed the letter to 'HID_KEYBOARD_SC_Z', but it still display 'O' - edited that manually)
Builded then loaded the new firware.
The new key, connected directly to the controller, open the infamous Office windows, AquaKeyTest show the same ALT + Win + Shift + CTRL press simultaneously T_T
Either I've overlooked something obvious, or this is a broken chineese copy of a teensy2++
Got a pro-micro controller bought from a french retailler, i'll try the same thing with it, when I had found some motivation...

Offline suicidal_orange

  • * Global Moderator
  • Posts: 4771
  • Location: England
Re: Looking for direction on an uncommon case (probably)
« Reply #27 on: Sat, 02 November 2019, 10:13:57 »
It showed "O" because you already had an O key in matrix position 7, 16 :)

To confirm it's a dodgy teensy you would need to disconnect all the wires to isolate it completely from the board.

Edit: I'm going to builld/flash your config on a spare Teensy to check it works - if not you can save yourself the hassle

Edit 2: Built the config as above, the LED lights up brightly but shorting the pins for F1 and F2 they both worked like they should.  Either it's your wiring or the Teensy :(
« Last Edit: Sat, 02 November 2019, 10:25:35 by suicidal_orange »
120/100g linear Zealio R1  
GMK Hyperfuse
'Split everything' perfection  
MX Clear
SA Hack'd by Geeks     
EasyAVR mod

Offline socratisator

  • Thread Starter
  • Posts: 41
  • Location: France
Re: Looking for direction on an uncommon case (probably)
« Reply #28 on: Sat, 02 November 2019, 12:43:11 »
Hello again, indeed (7,16) is already used for 'O' key, my bad.
Thanks for the check of the configuration :)
Is it really possible to **** up the wiring with that kind of assembly  :mad:

Offline suicidal_orange

  • * Global Moderator
  • Posts: 4771
  • Location: England
Re: Looking for direction on an uncommon case (probably)
« Reply #29 on: Sat, 02 November 2019, 15:18:10 »
Your wiring looks fine, it would have to be something stupid and strange to activate the keys it is.  But it would also take a very strange problem in the design of the wannabe teensy for the same reason - what you're seeing makes no sense.  Have you checked for shorts where the chip is soldered on?

Actually random thought - I guess you're using the latest version of EasyAVR while mine is at least a year old so I've attached my hex.  No harm in trying it, though it is exactly as posted above so D6 is in and the number row is blank so while F1 and F2 work it won't be usable :))
120/100g linear Zealio R1  
GMK Hyperfuse
'Split everything' perfection  
MX Clear
SA Hack'd by Geeks     
EasyAVR mod

Offline socratisator

  • Thread Starter
  • Posts: 41
  • Location: France
Re: Looking for direction on an uncommon case (probably)
« Reply #30 on: Mon, 04 November 2019, 12:16:17 »
I stare closely at the chip and nothing looks like a shortcut to me. Also loaded your hex file and the behaviour is the same  :(
I'm using the latest version of easyAVR.
Maybe I can submit this enygma in the Mettaliqaz thread dedicated to EasyAVR, as you suggested earlier. I'm so jaded right now...

 

Offline suicidal_orange

  • * Global Moderator
  • Posts: 4771
  • Location: England
Re: Looking for direction on an uncommon case (probably)
« Reply #31 on: Mon, 04 November 2019, 13:07:06 »
I'm tempted to send you my Teensy but then I wouldn't have one to help the next person so it's not a good idea.

I suppose you could get/borrow a programmer to return your not-teensy to the standard Atmel bootloader then in theory it would work.  Don't suppose you have a Raspberry Pi?

You could post in the EasyAVR thread and someone may know whether the memory that's supposed to store keyprosses could be filled with dodgy bootloader (the name Teensy comes from their impressively small bootloader which fakes don't have) but it might be better in a separate thread so experts on the chip rather than EasyAVR look at it.  Making Stuff Together! is where such people look...
120/100g linear Zealio R1  
GMK Hyperfuse
'Split everything' perfection  
MX Clear
SA Hack'd by Geeks     
EasyAVR mod

Offline socratisator

  • Thread Starter
  • Posts: 41
  • Location: France
Re: Looking for direction on an uncommon case (probably)
« Reply #32 on: Mon, 04 November 2019, 13:59:28 »
I may be keen but you surely are kind !
I've got a Pro micro with the exact same chip that I bought from a french retailer. what do you have in mind with a Raspberry Pi ?
I'll start a separate thread on this peculiar problem.
One last question: you're from England, where did you bought you teensy2++ ? The 25$ shipping is quite deterant.

Offline suicidal_orange

  • * Global Moderator
  • Posts: 4771
  • Location: England
Re: Looking for direction on an uncommon case (probably)
« Reply #33 on: Mon, 04 November 2019, 16:44:56 »
You can use the Raspberry Pi as a flasher to change the bootloader, then the teensy definitely won't be a Teensy but you should be able to tell EasyAVR that and get it working.  Actually you could try that with the teensy as it is - you never know.  Set 'Teensy = false' in the config file then build and flash.  Though actually the Teensy flasher may well refuse to flash it as it's notwhat it's expecting.  No harm in trying!

Pro Micros are usually small and have less pins than a standard Teensy so once again you've got yourself a funny one, pretty sure there is no standard for them though.  You can always flash and test it by shorting pins before soldering it to the keyboard, hopefully the site has instructions.

I got my Teensys from an electronic hobby site in the UK, I'll check where when I get home.

Edit:  I got my last one from hobbytronics, just had a look and they have stock and shipping to France is a bit cheaper than $25 as long as you don't want it tomorrow.
« Last Edit: Mon, 04 November 2019, 17:52:30 by suicidal_orange »
120/100g linear Zealio R1  
GMK Hyperfuse
'Split everything' perfection  
MX Clear
SA Hack'd by Geeks     
EasyAVR mod

Offline socratisator

  • Thread Starter
  • Posts: 41
  • Location: France
Re: Looking for direction on an uncommon case (probably)
« Reply #34 on: Mon, 11 November 2019, 02:32:07 »
Hello,
I tried the setting "Teensy =False" with the same result. I don't see any reason for the EasyAVR code to fail as miserably as that. The code has been used by thousands of people by now. The only 2 "explainations" I can think of are :
- faulty teensy++ 2.0
- "custom" teensy++ 2.0 that mess up with the EasyAVR code
I'm planing to investigate point 1 by loading code and check if it behaves as an official teensy using only the setup I've got : that means only push button.
At least the basic "blink" program works - and it has allowed me to confirm that PIN 6 is the LED - but I'll need to lean a bit of AVR programing.
For point 2, I was wondering if I can use the debugger of the Arduino GUI with the code of EasyAVR to search for the root cause of this crazy behaviour.

Offline suicidal_orange

  • * Global Moderator
  • Posts: 4771
  • Location: England
Re: Looking for direction on an uncommon case (probably)
« Reply #35 on: Mon, 11 November 2019, 04:57:30 »
The diodes and switch matrix are optional  - for testing shorting any row pin to a column pin with a bit of wire will register the key as pressed, though buttons in a breadboard are much easier.  The annoying part is you need to desolder it to confirm it's not an interaction with the PCB (explanation 3 - this behaviour is similar to the old controller?)  Teensy = false was checking for point 2, though it could be 1 and 2.  Or even 1, 2 and 3...

There is a 'plugin' (not sure that's what they call them) called teensyduino that allows you to use a Teensy in the Arduino GUI but EasyAVR is not written in Arduino language so the debugger can't help.  We know the code is good anyway as it runs on my Teensy.

There is code available for a basic HID keyboard in Arduino, you only need to map a handfull of keys to test.  Use some from each letter pin name (though you'll need to refer to them as Arduino pin numbers, just to make it a bit more fun!) as they're grouped in hardware.  D is at least partially working as blink works so D to other letters would be a good place to start.  You could try this before desoldering and maybe as it's a fullsize board it will even be good enough?!
120/100g linear Zealio R1  
GMK Hyperfuse
'Split everything' perfection  
MX Clear
SA Hack'd by Geeks     
EasyAVR mod

Offline socratisator

  • Thread Starter
  • Posts: 41
  • Location: France
Re: Looking for direction on an uncommon case (probably)
« Reply #36 on: Mon, 11 November 2019, 16:08:05 »
Quote
for testing shorting any row pin to a column pin with a bit of wire will register the key as pressed
what I did on post #28 is not what you had in mind by saying that ?
I remember that at first, the keyboard send letters without any typing, and later it launched Firefox (no aqua key test back then), not exactly the same sympatoms but not entirely different...
Browsed the examples provided with the Arduino GUI, it seems a good start, but I keep asking myself : what could explain the result I get with the assembly on post #28 (no PCB, only direct link to Teensy) ?

Offline suicidal_orange

  • * Global Moderator
  • Posts: 4771
  • Location: England
Re: Looking for direction on an uncommon case (probably)
« Reply #37 on: Mon, 11 November 2019, 16:31:48 »
#28 is close but the teensy is still soldered to the board so if keys are randomly activating or there's a short it could effect the separate switch.  Either you need to disconnect all the wires or change the firmware so it only uses pins which aren't attached in addition to the ones soldered directly to the switch.
120/100g linear Zealio R1  
GMK Hyperfuse
'Split everything' perfection  
MX Clear
SA Hack'd by Geeks     
EasyAVR mod

Offline socratisator

  • Thread Starter
  • Posts: 41
  • Location: France
Re: Looking for direction on an uncommon case (probably)
« Reply #38 on: Tue, 12 November 2019, 15:28:20 »
I lack the motivation to unsolder all the wires, so I chosed the second option.
Edited the python file like so :
Code: [Select]
...
num_rows = 1
num_cols = 1
...
matrix_hardware, matrix_strobe, matrix_sense = make_matrix_config(
    strobe_cols=strobe_cols,
    strobe_low=strobe_low,
     rows=[E0],
     cols=[E1],
    device=firmware.device
)
...
keyboard_definition = [[((4, 4), (0, 0), 'HID_KEYBOARD_SC_A')]]

I kept only pins E0 and E1 on which is connected the lone key. Loaded the code and pressed : ALT + WIN + SHIFT + CTRL
T_T

I also messed up with the Arduino exemple "KeyboardMessage", set buttonPin to 8 (equivalent to E0 as per the documentation) in order to test if once shorted, the message "You pressed the button X times." was displayed correctly.
The thing is, message was written randomly without even doing anything which means that pin 8/E0 changed state from HIGH to LOW on its own...

Offline suicidal_orange

  • * Global Moderator
  • Posts: 4771
  • Location: England
Re: Looking for direction on an uncommon case (probably)
« Reply #39 on: Wed, 13 November 2019, 19:24:09 »
The thing is, message was written randomly without even doing anything which means that pin 8/E0 changed state from HIGH to LOW on its own...
Pins will do this randomly, that's why there's a resistor in the example circuit tying the input pin to GND.  It's also expecting the other end to be connected to 5v not another pin so you either need to move it or ensure EO is high by adding this under the other pinMode:

Code: [Select]
pinMode(ledPin, OUTPUT);
digitalWrite(9, HIGH);

Assuming it does trigger when you press the switch (even if it also triggers randomly due to the missing resistor) I'd call it a success, then you can move on to testing the main matrix using something like this.  Start off with a couple of rows and columns then keep adding more until something strange happens.  Take note which way the example diodes are facing in the example, if they're the other way round you may need to swap your rows and columns.
120/100g linear Zealio R1  
GMK Hyperfuse
'Split everything' perfection  
MX Clear
SA Hack'd by Geeks     
EasyAVR mod

Offline socratisator

  • Thread Starter
  • Posts: 41
  • Location: France
Re: Looking for direction on an uncommon case (probably)
« Reply #40 on: Sat, 16 November 2019, 05:15:30 »
I went several posts back : as you stated, I unsoldered the controler and plugged the 'A' key directly to the teensy, in pins F7 and F4, as shown in the pictures.

Edited the firmware :
Code: [Select]
matrix_hardware, matrix_strobe, matrix_sense = make_matrix_config(
    strobe_cols=strobe_cols,
    strobe_low=strobe_low,
    rows=[F0, F1, F2, F3, F4, F5, F6, C7],
    cols=[B7, D0, D1, D2, D3, D4, D5, D6, D7, C0, C1, C2, C3, C4, C5, C6, F7],
    device=firmware.device
)
Pins (F4/F7) means (4,16) in the matrix.
Code: [Select]
...
((4, 4), (4, 16), 'HID_KEYBOARD_SC_A'),
...
Build, load, as usual "ALT + WIN + SHIFT + CTRL" pops up in AquaKeyTest.
At this point, I can consider my teensy broken. I'll try next with my Pro Micro but I'm near the braking point...and my old keyboard breaking point (in two) too.

Offline suicidal_orange

  • * Global Moderator
  • Posts: 4771
  • Location: England
Re: Looking for direction on an uncommon case (probably)
« Reply #41 on: Sat, 16 November 2019, 08:05:16 »
You don't need to solder anything to test the controller, touching a wire between the two pins does the same thing as a switch.  The voltage/current is so low there's no risk.  Flash your interesting Pro Micro and try a couple of 'keys' like this before soldering anything, that should keep the board in one piece.
120/100g linear Zealio R1  
GMK Hyperfuse
'Split everything' perfection  
MX Clear
SA Hack'd by Geeks     
EasyAVR mod

Offline socratisator

  • Thread Starter
  • Posts: 41
  • Location: France
Re: Looking for direction on an uncommon case (probably)
« Reply #42 on: Sun, 17 November 2019, 15:05:39 »
Thanks for the intel  :thumb:
I managed to get my Pro Micro to work with the demo program from SparkFun found here (https://www.sparkfun.com/tutorials/337). I can load the code from Arduino IDE, but I'm stuck when it comes to load the hex file from Easy AVR.
This thread from the Arduino Forum explains how to do that : https://forum.arduino.cc/index.php?topic=410618.0
Sadly, once in command line, avrdude does not see the board, whereas Arduino IDE displays "SparkFun Pro Micro on COM4".
Code: [Select]
PS C:\Users\nihilist> C:\Users\nihilist\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/bin/avrdude -CC:\Users\nihilist\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf -v -patmega32u4 -cavr109 -PCOM4 -b57600 -D -Uflash:w:"C:\Users\nihilist\Documents\Clavier\Easy AVR\CM storm test.hex":i

avrdude.exe: Version 6.3-20190619
             Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
             Copyright (c) 2007-2014 Joerg Wunsch

             System wide configuration file is "C:\Users\nihilist\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf"

             Using Port                    : COM4
             Using Programmer              : avr109
             Overriding Baud Rate          : 57600
avrdude.exe: ser_open(): can't open device "\\.\COM4": The system cannot find the file specified.


avrdude.exe done.  Thank you.
Is there another tool to load hex file into a SparkFun Pro Micro clone ? Or maybe select another "Programmer" (here "avr109") ?


Offline suicidal_orange

  • * Global Moderator
  • Posts: 4771
  • Location: England
Re: Looking for direction on an uncommon case (probably)
« Reply #43 on: Sun, 17 November 2019, 16:24:57 »
As I mentioned above Pro Micros are small and use the ATMEGA32u4 which I see is in your command, yours uses a different chip so it's not going to work.  What are the correct options for your fun chip?  I have no idea, but this post claims to show you what the GUI does so you can copy the command.
120/100g linear Zealio R1  
GMK Hyperfuse
'Split everything' perfection  
MX Clear
SA Hack'd by Geeks     
EasyAVR mod

Offline socratisator

  • Thread Starter
  • Posts: 41
  • Location: France
Re: Looking for direction on an uncommon case (probably)
« Reply #44 on: Mon, 18 November 2019, 04:02:23 »
That's exactly what I did in my last post. The tricky part was to enter bootloader mode which is different compare to the official Sparkfun Pro Micro.
After trial and error, I found the right timing between release "GRD + RST" on the board and "ENTER" the command in PowerShell.
At first, I saw some writing progress bar then everything goes awry...
Code: [Select]
***failed;
 ***failed;
 ***failed;
 ***failed;
 ***failed;
 ***failed;
 ***failed;
 ***failed;
 ***failed;
avrdude.exe: Error: butterfly programmer uses avr_write_page() but does not
provide a cmd() method.

 ***failed;
 ***failed;
 ***failed;
 ***failed;
Now, my Pro Micro display a green led when plugged but is nothing else (no sound, not visible in device manager, not visible in Arduino IDE).
I know I've abused of you time already, but could you try loading the HEX file I builded in your teensy (I already know that your HEX file is not working for me).
Thanks again.

Offline suicidal_orange

  • * Global Moderator
  • Posts: 4771
  • Location: England
Re: Looking for direction on an uncommon case (probably)
« Reply #45 on: Mon, 18 November 2019, 04:16:07 »
Is this hex teensy = true or false?  I'm really surprised it even started to flash either way when the command says ATMEGA32U4 which is not the right chip...

As on the Teensy you need to find which pin the LED is on and not use it in your matrix or it could cause problems.

My time is worthless so don't worry about that, I'll test it tonight if not before :)
120/100g linear Zealio R1  
GMK Hyperfuse
'Split everything' perfection  
MX Clear
SA Hack'd by Geeks     
EasyAVR mod

Offline socratisator

  • Thread Starter
  • Posts: 41
  • Location: France
Re: Looking for direction on an uncommon case (probably)
« Reply #46 on: Mon, 18 November 2019, 04:39:17 »
I build another HEX file with the "teensy = True" parameter and removing D6 (LED) from the matrix.
Waiting for your reply about the behaviour of your chip  :rolleyes:

Offline suicidal_orange

  • * Global Moderator
  • Posts: 4771
  • Location: England
Re: Looking for direction on an uncommon case (probably)
« Reply #47 on: Tue, 19 November 2019, 18:27:25 »
Interesting, your Teensy = True hex loaded and makes my Teensy appear as many HID devices in device manager, but shorting pins I can't get it to output any keys.  I can't test the Teensy = False one which you need to use though, because I only have a Teensy...

Reading around it seems the command you should have used is this (note the bold 'part'), does your reset button work to try and run it?

PS C:\Users\nihilist> C:\Users\nihilist\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/bin/avrdude -CC:\Users\nihilist\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf -v -pusb1286 -cavr109 -PCOM4 -b57600 -D -Uflash:w:"C:\Users\nihilist\Documents\Clavier\Easy AVR\CM storm test.hex":i
120/100g linear Zealio R1  
GMK Hyperfuse
'Split everything' perfection  
MX Clear
SA Hack'd by Geeks     
EasyAVR mod

Offline suicidal_orange

  • * Global Moderator
  • Posts: 4771
  • Location: England
Re: Looking for direction on an uncommon case (probably)
« Reply #48 on: Tue, 19 November 2019, 19:48:59 »
Just had a thought, maybe your Teensy = false hex is broken too so I've attached mine.  All keys are filled in but it's still using D6 as I forgot about it.

It might be worth asking in the EasyAVR thread if this chip not on a Teensy is supposed to work too though can't see why it wouldn't.
120/100g linear Zealio R1  
GMK Hyperfuse
'Split everything' perfection  
MX Clear
SA Hack'd by Geeks     
EasyAVR mod

Offline socratisator

  • Thread Starter
  • Posts: 41
  • Location: France
Re: Looking for direction on an uncommon case (probably)
« Reply #49 on: Wed, 20 November 2019, 08:43:34 »
My Pro Micro seems completly dead (reset sequence is not working and the board is not even visible in Arduino GUI), searches indicate that I'll need a dedicated chip or an Arduino to rewrite a bootloader. A friend of mine got one, I'll ask next time I see him.
Thanks for the command line, it wil make a nice epitaph ;D (saved it on my notes too)
Your new HEX file produce the same behaviour : the nefarious "ALT + WIN + SHIFT + CTRL"
All leads point toward a clone chip that is not really a clone, but I'll try the EasyAVR thread just to be sure.
Edit: I bought another teensy++ 2 to a french reseller this time, maybe I'll be a bit more lucky, but if it shows the same behaviour I send it back right away.