0
\$\begingroup\$

I'm trying to find out if there is any way to control the CC lines on a USB-C from an android app. I need to signal to my embedded gadget some event, instigated from an android app. I can't find any details on the phy layer of USB for android. any suggestions?

\$\endgroup\$
2
  • \$\begingroup\$ You want to use the CC pin as an IO? \$\endgroup\$
    – Dejvid_no1
    Commented Jan 11, 2021 at 20:52
  • \$\begingroup\$ I'd like to create some trigger-worth signal that is created by the android app. in my readings, the best case scenario would be to toggle the cc lines, like a DRP should be able to do. that way my external device can detect the state change and go do something. \$\endgroup\$
    – Darren
    Commented Jan 11, 2021 at 22:18

1 Answer 1

1
\$\begingroup\$

I doubt the CC pins are exposed to applications since they're an internal part of the USB connection and not something an application should have access to. Instead, a better option would be to use the USB data pins:

https://code.google.com/archive/p/android-serialport-api/wikis/android_to_rs232_guideline.wiki

This is officially supported and much more flexible.

\$\endgroup\$
4
  • \$\begingroup\$ good suggestion. I could use D+/D-. But I'd like to have an obvious event signal which I could use as GPIO for another mcu. that's what I was thinking doing the DRP swap for switching the CC lines would be a good candidate. Is there a forum for asking low level android questions? worst case scenario, I could do some root fix if it gave me control of the usb protocol pins. \$\endgroup\$
    – Darren
    Commented Jan 12, 2021 at 23:40
  • \$\begingroup\$ If the drivers for your chipset have source code available you could look into how that signaling works. It may not be exposed at all though. \$\endgroup\$ Commented Jan 13, 2021 at 0:05
  • \$\begingroup\$ the signal must be instigated by the user in an android app. that's what I'm trying to dig down into. but it doesn't have obvious exposure from android dev documentation. \$\endgroup\$
    – Darren
    Commented Jan 13, 2021 at 0:41
  • \$\begingroup\$ You won't be able to do this from within an Android app. \$\endgroup\$ Commented Jan 13, 2021 at 2:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.