serial over usb

by whataboutbob » Thu, 05 Mar 2009 23:04:07 GMT

Sponsored Links
 Does the G1 have a driver to support a serial over USB connection?

serial over usb

by James Clements » Thu, 05 Mar 2009 23:08:08 GMT

 definately hope it will ... some great attachments could come about ... but
also hoping for BT to develop so that wide range of Devices might be used
.... maybe even a BT printer ...


Sponsored Links

Other Threads

1. Timeout using apache DefaultHttpClient not working when port is closed

I have a simple piece of code that allows a user to specify a URL,
port, username, and password to grab a frame from a network camera.
An exception is thrown properly if the url can't be resolved, or if
the authentication fails.  However, I can't seem to throw an exception
in a reasonable amount of time if the server is available but the port
is closed (or the user entered the wrong port number).  It just seems
to sit and wait for a *long* time...

HttpParams params = new BasicHttpParams();
HttpConnectionParams.setConnectionTimeout(params, netConnectTimeout);
HttpConnectionParams.setSoTimeout(params, netReadTimeout);
DefaultHttpClient httpclient = new DefaultHttpClient(params);
DefaultHttpRequestRetryHandler(0, false));
UsernamePasswordCredentials credentials = new
UsernamePasswordCredentials(username + ":" + password);
httpclient.getCredentialsProvider().setCredentials(new AuthScope
HttpGet method = new HttpGet(cameraUrl);
HttpResponse response = httpclient.execute(method);

(netConnectTimeout & netReadTimeout are both set to 10000)

After doing a substantial amount of reading, I believe I understand
why netConnectTimeout and netReadTimeout have no effect on this
particular problem.  After discovering "HttpRequestRetryHandler" I
believed I had found the solution.  However after applying what I had
found to my code (line 5 above), it had no effect.  The connection
still sits and waits far longer than 10 seconds when the incorrect
port is specified in the prefs.

Can anybody help?


2. Best way to add 100.000 words to database

I am developing an application that, as the first thing, puts all
lines from a txt-file to a sqlite database. There is about 100.000
words that should be added to the database, and this takes almost an
hour to do.
Is there a better way to do this, fx. to have a database in the res/
raw resources if it is possible.
This is my currently way to do it:

public void getWords(final Context context, final InputStream aFile) {
        try {
                  InputStreamReader reader = new InputStreamReader(aFile,
                  BufferedReader input =  new BufferedReader(reader);
                  try {
                        DB = context.openOrCreateDatabase(DATABASE_NAME, 1, 
                        DB.execSQL("DELETE FROM english");
                    String line = input.readLine();
                    int i = 0;
                    while (( line = input.readLine()) != null){
                        try {
                                DB.execSQL("INSERT OR IGNORE INTO english(word) 
('" + line + "')");
                        catch (Exception e) {
                                Log.e("kaloer", e.getMessage());
                        if(i % 100 == 0) {
                                                try {
catch(InterruptedException e) {
                  } catch (IOException e) {
                  finally {
                         try {
                                } catch (IOException e) {


Thank you very much,

3. Outlook Synchronization (Possible?)

4. 1.5 rebuild issue with emulator

5. OpenGL garbage collection (with direct ByteBuffers)

6. The building instruction maybe broken

7. ADB server didn't ACK, cannot bind tcp...