Results 1 to 2 of 2

Thread: Lattice HW-USBN-2A programmer only working with sudo

  1. #1
    Join Date
    Jul 2021
    Beans
    10

    Question Lattice HW-USBN-2A programmer only working with sudo

    Hi there,
    i use Lattice Diamond (https://www.latticesemi.com/latticediamond) to program some FPGAs and managed to install the software in my Kubuntu 21.04 system. Now when i launch Diamond and want to program a target (programmer is attached via USB), it detects the programmer (https://www.latticesemi.com/en/Produ...ngCablesforPCs) fine but fails the programming process and tells me that i should install the drivers or wait a sec and try again. When i launch it via terminal and "sudo", the programming finishes flawlessly.
    Now because of that i suspect/assume that this is some kind of permission issue which needs some adjustment at the right place so normal users are allowed to fully access the programmer. But sadly i do not know how kubuntu manages usbdevice access. Can someone hook me up on how to proceed?

    Thanks in advance
    Detzi

  2. #2
    Join Date
    Jul 2021
    Beans
    10

    Re: Lattice HW-USBN-2A programmer only working with sudo

    Found it myself: get the Bus and Device number with lsusb and then "chmod 777 /dev/bus/usb/001/022" where 001 was my bus and 022 my Device. After that the programmer works perfectly well. Do i have to pay attention when chmod'ing this or can i just call a script on plugin that automates this?

    EDIT:
    I found the actual Problem the .rules supplied by Lattice had syntax errors in them. I figured this out using udevadm. Guess the syntax is different on red hat systems. I changes the rules files name to 51-lattice.rules and its content to:
    #Lattice
    SUBSYSTEM=="usb", ATTRS{idVendor}=="1134", ATTRS{idProduct}=="8001", MODE="0666", OWNER="1000", GROUP="1000"

    #FTDI
    SUBSYSTEM=="usb",ACTION=="add", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6010", MODE="0666", OWNER="1000", GROUP="1000",SYMLINK+="ftdi-%n"
    SUBSYSTEM=="usb",ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6010",RUN+="/bin/sh -c 'basename %p > /sys/bus/usb/drivers/ftdi_sio/unbind'"
    that's all that was missing. hope this helps someone avoid the diggin.
    Last edited by detzi88; July 28th, 2021 at 02:04 PM.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •