The issue here is that the CP210x driver is not enabled in the Android kernel by default. So you will either need to build this driver in to your kernel to get the tty access and ability to use JavaComm.
The other option is to use the USB Host functionality and access your CP210x directly with it's API.
from Preston answered Dec 10 '13 at 15:19
Ok.
Eventually solved my own problem.
When I imported the projects into Eclipse, the default Java Build path -> Source location settings are are for /src and /gen
However the project sources for this are in /java/src/...
So I've moved the files into /src as this seem to be the default (possibly current best practice ???) - as I said, I'm new to Android dev, so I'm not sure what the norms are, but when you create an empty project in the latest version of Eclipse it puts the source files in /src
The issue of the library name was just syntax, i.e the project can be renamed in Eclipse from "main" to USBSerialLibrary using the Refactor -> Rename command.
The stuff in the HowTo about linking the library seems to be out of date as well. As far as I can see (and it works for me in Eclipse ADT v22.6.2-1085508), is just to add the USBSerialLibrary project as a library to the Android setting in Properties.
BTW. I seem to need to compile as Android 4.2.2 because of a reference to JELLYBEAN in the code
I'm also getting lots of warnings, but normally isn't good news, however the only ones that probably needs to be dealt with in the long term is that
import android.widget. TwoLineListItem;
appears to be deprecated.
Anyway, I hope this helps anyone else just starting out on this journey ;-)
Eventually solved my own problem.
When I imported the projects into Eclipse, the default Java Build path -> Source location settings are are for /src and /gen
However the project sources for this are in /java/src/...
So I've moved the files into /src as this seem to be the default (possibly current best practice ???) - as I said, I'm new to Android dev, so I'm not sure what the norms are, but when you create an empty project in the latest version of Eclipse it puts the source files in /src
The issue of the library name was just syntax, i.e the project can be renamed in Eclipse from "main" to USBSerialLibrary using the Refactor -> Rename command.
The stuff in the HowTo about linking the library seems to be out of date as well. As far as I can see (and it works for me in Eclipse ADT v22.6.2-1085508), is just to add the USBSerialLibrary project as a library to the Android setting in Properties.
BTW. I seem to need to compile as Android 4.2.2 because of a reference to JELLYBEAN in the code
I'm also getting lots of warnings, but normally isn't good news, however the only ones that probably needs to be dealt with in the long term is that
import android.widget.
appears to be deprecated.
Anyway, I hope this helps anyone else just starting out on this journey ;-)
沒有留言:
張貼留言