b4a-bridge question

AndyDroid2012

Member
Licensed User
Longtime User
I installed the latest Google Store copy of B4A-Bridge but find that the IP address it sees is its internal BTinternet hub assigned IP
of 192.168.1.65 which cannot be pinged from my desktop Vista (192.168.1.64)
(but its external wifi IP 80.239.242.143 for the android is pingable) So the IDE fails to open the connection



On 06-21-2012, 10:27 AM Erel posted that with the (then current) version of B4A-Bridge

--------------------------------------------------------------------------------
... if the IP address is wrong, you can still use B4A-Bridge and enter the IP address shown in the wifi settings page.
__________________

How do you do that with the new wifi/bluetooth version ?

and if not, is there an alternative method ? :BangHead:
 

AndyDroid2012

Member
Licensed User
Longtime User
b4a-bridge connected and running

b4a-bridge connected and running --- Hurrah :icon_clap:

* * MY OUT OF THE BOX EXPERIENCE WITH B4A-BRIDGE v2.07 * *


Here are some notes I feel should be on the forum for newbies.

When you first start working with b4a its all new and you dont yet know what to expect and what is going to work or not. In my case the b4a-bridge did not work, and the responses here on the forum did not spell it out for me.

These notes probably apply across a broad range of home internet modems.

Here in the UK, I have a BTinternet HomeHub which has both wifi and copper RJ45 connection. The RJ45 plugs into my desktop running Vista, the wifi is used by my android tablet v. 4.0.3

When I ran the b4a IDE and attempted to use the bridge it failed because the IP displayed on the bridge was 192.168.1.65 and the ping failed. My pc internal IP on the BThub is 192.168.1.64

Talking to support at BT they were helpfull without having a specific solution.

In short, what you have to do is keep refreshing the devices page until you see the android device with a name like android-4668a66f6aa93f38 in the list of wireless connections. When I started browsing around the Hub admin pages I never saw this device until I had looped around ten times or more with the b4a-bridge app and my browser doing a Google search for What is My IP and I must have powered down the android and restarted as many times before suddenly I saw the device in the list. All this time the android was connecting properly to the internet and web pages were accessible but no device was showing except for two devices, one of which was named pc-01 IP 192.168.1.65 and my desktop IP 192.168.1.64
When the android was finally discovered by BTinternet hub it showed an IP 0.0.0.0

So now, right or wrong, I went to the BT admin page where I can assign the public IP to the device and I applied it to the android.

now the device list shows

Desktop PC IP 192.168.1.64
android-4668... IP 86.142.210.264

At this point I ran b4a-bridge again and it showed IP 86.142.210.264
Now I ran b4a IDE and was able to download and install one of the sample
applications and it ran fine.

As a test I shut down the pc and android and rebooted, though I left the BT modem powered up. On the android browser I again did What is My IP
and this time got a completely different IP
I ran the b4a-bridge again and got the IP from before shut down (because I think the BT modem assigned it) and that worried me.
I ran the IDE and it successfully downloaded the app (which I had un-installed)

As a further test I rebooted android and left the app installed but attempted to download it anew, but the bridge stalled. I went into android settings and uninstalled the app. When I returned to b4a-bridge it immediately asked to download the app, which it did and worked fine.

Conclusion:
BTinternet Hub seemed to have difficulty detecting the named android device in its list, even though android worked perfectly as a web device.
I was never able to ping the IP 192.168.1.65 from the pc and BT support agreed that internal IPs should not be pingable, only public IPs except if you open the BT-firewall and it still did not for me at least one time.

Seeing the android-4668a66f6aa93f38 and applying the public IP onto the android device was the turning point and everything worked after that, even though the public IP changed next time android booted.

I am not an network engineer and frankly I found this forum and BTsupport to be sympathetic but it took a few hours of messing about to get the BThub to discover my android in the tables.
I hope this posting will help others in their initial experience with b4a

BTW I was so impressed with b4a code structure and the people at Anywhere I purchased the package even before getting the bridge working. I reckon the last day or two will prove me correct.

-------------------------------------------------------------------
Keywords b4a-bridge, BTinternet HomeHub, internal IP, external IP, ping
 
Upvote 0

AndyDroid2012

Member
Licensed User
Longtime User
More Info for newbies who have not downloaded yet

b4a-bridge makes rapid development

Now that I have been using this bridge for two days I must say I am delighted.

Having booted android and run the bridge once, It starts and is waiting, now I connect from the IDE then Compile and Run.

The app is now installed when I click OK

Then testing and ooops ! I got an error in a variable or maybe syntax and the debugger shows both on the android screen and also at the line number in the IDE source code.

Now I fix the error and Compile and Run again.

The android prompts me if I wish to replace the app ? OK

Test again... ooops another error and the IDE source code line number is shown. And so on until the program runs OK

Want to tweak a button or field position ? A quick designer drag or change text in a label, Compile & Run in seconds and you see the result on-screen in android. AWESOME :)

This is so damn cool being able to download repeatably with so little effort, it makes it a breeze to learn and develop the app. Thank you so much for the b4a-bridge :sign0188: You guys obviously thought the development curve through.
 
Upvote 0
Top