Profile

Cover photo
Jason Banich
Works at Viakoo
Attended Cal Poly
Lives in San Luis Obispo, ca
164 followers|374,211 views
AboutPostsPhotosYouTubeReviews

Stream

Jason Banich

Shared publicly  - 
 
 
USB C to A cable testing refined - Nexus 5X only
Edit: Now 6P as well

Short version
5X
adb shell "cat /sys/bus/i2c/drivers/fusb301/*/fclientcur"
Or  from a shell on the phone
cat /sys/bus/i2c/drivers/fusb301/*/fclientcur

If the result is 3000 the cable is non-compliant

6P
adb shell "cat /sys/class/typec/typec_device/current_detect"
Or from a shell on the phone
cat /sys/class/typec/typec_device/current_detect

If the result is 2 the cable is non-compliant

Details
The FUSB301 chip is connected directly to the configuration channel pins in the Type-C port on the Nexus 5X and is used determine if the cable is connected, the orientation, and the power level and direction.  The fusb301 driver makes the charge current value available in the file fclientcur in the sys file system.  Because this is as close as it gets to the CC pins in the port, this is the best that can be done from the phone.

Also, because this can be done from the phone, if it is in fact reliable, an app can be built around this.

Looking at the kernel sources for the 6P, it doesn't have the fusb301 driver so it is probably using a different chip.  The 6P uses a tusb320
169 comments on original post
1
Ivan Yudhi's profile photo
 
/sub
Add a comment...

Jason Banich

Shared publicly  - 
 
Join our team of rover drivers!
1
Add a comment...

Jason Banich

Discussion  - 
 
Is there a possibility of pushing out a version that requires root, but works on 4.4?
4
Add a comment...

Jason Banich

Shared publicly  - 
1
Add a comment...

Jason Banich

Shared publicly  - 
1
Add a comment...

Jason Banich

commented on a video on YouTube.
Shared publicly  - 
 
Dont litter

Jason Banich

Shared publicly  - 
 
Sometimes I have no idea what the designers of windows were thinking: http://www.robvanderwoude.com/escapechars.php
Escape Characters. All DOS versions interpret certain characters before executing a command. Some well know examples are the percent sign ( % ), and the redirection symbols ( < | > ). Windows 95/98 and NT, and OS/2 too, also interpret double quotes ( " ) and ampersands ( & ), as shown in the ...
1
Add a comment...

Jason Banich

Shared publicly  - 
1
Add a comment...

Jason Banich

Shared publicly  - 
1
Add a comment...

Jason Banich

Shared publicly  - 
1
Add a comment...
Story
Tagline
I'm Jason
Introduction
Adding stuff here to get this published
Bragging rights
Eagle Scout
Education
  • Cal Poly
    Computer Engineering, 2007 - 2016
  • Menlo Atherton HS
Basic Information
Gender
Male
Work
Occupation
Software Developer
Employment
  • Viakoo
    Software Developer, 2013 - present
  • Cal Poly San Luis Obispo
    Student, 2007 - 2014
  • Intransa
    Software Development Intern, 2012 - 2013
  • Tyco Electronics
    Apps Engineering Intern, 2008 - 2008
  • Tyco Electronics
    Development Intern, 2010 - 2010
  • TE Connectivity
    Development Intern, 2011 - 2011
Places
Map of the places this user has livedMap of the places this user has livedMap of the places this user has lived
Currently
San Luis Obispo, ca
Previously
Menlo Park, ca
Links
Other profiles
Public - a month ago
reviewed a month ago
Public - a month ago
reviewed a month ago
Public - 7 months ago
reviewed 7 months ago
13 reviews
Map
Map
Map
Public - 7 months ago
reviewed 7 months ago
Public - 7 months ago
reviewed 7 months ago