donn / nudelta

Open source NuPhy Console alternative
GNU General Public License v3.0
522 stars 24 forks source link

[Apple Silicon] Keyboard unusable after failed remap #58

Open pashkes opened 1 year ago

pashkes commented 1 year ago

Version

0.7.2

Operating System

MacOS 13.5 but it doesn't work for everyone

Description

I instaled the app on my mac m1 and try to set up key, after save I get an error that the shortcut can't save and now my keyboard don't connect to any device, light is not on, reset (fn, tab, r) can't be helped I also try to connect via a console on Win but device didn't detect

When I try to update firmware I always see text waiting and nothing happen 😭

donn commented 1 year ago

Air or Halo? Also, can you send a photograph of the metal plaque on the back of the keyboard

Also, try the Windows firmware updater (if applicable) - Mac one never worked for me.

This is serious- if the software is somehow corrupting the bootloader then something is going horribly wrong

pashkes commented 1 year ago

Air or Halo? Also, can you send a photograph of the metal plaque on the back of the keyboard

Also, try the Windows firmware updater (if applicable) - Mac one never worked for me.

This is serious- if the software is somehow corrupting the bootloader then something is going horribly wrong

Air. I tryed to update on Windows PXL_20230813_040512633.MP.jpg

donn commented 1 year ago

That does match mine... welp.

The last thing I can ask you to try is https://github.com/carlossless/sinowealth-kb-tool. If you can download the Windows version and it can recognize your keyboard, I can send you a firmware dump from my own keyboard so you can try to flash and fix it.

For now, I'll add an advisory for M1 Macs to the Readme. Sorry about this

pashkes commented 1 year ago

That does match mine... welp.

The last thing I can ask you to try is https://github.com/carlossless/sinowealth-kb-tool. If you can download the Windows version and it can recognize your keyboard, I can send you a firmware dump from my own keyboard so you can try to flash and fix it.

For now, I'll add an advisory for M1 Macs to the Readme. Sorry about this

I'm trying to start the tool on Windows under admin with connected the keyboard but nothing happen. Any dialogs don't bubble. Maybe I do something wrong or should try macOs version?

donn commented 1 year ago

@pashkes It's a CLI tool: I'll give you some instructions in a moment

donn commented 1 year ago
  1. Download and decompress sinowealth-kb-tool-x86_64-pc-windows-msvc-v0.0.2.tar.gz. There should be exactly one file, called sinowealth-kb-tool.exe.
  2. Shift + right click the Windows button in your task bar, and press "Windows Powershell (Administrator)"
  3. Navigate to the folder containing sinowealth-kb-tool.exe using cd.
  4. Execute this command: .\sinowealth-kb-tool.exe -r --part nuphy-air75 out.ihex

Report back with a screenshot of your full window.

pashkes commented 1 year ago
  1. Download and decompress sinowealth-kb-tool-x86_64-pc-windows-msvc-v0.0.2.tar.gz. There should be exactly one file, called sinowealth-kb-tool.exe.
  2. Shift + right click the Windows button in your task bar, and press "Windows Powershell (Administrator)"
  3. Navigate to the folder containing sinowealth-kb-tool.exe using cd.
  4. Execute this command: .\sinowealth-kb-tool.exe -r --part nuphy-air75 out.ihex

Report back with a screenshot of your full window.

IMG_20230813_094806_074.jpg

Looks like the tool doesn't support air 75

donn commented 1 year ago

Try nuphy-air60, I got the Air75 support merged but it's not in a release version yet and it's just a copy of Air60's data anyway

Also, while you're there, I'd like you to run .\sinowealth-kb-tool.exe -r --part nuphy-air60 bootloader.ihex as well.

pashkes commented 1 year ago

Try nuphy-air60, I got the Air75 support merged but it's not in a release version yet and it's just a copy of Air60's data anyway

Also, while you're there, I'd like you to run .\sinowealth-kb-tool.exe -r --part nuphy-air60 bootloader.ihex as well.

No KB found. Trying bootloader directly...
thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', src\isp.rs:60:93
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

image

donn commented 1 year ago

Assuming this isn't a permissions issue, that means the firmware flasher cannot find either the keyboard or the bootloader. Can you check device manager to see what pops up when the keyboard is plugged in? Also, can you try a different USB-C cable?

pashkes commented 1 year ago

image when connect to another port I saw the error, it's means that unknown device

Windows stopped this device because it reported problems. (Code 43)

Request for USB device descriptor failed.
donn commented 1 year ago

I need two items called the Product ID and Vendor ID in one of these tabs so I can diagnose further: Screenshot at 2023-08-13 11:35:43

If they do not exist, then I would ask you to email NuPhy and just tell them that the keyboard is not responding to the firmware updater, as I am at a loss.

Out of curiosity- is your Macbook also in Ukrainian? I'm wondering if this is a locale thing.

pashkes commented 1 year ago

Here is what I found:

Error Log

``` Имя журнала: Microsoft-Windows-Kernel-PnP/Configuration Источник: Microsoft-Windows-Kernel-PnP Дата: 13.08.2023 10:48:13 Код события: 411 Категория задачи:Отсутствует Уровень: Ошибка Ключевые слова: Пользователь: SYSTEM Компьютер: DESKTOP-GJI6BCH Описание: Возникла проблема с запуском устройства USB\VID_0000&PID_0002\5&84e935&1&2. Имя драйвера: usb.inf GUID класса: {36fc9e60-c465-11cf-8056-444553540000} Служба: Нижние фильтры: Верхние фильтры: Проблема: 0x2B Состояние проблемы: 0x0 Xml события: 411 0 2 0 0 0x4000000000000000 3135 Microsoft-Windows-Kernel-PnP/Configuration DESKTOP-GJI6BCH USB\VID_0000&PID_0002\5&84e935&1&2 usb.inf {36fc9e60-c465-11cf-8056-444553540000} 0x2b 0x0 ```

and one more

Details

``` Имя журнала: Microsoft-Windows-Kernel-PnP/Configuration Источник: Microsoft-Windows-Kernel-PnP Дата: 13.08.2023 10:48:13 Код события: 400 Категория задачи:Отсутствует Уровень: Сведения Ключевые слова: Пользователь: SYSTEM Компьютер: DESKTOP-GJI6BCH Описание: Устройство USB\VID_0000&PID_0002\5&84e935&1&2 настроено. Имя драйвера: usb.inf GUID класса: {36fc9e60-c465-11cf-8056-444553540000} Дата драйвера: 06/21/2006 Версия драйвера: 10.0.19041.2546 Поставщик драйвера: Microsoft Раздел драйвера: BADDEVICE.Dev.NT Ранг драйвера: 0xFF0000 Соответствующий ИД устройства: USB\DEVICE_DESCRIPTOR_FAILURE Драйверы с более низким рангом: usb.inf:USB\DEVICE_DESCRIPTOR_FAILURE:00FF2000 Устройство обновлено: false Родительское устройство: USB\ROOT_HUB30\4&1dc62523&0&0 Xml события: 400 0 4 0 0 0x4000000000000000 3134 Microsoft-Windows-Kernel-PnP/Configuration DESKTOP-GJI6BCH USB\VID_0000&PID_0002\5&84e935&1&2 usb.inf {36fc9e60-c465-11cf-8056-444553540000} 06/21/2006 10.0.19041.2546 Microsoft true BADDEVICE.Dev.NT 0xff0000 USB\DEVICE_DESCRIPTOR_FAILURE usb.inf:USB\DEVICE_DESCRIPTOR_FAILURE:00FF2000 false 0x0 USB\ROOT_HUB30\4&1dc62523&0&0 ```

I'm not sure if the laptop is Ukrainian because it's a work laptop, not my personal one. Although most likely yes, I think I can somehow check for 100% if necessary.

As I understand it, it’s no longer possible to restore and I should contact the reseller from whom I bought and clarify whether it will be possible to make a replacement (3 days have passed since the purchase), although I doubt that it will be possible

WinkelCode commented 1 year ago

@donn @pashkes

FYI!!! From my experience, the sinowealth-kb-tool may not work under Windows. I was unable to dump my Air96 firmware using it on Windows (couldn't get into "ISP" mode), but it worked flawlessly on Linux. From my understanding, Windows has extra restrictions on input devices like keyboards, presumably for security (keylogging) reasons, which can cause issues communicating with the keyboard.

WinkelCode commented 1 year ago

@pashkes In Linux, run lsusb and check with/without the keyboard plugged in, if it is detected we may still be able to get it to work.

The error comes from here: let isp_device = HidDevice::open(GAMING_KB_VENDOR_ID, GAMING_KB_PRODUCT_ID).unwrap(); (It is not able to find a device with the pre-configured ID)

I am not familiar with USB at this level, but given that Windows is able to detect something, maybe it still has a USB device path we can talk to. The question is if it has actually loaded into the SinoWealth bootloader, or if we are able to get it to do that.

pashkes commented 1 year ago

@WinkelCode is it ok if i will try this on liveusb fedora?

WinkelCode commented 1 year ago

@WinkelCode is it ok if i will try this on liveusb fedora?

I think it might be easier to do this in a Discord chat, I sent you a message on the NuPhy server.

donn commented 1 year ago

@pashkes To be clear, I was asking about the language of macOS, not the model of the computer. Was the language set to Ukrainian?

pashkes commented 1 year ago

@pashkes To be clear, I was asking about the language of macOS, not the model of the computer. Was the language set to Ukrainian?

No, Language of the System was English

donn commented 1 year ago

So that rules out a locale issue. We've had another report of a brick from a user from Ukraine, so I'm wondering if it's just a bad batch

pashkes commented 1 year ago

So that rules out a locale issue. We've had another report of a brick from a user from Ukraine, so I'm wondering if it's just a bad batch

that's probably my reseller asking the question because the nickname is very similar to his name.

donn commented 1 year ago

ah.

samiparken commented 2 months ago

Trying for remapping with Nudelta completely ruined my keyboard.... RIP my Nuphy air75. I cannot see my keyboard from Device Manager... No way to revive it?

WinkelCode commented 2 months ago

Trying for remapping with Nudelta completely ruined my keyboard.... RIP my Nuphy air75. I cannot see my keyboard from Device Manager... No way to revive it?

I mean... it's not like it's physically broken, you just need to install a working firmware. The easiest way is to get your hands on a "SinoLink" programmer, they are available on AliExpress, but cost a bit over $100. There is also this program for Arduinos, but it doesn't support writing (yet): https://github.com/gashtaan/sinowealth-8051-dumper

@carlossless shared a dump of the SinoLink device programming the chip: https://github.com/gashtaan/sinowealth-8051-dumper/issues/5#issuecomment-1501656201 - so I believe the information for how to do it is technically out there.

Honorable mention to https://github.com/carlossless/sinowealth-kb-tool - although I believe that would require the device to be enumerated (which is exactly what's not happening if I understand correctly).