B4A-Bridge using Bluetooth

johnaaronrose

Active Member
Licensed User
Longtime User
I'm using Windows XP with an ISSCTBA Bluetooth USB adapter connected to my desktop. The BlueSoleil driver software (provided by the ISSCTBA supplier) sees my ZTE Blade. I'm using B4A version 2.00. I have the ZTE Blade enabled for Bluetooth & made discoverable. I have B4a-Bridge v2.01 loaded on the ZTE Blade. I've pressed the Start-Bluetooth button on the ZTE Blade. When I select 'Tools - B4a Bridge - Connect Bluetooth', I get (from B4a) a dialog box stating "An error occurred - no radio found" and clicking OK in it gets a dialog box with Log stating "Finding Bluetooth radio: Error - specified transport is not available". Is this a problem with B4A-Bridge or with the BlueSoleil/WindowsXP?
 
Last edited:

johnaaronrose

Active Member
Licensed User
Longtime User
Stack

Basic4android uses a third party library to access the Bluetooth device. It works with Microsoft stack and some other stacks as well. However it seems like it doesn't recognize your adapter. In some cases you can uninstall the driver and install a Microsoft stack driver.

When you say Microsoft stack driver, do you mean letting Control Panel's New Hardware function search for a driver? I've already tried that and it fails.

So another alternative I have is to use the Wireless option which only works very occasionally. When it doesn't work, I see that it is connected to the router (using the WIFi finder app) but B4A Bridge says that the Status is 'Disconnected' and 'Waiting For wireless connections'. When I try Tools / B4A Bridge / Connect - Wireless & enter the IP Address (fixed by router administration), there is no error message & still shows Disconnected in B4A & no change to B4A-Bridge on phone.

I'd like to be able to use USB to connect to my PC from my Android phone: I'm able to push/pull files between them using ADB. Can B4A Bridge be enhanced to make use of a wired USB connection from PC to Android device?
 
Last edited:
Upvote 0

johnaaronrose

Active Member
Licensed User
Longtime User
B4A-Bridge should only be used if your device doesn't support USB debugging (over ADB). In that case it should just work. You do not need to start B4A-Bridge.

The problem is that when I select 'Compile & Run' using the USB connection, B4A says that there is no device found. In Windows Explorer, I can see the contents of the sdcard in the phone when I have USB storage turned on on the phone. I have tried it with USB storage turned off on the phone. I have tried it with USB Debugging both turned on & turned off (on the phone). To summarise, for me Compile & Run with USB connected does not work.

That is why I tried to use Bluetooth with B4A Bridge, for which B4A does not work with my Bluetooth dongle even though the Bluetooth driver is installed OK. As I previously said, Wireless with B4A Bridge only works sometimes: I have not been able to establish why this is.
 
Upvote 0

johnaaronrose

Active Member
Licensed User
Longtime User
In order to use USB debugging you should first enable this mode in the device and you should also install the device driver. Usually it can be done from the Android SDK manager.

I've tried installing the Google USB driver (using Android SDK Manager under Windows XP) but that doesn't help. If I run 'adb devices' (under MSDOS Prompt) it says that ADB Server is out of date, daemon started successfully & shows the device (CM7-Blade) is device (I presume that means that it is OK). When I try Compile & Run, I've noticed that after failing due to no device found, adb devices shows that the device is offline. If I again run 'adb devices' (under MSDOS Prompt) it says that ADB Server is out of date, daemon started successfully & shows the device (CM7-Blade) is device. I've also tried 'adb kill-server' & 'adb start-server' before & after as well as 'Restart ADB Server' under B4A, but still no successful compile.

Any ideas?

PS it would be nice to have a Compile only facility: then I could transfer the .apk file to the phone's sdcard using Windows Explorer & install my app from the sdcard.
 
Upvote 0

johnaaronrose

Active Member
Licensed User
Longtime User
ZTE Blade driver


This driver (using Windows XP one) made no difference. Given that the phone is recognised by adb (presumably using the ZTE driver) & works fine when looking at the phone's sdcard using Windows Explorer & that Windows XP Device Manager shows the 'ZTE Composite ADB Interface' device as working properly, the implication is that the problem is with B4A (rather than the driver). Or is that too simplistic?

To repeat: it would be nice to have a Compile only facility: then I could transfer the .apk file to the phone's sdcard using Windows Explorer & install my app from the sdcard. Any chance of this?
 
Last edited:
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
Or is that too simplistic?
Yes. Devices can be connected with USB in several modes. Only if USB debugging is working correctly then you will be able to connect the IDE (or Eclipse) to the device, not using B4A-Bridge. Basic4android uses ADB (a tool from Android SDK) to communicate with the device. So the problem is usually not in Basic4android.

Any chance of this?
Maybe in the future. You can choose compile & run and ignore the last message. In most cases developers are able to connect to a real device using one of the three methods: USB debugging, B4A-Bridge over wifi network or B4A-Bridge over bluetooth.
 
Upvote 0

johnaaronrose

Active Member
Licensed User
Longtime User
Yes. Devices can be connected with USB in several modes. Only if USB debugging is working correctly then you will be able to connect the IDE (or Eclipse) to the device, not using B4A-Bridge. Basic4android uses ADB (a tool from Android SDK) to communicate with the device. So the problem is usually not in Basic4android.

Maybe in the future. You can choose compile & run and ignore the last message. In most cases developers are able to connect to a real device using one of the three methods: USB debugging, B4A-Bridge over wifi network or B4A-Bridge over bluetooth.

When I try compiling, B4A does not find the device even though it is connected by USB cable & USB Debugging is on (in my ZTE Blade phone): it doesn't matter whether USB Storage is switched on or not(in my phone). Interestingly, running 'adb devices' afterwards gives:
adb server is out of date. killing...
* daemon started successfully *
List of devices attached
CM7-Blade device

Could the above message about 'adb server' be connected with B4A not finding the device?

Thanks for the advice on ignoring the last message: I can transfer the .apk to the sdcard on my phone and install the app from there.
 
Upvote 0

johnaaronrose

Active Member
Licensed User
Longtime User
Please check Tools - Configure paths. Does it point to android.jar in the same SDK that you used when running adb?

Path of android.jar is:
C:\AndroidSDK\platforms\android-10\android.jar

adb is run from:
C:\AndroidSDK\platform-tools

So the answer is yes.
 
Upvote 0
Top