[Free] UDP client extension

I failed use it send a message to IP is BUG?
And I want get MQTT TCP/IP Extension ,but I not use paypal. Can I use Wechat Pay or AliPay?

@Andres_Cotes thank you for this great extension!
But i have problem with response from UDP server. When I send packet to some ip where there is NO server i still get “response” and clientudp.received is triggered with last received message from exist server.

Send message to existing server on, got reply with text “random reply from server”.
Change ip in clientudp to where is no any machine in network with this adress.
Send message, and still “got reply” (clientudp.received is triggered) with before text “random reply from server”.

Any advices?

How can I make the delay between each UDP message shorter?

I have 2 buttons to send 2 strings. Like A_button send led_on, B_button send led_off. The issue was this extension didn’t send strings fast enough. When I pressed the buttons quickly, like less than 1 second, there were some messages will be missed to send out.

Is anyone have same problem like that?

Is it possible to add in delay attribute for UDPClient.send() ?

Thank you.

Servus Harry!

This is a problem that the header is not properly configured and evaluated. Andres does not seem to know this option from UPD? He promised, however, to solve this problem.
Know this from your own experience. It took a long time to properly configure and use the UPD class of Adruino and ESP8266.
Sowas usually need a few days until you see through, what you do wrong. Guess, in Java that’s not much different?

Very nice extension, thank you!
However, I have one problem:
I need to send some special characters like 0x91 and 0x12.
Is there any way to send raw hex data or any other special characters other than \r and \n?
How can I send hex values like 91 and 12?

A friendly hobbyist who is proficient in Java has created a working UDP extension for me and for his project. Everything works. Even error codes can be read out separately. Naturally also the local IP queried, as well as answer haven and Ip of the sender are read from the header of the incoming message. Of course, the header of the outgoing message is also created and transmitted correctly.

So is no longer needed this extension. I’m sorry for you Andres.

Download at http://bienonline.magix.net/public/android-AI2-UDP.html

Everything open source.
So everyone can see for themselves whether he can still improve something.


thank you very much @Johannes_der_Wildwes for the contribution to the community is excellent your extension I like that you have served the information that you send and wake up the development of extensions and I put the link in the first post

I also think that you should create a new post so @taifun can add the information to the extensions directory


Andres Cotes


Hi Andres_Cotes,

Can you please improve the delay issue? Thank you.

Hello Andres,
Thank you for your extensions.
I am looking for an extension that can “telnet” to some older equipment.
Some equipment only accept telnet commands.

For example:
IP :192.168.1.xx
port: 23 ( 24, 6742 and etc)
data: “command 1”

Please kindly let us know if this possible or what it would require for development
Thank you

hello, you mean this

Hello Andres,
Thank you kindly for the quick response.
Yes, that is the idea! But we just need the “telnet block” so we can drag into our own projects

here is what we need:

  1. We just need a Telnet Client “block” that allows us to import and assign to a button.

Then when we press the BUTTON, the command can be sent to the ip address using TELNET.

For example,
We tried the UDP client extension, but i think that is not the correct one for our application.

thank you @Johannes_der_Wildwes for your contribution, I now added the extension into my extensions directory


Trying to push the limits! Snippets, Tutorials and Extensions from Pura Vida Apps by Taifun.

1 Like

salut. s’il te plait j’aimerai savoir comment t’as proceder. j’ai a peu pres le meme probleme. s;il te plait j’ai besoin de ton aide.

Buenos días ANDRES por favor cómo me gustará saber utilizarme extensiones cliente UDP cuando envíos de los paquetes recois nada en la vía serie de arduino. cuando pruebo(trato) con UDP sender ca funciona. Por favor ven tiene mi socorro


Muchas gracias por tu trabajo, me resulta de gran utilidad.
Recién encuentro tu actualización del 14/10/2017, que incluye el argumento Timeout.
Quisiera saber si hay alguna manera de lanzar un evento “OnTimeOut”, debido que me resulta de vital importancia saber si el mensaje UDP salió a destino dentro del tiempo previsto.
Tal vez me esté perdiendo algo muy evidente, pero que no alcanzo a ver…
Infinitas gracias, David de Argentina

I have a device that accept UDP messages.
Those messages at the moment are sended by a python app with this format:
struct.pack("<BLBHBBBB", 66, 0, 168, 0, 10, 168, 123, 222);

I would like to convert it to a message compatible with UDP extension (i think it’s a text field).
How can I convert this blob into a message?
thank you so much!

great job, thanks for share it @Johannes_der_Wildwes

I tried “UrsAI2UDP” ([http://bienonline.magix.net/public/android-AI2-UDP/UrsAI2UDP.zip]).
And send datagram don’t work for my phone. I made my version of sendUDP (added new thread). So it works for me (tested only in a local network). UDPsend.aix (6.4 KB) Only basic send message to IP Port, no broadcast , no from port.

These extensions work OK for sending datagrams. But None are proposing a non blocking receivefrom() equivalent. In UDP there’s no such thing as a “Connection” (as far as I know), so I should be at anytime able to test is a Receive is underway (without having to send anything), for a period of time of my choice and return/cancel from that request if no data is available.
Anyone has that?

Seems here is error in extension, regarding sending of UTF encoded string…
Let assume string contains non-ASCII characters “абвгд”. Length of string is 5 characters.
However all character is incoded by 2 bytes - D0B0 D0B1 D0B2 D0B3 D0B4, so actual size of packet is 10.
On the far end, udp receiver reports that packet size is 5 bytes, and only half of buffer is received.

1 Like