Downloading FTDI dive log using desktop Subsurface on Android

Anton Lundin glance at acc.umu.se
Wed Feb 8 03:36:02 PST 2017


Re-sending this one to the list to.

On 08 February, 2017 - Willem Ferguson wrote:

> On 08/02/2017 08:43, Anton Lundin wrote:
> >As far as I've remember, thats a libdivecomputer issue. You should
> >probably send a trace log to Jef and he can help us figure out whats
> >going on. Maybe I've done something stupid in the custom-serial layer
> >which corrupts the data, or maybe its a parsing error in
> >libdivecomputer. Anyway, we probably need Jef's help to figure that one
> >out.
> >
> Will follow up with Jef.

Ok.

> >The permissions handling and device node open is done in a completely
> >different way on Android.
> >
> >All the usb vid/pid's we support needs to be listed in the manifest.
> >Make sure the vid/pid for your usb-chip is listed in
> >android/res/xml/device_filter.xml
> The vid/pid is set up correctly. It uses the Oceanic vid/pid as
> already supplied in device-filter.xml.
> I have double-checked this using lsusb with the dc connected via the
> USB hub.

Ok.

> >The ftdi on android code is as far as I've know compliant with the
> >android sdk/ndk api's, and doesn't really use anything it shouldn't.
> >That said, there might be something in the I've missed, which breaks on
> >a specific vendor implementation of hal/usb on some devices. There might
> >also be something that broke in newer Android version. Last time I
> >tested this was on a Nexus 5 running ... KitKat or Lollipop.
> >
> >My current phone is seriously b0rked, and doesn't do USB-OTG so I can't
> >really test it. I'd might need to borrow my wife's phone and see if that
> >can be tricked into doing USB-OTG and test the ftdi code on.
> >
> >I could probably test it in a emulator to, but that hal is probably even
> >simpler and more standard so I bet it already works there. Goldfish ftw.
> I have no idea how OTG handles different uses of the USB port. There
> are several other processes that use the same port, e.g. Linux
> access of the phone for accessing files on the phone; Android debug
> bridge outputting process information via this port, etc. I have no
> idea if any of these processes block other Android software from
> using the port. In theory, OTG should be able to handle all these
> problems automatically. Currently I have Android Developer Options
> disabled, which hopefully means that adb access to the port does not
> occur.

Basically you can't connect anything else to you phones usb-port than
the USB-OTG cable. You might be able to use a USB-OTG-cable which
injects power but nothing else. You might be able to use a usb-hub for
the power inject, but I've never seen one which can feed power to a
USB-OTG connected phone.

Remember USB-OTG != USB. They are two completely different modes in the
usb-hardware and software in your Android device.

If you simultaneously need adb access, you need to enable adb over wifi,
and connect to your Android device that way.


//Anton


-- 
Anton Lundin	+46702-161604


More information about the subsurface mailing list