Android Question [SOLVED] felUsbserial with android marshmellow...

Discussion in 'Android Questions' started by rbghongade, Jul 14, 2016.

  1. rbghongade

    rbghongade Active Member Licensed User

    Dear friends,
    I have successfully interfaced arduino duemilanove with android phone (android 4.4 ), but if I try to use the same apk on a phone running marshmellow 6.0.1 , the usb connection is not recognised. Is this a known issue with marshmellow?
    I have followed all instructions about modifying manifest file, used device_filter.xml (making it read only), even changed the target sdk to API 23.
    Even using Genymotion emulator , the connection works for android 4.4 (kitkat) and not for android 6.0.1 (marshmellow).
    Seems to be a problem with marshmellow.
    Any solution is highly appreciable.
    regards,
     
  2. Erel

    Erel Administrator Staff Member Licensed User

    I don't think that it is related to the OS version. Not all devices support USB host mode.
     
    Peter Simpson likes this.
  3. rbghongade

    rbghongade Active Member Licensed User

  4. Erel

    Erel Administrator Staff Member Licensed User

    What happens when you click on the connect button?
     
  5. rbghongade

    rbghongade Active Member Licensed User

    Log displays the "No usb devices" .
     
  6. Erel

    Erel Administrator Staff Member Licensed User

  7. rbghongade

    rbghongade Active Member Licensed User

    Dear Erel,
    Let me summarise my experience:
    To start with I was not able to detect usb device on android (phone model MI5 running Marshmellow). I connected Arduino Duemilanov to phone and now the device gets detected and usbserial 2.4 library works great, plotting the analog data on screen. I tried to connect Arduino Mega 2560 ( not ADK) and it does not work! I have attached log of usb1.DeviceInfo(1), screenshot of DroidTerm and my project. Interesting thing is that an app called "DroidTerm" is able to connect and display the adc values! I am confused as to where the actual problem lies! Please help!
    regards,
     

    Attached Files:

  8. Erel

    Erel Administrator Staff Member Licensed User

    Try to use felUsbSerial instead and see whether it works.
     
    Peter Simpson likes this.
  9. rbghongade

    rbghongade Active Member Licensed User

    Dear Erel,
    Finally solved the problem. It was nothing to do with felusb serial library! My pea-sized brain could not realize then, that it was a problem of creating a text file for logging and marshmellow was not granting permission for the same ! Removed the file writer code and it works as expected! Sorry to bother you!
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice