2015년 10월 12일 월요일

Need for Nexus Devices

Recently, I developed a multivision platform with Android devices for Samsung Unpacked 2015 shows.

최근에 저는 삼성 언팩 2015 행사를 위해, 안드로이드 디바이스를 이용한 멀티비전 플랫폼을 개발했습니다.





By the request, we paired each Arduino MEGA ADKs to Android devices and controlled with a server application on PC.

요청을 그렇게 받았기에, 우리는 Arduino MEGA ADK와 안드로이드 디바이스를 각각 쌍으로 연결했고, PC에서 구동되는 서버로 제어했습니다.



There was a unsolved bug which causes dangling connection between Arduino and Android device until today.

오늘까지 해결되지 않았던 버그가 하나 있는데, Arduino와 안드로이드 디바이스간의 연결이 복구 불가능한 상태에 빠지는 문제 였습니다.

Connecton between PC and Arduino could be disconnected for some reasons and server reconnects them.

PC와 Arudino간의 연결은 몇몇 이유로 끊어질 수 있는데, 그러면 서버는 다시 연결을 합니다.

But sometimes, during re-connection, Arduino says USB device is detached but Galaxy Note 3 says it's still connected and this phenomenon leads to dangling connections.

하지만 때때로, 재연결 도중에 Arduino는 USB 장치가 분리되었다고 말하지만 갤럭시 노트 3는 아직 연결되어 있다고 말하는 증상이 있는데, 이게 연결을 복구 불가능한 상태에 빠트립니다.

Max3421e (USB Host) chip's vbus state became SE0 but Galaxy Note 3 doesn't aware detachment so AndroidAccessory::isConnected never returns true.

Max3421e (USB 호스트) 칩의 vbus 상태는 SE0 인데 갤럭시 노트 3는 분리되는 것을 인지하지 못해서 AndroidAccessory::isConnected 가 절대 true를 반환하지 못합니다.



I tried to every programatically possible ways to reset USB Host chip on Arduino or Arduino itself but dangling connections holds.

프로그램적으로 접근할 수 있는 모든 방법으로 USB 호스트 칩 또는 Arduino 자체를 초기화 해봤지만 복구 불가능한 연결은 계속 남아 있었습니다.

There's nothing left to do with Arduino so I assumed Galaxy Note 3 might cause this problem and  tested with my Nexus 4.

Arduino에서 해볼 수 있는 것이 더 이상 없으므로 갤럭시 노트 3가 문제를 일으킬지 모른다고 생각해서, 제 소유의 넥서스 4로 테스트르 해봤습니다.

Guess what? There was no such problem with Nexus.

어떻게 됐을까요? 넥서스에서는 아무런 문제도 없었습니다.

< vbus is recovered from SE0 (disconnected) to FSHOST (full speed host) >

If you're developing an Android app, this is why you should have a reference device.

만약 안드로이드 앱을 개발하고 있다면, 이게 바로 레퍼런스 폰을 가지고 있어야 하는 이유입니다.