Pak/Unpack and UdpSend/UdpReceive

Icarart's icon

Hello,
I try to create a tablet interface to control max on a computer.
But I don't understand pak and unpack don't work fine.
Just "send" and "receive" work fine.
But in all the patch, when I click on a button in the send subpatcher's, all the button are activated in the receive subpatcher's.
I try to separate in other port, but same thing, anarchy!

What's wrong please?

Thanks.

Max Patch
Copy patch and select New From Clipboard in Max.
Max Patch
Copy patch and select New From Clipboard in Max.

Here it is bpatchers:

broc's icon

All buttons are activated because you have set all arguments of 'pak' to '1'.

Try using [pak 0 0 0 0 0 0] instead.

Icarart's icon

Thanks broc for you're answer.

But it don't solve my problem.
In the documentation (Max Comm Tutorial 3: UDP Networking) it's written:
"UDP isn’t the most robust protocol: it does not guarantee that packets will arrive in any order, nor does it provide any means of error or packet loss notification."
Do you thing it could be the problem?

David Butler's icon

The problem is going to be with your network settings in some way. The patch works correctly on a local machine with the loopback IP (127.0.0.1).

UDP is an unreliable protocol, but the word 'unreliable' here mainly refers to the fact that the protocol doesn't include packet acknowledgement from the receiving device. You're not going to have any difficult using it over a small network.

Icarart's icon

So I don't understand, I've tried many things...
Now I will separate message into different ports, tedious but it looks working...

broc's icon

I don't think that different ports are really needed. You could still try to send the list as proper OSC message by prepending an address like /buttons, or send the list as single item converted eg. with tosymbol/fromsymbol.

Icarart's icon

Ok thanks for UDP info,
I will continue to try to solve my problem.
Osc and touchosc look like a good way to realize my interface, next step to learning using Osc!

balam's icon
Max Patch
Copy patch and select New From Clipboard in Max.

in my exp udp has been reliable
try to send messages as Osc tunnel
use