plaid icon indicating copy to clipboard operation
plaid copied to clipboard

Help with build, keyboard or usbasp not appearing on my connected devices

Open miguelangelramirez opened this issue 6 years ago • 24 comments

Hey guys, I managed to solder all the components into the PCB including switches. Currently trying to burn the bootloader from my mac but have had no luck just yet.

Should LEDs turn on once connected?

I've used the direction in the bootloader.md file and also in the _alpha file with no luck :( can somebody point me in the direction that I can burn the bootloader and then load the qmk firmware?? THANKS!

miguelangelramirez avatar Jun 06 '19 01:06 miguelangelramirez

Hi,

LED is not turn on when connected.

Could you check soldering and the directions of component again?

hsgw avatar Jun 06 '19 02:06 hsgw

Double checked the soldering, thought I saw a bridge on the capacitor but there was no bridge at all plaid_IMG_8919

miguelangelramirez avatar Jun 06 '19 02:06 miguelangelramirez

Are you using the ISP header? Which device you use, to burn the bootloader on the chip? Check also https://github.com/baerwolf/USBaspLoader/issues/19

BenRoe avatar Jun 06 '19 15:06 BenRoe

I'm plugging the keyboard to my computer through USB, should I use the ISP header to burn the bootloader?? I could also use my other Arduino Uno to program it, maybe will try that tonight.

miguelangelramirez avatar Jun 06 '19 15:06 miguelangelramirez

Do you bought the kit via the original GB or keycapsss.com? If yes, the bootloader is already burned and you only have to follow the firmware steps.

BenRoe avatar Jun 06 '19 16:06 BenRoe

I ordered my PCB from jlcpcb since I couldn't get a kit, I know I suck.

miguelangelramirez avatar Jun 06 '19 16:06 miguelangelramirez

I've bought the kit from the GB, but even after another check to both soldering and schematics my pc (both windows and Linux) won't notice that a new device has been connected to it.

Could it be that the atmega is not working properly? How do I check that?

marsicplusplus avatar Jun 06 '19 16:06 marsicplusplus

Ok, i can give you some tips, but can't explain the whole process. You need a ISP Flasher like the usbtinyisp (cheap on ebay or aliexpress). Connect the usbtinyisp via usb to the pc. Connect usbtinyisp to plaid via isp header. Use avrdudess (gui for avrdude) on windows. It's easier.

Use yellow marked settings, but replace it for the following settings. L (LFUSE): 0xF7 H (HFUSE): 0xD0 E (EFUSE): 0x04 avrdudess

BenRoe avatar Jun 06 '19 16:06 BenRoe

Wow, thank you very much, this was way more than I expected from you!

I'll try this as soon as possible, thanks!

marsicplusplus avatar Jun 06 '19 17:06 marsicplusplus

Ok, i can give you some tips, but can't explain the whole process. You need a ISP Flasher like the usbtinyisp (cheap on ebay or aliexpress). Connect the usbtinyisp via usb to the pc. Connect usbtinyisp to plaid via isp header. Use avrdudess (gui for avrdude) on windows. It's easier.

Use yellow marked settings, but replace it for the following settings. L (LFUSE): 0xF7 H (HFUSE): 0xD0 E (EFUSE): 0x04 avrdudess

That is awesome!! sadly they take some time to delivery and I'm moving to LA soon :(. I'll order one when I get my new address, but still try to load it with my Arduino Uno/breadboard...I think I have all the parts just laying round.

Thanks bro!

miguelangelramirez avatar Jun 06 '19 17:06 miguelangelramirez

I've tried flashing the bootloader with the USBTiny programmer with no luck at all.

The most weird thing is that avrdude is successful in writing the bootloader even if the board isn't officially in DFU mode (success either after or before pressing the buttons).

marsicplusplus avatar Aug 07 '19 15:08 marsicplusplus

here's how I got it to work. 1, open plaid_default.hex in text editor, remove last line :00000001FF 2, append usbasp bootloader on to end 3, flash using teensy 2.0 with qmk isp flashing guide avrdude -c avrisp -p m328p -P /dev/ttyACM0 -b19200 -U flash:w:plaid_default.hex avrdude -c usbasp -b19200 -p m328p one efuse didn't write but it wasn't important(low voltage protection). then make plaid:default:program to program normally over usb. the issue seems to be that an incorrect baud rate was used.

itsnoteasy avatar Feb 09 '20 14:02 itsnoteasy

If you use a newer qmk firmware, then use make plaid:default:flash and not plaid:default:program.

BenRoe avatar Feb 09 '20 16:02 BenRoe

I was having difficulty entering the bootloader and i'd like to note the docs are wrong. the correct procedure is: Enter bootloader mode

Push and hold BOOT SW
Plug into USB cable
Release BOOT SW
make plaid:flash
Push and release RESET SW

itsnoteasy avatar May 28 '20 18:05 itsnoteasy

I was having difficulty entering the bootloader and i'd like to note the docs are wrong. the correct procedure is: Enter bootloader mode

Push and hold BOOT SW
Plug into USB cable
Release BOOT SW
make plaid:flash
Push and release RESET SW

This worked for my kit ordered from mechboard (preflashed I guess)

denisinvader avatar Aug 28 '20 19:08 denisinvader

@itsnoteasy, would you mind elaborating? Are you using the main.hex file from the plaid fork of the USBaspLoader repository? In step 2, which file contents do you append to the bottom of it? I'm trying to use avrdudess in Linux (using mono), with an Arduino nano as a programmer but not having any success. My settings are below but I think the main issue is the hex file. image

Daveyr avatar Jan 06 '21 22:01 Daveyr

that's correct, step 2 is copy paste the ascii from this file https://github.com/hsgw/USBaspLoader/blob/plaid/firmware/main.hex I don't know what the error is with your setup but it could be using the nano for programming isp. a teensy 2.0 would have a lower learning curve.

itsnoteasy avatar Jan 06 '21 22:01 itsnoteasy

Thanks for the clarification. So I combine the hex file generated from qmk (mine is called dm9records_plaid_default.hex) with the main.hex from the file you reference above into one file (removing the last line from the first file - contains :00000001FF)? I've named this plaid_bootloader.hex and managed to upload it using an arduino nano using the following command:

avrdude -u -c arduino -p m328p -P /dev/ttyUSB0 -b 115200 -U flash:w:"/home/ubuntu/Documents/projects/keyboards/plaid/bootloader/plaid_bootloader.hex":a -U lfuse:w:0xF7:m -U hfuse:w:0xD0:m -U efuse:w:0x04:m

However, it complains about the efuse setting.

avrdude: 1 bytes of efuse written avrdude: verifying efuse memory against 0x04: avrdude: load data efuse data from input file 0x04: avrdude: input file 0x04 contains 1 bytes avrdude: reading on-chip efuse data:

Reading | ################################################## | 100% 0.01s

avrdude: verifying ... avrdude: verification error, first mismatch at byte 0x0000 0xfc != 0x04 avrdude: verification error; content mismatch

avrdude done. Thank you.

Incidentally, this is exactly the same error I find when I burn the bootloader using Arduino software. I created a new board definition with the fuse settings you showed above and the error message was almost identical.

It is also the same error I get when I take the plaid firmware repo and run:

make
make flash
make fuse

When I remove all the settings relating to fuses then the flash seems to go through fine and my red led on the keyboard lights up. However, the board isn't recognised. Either way, when I run avrdude -c arduino -p m328p it says that no such device is connected. Any ideas?

Daveyr avatar Jan 09 '21 20:01 Daveyr

After much trial and error I think I've worked it out. I wrote a blog post here but the summary is below.

First upload the standard avrisp example sketch to the Arduino Nano. Note, the default baud rate is 19200. Using the method described above to make the hex file, I entered the following in a terminal on a pc connected to the Arduino, in turn connected to the ISP headers on the keyboard.

avrdude -u -c avrisp -p m328p -P /dev/ttyUSB0 -b 19200 -U flash:w:"plaid_default.hex":a -U lfuse:w:0xF7:m -U hfuse:w:0xD0:m -U efuse:w:0xfc:m

Notes.

  1. When burning the bootloader you need a 10nF capacitor across GND and RST pins on the Arduino Nano (no need for other Arduino types)
  2. The programmer is actually avrisp rather than arduino
  3. The efuse setting in the plaid firmware repo is wrong; it should be 0xfc
  4. I had to disconnect the Arduino from the keyboard in order for it to be properly detected

Daveyr avatar Feb 01 '21 21:02 Daveyr

Hi all! I am having the same problem as originally described in this thread: I soldered everything seemingly correctly and yet the keyboard isn't detected by my WIndows PC in the device manager. It just lists it as an unrecognized USB device. I followed the guide and installed the libusBK driver and was using button press combinations from the OG guide and what was reccomended by @denisinvader , and yet it stil isn't recognized. Does anyone of you have any ideas what I should do? I bought the kit from mechboards.co.uk and it is supposed to have firmware preflashed onto the ATmega ship.

MrCrazyUkrainian avatar May 27 '21 18:05 MrCrazyUkrainian

Was the board in bootloader mode when you installed libusbk in zadig? It should show up as "usbasp" for the device if done correctly.

I made the mistake of installing libusbk as the device driver instead of the bootloader and had the same issue as you did.

Link to the QMK zadig guide

chief-teep avatar Jun 04 '21 16:06 chief-teep

Update on my troubles. They are now resolved. Solder USB connector carefully and check multiple times that all the pins have continuity to the corresponding components, as in my case one of the data lines wasn’t soldered properly (solder pad split) and that was the cause of everything. After plonking a bit of solder onto that problematic joint everything works fine. Admittedly it took me and MechBoards UK support staff way too much time to figure out. As of now it works, I just need to figure out how to solder all the switches so that that are all properly aligned as I bought 3 pin ones (and I am a bit of a perfectionist) :/

MrCrazyUkrainian avatar Jun 04 '21 18:06 MrCrazyUkrainian

Glad you got it sorted! Don't feel too bad about it taking so long to figure out, I flashed a keymap to my plaid using the newest qmk version and it was bricked for 2 months before I figured out that I needed to use an older release -_-

chief-teep avatar Jun 04 '21 19:06 chief-teep

Late to the party. I could not program the chip with USB ISP programmer, and I ended up using a Raspberry Pi instead. The All of my programmers, although they showed uploaded successfully (tried on macOS), did not apparently upload the bootloader to my cheap atmega328p.

The issue for me was both for Plaid and Lumberjack, which apparently is quite similar in terms of technicality.

Ardakilic avatar Apr 28 '22 20:04 Ardakilic