Android Question Designer/Deployment/Debugging Over USB - Unreliability

RichardN

Well-Known Member
Licensed User
Longtime User
As I travel a lot I have recently moved by B4A development to a Win 8.1 laptop. Due to various public/hotel network issues with the B4A Bridge I am often compelled to use a USB connection to connect to the designer or deploy to my normal development platform a Samsung S4.

I have the correct drivers in place and when it connects..... it connects perfectly for all functions. Other times it refuses to connect or breaks connection after several successful deployments. Often the compile dialog reports compiling to a correctly recognized device serial # but then just times out trying. I tried increasing the time-out value but with no luck.

I have tried different leads as I suspect later Samsung devices draw more current than others and are maybe current-sensitive but I am unable to pin-down the issue.

Any suggestions ?
 

KMatle

Expert
Licensed User
Longtime User
I'm testing on a S4, too with WIN8.1. No problems so far but I'm testing via WiFi. I just plugged in my USB cable for some compiles but I cannot see a problem. Take a look in the WIN8's logs if there are general USB connection problems.

Did you see this thread: http://www.b4x.com/android/forum/threads/fail-to-connect-b4a-to-phone-by-usb-cable.42520/

I did not install any drivers from Samsung, except KIES for an update. Maybe the drivers came with it. Maybe there is a newer version coming with KIES.
 
Upvote 0

sorex

Expert
Licensed User
Longtime User
since Vista or Win7 you should be able to make a hotspot from your laptop which should allow you to connect to the S4 via wireless network connection (bridge)

you could try another (short) usb cable, I've seen a lot of complaints about the cables.
 
Upvote 0

RichardN

Well-Known Member
Licensed User
Longtime User
I believe I had Samsung USB driver ver 1.5.33.0 which is later than the one above (1.3.1500.0). I tried both and found no difference between them.... the problems persist. Both the Android ADB interface (2.11.70) and the driver for the Samsung Mobile Composite Device are the latest available.

Eventually I am drawn to the conclusion that the S4 is very fussy about USB leads. I bought some cheap ones a while ago and although they were fine with other devices when I connected the S4 some would not connect as a device at all. I have a theory that when an S4 is connected via USB that it draws all it's power from that connection. If the voltage drop across a substandard USB lead is too much it will perform unexpectedly. A charge app I use says the S4 discharges at around 450mA when active so if the device is soley reliant on USB power when connected a standard USB2 port (500mA max) might struggle to support the higher demands during operations such as r/w. Incidently the misbehaviour is not confined to cheap leads.... an nice blue Belkin one I purchased also does the same thing.

Using the B4A bridge over a a Peer-to-Peer network with seems to be the only way ahead. Unfortunately in Win 8.1 the prompts to set this up have been removed from the Network & Sharing centre so...... Idiots Guide.....

Check your adapter is capable. Open a command prompt as an administrator and execute:
B4X:
netsh wlan show drivers

If the string: "Hosted network supported=Yes" Is present then you are good to begin.

The following two batch files will switch the Peer2Peer capability on/off. You should change the filenames to .bat and edit the SSID and password to suit your purposes. The B4A bridge should then work perfectly over WiFi in Peer2Peer mode.
 

Attachments

  • Start Peer2Peer.txt
    118 bytes · Views: 196
  • Stop Peer2Peer.txt
    36 bytes · Views: 194
Upvote 0

sirjo66

Well-Known Member
Licensed User
Longtime User
I was the LAST version of KIES (but I don't know driver version) and it don't worked !!
Then I have change with 1.3.1500.0 version and now it works very well.

Sergio
 
Upvote 0

KMatle

Expert
Licensed User
Longtime User
Just took a look for my S4 ADB drivers. I have 2.11.9.0 (April, 3rd 2014). I did some tests with it (original Samsung cable). No probs. I kicked the the newer version by chance because I wanted to get rid of the crapy KIES.
 
Upvote 0

RichardN

Well-Known Member
Licensed User
Longtime User
I am not drawing any conclusions over USB or ADB driver versions in Windows 7/8/8.1 the ADB driver seems to be automaticly updated by Windows and different driver versions are found in different Windows versions.

In the previous version of Kies (not Kies3) a USB driver was included in the Kies package so having installed it you found the Kies package AND the USB driver as separate uninstall options. With Kies 3 it is all one install/uninstall package.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…