Wish B4A Bridge - Please ping default gateway until connected to B4A

Peter Simpson

Expert
Licensed User
Just a quick suggestion.

Must of the time I can only get B4A to connect to the bridge if I start the browser on my device(or any app that quickly connects to the internet), then quickly start B4A-Bridge, then select the IP address to connect to in B4A. Basically I've always had this problem no matter what router I use or Android device I use.

If B4A-bridge pinged the default gateway until B4A connected to it, then the connection procedure would run smoother as B4A would know where to find the device 100% and would connect 100% in my case. I know that I'm not the only person that has connection issues over WiFi, I'm sure that pinging would fix the issue for sure as I also run ping apps on devices and B4A find and connects to the device instantly when device is pinging out. Also I have the exact issues pinging any of my Android devices through the command prompt from any of my machines through any of my 5 routers, but not if I first start an app that quickly connects to the internet for any reason(for example chrome browser on that said device).

Once in a blue moon I can get away with not starting my browser or starting an app that quickly connects to the internet for some reason.

Basically by starting my browser first on ANY of my Android devices first, I'm guaranteed to connect B4A-bridge and B4A at my first attempt, but I usually forget because sometimes it works without starting the browser first.
 
Last edited:

DavideV

Active Member
Licensed User
Just a quick suggestion.

Must of the time I can only get B4A to connect to the bridge if I start the browser on my device(or any app that quickly connects to the internet), then quickly start B4A-Bridge, then select the IP address to connect to in B4A. Basically I've always had this problem no matter what router I use or Android device I use.

If B4A-bridge pinged the default gateway until B4A connected to it, then the connection procedure would run smoother as B4A would know where to find the device 100% and would connect 100% in my case. I know that I'm not the only person that has connection issues over WiFi, I'm sure that pinging would fix the issue for sure as I also run ping apps on devices and B4A find and connects to the device instantly when device is pinging out. Also I have the exact issues pinging any of my Android devices through the command prompt from any of my machines through any of my 5 routers, but not if I first start an app that quickly connects to the internet for any reason(for example chrome browser on that said device).

Once in a blue moon I can get away with not starting my browser or starting an app that quickly connects to the internet for some reason.

Basically by starting my browser first on ANY of my Android devices first, I'm guaranteed to connect B4A-bridge and B4A at my first attempt, but I usually forget because sometimes it works without starting the browser first.
Exactly the same for me, can't explain better.
The first times i used ping in dos mode until the device started to respond then i found that starting the browser on the device did the same and faster.

I think this problem is related to my wifi access point, i travel for work and i get the problem always at home but not in the hotels...
I tried to change some settings in the access point without lucky...
 

Peter Simpson

Expert
Licensed User
I've got a number of Wi-Fi access points and in my case no matter which access point(router) it use, even with their firewalls switchef off, the same thing always happens, it's a nightmare.

A simple ping routine to ping the default gateway address of the B4A machine would easily resolve the issue. I know for a fact that I'm not the only person on this community having this problem.

I can tell you that I don't have this issue with 2 device's running Android 2.3. Those device's works 100% of the time. All my device's running Android 3.2 and above all have this problem. To tell you the truth @DavideV, it's the only annoying thing that I've come across when it comes to B4A.

I used to be a network engineer fine tuning large company networks, doing that job never really annoyed me like this little bridge issue does.

As I said previously, I know that other are having the same issues, but there's nothing that I can do about it. Well I suppose I could modify the Bridge code for myself that @Erel has uploaded on this community. But then if Erel updates the bridge I have to update the new bridge as well and so :(
 
Top