Mac OSX serial port

Hi,

I am using macosx and I am able to program the board in Arduino environment. But the serial port does not show up in /dev/tty* , When I plug in the board and execute lsusb I get:

Bus 020 Device 021: ID 0403:6010 Future Technology Devices International Limited Dual RS232-HS

So is there any particular driver I need to install (I have already have Openocd and ftdi driver install)?

Which FTDI driver do you have installed? I had to manually install the FTDI driver from their website, the default one was not enough to make the /dev/tty.usb* show up.

Note that this will then conflict with libusb needed to program the board with OpenOCD. So you will need to unload those drivers when trying to program the board.

I’ve been trying to figure out a way around this, but haven’t found one yet.

1 Like

Thanks for your suggestion, I found what was the issue. I am using macOS Sierra 10.12.2. I had all the drivers installed correctly. But the VCP(Virtual Com Port) was blocked by my recent installation of D2xxHelper. Thanks to FTDI’s documentation, I found how to disable D2xxHelper so that the VCP was no longer blocked. Here is the part of the document that resolved my problem:

On OS X 10.11 or later, another possibility is that VCP has been blocked by installation of D2xxHelper
bundled with an application. VCP and such an application are mutually exclusive. To force using VCP
disable D2xxHelper:
cd /Library/Extensions
sudo mv D2xxHelper.kext D2xxHelper.disabled
Then reboot. To force using D2xx again, rename D2xxHelper.disabled back to D2xxHelper.kext and
reboot.

After reboot, I plugged in my board and the serial showed up in /dev/tty.usb***

I find tty.usb successfully, but I can’t upload program through Arduino

âžś  Extensions ls /dev/tty.*                              
/dev/tty.Bluetooth-Incoming-Port /dev/tty.EthanChoiMacBookPro-Blu /dev/tty.usbserial-141414A       /dev/tty.usbserial-141414

My Arduino Setting is here:

My Error is “your board is not connected” when I want to upload my program:

I also install FDTI Driver D2XX with its manual step.

Did I lost anything?

PS:

  • My OS’s version is macOS X EI Caption 10.11.6
  • I also tried /dev/tty.usbserial-141414, it either not work.
  • lsusb result:
    Bus 020 Device 025: ID 0403:6010 Future Technology Devices International Limited Dual RS232-HS

I can use UART to show message with sudo screen /dev/tty.usbserial-141414B 115200

Did I miss something ?

Have been solved use command as below : https://github.com/marvell-iot/aws_starter_sdk/issues/6

âžś  ~ sudo kextunload -p -b com.apple.driver.AppleUSBFTDI
âžś  ~ sudo kextutil -b com.apple.driver.AppleUSBFTDI -p AppleUSBEFTDI-6010-1

1 Like

It is now couple of times that I am running into this problem. I was working just fine with the board (e.g I was able to program and debug the board), until this afternoon. Now when ever I try to program my board, I am getting the following error:

Error: libusb_claim_interface() failed with LIBUSB_ERROR_ACCESS . 
Error: unable to open ftdi device with vid 0403, pid 6010, description 'Dual RS232-HS', serial '*' at bus location '*'

But at the same time, in another terminal window, I am able to see print outs of my previous program being running on the board (I can see tty.usbserial-00001014B). The following is my ftdi setup:

Hossein@~/MyRepos/freedom-e-sdk ->kextstat | grep -i ftdi
152    0 0xffffff7f8330e000 0x7000     0x7000     com.FTDI.driver.FTDIUSBSerialDriver (2.3) ECC3AF36-431D-370D 86F2-5237785E9CF8 <99 41 5 4 3 1>

The interesting thing is that when I unload the FTDI driver and load apple driver using the following command:

 sudo kextutil -b com.apple.driver.AppleUSBFTDI -p AppleUSBEFTDI-6010-1

I will be able to program the board but the serial port doesn’t show up in the /dev/tty.* :unamused:

So, I am kind of lost. This happened couple times before, but I managed to get it working by unload and loading the FTDI driver. But now, nothing works :confused:

I have to mention that by default, I have setup FTDI driver to be picked up by osx and after a restart, the FTDI driver infact shows up. Also I am using openocd from homebrew. Here is my system information:

Hossein@~/MyRepos/freedom-e-sdk ->uname -a
Darwin MohammaseinsMBP 16.5.0 Darwin Kernel Version 16.5.0: Fri Mar  3 16:52:33 PST 2017; root:xnu-3789.51.2~3/RELEASE_X86_64 x86_64

Hossein@~/MyRepos/freedom-e-sdk ->brew list libusb
/usr/local/Cellar/libusb/1.0.21/include/libusb-1.0/libusb.h
/usr/local/Cellar/libusb/1.0.21/lib/libusb-1.0.0.dylib
/usr/local/Cellar/libusb/1.0.21/lib/pkgconfig/libusb-1.0.pc
/usr/local/Cellar/libusb/1.0.21/lib/ (2 other files)
/usr/local/Cellar/libusb/1.0.21/share/libusb/ (16 files)

Hossein@~/MyRepos/freedom-e-sdk ->libusb-config --version 
0.1.12

Hossein@~/MyRepos/freedom-e-sdk ->openocd --version
Open On-Chip Debugger 0.10.0 
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html

Any suggestions??

I write two scripts for uploading and uart message:

show.sh

sudo kextload -bundle-id com.FTDI.driver.FTDIUSBSerialDriver
screen /dev/tty.usbserial-00141414B 115200

upload.sh

echo “target: $1”
sudo kextunload -bundle-id com.FTDI.driver.FTDIUSBSerialDriver
make upload PROGRAM=$1 BOARD=freedom-e300-hifive1

FYI

2 Likes

Just going to put this here for any other mac users that may be having problems.

Running OS X El Capitan, after some reading and errors, and finding this forum, I was able to get the blink program to upload via the Arduino IDE (version 1.8.2)

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  • Install openocd (this will also install the libftdi dependency)
brew install openocd
  • Disable Apple’s FTDI driver, as described in this thread by mintisan
sudo kextunload -p -b com.apple.driver.AppleUSBFTDI
sudo kextutil -b com.apple.driver.AppleUSBFTDI -p AppleUSBEFTDI-6010-1
  • Since this needs to be run every time you restart and want to upload to the HiFive1, I added this script to my ~/.bash_profile
function hifive(){
  sudo kextunload -p -b com.apple.driver.AppleUSBFTDI;
  sudo kextutil -b com.apple.driver.AppleUSBFTDI -p AppleUSBEFTDI-6010-1;
}
  • At this point you should be able to upload programs via the Arduino IDE to your HiFive1!
  • Any time you restart or reload your extensions and you want to upload a new file simply type hifive in the terminal and you should be able to.

Fresh back from LinuxFest and I just picked this board up. This is my first post, so, hi everyone, I’m glad to be here! Can’t wait to put those 320 open megahertz to use.

2 Likes

Thanks for the post Caleb and welcome!

We will add this suggestion to our Quick Start Guides.