Use of the USB-Serial SDK for Android

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

Hi !

   

I want to develop an Android app that communicates with a device using  a CY7C68053-56BAXI chip.

   

The chip uses the ReNumeration process (2 steps configuration).

   

Is the USB-Serial SDK for Android (found here : http://www.cypress.com/?rID=83110) appropriate to develop that kind of application ?

   

I already have the firmware file to load in the chip, I just don't know how to do it. So, are the necessary functions for loading a firmware on the chip, included in the SDK mentionned above ?

   

If not, what should I do ?

   

 

   

Even if I'm not sure that it's the proper SDK, I tried to run the application provided in it, on an Android tablet, to try communicating with the Cypress chip.

   

The problem is, I can't build the .apk because of an error in the native (C/C++) files of the SDK :

   

Here is the build log:

   

" Executing tasks: [:app:assembleDebug]

Configuration on demand is an incubating feature.
:app:preBuild
:app:compileDebugNdk
/home/matthieu/Projects/AndroidStudioProjects/CyUSBSerial/app/src/main/jni/CyUSBSerial_JNI/cy_libusb/io.c:21:20: fatal error: config.h: No such file or directory
compilation terminated.
make: *** [/home/matthieu/Projects/AndroidStudioProjects/CyUSBSerial/app/build/intermediates/ndk/debug/obj/local/armeabi-v7a/objs-debug/app//home/matthieu/Projects/AndroidStudioProjects/CyUSBSerial/app/src/main/jni/CyUSBSerial_JNI/cy_libusb/io.o] Error 1

 FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:compileDebugNdk'.
> com.android.ide.common.internal.LoggedErrorException: Failed to run command:
      /home/matthieu/Programs/android-studio/android-ndk-r10b/ndk-build NDK_PROJECT_PATH=null APP_BUILD_SCRIPT=/home/matthieu/Projects/AndroidStudioProjects/CyUSBSerial/app/build/intermediates/ndk/debug/Android.mk APP_PLATFORM=android-14 NDK_OUT=/home/matthieu/Projects/AndroidStudioProjects/CyUSBSerial/app/build/intermediates/ndk/debug/obj NDK_LIBS_OUT=/home/matthieu/Projects/AndroidStudioProjects/CyUSBSerial/app/build/intermediates/ndk/debug/lib NDK_DEBUG=1 APP_ABI=all
  Error Code:
      2
  Output:
      /home/matthieu/Projects/AndroidStudioProjects/CyUSBSerial/app/src/main/jni/CyUSBSerial_JNI/cy_libusb/io.c:21:20: fatal error: config.h: No such file or directory
      compilation terminated.
      make: *** [/home/matthieu/Projects/AndroidStudioProjects/CyUSBSerial/app/build/intermediates/ndk/debug/obj/local/armeabi-v7a/objs-debug/app//home/matthieu/Projects/AndroidStudioProjects/CyUSBSerial/app/src/main/jni/CyUSBSerial_JNI/cy_libusb/io.o] Error 1


* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.


BUILD FAILED

Total time: 1.206 secs"

   

Do you know something about this error ? The config.h file is in the same folder as io.c, why can't the compiler find it ?

   

 

   

Thank you for your help.

   

Matthieu Heitz

0 Likes
3 Replies
Anonymous
Not applicable

By the way, I use the Android Studio IDE.

0 Likes
Anonymous
Not applicable

Hi again !

   

I've managed to bypass the error by replacing #include <config.h>  by  #include "config.h", in cy_libusb/io.c

   

I now have another problem: it doesn't find libusbi.h, in io.c:42:21  :  #include "libusbi.h"

   

libusbi.h is in the parent folder, so I tried #include "../libusbi.h", but it doesn't work either.

   

What can I do ?

   

 

   

Thank you.

   

Matthieu

0 Likes
Anonymous
Not applicable

I repost my previous questions to refresh the thread:

   

 

   

I want to develop an Android app that communicates with a device using  a CY7C68053-56BAXI chip.

   

The chip uses the ReNumeration process (2 steps configuration). So I need to load a firmware in the chip before being able to send commands to it.

   

Is the USB-Serial SDK for Android (found here : http://www.cypress.com/?rID=83110) appropriate to develop that kind of application ?

   

If not, is there anothe way that I can do this Renumeration process from an Android device ?

   

I already have the firmware file (to load in the chip), I just don't know how to do it.

   

 

   

Thank you,

   

Matthieu Heitz.

0 Likes