atlas0fd00m / rfcat

RfCat - swiss-army knife of ISM band radio
Other
554 stars 116 forks source link

YS1 Successful firmware update, no dongle found. #154

Closed unknownuser374 closed 6 months ago

unknownuser374 commented 7 months ago

Hello all, I have successfully updated the firmware on my YS1, but now it seems to be stuck in a weird state with a blinking green LED and it is not recognized by my machine.

I keep getting : Error in resetup():Exception('No Dongle Found. Please insert a RFCAT dongle.').

Is there an easy fix for this?

Same error on Ubuntu and Endeavor OS.

atlas0fd00m commented 7 months ago

it depends on why.

can you please share the results of lsusb and dmesg (just what happens when you plug in the dongle)

atlas0fd00m commented 7 months ago

after that, i'd like to know what you typed to flash the firmware, and how it went.

unknownuser374 commented 7 months ago

Certainly! Here are the screenshots from both lsusb and dmesg. lsusb did not pick up anything, dmesg would recognize a new usb device and fail error out when unplugged (plugged in and out 3 times to see the dmesg change)

lsusb: lsusbScreenshot 2024-02-23 074513

dmesg: dmesgScreenshot 2024-02-23 075045

As for what I did to flash, I followed the Steps for firmware updates via USB port section of the README and ran the make installRfCatYS1CCBootloader inside the firmware directory. I do not have the output from that unfortunately, but it did not give me any errors and exited cleanly with the successful message.

d3adc0de commented 7 months ago

I'm facing the same issue.

I did the following:

lsusb output on the machine

image

dmesg output doesn't show anything for the YS1 after the flash:

image

You can see it here, but that was pre-flash timing AFAICT.

EDIT: jumpered it to bootloader mode (https://github.com/greatscottgadgets/yardstick/issues/2#issuecomment-425318321)

image

it shows up in lsusb as in bootloader mode and all 3 LEDs are lit solid. Tried to re-flash the firmware and here is the truncated output:

image image

after this is drops me back to my shell, the light blinks green a few times then stops.

After that, it disappears from lsusb

atlas0fd00m commented 7 months ago

what version of SDCC are you using?

are you able to reflash the dongle using one of the included images (from the latest github release)?

atlas0fd00m commented 7 months ago

it looks like whatever firmware was flashed is having issues interacting with the USB controller correctly. this could be for many potential reasons. if this is not custom firmware (ie. you make changes to the codebase before installing), it could be a problem with the version of compiler not interpreting the code as previous versions have.

i appreciate your help in this. each time SDCC has updated to a new version, it's caused minor issues, some not so minor. so that's a legitimate possibility.

d3adc0de commented 7 months ago

SDCC version is 4.0.0, running 22.04 ARM on my mac.

No changes made to the firmware, just pulled down and followed the instructions.

Happy to try it out, just as an example I tried the command listed with "download" as regular user it says permission denied: something is talking to the dongle (nothing setup to do so) and never breaks out of that loop. if I try it with sudo it doesn't do anything but spit out the manpage/help text for the dongle. udev rules are in place.

I was actually in the process of trying to do the install using an older version of ubuntu on a non ARM based machine to see if that would "fix" it. Happy to keep trying with the current version of SDCC.

d3adc0de commented 7 months ago

just followed your steps on an ubuntu 20.04 setup and it worked. sdcc version is 3.8.0 FWIW.

unknownuser374 commented 7 months ago

I will try the same as soon as I can and will report back

unknownuser374 commented 7 months ago

Ok, did not see the steps from the comment above.

put in bootloader mode rfcat_bootloader /dev/RFCAT_BL_YS1 erase_all rfcat_bootloader /dev/RFCAT_BL_YS1 download rfcat_bootloader /dev/RFCAT_BL_YS1 verify rfcat_bootloader /dev/RFCAT_BL_YS1 run

After that the YS1 was recognized as a bootloader even without the pins jumped. I figured reflash and got to the same Skipping non data record: ':00000001FF' line before it was not recognized by lsusb again.

This is not custom firmware either. I assume it is part of the issue mentioned about the firmware not communicating with the usb controller correctly?

Just realized I needed to specify the hex file for those commands, and retried with rfcat_bootloader /dev/RFCAT_BL_YS1 download CCBootloader-rfcat-ys1.hex

And got this error :

Writing :0600000002017B02140363 RC = 3(Bad Address) Error downloading code!

Here is what I get after trying the regular make installRfcatYS1CCBootloader command: image

unknownuser374 commented 7 months ago

Ok, finally had some time this week to get back to this. Here is what we see after jumping the YS1 into bootloader mode: lsusb image dmesg image

Was able to compile sdcc version 3.5.0 and re did the bootloader steps using the hex file found in firmware/bin/. Everything worked up until the run step where I got this: image

Back to blinking green LED after this and no more appearance on lsusb. lsusb image

dmesg image

seems like dmesg is picking it up as the new full speed device, but not sure what else is going on here.

Edit: Seems like if I plug the YS1 into the machine and run lsusb -v it hangs forever until i unplug the YS1 image

atlas0fd00m commented 6 months ago

are you sure you're using the right firmware file?

try this: https://github.com/atlas0fd00m/rfcat/releases/download/v2.0.1/RfCatYS1CCBootloader-201231.hex

unknownuser374 commented 6 months ago

I must have been using the wrong firmware file because that worked like a charm. You are the man <3

anoduck commented 6 months ago

Oh... That is just unfair... I sweated for hours for nothing, when all I had to do is find and read this one issue. So not fair.

@atlas0fd00m would you please include this in the readme? The command rfcat_bootloader is not mentioned in the readme.

That just fixed my issue. #156