Massdrop / mdloader

Massdrop Firmware Loader - for CTRL / ALT / SHIFT / Rocketeer keyboards
GNU General Public License v3.0
429 stars 79 forks source link

mdloader doesn't detect ALT keyboard #36

Open brewerbjb opened 4 years ago

brewerbjb commented 4 years ago

I just got an ALT keyboard and am trying to flash the firmware. When I run mdloader on Windows I get an error "could not find a valid device port!".

carlosbelardi commented 4 years ago

Commenting to get some visibility on this but yup I'm having the same issue with the ALT I got 2 weeks ago. I'm guessing these newest batch has another new chip ID in it that the current code doesn't account for

mbodge commented 4 years ago

Same here, does not detect on my mac

mbodge commented 4 years ago

Ok, i resolved this by going into the source code, modifying line 38 in mdloader_common.c by changing the chip id to "0x60060005". Go to the command line, type make and you've built your own binary to run.

carlosbelardi commented 4 years ago

@mbodge That worked! Thanks!

JasonYuanLiu commented 4 years ago

Ok, i resolved this by going into the source code, modifying line 38 in mdloader_common.c by changing the chip id to "0x60060005". Go to the command line, type make and you've built your own binary to run.

There's also a chance that the CHIP ID is 60060305 in the new batch of Alt

fciuffo commented 4 years ago

Can someone tell me how i can modify the code to add the correct CHIP ID in order for the program to recognize my new ALT. Once I download the downloader, is there an easy way to edit the code and recompile?

scrumyy commented 4 years ago

I'm having the same issue, got my alt this week

adrianjean commented 4 years ago

Ok, i resolved this by going into the source code, modifying line 38 in mdloader_common.c by changing the chip id to "0x60060005". Go to the command line, type make and you've built your own binary to run.

This worked for me just now on macOS with my day-old Drop Alt. I used 0x60060005

brewerbjb commented 4 years ago

Ok, i resolved this by going into the source code, modifying line 38 in mdloader_common.c by changing the chip id to "0x60060005". Go to the command line, type make and you've built your own binary to run.

Do you have any clue how I can compile it on windows?

scrumyy commented 4 years ago

Ok, i resolved this by going into the source code, modifying line 38 in mdloader_common.c by changing the chip id to "0x60060005". Go to the command line, type make and you've built your own binary to run.

Do you have any clue how I can compile it on windows?

I would also really like to know

adrianjean commented 4 years ago

Ok, i resolved this by going into the source code, modifying line 38 in mdloader_common.c by changing the chip id to "0x60060005". Go to the command line, type make and you've built your own binary to run.

Do you have any clue how I can compile it on windows?

@brewerbjb @scrumyy Can you install a quick Linux VM using VirtualBox and compile and run it from in there?

mattdzugan commented 4 years ago

For the sake of potential other readers of this thread -- I was getting the "could not find a valid device port!" error even after applying all the changes mentioned here. Turns out all i needed was sudo. So just beware that a permissions issue will still throw this same "could not find a valid device port!" error! 🤦‍♂️

scrumyy commented 4 years ago

Ok, i resolved this by going into the source code, modifying line 38 in mdloader_common.c by changing the chip id to "0x60060005". Go to the command line, type make and you've built your own binary to run.

Do you have any clue how I can compile it on windows?

@brewerbjb @scrumyy Can you install a quick Linux VM using VirtualBox and compile and run it from in there?

compiled in Linux VM, but when running in the VM I get error "mdloader_linux: command not found". Any ideas what I might be doing wrong?

brundonsmith commented 4 years ago

Having the same issue; just bought a new Alt and getting this error message on both Mac and Windows. I tried running it as admin on Windows per @mattdzugan 's suggestion and it made no difference.

This is GitHub; if we know the fix, could someone make a pull-request and hope that Massdrop merges it and does a new release?

Has anyone contacted customer service? This seems to be a really widespread issue and a really easy thing for them to fix.

james-fourth commented 4 years ago

@mbodge You're awesome! Thanks so much for sharing this solution!!

SolaireFlair commented 4 years ago

Ok, i resolved this by going into the source code, modifying line 38 in mdloader_common.c by changing the chip id to "0x60060005". Go to the command line, type make and you've built your own binary to run.

I'm an absolute total newbie to coding, would it be possible to get some directions on how to compile this? I already got the file opened and edited the line in question, but I'm not sure how to compile a program in CMD.

mbodge commented 4 years ago

@solaireflair Are you on a mac or a pc?

On Sat, Oct 3, 2020 at 2:56 PM SolaireFlair notifications@github.com wrote:

Ok, i resolved this by going into the source code, modifying line 38 in mdloader_common.c by changing the chip id to "0x60060005". Go to the command line, type make and you've built your own binary to run.

I'm an absolute total newbie to coding, would it be possible to get some directions on how to compile this? I already got the file opened and edited the line in question, but I'm not sure how to compile a program in CMD.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Massdrop/mdloader/issues/36#issuecomment-703169515, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAOTT4WD4O5X37XAYEXR4FTSI6M2PANCNFSM4QZRRH5A .

SolaireFlair commented 4 years ago

@mbodge Windows PC

mbodge commented 4 years ago

Ah, sorry, unfortunately i don't know how compiling on windows works.

On Sat, Oct 3, 2020 at 3:29 PM SolaireFlair notifications@github.com wrote:

@mbodge https://github.com/mbodge Windows PC

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Massdrop/mdloader/issues/36#issuecomment-703172387, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAOTT4UWDEZ6MDEEJQB5ACLSI6QTZANCNFSM4QZRRH5A .

SolaireFlair commented 4 years ago

Darn, ok. I have a friend who might be able to help. He's gonna come over in about an hour. Hopefully I can get it done.

0x4a commented 4 years ago

I still did no receive my Alt, so I cant test it - but I found that somewhere round here: https://drive.google.com/file/d/1KvyRvtoVVE3OQdiWAKgj-XZll37Cxy4H/view

Supposed to be a fixed version for Windows, maybe give it a try.

Also: did you try the release from two days ago? Changelog suggests the problem is fixed:

Expanded mcu_t definitions to reflect broader ATSAMD/E chip ID support.

And it does have the 0x60060005 (and 305) lines added to mcus[] like suggested above. Always go for official releases instead of shady binaries from Google Drive - if you can.

HTH

james-fourth commented 4 years ago

Darn, ok. I have a friend who might be able to help. He's gonna come over in about an hour. Hopefully I can get it done.

This Stack Overflow article seems like it could help.

SolaireFlair commented 4 years ago

I still did no receive my Alt, so I cant test it - but I found that somewhere round here: https://drive.google.com/file/d/1KvyRvtoVVE3OQdiWAKgj-XZll37Cxy4H/view

Supposed to be a fixed version for Windows, maybe give it a try.

Also: did you try the release from two days ago? Changelog suggests the problem is fixed:

Expanded mcu_t definitions to reflect broader ATSAMD/E chip ID support.

And it does have the 0x60060005 (and 305) lines added to mcus[] like suggested above. Always go for official releases instead of shady binaries from Google Drive - if you can.

HTH

@0x4a I've tried the updated version from two days ago and still no dice, and the one you linked to spat this out when I tried to flash:

Scanning for device for 60 seconds ..........60060305.60060305.60060305.60060305.60060305.60060305.60060305.60060305.60060305.60060305.60060305.60060305.60060305.60060305.60060305.60060305.60060305.60060305.60060305.60060305.....

Had to disconnect the keyboard to get it to quit.

When using the official release, the keyboard sits with the orange "connection error" LED on and Powershell spits this out:

Opening port 'COM9'... Success! Found MCU: SAMD51J19A Bootloader version: v2.18Sep 4 2018 16:48:28 Applet file: applet-flash-samd51j19a.bin Error: Could not open applet file: applet-flash-samd51j19a.bin Closing port... Success! PS D:\users\jeff\desktop\altlow>

0x4a commented 4 years ago

spat this out when I tried to flash:

As far as I can see, thats the chip-id you would need for it to work (said so somewhere on drop discussions). Found another version here which explicitely mentions that 60060005 ID you got.

Give that a try or set up a build environment (I would use WSL) and build yourself.

Good luck! Can't wait to get my keeb, and to have to go through the same hassle ;-)

SolaireFlair commented 4 years ago

spat this out when I tried to flash:

As far as I can see, thats the chip-id you would need for it to work (said so somewhere on drop discussions). Found another version here which explicitely mentions that 60060005 ID you got.

Give that a try or set up a build environment (I would use WSL) and build yourself.

Good luck! Can't wait to get my keeb, and to have to go through the same hassle ;-)

MY MAN. @0x4a you came through. That build you linked works. I have been wracking my brain for DAYS, but this did the trick.

sadan commented 4 years ago

Hi, I just received my Drop Ctrl keyboard yesterday and I am using MAC. The loader is also unable to find the device. I downloaded the latest version 1.0.5 from the release page but in the terminal it is still showing me version 1.04. Can someone please help?

Screenshot 2020-10-05 at 09 54 13
ShaunMWallace commented 4 years ago

just updating this for anyone that reads. I have a brand new alt and the change from 5 days ago appears to solve the issue of the chip id being incorrect or missing. There is a small bug where the mdloader is looking for applet 19 and the one provided is 18. I simply renamed the 18 to 19 in the applet file and all works as expected. Good luck

auxiliary commented 2 years ago

Is this still an issue? I think it might be obsolete as the code now seems to include 0x60060005. What worked for me and I wish the README would've mentioned was to first "reset" the board with a pin. Only then would the loader actually detect the board.