TCP/IP Extension

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

Hi, question - is this extension still works in 2022? When i try it i have (..)" java.lang.RuntimeException: no such class: com.gmail.at.moicjarod.ClientSocketAI2Ext gnu.bytecode.ObjectType.getReflectClass(ObjectType.java:179) (..)"
20+ more lines of error at connect via USB to Samsung +20FE

Hi Pawel. I'm currently using this extension on my project and it works fine. Nevertheless, I also got the same error you mention. Try connecting your phone via AI Companion in stead of USB just once and then connect again the way you prefer. That's how the error disappeared for me.

Gracias!

Greetings! there is esp32 on it telnet and a hosting name are implemented. Telnet works on port 23 - there is a connection when specifying a specific ip address. When you specify the name host - the connection is not performed - it says that there is no such name, (Socket Creation, please check Ip or hostname -> ). On the PC version of PuTTy, everything works both by host name and by ip address.
Does host name work for anyone?

i just tried, yes it does work with host name too : )

hi, to all. i made a simple client app with this extension, but have some real problems with this one.
first when i close my win 10 program from red X icon all app on phone freeze and want to close and /or disconnect normal to say that the connection is lose. i can not picture this action, but i try what i know about for app inventor to avoid this. no success.

second : when win 10 program is on but server is not started, and i try to connect phone app to ip:port, mean click connect button on app to try connect shows this one:


and when i press end button app is close. on other app that i try when is no server to connect, is message show up to say that is no server. here is directly end app. think need to make some little more to avoid this message and add message for no server to connect.

third : i make a simple function to connect to server, when i started, but after click button connect app try to connect, playing sound for receive message, because i made IF is connect to server , server send message YOU ARE CONNECTED double, but in server client list, ip of app client is not show up. need to click again connect button to make connection. also made a connect button to be disable when connection is real, but after receive messages more then one button connect is still enable and connection is not real. image goes here with more then one messages received for ready of connections:


also label connected is green and text is connected but in real connection is not true. i don know why, in same if construction i made a connect button to be disable when connection is real AND after that label to be green, but how you can see this not happen.

a real connection result after next click is this picture:

in normal true connection like last picture all works fine. in receive messages, sound is playing and all functioning well like in picture bellow:

disconnect button works fine. after clicking, sound for disconnect is playing and after 1 second timer is off and connection is close. label stay blue, test is disconnected

picture of basic client/server win 10 program is here. made by me with C# and work of many of my RASPBERRY PI PICO boards in all local and global network.

when app is try to connect but is no success, program in win 10 say always REASON : NORMAL and in left site client list with ip:ports is empty. like picture bellow:

ok, i know that you will need to see code of project and i make some pictures of that:

if is need to make some more let me know. best regards of your work in this extension, but i think need to make some little fixes and/or add some extra functions or need to test extension a little more about to test/fix all scenarios in local network events to make it great for small apps like this :slight_smile: www.karadev.net

Hi , thanks for the code and extension.
But I encounter problem where the data received always truncated on the first 10 charcter if the sentence more than 20 letters?

like you can see in my soft for windows and app for phone messages are more then 10 characters.
the socket window software is old one and i will make a new, because the lib for C# is have an update, but and with old version works fine.
give some pics to see what is bothering you.

Work for me. Thank's.

Men bu extension o'zgartirish kiritdim buni
GitHub - Soyibjon1/ClientSocketAI2Ext-v5: ClientSocketAI2Ex ning yangilangan 5-versiasi bu versiada xatolikni ushlab qolish funksiyasi qo'shilgan dan yuklab olishingiz mumkun.


men unga xatoni ushlab olish funksiyasini qo'shdim menimcha u yaxshi ishlayapti.

Malumot uchun men java dasturlash tilini bilmayman va extension-ni suniy intelekt do'ztlarim bilan hamkorlikda qildik :grin:

thank you very much for the help and the quality answer. I will try it to see how it works, just to have a little time, because the tasks are many :). this is important for use, not only for me, but also for all users it will be very valuable. you can upload it as an official plugin to the library directly on MIT App Inventor. I am super happy that we have colleagues who know, can, make quality software. for all of us users of MIT App Inventor, specialists like you are quality colleagues and friends. thanks once again, when I have time I will test it. that will be soon :slight_smile:

==============================================================

Yardımınız ve kaliteli cevabınız için çok teşekkür ederim. Deneyip nasıl çalıştığını göreceğim, sadece biraz zamanım var, çünkü çok fazla görev var :). Bu kullanım açısından önemli, sadece benim için değil tüm kullanıcılar için çok değerli olacak. Bunu doğrudan MIT App Inventor'daki kütüphaneye resmi eklenti olarak yükleyebilirsiniz. Kaliteli yazılım bilen, yapabilen ve üreten meslektaşlarımızın olması beni çok mutlu ediyor. Biz MIT App Inventor kullanıcıları için sizin gibi uzmanlar kaliteli meslektaşlar ve dostlardır. tekrar teşekkürler, zamanım olunca deneyeceğim. yakında olacak :slight_smile: