Problems connecting APM to Galaxy S4

Hi All,

I can’t connect anymore.

  • It used to work fine: Galaxy S4, 433Mhz telemetry, everything as expected

  • Now it doesn’t: I reinstalled the app from Google Play (v0.14.2 of Droidplanner), cleared cache/storage, checked the groundradio (via PC all still ok) and Galaxy<>PC USB also still ok

  • The groundmodule baseprint Rx and Tx LED’s flash couple of times when connecting USB cable, but pressing CONNECT in Droidplanner keeps saying “DISCONNECTED” and not any LED action. The red LED on the HP-frm print mounted on the base print burns/flickers faintly, the green LED there is full on

  • I did receive an Android update recently, which was between working and non-working tests/connections. Phone now says Andoid 4.2.2, though I believe this is not a very recent version. So I dont know what the update from last week was about exactly, for now it’s the closest pointer I have to things not working anymore. For what it’s worth: whatsapp also gave a ‘strange’ security alert/message, though I doubt it’s related (at least it indicates something on my Phone changed from the update)

  • Cant seem to find others on the webs having this issue.

Maybe here? Any clues to go ahead? Many thanks, i’m sitting back a bit sad looking at perfect no-wind flying conditions… :frowning:

All works as expected on my friends Galaxy S3. Several reinstalls, cleans and resets don’t see to make a difference on my S4. Still puzzled…

More problems with the recent firmware update:
I will either downgrade to the aug. firmware or wait a while for JB4.3… Need some patience to try Droidplanner 1.0.!!!

Hi Splinter, I received some mail about people having trouble with the S4. But from what I understand re-installing and clearing the cache made it work.

What is exactly your problem: the app crashes on opening or just doesn’t connect?

Hi me too can’t get to work with my galaxy s4 android v 4.2.2 it just does not connect I tried clearing the cache and reinstall without any success

the problem is that Droidplanner can’t communicate with the radio anymore. I still link it to the september firmware update. It seems other USB hardware has the same issue, from the link above: “because with latest [firmware] i cant use EYE TV MICRO”. (
In case my problem description above is not clear, please help me clarify it. Hardware is confirmed ok on all sides. The LED’s blink for a short time when plugged into the phone, then nothing. Pressing CONNECT says “DISCONNECTED” and not any response on the hardware/LED’s. My impression is the communication from Android or Droidplanner to the radio through USB is blocked. Which might be linked to new security features in the new firmware, but that’s still speculation…
I tried reverting back to the august firmware, which doesnt work with Odin, block the Phone completely and requires a thorough firmware reset and upload via KIES. This afternoon I might have a chance trying another S4, which might not be updated yet. Then I could update that Phone and look for a difference… to be continued, or else hope Androind 4.3 in october solves stuff…
Thanks & the best!

For clarity: Droidplanner does not crash, just keeps saying “disconnected” when pressing CONNECT. The september firmware update, far as I know now, has not been rolled out to the whole world. Me is in the Netherlands and I think Italy and Spain were also in a list I saw. Maybe I could try a factory reset but doubt it will help, clearing everything I can find (app, buffers, cache, directories) from DP doesnt.

When you plug your telemetry module does a windows pops up asking you to use DroidPlanner with it?

Is there a possibility of you getting a LogCat of Android, by building the source yourself? … uild-Setup

I’ll do what I can to resolve your issue, and I don’t think you should need to resort to extreme stuff like re-flashing your phone.

Yes, DP starts when I connect the module and says “Disconnected”. My dad’s Galaxy 2+ connects (though I didnt have my plane around to actually check the radio link itself), my sisters S4 mini does nothing. I’ll dive into the homebuilding and once I have a logcat send it to you. Thanks for the support sofar!!!

it seems that droidplanner like some other apps cant work with 4.2.2 android at moment . i am borrowing my wife galaxy 3 connects first time no problem.

Hi guys, I hope we can solve your issues but you should understand that I’m probably on the other side of the word (not that this matters) and I don’t have access to a S4. So I’ll need some help from you.

Thanks Splinter for sending me the LogCat output via PM, it’s great to hear that you have been able to compile the code without problems. But as you guessed what we want is the logcat during the time the device is opening the connection. Normaly I access the android debug bridge (adb) via wifi so I can monitor logcat and connect the USB telemetry at the same time, but this requires root access at the device. Luckly we have another option: … xvZ2NhdCJd

If you could run that app from the moment you plug your USB telemetry until you hit connect on DroidPlanner we may be able to get the debug info (aka. Logcat) via the ALogcat app.

After exchanging several mails with Arthur, sending catlogs and trying stuff out (AndroPilot doesn’t work either anymore!) I’m giving up on a quick & easy solution. I’m hoping for the Andriod 4.3 update in october and might look into a Bluetooth solution or tablet. And ofcourse there’s always the chance on some sort of miracle…

Bye, Splinter

Just to close the topic for now:

One viable way to bypass the problem is using a Bluetooth to Serial Bridge, there are some boards that sell for $9 that do this.

For sake of completeness:

This part of the log gives the clue:

[quote]10-01 11:09:19.742 E/UsbManager(7538): exception in UsbManager.openDevice
10-01 11:09:19.742 E/UsbManager(7538): android.os.TransactionTooLargeException
10-01 11:09:19.742 E/UsbManager(7538): at android.os.BinderProxy.transact(Native Method)
10-01 11:09:19.742 E/UsbManager(7538): at android.hardware.usb.IUsbManager$Stub$Proxy.openDevice(
10-01 11:09:19.742 E/UsbManager(7538): at android.hardware.usb.UsbManager.openDevice(
10-01 11:09:19.742 E/UsbManager(7538): at$1.probe(
10-01 11:09:19.742 E/UsbManager(7538): at
10-01 11:09:19.742 E/UsbManager(7538): at com.droidplanner.connection.UsbConnection.openCOM(
10-01 11:09:19.742 E/UsbManager(7538): at com.droidplanner.connection.UsbConnection.openConnection(
10-01 11:09:19.742 E/UsbManager(7538): at
10-01 11:09:19.742 D/USB (7538): No Devices found
10-01 11:09:19.742 W/System.err(7538):
10-01 11:09:19.742 W/System.err(7538): at com.droidplanner.connection.UsbConnection.openCOM(
10-01 11:09:19.742 W/System.err(7538): at com.droidplanner.connection.UsbConnection.openConnection(
10-01 11:09:19.742 W/System.err(7538): at

Which relates to these lines in Arthur’s code: … va#L80-L88

When running AndroPilot I get the same type of connection errors (much more to be precise), which looks like this:

[quote]10-01 15:57:45.782 D/UsbHostManager(791): ::: openDevice : /dev/bus/usb/002/002
10-01 15:57:45.792 E/UsbManager(7712): exception in UsbManager.openDevice
10-01 15:57:45.792 E/UsbManager(7712): android.os.TransactionTooLargeException
10-01 15:57:45.792 E/UsbManager(7712): at android.os.BinderProxy.transact(Native Method)
10-01 15:57:45.792 E/UsbManager(7712): at android.hardware.usb.IUsbManager$Stub$Proxy.openDevice(
10-01 15:57:45.792 E/UsbManager(7712): at android.hardware.usb.UsbManager.openDevice(
10-01 15:57:45.792 E/UsbManager(7712): at$1.getDevice(
10-01 15:57:45.792 E/UsbManager(7712): at
10-01 15:57:45.792 E/UsbManager(7712): at
10-01 15:57:45.792 E/UsbManager(7712): at com.geeksville.andropilot.service.USBAndroidSerial.(AndroidSerial.scala:38)
10-01 15:57:45.792 E/UsbManager(7712): at com.geeksville.andropilot.service.MavlinkAndroid$.create(MavlinkAndroid.scala:28)
10-01 15:57:45.792 E/UsbManager(7712): at com.geeksville.andropilot.service.AndropilotService$$anonfun$serialAttached$1.liftedTree1$1(AndropilotService.scala:356)
10-01 15:57:45.792 E/UsbManager(7712): at com.geeksville.andropilot.service.AndropilotService$$anonfun$serialAttached$1.apply(AndropilotService.scala:350)
10-01 15:57:45.792 E/UsbManager(7712): at com.geeksville.andropilot.service.AndropilotService$$anonfun$serialAttached$1.apply(AndropilotService.scala:340)
10-01 15:57:45.792 E/UsbManager(7712): at scala.collection.TraversableLike$$anonfun$flatMap$1.apply(TraversableLike.scala:251)
10-01 15:57:45.792 E/UsbManager(7712): at scala.collection.TraversableLike$$anonfun$flatMap$1.apply(TraversableLike.scala:251)
10-01 15:57:45.792 E/UsbManager(7712): at scala.collection.immutable.List.foreach(List.scala:309)
10-01 15:57:45.792 E/UsbManager(7712): at scala.collection.TraversableLike$class.flatMap(TraversableLike.scala:251)
10-01 15:57:45.792 E/UsbManager(7712): at scala.collection.AbstractTraversable.flatMap(Traversable.scala:105)
10-01 15:57:45.792 E/UsbManager(7712): at com.geeksville.andropilot.service.AndropilotService.serialAttached(AndropilotService.scala:340)
10-01 15:57:45.792 E/UsbManager(7712): at com.geeksville.andropilot.service.AndropilotService.onCreate(AndropilotService.scala:196)
10-01 15:57:45.792 E/UsbManager(7712): at
10-01 15:57:45.792 E/UsbManager(7712): at$1700(
10-01 15:57:45.792 E/UsbManager(7712): at$H.handleMessage(
10-01 15:57:45.792 E/UsbManager(7712): at android.os.Handler.dispatchMessage(
10-01 15:57:45.792 E/UsbManager(7712): at android.os.Looper.loop(
10-01 15:57:45.792 E/UsbManager(7712): at
10-01 15:57:45.792 E/UsbManager(7712): at java.lang.reflect.Method.invokeNative(Native Method)
10-01 15:57:45.792 E/UsbManager(7712): at java.lang.reflect.Method.invoke(
10-01 15:57:45.792 E/UsbManager(7712): at$
10-01 15:57:45.792 E/UsbManager(7712): at
10-01 15:57:45.792 E/UsbManager(7712): at dalvik.system.NativeStart.main(Native Method)
10-01 15:57:45.802 I/Choreographer(7712): Skipped 53 frames! The application may be doing too much work on its main thread.

From there on Arthur suggested using this app: … .hyperterm, the FTDI UART terminal.
This gives similar errors in the logcat, even locks up completely. Since I know the radio works on my PC and Galaxy S3, this leads us to the conclusion that indeed the current S4 firmware is preventing proper working.

Arthur suggested to try the Bluetooth solution, connecting the radio module to a bluetooth module (for example … df7b0d0cee) and will see what happens when Android 4.3 becomes available…

It’s been a great adventure anyway :wink:

ps. one other thing I learned: when registering an API key to get Google Maps working on my own compiled DP, it takes some time for it to get populated throughout serverworld. My freshly compiled app will not immediately show the Google Map and produce authentication errors, which does not mean I did it wrong, just try again some time later. The required SHA1 fingerprint is found in Eclipse -> Window -> Prefs -> Android -> Build and should be registered in the Google online API console like xx:xx…xx:xx;com.droidplanner which returns the API key to replace in the FlightActivity manifest file.

Hi Splinter,

I agree it is disappointing that an ap0plication that you wants is not working. Altough i had other log messages in my Galaxy TAB 3 8.0 i was pointing to the same source area as you dit, the openCom routine.

After searching and debugging there was no clue, also not on the examples of the hardware produces websites and so on.

What i have done to make it work is commented out line 63 and 102. It could be that the first time connection fails, but when you push the connect button fast after the first push, in my situation the application connected and stays connected and was functioning normal. Everytime i connect, i have to push the connect button multiple times.

I think the driver is debet on this situation and it has to do with the open and reset flow in the driver. I have read an article were was suggested to do an open, write some bytes that fails, and thereafter you can reset and use the device. As soon as i have found this article again, i wil post the reference to it.

Hopefully this works also in your situation.

I had already ordered a new radio and OTG cable before I read about this problem, so I was prepared for a long wait for an update. I had a go anyway and it worked perfectly. I have the Galaxy S4 running 4.2.2 and the jDrones manufactured 900mhz USB SiK radio. Is there anything I can test on mine to help you guys get yours going?

Wimnac, your suggestion didn’t work for me, unfortunately.

Tehconz, from what I understood the update which killed DP on my phone has not been rolled out to the whole world. My current build is I9505XXUDMHB. Can you give us yours?

My build is JDQ39.I9505XXUBMG4. I’m in New Zealand.

4.3 or not, I bought a bluetooth module and finally again: “CONNECTED”! Jeuh!