TCP/IP Extension

Excelent. Thanks for sharing.

how to replace the 2000 ms timeout time with another duration?

Hi thanks for the code.

How can i disable the error messages?

Thanks

Hello ;
I want to send data for a specific address at the plc register. I can connect to the my plc's HMI screen, thanks to your extension with TCP/IP. But I want to send a data to register adress. Do you have a any recommendation.

Hi Jean,

Great Extention exactly what I was looking for. :grin: :grin: :grin:

I tried using the Hexa mode, but noticed that when I send 123 "303132" on the receiving side I'm getting "30 31 32 00". I am always getting a null character added at the end of the message; which I do not want and will mess up things on the receiving side which I have no control off.

If I send "52" I'm receiving "52 00"

Is the null character coming from the Extention or ???, and is it possible to get rid of it. It only occurs when using the Hexmode... Or can we toggle on/off if needed for other scenarios...

TIA

Hello,
Sorry for not answering for a long time.
I don't know why this is happening because on my phone and with the basic project, there is no problem, I choose Hexa String Mode and send 303132, I receive on the other side 303132.
Here is a version of the extension with app inventor sources updated, can you try it and tell me if it make it works better ?

com.gmail.at.moicjarod.aix (18.3 KB)

Hi Jean,

Thanks for the response. I downloaded the new aix and Imported it into my app, where I got a message that the Extention got updated.

I tried the same scenarios and I am still seeing the Null characters added. So let me describe my testing:


The two blocks send Hex-"E" "52" when button pushed down and then sends Hex-"e" "72" when up.

So I should see "5272"
And I'm getting "52007200"

The same scenario but with Hex off and the actual ASCII characters, I get "Ee"

I am using Realterm on a laptop to test the output of the Wifi/RS232 adapter.


So if you can not replicate on your side, I'm wondering if its a setting in Realterm or the Adapter...

1 Like

Ok, so you confirm that it Only happens when hexastringmode is enabled ?

Yes. At the end of every send data the Nul character gets added.

I checked the output in Realterm where Display was set to Hex this way I can easily see if I'm receiving the Nul character. The Nul character does Not get added in none Hexa mode and only gets added in Hexa mode with every send data.

Phone: Samsung S9+, Android 10

Hi Jean,

I need to apologize since I must have messed up with upgrading the Extention.
I was testing again but this time I used your test app. I first upgraded it to the latest Extention and then added a check box to toggle Hexa Mode. When the hex mode was enabled, I did not get the Nul character.

I went back to my app and clicked on the Extention where I notice that the number of blocks is not the same as the one I just upgrded to using your test app.

So I must have messed up the upgrade and did not use the latest version you provided. When I corrected my mistake, things worked as expected.

Thanks again for the great Extention, and quick response.

Hi Jean
I did an App with Kodular with your TCP/IP extension.
I tried with android emulator on my pc and its connecting, communicating without any error.
I tried with my real phone samsung s8 android9, the app hangs.
When i hit the connect to server, its connecting and then disconnecting about 2 or 3 seconds later. when that happens application hangs up.
Do you have any advice ?
Thanks

1 Like

Thanks for sharing.

Hello Jean

I am trying to use your ClientSocketA2IExt with my Android mobile to send data to an application running under Windows 10 environment. This application has a built-in socket listener which listens on port 6100. I send message to the application which is not get received unless I disconnect the socket. Any workaround. Basically I am sending Gyro data to the application.

Hi, could you also make a server socket, I really need it, thanks in advance.

I've found what I need.

Hello JRL,
Could you tell me if your extension is using the wss or ws mode (secured or not).
I could partially get it to work to a server that expects ws mode only.
I get connected, but was not able to exchange data, even though the APP reports
data sent and data received with nothing displayed.
Thx.

Hi, I also need to make a server socket which listens to a defined port, could you share your findings please? Thak you in advance

@Jean-Rodolphe_Letert, HELLO,
Has it been updated recently?
Can it set "character encoding"?For example, GBK。

Hello Jean-Rodolphe,
Your clientsocket worked like a charm for many years. Only lately the connection failed to establish.
I found out my provider has changed all the ip addresses to ipv6 and uses the ipv 4 addresses for internal traffic only meaning I need to connect through the ipv 6.

Is it possible to adapt the clientsocket for ipv6 or is there maybe something else obstructing my connection.

regards Atez