Hot!CDC serial device Microchip to android OTG host

Author
EfYuri
Starting Member
  • Total Posts : 17
  • Reward points : 0
  • Joined: 2016/08/09 22:38:24
  • Location: 0
  • Status: offline
2018/02/02 02:44:01 (permalink)
0

CDC serial device Microchip to android OTG host

Hi, if I have cdc serial emulator (uart - usb on pic16f1454) and want to transfer my data from the uC to android tablet through OTG do I need any driver for creating virtual COM port on android?
post edited by EfYuri - 2018/02/09 02:01:55
#1

5 Replies Related Threads

    EfYuri
    Starting Member
    • Total Posts : 17
    • Reward points : 0
    • Joined: 2016/08/09 22:38:24
    • Location: 0
    • Status: offline
    Re: CDC serial device to android OTG host 2018/02/08 05:50:10 (permalink)
    0
    Ill be grateful
    #2
    qɥb
    Monolothic Member
    • Total Posts : 1291
    • Reward points : 0
    • Joined: 2017/09/09 05:07:30
    • Location: Jupiter
    • Status: offline
    Re: CDC serial device to android OTG host 2018/02/08 12:32:11 (permalink)
    0
    You might get more help on an Android forum, as that is what your question is about.
     

    PicForum "it just works"
    #3
    EfYuri
    Starting Member
    • Total Posts : 17
    • Reward points : 0
    • Joined: 2016/08/09 22:38:24
    • Location: 0
    • Status: offline
    Re: CDC serial device to android OTG host 2018/02/08 23:24:59 (permalink)
    0
    qɥb
    You might get more help on an Android forum, as that is what your question is about.
     

     
    Mm, I''ll try but they will say to "call to your uC manufacturer" I guess.
    I saw "USB Host" document on android help-site and some posts in our forum. They says for Android it doesn't matter which uC offer to work with CDC (only vid\pid matters) ( http://www.microchip.com/forums/FindPost/764784 ) . But also there are many information about other uC like FTDI, Prolific etc and they offer CDC serial drivers for Android ( https://github.com/mik3y/usb-serial-for-android/tree/master/usbSerialForAndroid/src/main/java/com/hoho/android/usbserial/driver ).
    And I'm confused, bcoz cant decide what side is right. 
    #4
    rodims
    Super Member
    • Total Posts : 1071
    • Reward points : 0
    • Joined: 2009/02/10 11:08:59
    • Location: 51.9627, 7.6262
    • Status: online
    Re: CDC serial device to android OTG host 2018/02/09 05:47:19 (permalink)
    +2 (2)
    I just installed the Android App "Serial USB Terminal" on a Samsung S7 and attached it via an FTDI adapter.
    https://play.google.com/s...usb_terminal&hl=en
    Be sure to use a USB OTG adapter / cable, if not already supplied with your phone.
    from the description: To connect USB to serial converters, your android device must support USB OTG aka. USB host mode.
    For a self written debug-monitor my PIC24FJ...GB I can use both a simple serial port (usually connected via FTDI to an USB host = PC), but I can also use my PIC's USB / CDC (based on MLA code).
    FTDI attached to the S7 works out of the box, no driver (automatic detection of FTDI), no hassle.
     
    Then I attached my PIC's USB (i.e. CDC) to the phone. The App provides a menu which contains "USB devices" and this point will list an unknown  / custom CDC device with Vendor ID (04D8) and Product ID (0057), i.e. this is Microchip.
    the app then also offers a choice for the "Driver for unknown device"
    -no driver
    CDC
    CH340
    CP210x
    FTDI
    PL2302

     
    If I choose CDC here (and later connect ... ) this works perfectly with my PIC24.
    So at least for my configuration I did not have to install any driver for this on my Android 7 phone. No idea what possibly the App does behind the scenes, and whether it brings along those drivers listed above.
     
    The App looks good, it also allows to define HEX byte sequences as strings.
     
    edit: one itsy bitsy detail
      This Android app seems to send the message body and the Newline character(s) in different USB packets. (or with a time gap?)
      The Microchip USB stack function
          uint8_t getsUSBUSART(uint8_t *buffer, uint8_t len)
      in my case will first retrieve the body, and on the next call it will get the selected Newline character(s).
    /edit
     
    post edited by rodims - 2018/02/09 12:53:15
    #5
    EfYuri
    Starting Member
    • Total Posts : 17
    • Reward points : 0
    • Joined: 2016/08/09 22:38:24
    • Location: 0
    • Status: offline
    Re: CDC serial device to android OTG host 2018/02/13 00:50:10 (permalink)
    +1 (1)
    Thanks! I tried the app with my device and it works too. Im glad that PIC doesnt need a specific driver.
    #6
    Jump to:
    © 2018 APG vNext Commercial Version 4.5