Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
miguelangelramirez opened this issue Jun 6, 2019 · 24 comments

Comments

@miguelangelramirez
Copy link

miguelangelramirez commented Jun 6, 2019

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 miguelangelramirez changed the title Help with build Help with build, keyboard or usbasp not appearing on my connected devices Jun 6, 2019
@hsgw
Copy link
Owner

hsgw commented Jun 6, 2019

Hi,

LED is not turn on when connected.

Could you check soldering and the directions of component again?

@miguelangelramirez
Copy link
Author

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

@BenRoe
Copy link
Contributor

BenRoe commented Jun 6, 2019

Are you using the ISP header? Which device you use, to burn the bootloader on the chip?
Check also baerwolf/USBaspLoader#19

@miguelangelramirez
Copy link
Author

miguelangelramirez commented Jun 6, 2019

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.

@BenRoe
Copy link
Contributor

BenRoe commented Jun 6, 2019

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.

@miguelangelramirez
Copy link
Author

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

@marsicplusplus
Copy link

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?

@BenRoe
Copy link
Contributor

BenRoe commented Jun 6, 2019

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

@marsicplusplus
Copy link

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

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

@miguelangelramirez
Copy link
Author

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!

@marsicplusplus
Copy link

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).

@itsnoteasy
Copy link

itsnoteasy commented Feb 9, 2020

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.

@BenRoe
Copy link
Contributor

BenRoe commented Feb 9, 2020

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

@itsnoteasy
Copy link

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

@denisinvader
Copy link

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)

@Daveyr
Copy link

Daveyr commented Jan 6, 2021

@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

@itsnoteasy
Copy link

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.

@Daveyr
Copy link

Daveyr commented Jan 9, 2021

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
Copy link

Daveyr commented Feb 1, 2021

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

@MrCrazyUkrainian
Copy link

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.

@chief-teep
Copy link

chief-teep commented Jun 4, 2021

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

@MrCrazyUkrainian
Copy link

MrCrazyUkrainian commented Jun 4, 2021

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) :/

@chief-teep
Copy link

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 -_-

@Ardakilic
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants