Android Question Network Port 80

canalrun

Well-Known Member
Licensed User
Longtime User
Hello,
I am writing a chat type application using B4A. It is derived from Erel's Walkie Talkie tutorial:

https://www.b4x.com/android/forum/t...reaming-over-wifi-or-bluetooth.30648/#content

In fact, the connector service is almost identical.

I would like to establish a network connection via a cellular data network. My guess is that this is probably not possible since many cellular networks block nonstandard network ports.

To get around this nonstandard port problem I've tried using port 80 instead of the defined port, 21341.

The connector crashes on the line (when port = 80):
B4X:
server.Initialize(port, "server")
It works when port = 21341. I'm thinking it's probably because this port may already be in use or it is not allowed to connect to standard defined ports.

I thought I would ask to be sure.

If I use a standard port, might it be possible to connect over cellular data networks?
Is there a different way to enable use over cellular data networks?

Is the problem that I am not allowed to use standard ports? Or, is it that the port is busy?

Thanks for any insight.

Barry.
 

canalrun

Well-Known Member
Licensed User
Longtime User
Thanks. I think that explains it.

I got the server connect error (on the line server.Initialize(port, "server")) message when I tried to connect the server using port 80 – that is less than 1024, as you say, so I guess the error is expected.

When I tried to connect through the cellular network using port 21341, it timed out trying to connect (I did not receive the server connect error, only timeout error). Would this be explained by the cellular network rejecting incoming connections even though the connection was intended for another device also using the same cellular data network?

Barry.
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
Would this be explained by the cellular network rejecting incoming connections even though the connection was intended for another device also using the same cellular data network?
Yes. It will not work.

You can use CloudMQTT service to easily create a chat application over the internet based on MQTT.
 
Upvote 0

canalrun

Well-Known Member
Licensed User
Longtime User
Thanks.

I will have to look at the MQTT solution. I noticed your tutorial on this.

Barry.
 
Upvote 0
Top