Giter Site home page Giter Site logo

Comments (3)

c-mauderer avatar c-mauderer commented on June 10, 2024

The used FT2232 provides two interfaces. The first one (/dev/ttyUSB0 if no other device is connected) is used for debugging using OpenOCD. The second one (/dev/ttyUSB1) is the serial console interface. The ATTRS{bInterfaceNumber} was necessary to only create the link for this second port.

The rule has been written on an OpenSUSE 42.2 system with udev version 228-25.15.1. In my experience with other devices the ATTRS are not always consistent over different versions of udev. So it's quite possible that some adaption is necessary.

I'm not sure but it could be possible that ID_USB_INTERFACE_NUM has different values if there are more USB serial converters attached. Do you have any more information on how that value is generated?

from grisp-software.

sylane avatar sylane commented on June 10, 2024

Ok, I see now.
I was using the rules without ATTRS{bInterfaceNumber}=="01" and it got linked to /dev/ttyUSB0 and was not working. using ENV{ID_USB_INTERFACE_NUM}=="01" seems to work just fine now.

I am not 100% sure about where the value is generated, but it seems it comes from systemd, not udevd... so it may not be completely portable.

From some mailing list someone got around it not being defined by using the rule:
SUBSYSTEMS=="usb", ATTRS{bInterfaceNumber}=="?*", ENV{ID_USB_INTERFACE_NUM}="$attr{bInterfaceNumber}"

I am not sure what you are suggesting about issues with serial converters.

from grisp-software.

c-mauderer avatar c-mauderer commented on June 10, 2024

I am not sure what you are suggesting about issues with serial converters.

I meant the following case:

  • You have some random USB-serial converter connected that is registered as /dev/ttyUSB0
  • Now you connect a GRiSP. That creates /dev/ttyUSB1 and /dev/ttyUSB2. Does the symlink point to ttyUSB1 or ttyUSB2.

But I just tested that. It correctly points to USB2. So I'll just create a patch with your suggested solution.

from grisp-software.

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.