Android - USB communication with FTDI chip and d2xx driver -
i developing android (android 4.2) project in read data devices connected through usb. on connected sensor board have ftdi chipset, using d2xx drivers.
everything works fine begin with: able acquire data through usb connection , processing. in loop running in , asynctask
in write acquisition command sensor board tell acquire data. once data has been received, processed. acquisition command written again sensor board , new data acquired , processed.
however after while (it not seem fixed time) device unable read other data sensor board. note sensor board not @ fault here, because have been able thoroughly test using program doing same processing running on laptop.
if go check in ddms logs find, right when application becomes unable receive data, following debug messages:
tag: extractreaddata:: text: written != totaldata, written= 16384 totaldata=196
(the numbers in text not same). and
tag: processbulkin:: text buffer full, waiting read....
after messages, besides seeing logs couple of processing threads end, log (repeatedly , until stop application) is:
tag: usbrequestjni text: init
during normal operation receive log messages different parts of application (acquisition, data processing , on), these not appear anymore once messages reported.
i know log message tagged usbrequestjni
appears during normal operations when communicate through usb connection, when perform write command (sending sensor board command acquire , send data). appear after receiving 2 messages application stuck attempting write sensor board.
i don't know other 2 messages come from. best guess come either d2xx ftdi driver or underlying usb host library.
can me understand:
- the source of 2 messages
- the reason why appear
- how solve problem causing them
thanks lot can pitch in.
best, matteo
i later found out (by discussing support team @ ftdi) issues facing caused bugs in ftdi drivers android. locks in threads.
of today (october 22nd, 2014) these bugs have not been solved yet. moreover, similar bugs affect windows ce7 arm version of drivers.
Comments
Post a Comment