Arch Linux: TinyFPGA BX not showing up as a serial device [solved]


#1

I’ve been trying to use my TinyFPGA BX today, and seemingly I can’t get it to recognise as a serial device. It does get recognised as a USB device, and you can program it over libusb with sufficient permission, but it simply doesn’t work over serial whether you’re root or not.

$ lsusb | grep '1d50:6130'
Bus 001 Device 011: ID 1d50:6130 OpenMoko, Inc.

$ tinyprog -l

    TinyProg CLI
    ------------
    Using device id 1d50:6130
    No port was specified and no active bootloaders found.
    Activate bootloader by pressing the reset button.

$ sudo tinyprog -l

    TinyProg CLI
    ------------
    Using device id 1d50:6130
    No port was specified and no active bootloaders found.
    Activate bootloader by pressing the reset button.

$ tinyprog -l --libusb
Traceback (most recent call last):
File "/usr/bin/tinyprog", line 11, in <module>
    sys.exit(main())
File "/usr/lib/python3.7/site-packages/tinyprog/__main__.py", line 217, in main
    active_boards = get_ports(device) + get_ports("1209:2100")
File "/usr/lib/python3.7/site-packages/tinyprog/__init__.py", line 39, in get_ports
    for d in usb.core.find(idVendor=vid, idProduct=pid, find_all=True)
File "/usr/lib/python3.7/site-packages/tinyprog/__init__.py", line 40, in <listcomp>
    if not d.is_kernel_driver_active(1)
File "/usr/lib/python3.7/site-packages/usb/core.py", line 1061, in is_kernel_driver_active
    self._ctx.managed_open()
File "/usr/lib/python3.7/site-packages/usb/core.py", line 102, in wrapper
    return f(self, *args, **kwargs)
File "/usr/lib/python3.7/site-packages/usb/core.py", line 120, in managed_open
    self.handle = self.backend.open_device(self.dev)
File "/usr/lib/python3.7/site-packages/usb/backend/libusb1.py", line 786, in open_device
    return _DeviceHandle(dev)
File "/usr/lib/python3.7/site-packages/usb/backend/libusb1.py", line 643, in __init__
    _check(_lib.libusb_open(self.devid, byref(self.handle)))
File "/usr/lib/python3.7/site-packages/usb/backend/libusb1.py", line 595, in _check
    raise USBError(_strerror(ret), ret, _libusb_errno[ret])
usb.core.USBError: [Errno 13] Access denied (insufficient permissions)

$ sudo tinyprog -l --libusb

    TinyProg CLI
    ------------
    Using device id 1d50:6130
    Only one board with active bootloader, using it.
    Boards with active bootloaders:

        USB 1.7: TinyFPGA BX 1.0.0
            UUID: b49d26f5-c1fe-46f0-aa8a-6bd3f273a5da
            FPGA: ice40lp8k-cm81

With root + libusb I was able to update the bootloader, but that didn’t fix it. To preempt any well-meaning but already failed help: There is no “dialout” group on Arch Linux, and even if there were, the problem is that the serial device doesn’t even show up in /dev/.

Does anyone have any ideas?


#2

Okay, as it turns out the problem was esoteric and the solution was simple: a reboot was all that was needed.

The problem was that the installed kernel was newer than the currently running kernel. My guess is that it couldn’t load a certain kernel module because of that. After a reboot, the device shows up over serial as expected.