any idea why this updsend/udpreceive setup doesn't work ?

vichug's icon

Hello,

we're havig bad times here trying to make use of udpsend/udpreceive at a local network, can't figure out why.

The network is via etherenet and an ethernet hub. Both computer appear in the list of network machines in the finder. Pinging the 2d computer from the first, with the mac terminal, gives normal results. The sender computer is an iMac from circa 2010, the second (receiver) a macbook pro from circa the same era. Max is either 6.1 on both computers, or 6.0.? on one (can't remember for sure) and 6.1 on the other. Their IP adress is fixed on the local netork, we checked double triple checked if it was the good IP. We tried several ports (first 5000 then 4200).

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

Here are the relevant part of the patches used :
sender computer

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

receiver computer

the 'relevent part of patches' probably mean nothing, but that's what we used to test, and what didn't work... Maybe the problem comes from..; i don't know;... somewhere ?

vichug's icon

some precisions :
sender computer is 2009 iMac osx 10.5.8, max6.1, 32 bit mode
receiver is 2009 MacBookPro, osx 10.5.8, max6.0.8

dtr's icon

in the address, are you sure it's 68 instead of 168? 192.168.x.x is common for local networks.

vichug's icon

it was indeed 192.168.0.2, but i had spellt it right in the original patch, as odd as it sounds.
Also, i tried to udpsend/udpreceive (with the right spelled adresses...) with the testing utility, and it didn't work, even though the localhost did work.

woyteg's icon

I recently ran into the problem that udpsend (or was it receive?) didn't initialise properly. I hav no idea why, but i typed eg
[udpsend localhost 5000]
And it did not bind to the port 5000. I think it even reported "binding to port 0" in the max window.
I had this problem several times and would say i can assure it wasn't a spelling problem.
Anyways, when i sent "port 5000" to the object with a message box, it bound properly and everything worked.
I don't know if that helps. Do you have the correct "binding to port 4200" message in the max window?

dtr's icon

Does udpsend/receive support host names like jit.net.send/recv does? I had similar problems with jit.net.send/recv till I used my computers' network names instead of IP's. My desktop's name is dtrHacPro. Network name then is dtrHacPro.local .

vichug's icon

@dtr : then, could it be that i need to access distant computers with such a naming ? Imagine a distant computer's desktop is called "computer", then would i need to indicate "computer.local" as its network name ?
@woyteg : no binding prints in the max window at all for sending. The bindings show only for instantiating a udpreceive object. Though when trying to establish connection to localhost, it works, even though the binding for the udpsend object doesn't print. The udpsend doesn't report anything, not even "binding to port 0". Is that not the expected behaviour ?

dtr's icon

> @dtr : then, could it be that i need to access distant computers with such a naming ? Imagine a distant computer's desktop is called "computer", then would i need to indicate "computer.local" as its network name ?

Yes. Assuming that computer is on the same local network, not the internet.

> @woyteg : no binding prints in the max window at all for sending. The bindings show only for instantiating a udpreceive object. Though when trying to establish connection to localhost, it works, even though the binding for the udpsend object doesn't print. The udpsend doesn't report anything, not even "binding to port 0". Is that not the expected behaviour ?

udpsend doesn't post to the Max window.

jaeho's icon

The patches you attached look OK to me.

I'm wondering if the networks settings on the Macs are correct.
I used to set only IP address and subnet mask, but not router, DNS, etc.

vichug's icon

@jaeho : those settings are exactly those used :/
@dtr : i'll try this naming then

jaeho's icon

I would try to:

1. conenct two Macs directly with the ethernet cable and see if it works.
(It does not have to be a so-called 'cross-cable'. You may use just a normal cable.)

2. use another ethernet cable.

3. use another router.

pdelges's icon

The last time I had problems with UDP in Max, it was because of firewalls turned on one of the Macs. Make sure they are off or that the ports you use are opened. Beware: ping does work even with firewalls turned on!

p

vichug's icon

aaaaah maybe it's that because, usually there's no firewall on a mac is there ? and on one of the problematic machines iirc there is an antivirus....

dtr's icon

there is. check system preferences > security & privacy