3
\$\begingroup\$

I have the PIC24F Android Accessory Development Starter Kit from Microchip. I am running Android 4.4.2 on a Samsung Galaxy S4, however I am unable to get the phone to recognize the USB device when plugged in. The Microchip Accessory Support detection app reads as follows:

android.hardware.usb.accessory=true
com.android.future.usb.UsbAccessory=false
android.hardware.usb.host=true
android.hardware.wifi.direct=true
android.hardware.bluetooth=true

From what I can tell the Accessory mode is supported in Android 3+, is there some process to enable the Accessory mode? Any advice on how I would get this working?

EDIT:

I have contacted support at Microchip, there does seem to be an issue installing the compiler and the Application libraries mentioned in Keelan's answer below. However on a windows machine once the MPLAB X is installed, the 16 bit compiler and the Application Libs. Simply build the Demo firmware and install it onto the device, then attach to an Android device with the Demo app and it all works well !

\$\endgroup\$
1
\$\begingroup\$

You do not need to have com.android.future.usb.UsbAccessory (if I understand correctly that's your question, right?). This is because this namespace contains only a backported API to enable some kind of support on Android 2.3.4 (source). So the output of the detection app is completely normal and fine.

Now, this doesn't solve your problem yet, of course. I have only one idea right now: did you follow the manual? The whole section 6.2 is relevant, but I'm thinking in particular of section 6.2.2, "Preparing the hardware":

Before attempting to run the demo application, insure that the correct firmware for the demo application has been loaded into the target firmware.

The firmware for this example can be found in the "Basic Accessory Demo/Firmware" folder of this distribution. Open the correct project file for your hardware platform for MPLAB 8. If you are using MPLAB X, open the MPLAB.X project folder and change the configuration in the configuration drop down box. Compile and program the firmware into the device.

(Android Library Help)

\$\endgroup\$
  • \$\begingroup\$ I am using MPLAB X, I can't seem to find the Basic Accessory Demo/Firmware. Do you have a URL ? Thanks ! \$\endgroup\$ – avrono Sep 24 '14 at 10:03
  • 1
    \$\begingroup\$ @avrono on the page for your kit (microchip.com/Developmenttools/…) there's on the bottom a link to "Microchip Libraries for Applications", which leads you to this page in the end: microchip.com/pagehandler/en-us/devtools/mla/home.html - there you can download the libraries, and also demos are included. Make sure to download the Legacy MLA. It's true, MCP's website is not very clear. \$\endgroup\$ – user17592 Sep 24 '14 at 10:16
  • \$\begingroup\$ Many thanks, I downloaded the "new" MLA, but it does not seem to install on Ubuntu 13.10. It would be a pitty to have to use a Windoz machine \$\endgroup\$ – avrono Sep 24 '14 at 12:16
  • \$\begingroup\$ @avrono I've never worked with MCP on linux, but I'm guessing you could just install it once on windows (I understand you have access to a windows machine) and then copy the sources of the demos. I'm not sure if it would work though. Also, Ubuntu 13.10 has reached EOL, but that shouldn't matter since the MLA is older. Maybe MLA only works with 12 or lower. \$\endgroup\$ – user17592 Sep 24 '14 at 12:22
  • \$\begingroup\$ Actually I am on 14.04, I might have to copy the sources as you suggest. Unfortunately, I also can't get the compilers to install or even post a message to the Microchip forums ! \$\endgroup\$ – avrono Sep 24 '14 at 12:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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