Git Product home page Git Product logo

Comments (5)

jrb avatar jrb commented on September 23, 2024

I found the symlink for the bootloader points to the wrong place. When my YS1 is in bootloader mode, /dev/RFCAT_BL_YS1 exists, but rfcat_bootloader fails to open it with an invalid ioctl (you have to hack in debug prints; the "something is talking to" actually means "I couldnt open it as a serial port".

fortunately I sound when the ys1 is in bootloader mode, I also have a /dev/ttyACM0 (your dev name may vary). this worked with rfcat_bootloader as RFCAT_BL_YS1 was expected to.

from rfcat.

atlas0fd00m avatar atlas0fd00m commented on September 23, 2024

hey jared,

thanks for the comment. what was wrong? invalid ioctl? you are able to flash the /dev/ttyACM0 but not the /dev/RFCAT_BL_YS1?
yes, the bootloader script is not terribly robust (error handling when you can't talk to the dongle). typically when you can't talk to the /dev/RFCAT_BL_* it is because NetworkManager is trying to open it as a modem. at least that's historically what's been wrong.

can you give any other insight? /dev/RFCAT_BL_YS1 should work just as well (if not better) as /dev/ttyACM0, assuming you don't have multiple RfCats plugged in or some other oddity.

thanks!
@

from rfcat.

jrb avatar jrb commented on September 23, 2024

This is the output of rfcat_bootloader patched to print the exception:

$ rfcat_bootloader /dev/RFCAT_BL_YS1 erase_all
Could not configure port: (25, 'Inappropriate ioctl for device')

Something is talking to the RfCat dongle (Modem Manager, most likely).  Retrying again after 5 seconds.  This can take a minute, please be patient.
^CTraceback (most recent call last):
  File "/usr/bin/rfcat_bootloader", line 216, in <module>
    time.sleep(6)
KeyboardInterrupt

You can see the usb device (all removed entries are completely unrelated to YS1)

lsusb
...snip...
Bus 001 Device 035: ID 1d50:605c OpenMoko, Inc. YARD Stick One bootloader
...snip...

The RFCAT symlink points to the /dev/bus entry:

$ file /dev/RFCAT_BL_YS1 
/dev/RFCAT_BL_YS1: symbolic link to bus/usb/001/035

For good measure, here are my udev rules (slightly modifies from yours, but should behave similarly)

# legacy RfCats and cc1111usb
SUBSYSTEMS=="usb" ATTRS{idVendor}=="0451" ATTRS{idProduct}=="4715" MODE:="0660" SYMLINK+="RFCAT%n" GROUP="rfcat"

# modern RfCats
SUBSYSTEMS=="usb" ATTRS{idVendor}=="1d50" ATTRS{idProduct}=="6047" MODE:="0660" SYMLINK+="RFCAT%n" GROUP="rfcat"
SUBSYSTEMS=="usb" ATTRS{idVendor}=="1d50" ATTRS{idProduct}=="6048" MODE:="0660" SYMLINK+="RFCAT%n" GROUP="rfcat"
SUBSYSTEMS=="usb" ATTRS{idVendor}=="1d50" ATTRS{idProduct}=="605b" MODE:="0660" SYMLINK+="RFCAT%n" GROUP="rfcat"


# RfCat bootloader subsystem (uses it's own product id)
SUBSYSTEMS=="usb" ATTRS{idVendor}=="1d50" ATTRS{idProduct}=="6049" MODE:="0660" SYMLINK+="RFCAT_BL_C" ENV{ID_MM_DEVICE_IGNORE}="1" GROUP="rfcat"
SUBSYSTEMS=="usb" ATTRS{idVendor}=="1d50" ATTRS{idProduct}=="604a" MODE:="0660" SYMLINK+="RFCAT_BL_D" ENV{ID_MM_DEVICE_IGNORE}="1" GROUP="rfcat"
SUBSYSTEMS=="usb" ATTRS{idVendor}=="1d50" ATTRS{idProduct}=="605c" MODE:="0660" SYMLINK+="RFCAT_BL_YS1" ENV{ID_MM_DEVICE_IGNORE}="1" GROUP="rfcat"
SUBSYSTEMS=="usb" ATTRS{idVendor}=="1d50" ATTRS{idProduct}=="ecc0" MODE:="0660" SYMLINK+="RFCAT_BL_SRF" ENV{ID_MM_DEVICE_IGNORE}="1" GROUP="rfcat"

from rfcat.

jrb avatar jrb commented on September 23, 2024

Looks like the udev rules didnt get applied to the tty subsystem. Changing
SUBSYSTEMS=="usb" to
SUBSYSTEM=="tty" SUBSYSTEMS=="usb"
fixed the symlink on my Arch system.

$ file /dev/RFCAT_BL_YS1 
/dev/RFCAT_BL_YS1: symbolic link to ttyACM0

I'll test on ubuntu later and open a pr

from rfcat.

jrb avatar jrb commented on September 23, 2024

see #35 for my PR

from rfcat.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.