ClusterM / hakchi2

Tool that allows you to add more games to your NES/SNES Classic Mini. WARNING: hakchi2 is no longer supported. Please use hakchi2 CE.
GNU General Public License v3.0
2.93k stars 454 forks source link

USB not working #1571

Open fdabbieri opened 9 months ago

fdabbieri commented 9 months ago

After many years I took back my SNES mini (original, not fake) but I'm not able to connect it to my PC anymore. If i connect to a TV i can see the green logo with "tok tok" in the left top corner because i already flashed with hakchi many years ago. I remember that I installed the OTG mod and I had an USB stick with many games, now it is not reading it anymore.

I googled the problem and these are my tests:

1. Connect to PC (Windows 10) using original cable (the one with label) -> no sound coming from Windows.

2. Disconnect cable, wait 30 sec, press reset, connect cable to PC -> no sound coming from Windows, no new device in device manager.

3. Soldered uart interface, connected to PC and power on SNES. I can read linux powering on like this: _> ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒[ 0.213]

U-Boot 2011.09-rc1 (Jul 10 2017 - 12:58:56) Allwinner Technology

[ 0.221]version: 1.1.0 [ 0.223]uboot commit : d8b65c6c57236fabd8e7a6b0a1ae254a0f03118f

ready no battery, limit to dc no key input dram_para_set start dram_para_set end Using default environment

In: Out: Err: Uncompressing Linux... done, booting the kernel. <4ion: failed to create debug files. <[RTC] WARNING: Rtc time will be wrong!! sunxi_leds_fetch_sysconfig_para script_parser_fetch "leds_para" leds_used = -1067139504 [ audio ] err:try to get audio_pa_ctrl failed! [I2S1]sunxi-i2s1 cannot find any using configuration for controllers, return directly! [I2S]sndi2s1 cannot find any using configuration for controllers, return directly! sunxi-rtc sunxi-rtc: hctosys: unable to read the hardware clock ths_fetch_sysconfig_para: type err device_used = 1. fetch C0_LV_count from sysconfig failed

hakchi init script version: 1.0.2 loading hakchi usbMode: device overmounting /lib/modules overmounting /bin overmounting /etc overmounting /etc/init.d/S92rndis on /etc/init.d/S90usb-gadget menu code: 000 overmounting /usr/bin/clover-canoe-shvc

Welcome to CLOVER dp-sneseur-nerd release-v2.0.14-0-gd8b65c6 BuildId final.cis.cis-d9-clvrel1.20170710130811CEST madmonkey login: root login[772]: root login on 'ttyS0'

hakchi v1.0.4-116 by madmonkey

Special thanks to all of the contributors including: KMFDManic, xorloser, ClusterM, princess_daphie, ghoost82, zigg, mistydemeo, Mugi, thomascrha, DanTheMan827, potyl, skogaby, thomas-alrek and anyone else I may have forgotten

root@madmonkey:~#_

4. Same of point 2 with UART connected, i can read this: _▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒%▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒[ 0.213]

U-Boot 2011.09-rc1 (Jul 10 2017 - 12:58:56) Allwinner Technology

[ 0.221]version: 1.1.0 [ 0.223]uboot commit : d8b65c6c57236fabd8e7a6b0a1ae254a0f03118f

ready no battery, limit to dc ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒_

I tried many cables and many PCs with no result. The cables that I used, do work properly with other devices. I also tryed to solder an usb cable directly to the board to avoid connector issues...still no connection to the PC.

My opinion is that in some way the USB connection is broken at kernel level or at board level, so my question is: do I have some chance to restore original kernel using UART only? If not, what do you suggest me to do?

Thanks, Federico

ClusterM commented 9 months ago

Hi

If i connect to a TV i can see the green logo with "tok tok" in the left top corner

I have no idea what are you talking about. Are you sure that you are used not hakchi2 CE before? Or some other fork?

fdabbieri commented 9 months ago

I mean this one: 20230915_135524 20230915_135526

Actually i dont remember the version I used, maybe an old hakchi2 CE v1.2.4 or even earlier.

By the way, shouldn't I be able to use any other version to restore stock firmware?

ClusterM commented 9 months ago

I'm 100% sure that you used a different version, not mine. You can try to use my version to return to the stock firmware, but you need the original kernel image.

fdabbieri commented 9 months ago

I would, but I'm not able to let the PC recognize my SNES. I mean..I can send it in FEL mode both using reset button and sending "fastboot" command on stock U-Boot, but I'm not sure it actually goes to FEL mode because the red led is off but no other message is received by UART. Do you know any way to flash stock firmware from UART?

ClusterM commented 9 months ago

It's weird. FEL mode should work regardless of the firmware. Console should be detected via USB in this mode. Broken USB cable maybe? Or something like that.

ClusterM commented 9 months ago

And there is no way to flash firmware via UART :(

fdabbieri commented 9 months ago

Ok, so do you confirm that in FEL mode, the red led should stay off? I've tried many cables other than the original one, all of them work with an usb headset so i guess that d+ and d- are properly soldered. By the way i soldered a cable directly to the board, just in case may micro usb was broken and the pc is not making any sound when snes is in fel mode. I cannot even find it in device manager..

What if I use another pc, maybe with ubuntu? Do I need special drivers or even without drivers should i see something connected?

By the way, thank you very much for your help!

ClusterM commented 9 months ago

Yes, red led should stay off in the FEL mode. I'm not sure about drivers on Ubuntu.

fdabbieri commented 9 months ago

Ok, so at least it does go in FEL mode.

This is the USB cable i soldered: 16948611874737236567352422662408

Now, the only doubt is that the SNES chip has something broken on the usb bus. If i connect a usb drive with otg, is there any linux command to check the bus?