Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Novice
1,204 Views

Serial Monitoring & Debugging In USB Host Mode On Edison

Jump to solution

Is is possible to view the serial monitor output from an Arduino script while in USB Host Mode on an Intel Edison? I've recently started working with USB peripherals over the Edison's built in USB-A port, which requires you to flip the little microswitch to enable host mode, therefore disabling the middle USB micro client port (/dev/ttyGS0) that is used for debugging/serial-monitoring and deploying code. As a result, I find it very difficult to debug programs involving USB HIDs seeing as there is no way to see the serial output while in host mode.

 

Perhaps there's a way to view the serial output from the USB micro host port (/dev/ttyMFD2) in the Edison Linux terminal?

 

I found similar question on Stack Overflow, but it uses an Android Things configuration. Thanks in advance.

Tags (1)

Accepted Solutions
Highlighted
Employee
631 Views
Hello MMora15, Thank you for your patience! There are several command line tools available that could help look at error messages and kernel verbiage in general. One of those tool is "dmesg" which can be very useful when troubleshooting or just trying to obtain information about the hardware on a system, as explained here http://www.linfo.org/dmesg.html. Hope this helps! Thank you and best regards, Eliza

View solution in original post

0 Kudos
3 Replies
Highlighted
Employee
631 Views
Hello MMora15, Thank you for your interest in the Intel Edison Board. Could you please let us know if lsusb command gives you any error message? On an older thread (https://forums.intel.com/s/question/0D50P0000490WLkSAM/intel-edison-usb-host-mode?start=15&tstart=0) where another Edison user enabled it in Host Mode, someone mentioned that having this setup, they would receive "-99(no USB device attached)". The solution he found is as follows: "My solution was to use the PSW signal to be my power enable to the USB. My suspicion is that the uvc camera (this was my case, but i would bet it's similar for all usb slaves) goes into "sleep" if no one replies within 300 ms of power-up (reference eludes me at the moment). Pin out of otg connector etc. you seem to be OK, so this would be my only suggestion. I haven't had a chance to understand exactly what was happening since for now it "works" and if it ain't broke ... " Maybe this thread can help you! Thank you and best regards, Eliza
0 Kudos
Highlighted
Novice
631 Views

Hi Eliza. Thank you for your response.

 

I ran the lsusb command from the Edison Linux terminal and did not receive an error. After running the command I received the following:

Bus 001 Device 002: ID 04d9:048e Holtek Semiconductor, Inc. Optical Mouse Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub

I've been testing with an optical mouse plugged into the USB-A port, so that'd explain the mouse.

 

However, the forum you linked here uses an Edison mini breakout board while I have the Edison Arduino breakout board, which has a physical switch to change between Host/Client mode.

 

My main question is if anyone has a recommendation on how to perform serial debugging while using a USB peripheral or view serial-monitor output from the linux terminal. Any ideas?

 

Thanks.

0 Kudos
Highlighted
Employee
632 Views
Hello MMora15, Thank you for your patience! There are several command line tools available that could help look at error messages and kernel verbiage in general. One of those tool is "dmesg" which can be very useful when troubleshooting or just trying to obtain information about the hardware on a system, as explained here http://www.linfo.org/dmesg.html. Hope this helps! Thank you and best regards, Eliza

View solution in original post

0 Kudos