title: Read USB-C ports using Java from MacBook Pro with Touch Bar 2016
body: <p>There is a library or so on to read USB-C ports from my MacBook Pro Touch by using Java?</p>
  
  <p>My machine has four USB-C ports and an Apple USB-C multiport that "maps" three ports:</p>
  
  <p>1) USB 3.1</p>
  
  <p>2) HDMI</p>
  
  <p>3) another USB-C</p>
  
  <p>See <a href="https://www.apple.com/shop/product/MJ1K2AM/A/usb-c-digital-av-multiport-adapter" rel="nofollow noreferrer">here</a> for further details.</p>
  
  <p>I need to read the USB 3.1 port thorough the adapter above mentioned using a simple Java program, in particular a tester device <a href="https://www.dowarsztatu.com/product-pol-8026-Tester-czujnikow-TPMS-AID-CUB.html" rel="nofollow noreferrer">this</a> (a TPMS AID CUB Tester) with a USB-out port that writes data, I have to read them.</p>
  
  <p>I tried to use <a href="https://mvnrepository.com/artifact/org.scream3r/jssc/2.8.0" rel="nofollow noreferrer">JSSC</a> and the first example code form <a href="https://code.google.com/archive/p/java-simple-serial-connector/wikis/jSSC_examples.wiki" rel="nofollow noreferrer">here</a>:</p>
  
  <pre><code>public class Main {
  
    public static void main(String[] args) {
        String[] portNames = SerialPortList.getPortNames();
       for(int i = 0; i &lt; portNames.length; i++){
            System.out.println(portNames[i]);
        }
    }
  }
  </code></pre>
  
  <p>It runs without errors, but prints nothing, even if I tried to plug in a mouse.</p>
  
  <p>On Wireshark I noticed it pings and my machine responds correctly to it.</p>
  
  <hr>
  
  <p>Further details:</p>
  
  <p><a href="https://i.stack.imgur.com/mcMsh.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/mcMsh.png" alt="enter image description here"></a></p>