Not able to update firmware on Ergodox keyboard on OpenSuse 42.3 Leap

Status
Not open for further replies.
I'm able to update the firmware on Windows 10 but not openSuse.

I've followed the instructions here for linux in general https://www.pjrc.com/teensy/loader_linux.html

Running these commands

Code:
user@linux:~> echo 'UBSYSTEM=="usb_device", SYSFS{idVendor}=="16c0", SYSFS{idProduct}=="0478", MODE="0666"' > /tmp/49-teensy.rules
user@linux:~> cat /tmp/49-teensy.rules UBSYSTEM=="usb_device", SYSFS{idVendor}=="16c0", SYSFS{idProduct}=="0478", MODE="0666"
user@linux:~> sudo cp /tmp/49-teensy.rules /etc/udev/rules.d/49-teensy.rules
user@linux:~> sudo cat /etc/udev/rules.d/49-teensy.rules
UBSYSTEM=="usb_device", SYSFS{idVendor}=="16c0", SYSFS{idProduct}=="0478", MODE="0666"
user@linux:~> cd Downloads/
user@linux:~/Downloads> tar xvzf teensy_linux64.tar.gz
libpng12.so.0
libusb-0.1.so.4
teensy
user@linux:~/Downloads> ./teensy &
[1] 28805
user@linux:~/Downloads>

then restarting the computer. When I run the teensy tool, upload a HEX file then reset the ergodox keyboard (similar to this video tutorial for Windows) https://www.youtube.com/watch?v=9PyiGUO9_KQ The keyboard just turns off instead of resetting like on Windows and the new firmware is also not uploaded into the keyboard.
 
If you are 'reseting' by poking the paperclip in again, that'll just trigger programing mode again but either case should get the code in. Most likely problem is they've used a clone Teensy inside the keyboard with an incompatible bootloader going off a previous poster. That said you can enable verbose mode on the teensy downloader to find out more on what it thinks it's doing during the download process.
 
If you are 'reseting' by poking the paperclip in again, that'll just trigger programing mode again but either case should get the code in. Most likely problem is they've used a clone Teensy inside the keyboard with an incompatible bootloader going off a previous poster. That said you can enable verbose mode on the teensy downloader to find out more on what it thinks it's doing during the download process.

The teensy tool does work when I am on a Windows 10 computer, does that still mean the bootloader is incompatible though? The output in the logs (when clicking Verbose Information) is

Code:
14:45:20.070: Teensy Loader 1.33, begin program
14:45:20.079: File "ergodox_ez_firmware_krponb_default.hex". 24122 bytes, 37% used
14:45:20.080: Listening for remote control on port 3149
14:45:20.080: initialized, showing main window
14:45:20.480: HID/linux: bus "002", device "002" vid=8087, pid=8001, ver=0000
14:45:20.480: HID/linux: bus "001", device "002" vid=8087, pid=8009, ver=0000
14:45:26.058: Verbose Info event
14:45:34.238: Auto Button event
14:45:34.238: Auto mode: enabled

After paperclipping to reset the keyboard, no additional logs are added to the logs
 
Yup, there's an S missing at the start in the OP's udev rule (but there might be other errors there too).

I like to use
Code:
..., ENV{ID_MM_DEVICE_IGNORE}="1", GROUP="developers", MODE="0660"
on centrally-maintained Debian/Ubuntu/Mint laptops, where developers (i.e., everyone except relatively untrusted guest users) belong to the developers group.

The ENV{ID_MM_DEVICE_IGNORE}="1" is nowadays sufficient to make ModemManager keep its annoying little mittens off the device. (Here, the Powers That Be, you see, require modemmanager on these laptops, so purging/removing it is not an option.)

(I have a number of devices combined into the same rule file, from Teensy 2.0's onwards. Makes maintenance easier. Certain devices even have an additional ,SYMLINK+="device-symlink-name" to add stable device names, when doing bare-metal/non-Arduino-environment development.)
 
Use the recommended udev rules file:

https://www.pjrc.com/teensy/49-teensy.rules

This is *not* the same....

So those values cam from https://www.pjrc.com/teensy/loader_linux.html, is that page deprecated now? How did those instructions work before? I know you guys aren't affiliated with ergodox at all I'm just surprised that page is there and why it's not working. Those instructions are linked from the ergodox configurator here http://configure.ergodox-ez.com/keyboard_layouts/new which I find surprising if they never worked
 
Sorry, could you help point to where the missing `S` is?
On the very first line. It is SUBSYSTEM, not UBSYSTEM.

Hey, Paul: Care to fix the screenshot?
linux_loader_1.png


To install the 49-teensy.rules, I suggest

Code:
( sudo rm -f /tmp/49-teensy.rules /etc/udev/rules.d/49-teensy.rules &&
  wget -O /tmp/49-teensy.rules https://www.pjrc.com/teensy/49-teensy.rules && 
  sudo install -o root -g root -m 0664 /tmp/49-teensy.rules /lib/udev/rules.d/49-teensy.rules &&
  sudo service udev reload && echo "Success." )

instead. You can just copy and paste it to a command line; it will still work, even though it is multiple lines.

(The && mean each following command is only run if the preceding one succeeds, and it's all in parentheses (run in a subshell) so that if you copy and paste it, you can write more than one line, but the entire stanza is only run when you close the parens. Also, I forgot the details, but I seem to recall having ... issues ... with udev rules in /etc/udev/rules.d/, while succeeding with the distro default of /lib/udev/rules.d/. I could remember wrong, though. )
 
Last edited:
So those values cam from https://www.pjrc.com/teensy/loader_linux.html, is that page deprecated now? How did those instructions work before? I know you guys aren't affiliated with ergodox at all I'm just surprised that page is there and why it's not working. Those instructions are linked from the ergodox configurator here http://configure.ergodox-ez.com/keyboard_layouts/new which I find surprising if they never worked

Are you saying you're unwilling to even try the udev rules PJRC recommends?
 
Are you saying you're unwilling to even try the udev rules PJRC recommends?

It's not that I am unwilling, I'm completely open to using the proper instructions. It's just hard to tell which instructions are the correct ones. That page ( https://www.pjrc.com/teensy/loader_linux.html ) was also on PJRC's website and, as such, could also be considered 'recommended'.

I'll give both ways a try. As a beginner it's hard for me to tell which is the real "recommended" way to do this as ergodox linked to the problematic link.
 
Code:
( sudo rm -f /tmp/49-teensy.rules /etc/udev/rules.d/49-teensy.rules &&
  wget -O /tmp/49-teensy.rules https://www.pjrc.com/teensy/49-teensy.rules && 
  sudo install -o root -g root -m 0664 /tmp/49-teensy.rules /lib/udev/rules.d/49-teensy.rules &&
  sudo service udev reload && echo "Success." )

Worked. Thank you Nominal Animal!!! Actually the command `sudo service udev reload` results in the error
Code:
service: no such service udev
but after rebooting the next day the teensy tool works!
 
Ah, right. (I so hate the systemd developers for breaking every interface they get their dirty little hands on; they seem so very dedicated to subverting everything they can.)

To download the official 49-teensy.rules from pjrc.com and install into /lib/udev/rules.d/ ,
Code:
( sudo rm -f /tmp/49-teensy.rules /etc/udev/rules.d/49-teensy.rules /lib/udev/rules.d/49-teensy.rules &&
  wget -O /tmp/49-teensy.rules https://www.pjrc.com/teensy/49-teensy.rules && 
  sudo install -o root -g root -m 0664 /tmp/49-teensy.rules /lib/udev/rules.d/49-teensy.rules &&
  sudo udevadm control --reload-rules &&
  sudo udevadm trigger &&
  echo "Success" )
should do the trick.

As an explanation, the first line removes the existing rules file, if any. The second line uses wget to download the rules from pjrc.com. The third line copies it to /lib/udev/rules.d, setting the owner, group, and mode to safe and sane values. The next two lines (one line in the earlier version) tells udev, the device monitoring service, to reload its rules, and make them effective immediately. The final line is only run if all the previous lines succeeded, and prints Success. so the user knows it worked.

The installation instructions at the Teensy Loader / Linux page does not explicitly tell you how to download the rules file, and only tells you to install it with sudo cp 49-teensy.rules /etc/udev/rules.d/ . That works too, but I prefer to use the install utility instead.
 
I've edited the PJRC udev rules file, to add a link to this thread in the comments. Hopefully that will help anyone else who wishes to use this alternate install approach.
 
Status
Not open for further replies.
Back
Top