[HOW TO] Config and Cap Logs using the UART KIT on Mac OSX

Post Reply
User avatar
midel
Posts: 45
Joined: Sun Mar 17, 2013 9:24 am
languages_spoken: english
ODROIDs: ODROID-X2
Contact:

[HOW TO] Config and Cap Logs using the UART KIT on Mac OSX

Unread post by midel » Sat Mar 23, 2013 12:39 am

Similar to the setup for Linux, I bring you the UART KIT setup for the few (me being one of them) Mac users on this form. I'm using the most recent version of Mac OSX (10.8) but it should be backwards compatible with 10.6 and 10.7 users. :)

DRIVER
First order of business is to get the drivers for our UART to work.
You may get them at the site below:
http://www.silabs.com/Support%20Documen ... Driver.zip
Unzip and install the package and reboot the system.
Image
Make sure the driver is install correctly by plugging in your UART into the USB ports of your Mac, and checking system information under: Apple Logo > About This Mac > More Info... > System Report... > Hardware > USB and look for the CP2104 USB to UART Bridge Connector
Image

INSTALL HOMEBREW, COMMAND LINE TOOLS, AND MINICOM
Next in order to install minicom, we're going to need to install homebrew
http://mxcl.github.com/homebrew/
As well as installing the Command Line Tools for Xcode (required for building software with brew, ports, or fink. Since you are a developer on the Mac Platform, its a good idea to pick it up if you want GNU Linux tools on that Mac of yours!)
https://developer.apple.com/downloads

Open terminal once again (found in /Applications/Utilities/Terminal).
Making sure to update homebrew once before going into this, install minicom with this command:

Code: Select all

$ brew install minicom
It will take a moment to compile the program for your machine. Next we need to get the actual terminal to read for the UART KIT.

READING THE UART
Now that we have the drivers and minicom installed on the Mac it's time to find out where it is!
Enter into terminal this command:

Code: Select all

$ ioreg -c IOSerialBSDClient | grep USBtoUART
the output will look similar to this:
Image
From there we need to setup minicom similar to the setup for Linux.
Open Minicom in SETUP mode with this command:

Code: Select all

$ sudo minicom -s
Enter your user password, press enter, then navigate with the arrow keys to Serial port setup and type A to change the Serial Device to what we got from the previous command.
It should look something like this:
Image
Press enter until you return to the main menu, and navigate to Save setup as dfl to save this so we never need to set it up again. Then Exit to enter the main view. To exit Minicom completely press Esc+X

LOGGING
With minicom open (sudo minicom) press ESC+L together.
Provide it a file name and press enter. Run your Odroid and capture your input then stop or close the logging with ESC+L again.

You will find the log file in the same directory as what the terminal is opened up to. (DEFAULT IS YOUR HOME DIRECTORY)

I hope this helps the few people who have macs and develop on the Odroid and need to see the UART port without wanting to dual boot windows or get another PC entirely.

Image
Looks good!

Kelnt
Posts: 17
Joined: Sat Mar 23, 2013 4:35 am
languages_spoken: english
ODROIDs: ODROID-X
Contact:

Re: [HOW TO] Config and Cap Logs using the UART KIT on Mac O

Unread post by Kelnt » Fri Mar 29, 2013 5:08 am

Just so folks know, Mac OS comes with GNU Screen as part of the default install. Once you've installed the drivers, you can find the correct port to connect to with the command "ls -l /dev/tty.*". On my system it's "dev/tty.SLAB_USBtoUART". You can connect using screen with this command screen "/dev/tty.SLAB_USBtoUART 115200".

This way you don't need to install anything extra.

User avatar
midel
Posts: 45
Joined: Sun Mar 17, 2013 9:24 am
languages_spoken: english
ODROIDs: ODROID-X2
Contact:

Re: [HOW TO] Config and Cap Logs using the UART KIT on Mac O

Unread post by midel » Fri Mar 29, 2013 1:11 pm

Ahh that 115200 was what I was missing. I knew Screen scould do it, but I was getting garbage text using it. That connection rate should allow UART to be read using the building screen.

Thanks Kelnt!

don_apple
Posts: 32
Joined: Thu Apr 18, 2013 3:09 am
languages_spoken: german english
ODROIDs: ODROID-X2
Location: Germany
Contact:

Re: [HOW TO] Config and Cap Logs using the UART KIT on Mac O

Unread post by don_apple » Sat Apr 20, 2013 12:08 am

Hello,

for some reason the UART-to-USB adapter doesn't seem to work correctly on my Mac, while on my linux box it works 100% reliable :-(

I'm running MAC OS X 10.8.3 (upgraded from 10.6.8) on a 2011 iMac and have the Mac OS X VCP driver mentioned in the original post installed. However only in one out of 10 times when connecting the UART-to-USB Adapter to the USB port on the Mac, Mac OS X is able to detect it and load the driver. The other nine times the UART-to-USB adapter doesn't show up at all.

Does anybody else using the UART-to-USB adapter with Mac OS X have the same problem?

Edit: After swapping out the USB cable the UART-to-USB adapter now also works on the Mac. Not sure why it doesn't like the original cable which works fine on my Linux box.

Regards,
don_apple

farleylai
Posts: 13
Joined: Mon Jun 15, 2015 7:25 am
languages_spoken: english
Contact:

Re: [HOW TO] Config and Cap Logs using the UART KIT on Mac O

Unread post by farleylai » Fri Jul 24, 2015 7:22 am

Does the UART access work with the ubuntu-mate for ODROID XU3?
I followed the instructions to set up the tty.SLAB_USBtoUART but there is nothing shown whether through minicom or screen.
After rebooting the device, it shows the messages until the login prompt.
However, I cannot type anything.
Is there anything wrong?
Got the solution!
The hardware flow control should be OFF.
The software flow control can be ON.
That's it.

geodatup
Posts: 7
Joined: Tue Aug 09, 2016 11:55 pm
languages_spoken: english, french
ODROIDs: C0, C2
Contact:

Re: [HOW TO] Config and Cap Logs using the UART KIT on Mac O

Unread post by geodatup » Tue Aug 23, 2016 3:39 pm

I am running OSX 10.11 and I had trouble on driver install process.

I had to change the permission on this file and I solve the problem.

Code: Select all

sudo chown -R root:wheel /System/library/Extensions/USBExpressCardCantWake_Huawei.kext

Hope that could help someone.

svoop
Posts: 1
Joined: Sat Jan 30, 2016 10:25 pm
languages_spoken: english
ODROIDs: C1+
Contact:

Re: [HOW TO] Config and Cap Logs using the UART KIT on Mac O

Unread post by svoop » Fri Feb 24, 2017 12:32 am

Here's an easier way to do the same (tested on macOS Sierra).

First extend Homebrew with Cask (see http://caskroom.io) unless you're using Cask already:

Code: Select all

brew tap caskroom/cask
Then install the driver and open a serial console:

Code: Select all

brew cask install silicon-labs-vcp-driver
screen /dev/tty.SLAB_USBtoUART 115200
The latter makes a great command entry on Terminal or iTerm so you don't have to remember it by heart.

jposemescouilles
Posts: 10
Joined: Thu Mar 01, 2018 9:01 am
languages_spoken: english / français
ODROIDs: hc-1
Contact:

Re: [HOW TO] Config and Cap Logs using the UART KIT on Mac O

Unread post by jposemescouilles » Wed Oct 24, 2018 11:06 am

Thanks a lot, it helped me getting access back to my odroid.

Not to mention that capturing the boot sequence output made me look like a hacker in front of my whole family! (I might have said to them it was government servers...)

Post Reply

Return to “General”

Who is online

Users browsing this forum: No registered users and 0 guests