Must something be considered for Android Mobil Data use?

I use several Apps I created with the AI2 and all work perfect if I use my local WLAN .
However, if I use Mobile Data , the latest created App does not work, all other do.

Is there something I have to consider with the AI2 setup to be able to use Mobile Data?
I can not remember that I considered this with the earlier created Apps.

The Mobile Data settings for all Apps are the same on my Android phone.

Can anybody help , please?

no

you might want to explain more about your project

Taifun

Not much to say.
I just connect to a local server which delivers serial data which I decode and display.
But the problem is, I can not connect to the servers in case of Mobile Data is active.
WLAN works as already mentioned.

All ClientSocket settings for Address and Port are always the same.


I have to correct myself :
The App which does not work with Mobile Data uses SerialOTG, the others
ClientSocketAI2 !!

which solution do you use for that? an extension? any link to that extension? you might want to ask in the corresponding thread

Taifun

Look at here, the part by rkl099.

SerialOTG has been tested as client and server some years ago. Ver 1.5b has an increased timeout as a client 0.5 -> 5 sec to handle LTE connections. Can you describe the problems.

@rkl099 Thank you very much for coming back!

The problem is, it seems I'm not able to connect to the server by
SerialOTG1.initWIFI if Mobile Data is active. It works perfect in case
of WLAN connection.

So I assume , something is wrong with SerialOTG1 settings in the App and
the smartphone settings seem to be ok.

Do you have an advice ?

Thanks a lot.

What do you mean with Mobile Data is active?

OK. I think I understand. You can use WIFI or Mobile Data (LTE), but not both at the same time. If you use LTE, then you must have a server connected to this LTE (global) network with a known IP, that you are allowed to access from the outside.

Thanks for your answer.

Yes , I mean Internet via cellular data.

But I'm aware that I can not use both at the same time.

My problem is , WLAN works , LTE not!
As already mentioned , I have several Apps created by AI2 and all work with LTE,
except the last one where I use SerialOTG. The other use ClientSocketAI2.

Btw, I do not get any error message or a message that connection failed.
ClientSocketAI2 delivers a message "failed to connect" after 2 seconds.

Could be I'm doing something wrong, therefor I asked.

It is Open that try do do the connection. You have to test after Open for errors. If both extensions fails, maybe you are not allowed to do the connection?

Just LTE fails, WLAN works!

How can I check for errors ?

You can use IsOpen

Thank you for trying to help.

I checked it quickly. It seems in case of LTE , the App does not leave SerialOTG.InitWifi.

I continue testing.

How can I check if the smartphone is a member of the local network after SerialOTG1.initWIFI ?

I assume this is the location where the decision is made if the access to the local network
takes place via local WLAN or via LTE.

.connect and .isOpen is a second step, I'm wrong?

You can see under "Network and Internet->WiFi" the network the smartphone uses. LTE uses the global network specified on your simcard. Its never the same as the local network.
You can see your local IP-address under "About your Phone" (refers to Motorola).
You can access the local network by configuring your router (with access to internet) with an open port but this allow all to access it. Your router may have settings to limit external access. You also have the problem with your routers external IP-address.
Use Open to connect and isOpen and isConnected to test.
I have not tested SerialOTG using LTE. It may miss some permissions.

Thank you for answering.

Most of them is already known and checked.

I did it, but isOpen and isConnected always delivers false.

I assume this is possibly the case. I guess I have to live with it.

Nevertheless, thanks a lot for your great support.

To remove all doubts if I setup something wrong on my smartphone or in
my Ai2 App , can anybody verify the issue, please ?
I would like to know, if SerialOTG is iused, a WLAN connection in a local network
is working, but a connection via LTE not.