mbedãADKã¯ãã¼ã³ã«ããã
Page last updated
03 Jun 2011 , by
makoto abe .
12
replies
android
2011/05/26 åç
2011/05/27 read/write両æ¹è©¦ãã¾ããã
2011/05/28 sendStringã®åä½ã«ã¤ãã¦futabaããã«ä¿®æ£ããã ãã¾ããm(_ _)m
ããã®ä»XOOM(and nexus S)ã¸ã®åä½å¯¾å¿ãå³ãã¾ããã
2011/06/04 Android Open Accessory ã®ã©ã¤ãã©ãªå+demokitã«ã
watanabeããããé ããã½ã¼ã¹ãå
ã«ãã¦ãã¾ãm(_ _)m
VIDEO
ã¨ããããADKãåããã®ã§ãããåä½ãä¸å®å®ã§ã(T_T)
ä¿®æ£ããã ããã¨ãããããã§ãã
以ä¸ã½ã¼ã¹ã§ãã
Android Open Accessory Libraryåãã¦ã¿ã¾ããã
ãã«ã¯è»¢éã®ä½¿ãæ¹ãåãã£ã¦ããªããããç¸å¤ãããåä½ã¯ä¸å®å®ã
I do not understand the usage of the bulk transfer.
Please teach someone.
old program
p21ãp23ã¾ã§ãã¹ã¤ãããã¤ãªãã¦ã¿ã¾ããã
mode(PullUp)ã«ãã¦ã¾ãã
åããæ¹ã«ã¤ãã¦
nexus oneã§å®ç§ã«åããæ¹æ³ãè¦ã¤ãåºãã¾ãããw
demokitãèµ·åãã¦ãããªãã¡ãã¥ã¼ããQuitãé¸æãçµäºãã¦ãã ãã¨
androidæ¬ä½ãmbedã¨æ¥ç¶ãã
mbedã®ãªã»ãããæ¼ãã¦mbedãèµ·åããã¾ã§å¾
ã¤ã(10sããã)
demokitãèµ·å
demokitãéã³ãã£ããå¿
ãã¡ãã¥ã¼ããQuitãé¸æãã¦çµäºãã ãã¨
ç¾å¨ã®ç¶æ³
Nexus One 2.3.4 æå
Nexus S 2.3.4æåï¼
XOOMãXOOMã¨æ¥ç¶ç¶æ
ã§mbedããªã»ããå¾ãä¸æ¦ã¢ããªãçµäºããã¦åèµ·åã§åä½ã
12 comments on mbedãADKã¯ãã¼ã³ã«ããã:
abe00makoto
#
27 May 2011
sendStringãæ©è½ãã¦ãªãããã§ãã
ä»æ§éãã«å¤ãã»ãããããã¨ããã¨ä»¥ä¸ã®ãããªãã°ã
send_string start(1,0,Google, Inc.) 13
USB_IRQHandler UnrecoverableError Please reset
USB_IRQHandler UnrecoverableError Please reset
abeããã®ããã°ã©ã 試ããã¦é ãã¾ããã
åèªä¿¡ãè¯ãç解ãã¦ããªãç¶æ
ã§ç³ã訳ãªãã®ã§ããã
sendStringã® const char *str ãããã®ã¾ã¾USBControlTransferã«æ¸¡ãã®ã§ã¯ãªãã
ãããã¡ãä½ã£ã¦ã³ãã¼ãã¦ãã渡ãã¨HOST_TO_DEVICEãåãã¾ããã
u8 buffer[255];
strcpy((char*)buffer,str);
USBControlTransfer(device,
HOST_TO_DEVICE |REQUEST_TYPE_VENDOR|RECIPIENT_DEVICE,
ACCESSORY_SEND_STRING,
0,//value
index, //index
buffer,
strlen(str)+1);
ãããªæãã§ãã
åã®ç°å¢(Nexus One)ã§ã¯ãããã§å®å®ãã¦æ¥ç¶ãåºæ¥ãããã«ãªãã¾ããã
abe00makoto
#
27 May 2011
æé£ããããã¾ããããã°ã©ã ã«åæ ããã¦ããã ãã¾ããã
NexusSã§ãèµ·åã§ãã¾ããã¼ï¼
対å¿ãç²ãæ§ã§ãï¼
abe00makoto
#
28 May 2011
NexusSã§ãèµ·åã§ãã¾ããã¼ï¼
対å¿ãç²ãæ§ã§ãï¼
試ãã¦ããã ãã¦æé£ããããã¾ãã
åãã¦ããã£ãã§ããnotebookã«åæ ããã¦ããã ãã¾ãã
abe00makoto
#
28 May 2011
ç¾ç¶XOOMãã¡ããã¨åããªãã£ãã
sendString(addr, ACCESSORY_STRING_MANUFACTURER, manufacturer);
sendString(addr, ACCESSORY_STRING_MODEL, model);
sendString(addr, ACCESSORY_STRING_DESCRIPTION, description);
sendString(addr, ACCESSORY_STRING_VERSION, version);
sendString(addr, ACCESSORY_STRING_URI, uri);
sendString(addr, ACCESSORY_STRING_SERIAL, serial);
usb.ctrlReq(addr, 0,
USB_SETUP_HOST_TO_DEVICE |
USB_SETUP_TYPE_VENDOR |
USB_SETUP_RECIPIENT_DEVICE,
ACCESSORY_START, 0, 0, 0, 0, NULL);
while (usb.getUsbTaskState() != USB_DETACHED_SUBSTATE_WAIT_FOR_DEVICE) {
max.Task();
usb.Task();
}
ä¸è¨ã®ã³ã¼ãã¯arduinoã®ã½ã¼ã¹ã®æç²ãªãã§ããã
while()ã®ã³ã¼ãé¨åãmbedä¸ã§ã©ãå®è£
ããã°ããã®ã解ããæ¾ç½®ãã¦ããã®ãåå ãã¨ã
ç¾ç¶XOOMãã¡ããã¨åããªãã£ãã
sendString(addr, ACCESSORY_STRING_MANUFACTURER, manufacturer);
sendString(addr, ACCESSORY_STRING_MODEL, model);
sendString(addr, ACCESSORY_STRING_DESCRIPTION, description);
sendString(addr, ACCESSORY_STRING_VERSION, version);
sendString(addr, ACCESSORY_STRING_URI, uri);
sendString(addr, ACCESSORY_STRING_SERIAL, serial);
usb.ctrlReq(addr, 0,
USB_SETUP_HOST_TO_DEVICE |
USB_SETUP_TYPE_VENDOR |
USB_SETUP_RECIPIENT_DEVICE,
ACCESSORY_START, 0, 0, 0, 0, NULL);
while (usb.getUsbTaskState() != USB_DETACHED_SUBSTATE_WAIT_FOR_DEVICE) {
max.Task();
usb.Task();
}
ä¸è¨ã®ã³ã¼ãã¯arduinoã®ã½ã¼ã¹ã®æç²ãªãã§ããã
while()ã®ã³ã¼ãé¨åãmbedä¸ã§ã©ãå®è£
ããã°ããã®ã解ããæ¾ç½®ãã¦ããã®ãåå ãã¨ã
USBãã¹ãã®ã¹ãã¼ã¿ã¹ãã©ã°ã®ãã¼ãªã³ã°ã§ãããã»ã»ã»
mbedã®USB Hostã¯DMAã¨ãæã£ã¦ã¦ããããããªã£ã¦ã¾ãããï¼ã³ã³ããã¼ã«è»¢éã®æã«DMA使ã£ã¦ããã¨ããã°DMAå²ãè¾¼ã¿ã§æ¤ç¥ããã®ãæ¬æ¥ãªã®ã§ããï¼å®éã©ããã£ã¦ããã§ããã
åã¯ãã®è¾ºã§æ«æãã¾ããï¼ï¼ï¼DMA使ã£ã¦ããã¼ãªã³ã°ã§æ¤ç¥ãã¦ããã®ããª
abe00makoto
#
03 Jun 2011
XOOMã«å¯¾å¿ãã¦ãACCESSORY_STARTãéä¿¡ããã¿ã¤ãã³ã°ã§ USB_Initãå¼ã³åºãããã«ãã¦ã¿ã¾ããã
ãã«ã¯è»¢éã®ä½¿ãæ¹ãåãã£ã¦ããªãã®ã§ãåä½ã®ä¸å®å®ãã¯ç¸å¤ãããã§ãã
I do not understand the usage of the bulk transfer. Please teach someone.
Doesn't work with Galaxy S2 i9100GT with XXKH3 2.3.4
èå³æ´¥ã
ã§è©¦ãã¦ã¿ã¾ããï¼
å®æ©ã¯HTC Desire (Softbank X06HTæ¹ Rom:CM7 Nightly GRJ90 Gingerbread 2.3.5)ã§ãï¼
mbedã®ãªã»ãã,USBã®æ¿æ,ã¢ããªã®åèµ·åãä½åº¦ãç¹°ãè¿ãã¦ããã¨æ°åã«ä¸åã§ããåä½ãã¾ããï¼
ãããããã«ç²ã£ã¦è¯ãã£ãã»ã»ã»ãã¡ãªã¿ã«ã½ã¼ã¹ã¯ç¡æ¹é ã§ãï¼
ãªã»ããã使ããã«ä½¿ããããã«ãªã£ãã®ã§å ±åãã¾ããã¾ãã端æ«ã®ã¢ããªã±ã¼ã·ã§ã³ã®ç®¡çã§demokitãé¸ã³ããè¨å®ãæ¶å»ããã¾ããèµ·åæã«USBã¢ã¯ã»ãµãªã®ããã©ã«ãã¨ãªã£ã¦ããã¨ãã¾ãã¤ãªãããªãããã§ããã§ãã®ã§ããã§ãã¯ããã¯ã¹ã¯ã¯ãããã¾ã¾æ¯åOKãã¿ã³ãæ¼ãããã«ãã¾ãã次ã«mbedã®ã½ã¼ã¹ã§ãã°ãprintfåºåãã¦ããã¨ãããå
¨ã¦ã³ã¡ã³ãã¢ã¦ãããããAndroidAccesory.hã®ADKLOGã0ã«å¤æ´ãã¾ããUSBHost.cppã®USBLOGã0ã«å¤æ´ãã¾ããmbedã®ãã°åºåããããã ãã§ãã次ã«ç«¯æ«ã®ã¢ããªdemokit.apkã®ã½ã¼ã¹ã®DemoKitActivity.javaã®openAccesory()ã¨onResume()ã§nullã¨ãªãå ´åã«ããã«returnãã¦ããé¨åãä¿®æ£ããwhileæã§å¾
ã¤ããã«ããã¨ãUSBãæããã¨ãã«demokitãèµ·åãã¦ãåä½ããããã«ãªãã¾ãã /media/uploads/androidfun/demokitactivity-changed.txt
Please log in to post comments.
sendStringãæ©è½ãã¦ãªãããã§ãã ä»æ§éãã«å¤ãã»ãããããã¨ããã¨ä»¥ä¸ã®ãããªãã°ã