iOS Question B4i bridge - Cannot connect to it

Status
Not open for further replies.

hatzisn

Expert
Licensed User
Longtime User
Hi everyone,

I just installed to the device (iPhone 5S with iOS 12.1.1) the B4i bridge. I tried to connect to it but when I clicked on the menu "Tools > Device IP Address" I did not see the device. I tried entering it manually (the IP as seen in the device) but in the beginning I was getting a (failed to ping IP 192.168.1.7 <-IP) and of course no response of connection as seen in the video of Erel. Now when I click on the IP nothing happens (no error message) and of course no response of connection from B4i which displays the progress dialog with "Device IP 192.168.1.7 - Waiting for the IDE to connect to B4i-Bridge"

Any suggestions???

Edit - In which port does it connect to allow ingoing and outgoing connections in this port in my firewall to check if it is a firewall issue?
Edit 2 - My router has only one SSID so the device is definitely connected to the same network. I am able to connect to B4A bridge with no problem so no network issue. Also I have tried by setting to 32 bit architecture in b4i and building the bridge with no luck (I have switched back to 64bit). I also checked the IPs in the router for any possible conflicts. None appeared. I also tried finally as suggested by others to reset the settings of the iPhone device also with no luck. No luck, no luck, no luck... Ran out of lucky days... Some help will be highly appreciated...
 
Last edited:

hatzisn

Expert
Licensed User
Longtime User
Could it have to do something with the new iOS (12.1.1) because I am able to ping it (as seen in the following picture):

upload_2018-12-23_11-3-10.png
 
Upvote 0

hatzisn

Expert
Licensed User
Longtime User
Still no luck. I 've done all the following but I still get the same result ("Device IP 192.168.1.10 - Waiting for the IDE to connect to B4i-Bridge"):

1) Upgraded to iOS 12.1.2
2) Deleted all my keys and provisioning profiles and corresponding certificates and have recreated them
3) Opened inbound and outbound connection holes in the port 58191 through firewall
4) Changed the iPhone's wlan address to 192.168.1.10
5) Added this address to b4i again with no luck
6) Tried to connect to the previous address (192.168.1.7) from B4i and got the ping error msgbox (just to check that it actually tries to connect)
7) Tried to connect from b4i to an address that does not exist f.e. 192.168.1.255 and got the ping error msgbox (just to check that it actually tries to connect)

It seems that when connecting to this IP address (192.168.1.10) it pings it and it finds it but the b4i-bridge either does not get the message or does not react to the message correctly. Erel do you have an iPhone 5S to check that it actually works in it?

Edit - Erel, another thing that I noticed when I tried to create the provisioning profiles and certificates is that the wild card app ID does not accept anymore just a single asterisk but you have to add a prefix to it (f.e. prefix.*). Could this be a problem in the b4i-bridge connection?
 
Last edited:
Upvote 0

hatzisn

Expert
Licensed User
Longtime User
I have uninstalled it already and have reinstalled it. When I click on b4i-bridge I see this (and no matter what it stays in this screen - with all trial connections from the IDE). Just progress dialog with "Device IP 192.168.1.12 - Waiting for the IDE to connect to B4i-Bridge" - I have changed again manually the iPhone's IP. My phone does not have a sim in it... Could this be a problem? Another thing that has happened is that when I was trying to find the UDID before getting it from iTunes I searched for getting the udid and google pointed me to betafamily.com which I visited and installed the corresponding certificate to get the udid but It did not succeed getting the UDID also. Could this affect my iPhone's ability to connect?

upload_2018-12-23_18-55-26.png
 
Last edited:
Upvote 0

hatzisn

Expert
Licensed User
Longtime User
Any ideas on how to get it to work because I am completely done with all the ideas I had and my iPhone knowledge is limited?
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
My phone does not have a sim in it... Could this be a problem?
No.

The UDID is also not related as you were able to install B4i-Bridge.
As a test you can install apps in release mode (Alt + T + B + R) and make the installation with the same link you used to install the bridge.

It seems like a network issue. The best thing to do is to try it with a different computer running on a different network.
 
Upvote 0

hatzisn

Expert
Licensed User
Longtime User
Thank you Erel, I installed a trial application in release mode (Alt + T + B + R) and made the installation with the same link I used to install the bridge. This though will not give me the commodity of debugging in case anything goes wrong. I installed B4i also in my laptop and have got the same results with B4i bridge there too. Both machines have Windows 10 and Avast Antivirus. I will try to connect to my iPhone from my laptop when I have connected both the iPhone and my laptop to my brother's router and let you know...
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
This though will not give me the commodity of debugging in case anything goes wrong
This is indeed not good enough for development. It was only suggested as a test.

I installed B4i also in my laptop and have got the same results with B4i bridge there too.
Test it on a different network.
 
Upvote 0

hatzisn

Expert
Licensed User
Longtime User
Hi Erel,

I have done all the following and no result yet.

1) Connected both devices (iPhone and laptop to my brother's router) --> No result
2) Connected both devices back to my network and have set both in iPhone and my desktop to use DHCP to get IP because both devices' IPs were manually inserted --> No result
3) Rebooted both devices (iPhone and Desktop) to get dynamic IPs --> No result
4) Wiped out completely the iPhone and started as a new iPhone without restoring from the cloud --> No result

It looks like as B4i bridge is zombie (live looking but dead inside) because I can connect to the IIS in my desktop from the iPhone and it is definitely not a WLAN problem... I don't know what else to do. Would you be kind enough to help me in this as I am completely lost in this? I have installed Teamviewer QS in my iPhone and I can provide you access both to my desktop and my iPhone through this application. If you can spare sometime with me in this, please send me a private message to provide you with the details... (Please also mention the time you will be able to do so).

Thanks in advance...
 
Upvote 0

hatzisn

Expert
Licensed User
Longtime User
I asked for the teamviewer because I believe I have covered everything in the cases that could prevent the IDE and the iPhone from communicating. Recapping what I have checked here is a total list:

1) Ping is Ok from command line
2) No ping error when trying to connect from the IDE (yet no connection)
3) Upgraded to iOS 12.1.2
4) Deleted all my keys and provisioning profiles and corresponding certificates and have recreated them
5) Opened inbound and outbound connection holes in the port 58191 through firewall
6) Changed the iPhone's wlan address to 192.168.1.10
7) Added this address to b4i again with no luck
8) Tried to connect to the previous address (192.168.1.7) from B4i and got the ping error msgbox (just to check that it actually tries to connect)
9) Tried to connect from b4i to an address that does not exist f.e. 192.168.1.255 and got the ping error msgbox (just to check that it actually tries to connect)
10) My router has only one SSID so the device is definitely connected to the same network
11) I am able to connect to B4A bridge with no problem so no network issue.
12) I have tried by setting to 32 bit architecture in b4i and building the bridge with no luck (I have switched back to 64bit).
13) I checked the IPs in the router for any possible conflicts.
14) I have uninstalled and have reinstalled B4i-Bridge. When I click on b4i-bridge, no matter what it stays in progress dialog with "Device IP 192.168.1.7 - Waiting for the IDE to connect to B4i-Bridge".
15) Connected both devices (iPhone and laptop) to my brother's router with no result
16) Connected both devices back to my network and have set both in iPhone and my desktop to use DHCP to get IP because both devices' IPs were manually inserted
17) Rebooted both devices (iPhone and Desktop) to get dynamic IPs
18) Wiped out completely the iPhone and started as a new iPhone without restoring from the cloud
19) Tried to access my IIS in desktop from Safari and the result was successful
20) I have deactivated the web shield in Avast Antivirus tried to connect from B4i with no result and have reactivated the web shield.

Do you see anything missing in this list?

The only common things that my laptop and my desktop have are: Windows 10, MS Office 2010, Avast Antivirus, B4A, B4i, B4J and B4R.
Yet in both no connection between the IDE and B4i. The other common factor in the anticipated communication, is the iPhone 5S in which I don't have a lot of experience.

That is why I asked you for the Teamviewer. If you don't want to support me with teamviewer since you have the source code of B4i and you are able to debug in this code may I ask you to do the following:

1) install Avast Antivirus
2) Build b4i bridge
3) Install b4i bridge in your iPhone 5S
4) And at last by debugging try to connect with to b4i-bridge and check with this configuration if there is a problem in communications?

Edit - Since B4i bridge is built seperately for each user do you think that the problem might be connected to the building of B4i bridge in the hosted builder?
 
Last edited:
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
Since B4i bridge is built seperately for each user do you think that the problem might be connected to the building of B4i bridge in the hosted builder?
No.

There is a network problem somewhere. It has nothing to do with the certificates or provision profiles.

It is worth testing with Avast Antivirus disabled completely. It is also worth testing with a different iPhone / iPad.
 
Upvote 0

hatzisn

Expert
Licensed User
Longtime User
It seems to be a network problem after all having to do with my iPhone 5S. I tried it with an iPhone 6 and it connects from my Desktop.
Given all the facts that I wrote before and my lack of knowledge in iPhone 5S I will definitely need some assistance in this.
I don't know what to look for... Any suggestions?
 
Upvote 0

moster67

Expert
Licensed User
Longtime User
If the iPhone 5 is just a developer phone, try to reset it from scratch. Perhaps you have installed some app which messes up networking settings or similar..
Or maybe some settings ..
 
Upvote 0

hatzisn

Expert
Licensed User
Longtime User
News buletin: I cannot access anything in the internet from a B4i app. Watch this code:

B4X:
    Dim hj As HttpJob
    hj.Download("https://onlineserver.gr/getip.aspx")
    hj.GetRequest.Timeout = 5000
  
    hd.ToastMessageShow("Just before Wait.", True)
    Wait For (hj) JobDone(job As HttpJob)
  
    hd.ToastMessageShow("Just after Wait.", True)
    If job.Success Then 
        Msgbox(job.GetString, "IP")
    Else
        Msgbox(job.ErrorMessage, "IP")
    End If
    job.Release
    hj.Release

I see the "Just before Wait" and then nothing at all. (hd = HUD from iHUD library).
Not even the timeout fires anything... ("onlineserver.gr" is bogus server changed just in this message)
Any suggestions?

@moster67 I already have reset the iPhone 5S and have started as a new iPhone without restoring from iCloud...
@Erel As I already have said I can access the internet from Safari. Any suggestions?
 
Last edited:
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
It seems to be a network problem after all having to do with my iPhone 5S.
You can see that I wrote it about 5 times in this thread.

News buletin: I cannot access anything in the internet from a B4i app.
You should start a new thread for any other question you have.
 
Upvote 0
Status
Not open for further replies.
Top