Can't create serial port (MacOS) [SOLVED]


#1

I am running a macbook pro High-Seirra 10.13.6.

I installed apio (0.4.0b3) and the latest version of tinyprog (1.0.11).

% pip install --upgrade --no-cache-dir apio==0.4.0b3 “tinyprog>=1.0.10”
% apio install system scons icestorm iverilog drivers
% apio drivers --serial-enable

I then plugged in the BX. The power light is on the the status light is blinking. However, the
serial device does not appear.

% apio system --lsserial
Number of Serial devices found: 0

It does mount a usb device.

% system_profiler SPUSBDataType
USB:

USB 3.0 Bus:

  Host Controller Driver: AppleUSBXHCISPTLP
  PCI Device ID: 0x9d2f 
  PCI Revision ID: 0x0021 
  PCI Vendor ID: 0x8086 

    Communication Device:

      Product ID: 0x2100
      Vendor ID: 0x1209
      Version: 0.00
      Speed: Up to 12 Mb/sec
      Location ID: 0x14300000 / 6
      Current Available (mA): 500
      Current Required (mA): 100
      Extra Operating Current (mA): 0

Note the vendor and product id.

% 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.

For some reason, apio doesn’t seem to be creating a serial port.

Any suggestions?


#2

I’m having a similar problem in gentoo.

new full-speed USB device number 16 using xhci_hcd
usb 1-12: New USB device found, idVendor=1209, idProduct=2100, bcdDevice= 0.00
usb 1-12: New USB device strings: Mfr=0, Product=0, SerialNumber=0

and then

$ 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.

Any thoughts?


#3

What version of tinyprog are you using? Try updating to the latest tinyprog if you haven’t done so already.

pip install --upgrade --no-cache-dir "tinyprog>=1.0.11"

Then try updating the bootloader

tinyprog --update-bootloader

#4

allready up to date :confused:


#5

APIO itself is not responsible for creating the serial port. It looks like the TinyFPGA BX is connected just fine to your computer. However, there could be a permissions issue preventing the serial port from being accessible from your user account. I believe this was added in the last year or so to MacOS. I’ll have to refresh my memory on how to handle it.


#6

Can you paste the output of lsusb?


#7

sure
$ lsusb
Bus 006 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 005 Device 003: ID 258a:1006
Bus 005 Device 002: ID 2516:0006 Cooler Master Co., Ltd. Storm Recon
Bus 005 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 002: ID 0a12:0001 Cambridge Silicon Radio, Ltd Bluetooth Dongle (HCI mode)
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 002: ID 1241:f767 Belkin Keyboard
Bus 001 Device 007: ID 18d1:4ee1 Google Inc. Nexus Device (MTP)
Bus 001 Device 003: ID 058f:6364 Alcor Micro Corp. AU6477 Card Reader Controller
Bus 001 Device 016: ID 1209:2100 InterBiometrics
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub


#8

Is it looking for a particular USB->Serial kernel driver?


#9

@dugz, I remember what the problem may be. Have you tried running with APIO yet? Linux modem drivers try to own any new serial device that gets attached. APIO has an easy to use mechanism to disable this for the TinyFPGA boards.

pip install --upgrade --no-cache-dir apio==0.4.0b3
apio drivers --serial-enable

#10

They claim to be enabled, but I’m not seeing any new devices appear in the log

$ apio drivers --serial-enable
Configure Serial drivers for FPGA
Already enabled

#11

Hey I am getting something here…

$ apio drivers --serial-enable
Configure Serial drivers for FPGA
sudo: service: command not found
Serial drivers enabled
Unplug and reconnect your board

sudo: service: command not found


#12

@hanrahan: This likes like it could be a bug in MacOS related to the serial port driver. I found the following discussion:

https://discussions.apple.com/message/33079474#33079474

I suggest trying workaround #2:

Run the Serial app, and then the “File | Open Port…” command, which will open a window with a list of the currently active serial ports. This list is initially blank, but after a few seconds, the Arduino device will appear with the cu.usbmodem1a21 name. That is, the Serial app has done something to force the AppleUSBACM driver to load and make the serial device active. (Note: Serial is even smart enough to only list active serial ports, not including others, e.g., Mike’s-iPhone6S, that were previously installed but are currently not available.)


#13

Another option is to disable modem-manager for a few devices manually.

You can follow this guide:

And use these rules instead of the rule in the guide:

# Disable ModemManager for TinyFPGA BX
ATTRS{idVendor}=="1d50", ATTRS{idProduct}=="6130", ENV{ID_MM_DEVICE_IGNORE}="1"
ATTRS{idVendor}=="1209", ATTRS{idProduct}=="2100", ENV{ID_MM_DEVICE_IGNORE}="1"

#14

update: gentoo needs sys-apps/init-system-helpers for sure, but its still got something going on.

I’m still looking into it. I don’t have ModemManager installed.


#15

I did some things, but haven’t gotten anywhere. I’ll check back later, gotta run.


#16

Ok, let me know if you can try this out on another machine. Windows 10, or a recent Ubuntu install would be a nice reference to rule out any issues with the board itself.


#17

I downloaded the Serial app and did File -> Open Port …

Unfortunately, didn’t work.


#18

I also tried the first suggestion: to reboot with the BX plugged in. That also didn’t work.

I also tried running the Arduino environment with a genuine Arduino Uno. That does work

And connected to a Raspberry Pi using a CP2102 usb-serial breakout board. That also works.


#19

Ohh, very interesting. Ok, I’ll try and reproduce the issue on a Mac. In the meantime, see if you can try it out on a Windows 10 or Ubuntu machine to help rule out any board issue.


#20

I tried it on ubuntu 18.04 and I was able to connect to the BX and update the bootloader.

Still can’t see it on my Mac.