Wish [SOLVED] Bluetooth / WiFi debugging

Peter Simpson

Expert
Licensed User
Longtime User
B4A caters for USB debugging and obviously B4A-Bridge.

Some smart watches do not have a physical connection or pins because they charge via QI charging. These devices do however cater for Bluetooth debugging for developers, thus creating apps on swatches with no physical connection suddenly becomes possible using B4A.

It's probably not worth your time and effort even thinking about adding Bluetooth debugging to B4A, but it would be a nice touch nevertheless.

Cheers...
 

moster67

Expert
Licensed User
Longtime User
B4A-Bridge used to support Bluetooth. If you could get hold of an older version of B4A-Bridge it might work. Anyway, I guess there must have been good reasons for Erel to remove bluetooth support or else we would still have it today.

What about network ADB? Maybe if you hook up the watch to your LAN you could use it?
 

Peter Simpson

Expert
Licensed User
Longtime User
Good morning @moster67 and @Erel,
I remember Erel mentioning something about stability before.

Moster67 I've already tried that in the past, a number of time to no avail.

If you turn on WiFi debugging on the watch and then type adb devices, it will show all the devices show the watch ip address. If you then type adb connect 192.168.0.7 it will connect to the watch on port 5555. Now at this point I would have though that since I specifically used adb to connect to a specific ip address (the watch), assembling the code in B4A the app would assemble to that ip address if there was no USB connected, but it doe not. When you use abd to connect, the watch is then assigned an ip address and not before hand, that's why I know it 100% connected. The result is that in B4X when not connected via USB but definitely 100% connected via WiFi via abd, when I try to assemble any code all I get is the following.

Installing file to device. Error
No device found.

followed by

Please use B4A-Bridge to connect to a device.

Now this is more than annoying as WiFi debugging is ready and waiting and I presumed that WiFi debugging would take over USB debugging before B4A-Bridge kicks in.

So I'm completely stuck with USB debugging wear devices thus annoyingly I can't upgrade my personal device. I refuse to buy another device for developing on as all half decent new wear devices charge via QI thus have no USB debugging. I wear my watch every day and I also use it for fitness tracking (cycling etc). If somehow I could get WiFi debugging working, would be able to upgrade my device and I would just give my current wear device away.

So there you have it. I've been there and done that, and that was last year, the whole situation really just annoyed me, thus I'm stuck with USB debugging on an older device.
 

Peter Simpson

Expert
Licensed User
Longtime User
Hello @Erel,
Trust me it is not working for me.

I completely agree with what you are saying, I agree 110% as that is what I would expect to happen, but it's just not happening for me. If there's no USB but there is WiFi, I would expect the install to happen via WiFi if I have connected it to WiFi, but it does not, I've even restarted the abd server and cleaned the project a few times just incase :)

Screen shots as proof.

Using ADB to find and connect to my watch.
Windows.png


Double checking on my watch to make sure ADB has connects correctly and my watch was given an IP address.
watch.png


Now I assemble one of my wear apps without sitting it on it USB cradle (thus no USB debugging)
B4A.png


So there you have it @Erel. Everything is apparently connected and working until I assemble it in B4A, if I now sit my watch on its cradle, it will assemble straight away via USB first time of asking.

What you said in your I do 110% agree, but it's just not happening in my case and the proof is in the screen shots above. I've already turned off my firewalls just to be on the safe side, it makes no difference, not in my case anyway.

Thank you...

P.S. Sorry for the abd/adb typo mix ups ;)
 
Last edited:

Peter Simpson

Expert
Licensed User
Longtime User
Update @Erel,
If I place the watch on the cradle it I type adb devices, it shows both the usb and wifi watch connections in the list, but then when I run it in B4A all the happens is that it installs the app onto the device via USB an does not even bring up the select device option box in B4A during installation like it does if I have the usb connected and an emulator running lets say.

The 2 devices also appears in the list if I type adb devices, but it still installs only via USB.
 

Attachments

  • 2.txt
    77 bytes · Views: 350

Peter Simpson

Expert
Licensed User
Longtime User
I've been there done that still not working, I was doing that with the old Android SDK.

I'm just going to remove absolutely everything to do with Android SDK and B4A and reinstall the lot again, I'll have to wait for you to install extra AVDs that I posted so that I can completely stop using the old SDK.

Cheers anyway, it' time for a completely new re-installation of everything, wish me luck :( and thank you again @Erel.
 
Last edited:

Peter Simpson

Expert
Licensed User
Longtime User
B4A was already configured to run the new and improves @Erel, I'm using maven in a project already, and I was executing adb from the new SDK folder. I had the same issue last year. No worries, I'm sure that it will be figured out sooner rather than later, maybe :)

I've uninstalled everything and I'm currently installing SDK components. It would be a great help if you could add the extra AVDs sometime in the future though, as I could then finally remove the old SDK components and AVD manager that I'm currently reinstalling now, as well as the new SDK and AVD manager.

Thank you...
 

Peter Simpson

Expert
Licensed User
Longtime User
It's gone back to doing the same thing and once again WiFi debugging isn't working, but it was working yesterday nothing has changed (I did nothing to the app).
Yesterday morning I woke up and ran the app just to see if it would connect (once I turned USB Debugging on), it worked first time out then I shut down B4A. This morning I thought that I would try it again, same app with the same IP address (it has not changed), this time nothing, no devices picked up by the ADB, I'm completely baffles. Even if I try to connect through a command prompt window, it has strangely decided to stop working, again.

How I connect to the watch, as I said nothing has changed and it worked perfectly well yesterday.
B4X:
#If RELEASE
    '#CustomBuildAction: 1, c:\Android_Development_Tools\Android-SDK-B4X\platform-tools\adb.exe, kill-server
    '#CustomBuildAction: 1, c:\Android_Development_Tools\Android-SDK-B4X\platform-tools\adb.exe, start-server

    'Connect to watch via IP address
    #CustomBuildAction: 1, c:\Android_Development_Tools\Android-SDK-B4X\platform-tools\adb.exe, connect 192.168.0.7
#End If

Oh well...
 
Last edited:

Peter Simpson

Expert
Licensed User
Longtime User
I can't believe what I'm going to say. Yesterday after I created the post above I updated the firmware on my router, it appears that WiFi debugging is now working 100% of the time.

I did the same test as yesterday, but today it's working perfect. I loaded the project into B4A, I checked the IP address on the watch then I ran the project. #CustomBuildAction connected ADB to the watch then the app installed perfectly fine first time out.

Yesterday from 1pm to today 3pm it been working flawlessly :)
 
Last edited:
Top