Hi Dennis,
I didn't see any attachments to previous emails from you. I think that sending and receiving on the same port is not an intended use of the UDP protocol, which was designed for throw and forget messaging. It makes more sense to do this with TCP, which maintains a two-way connection. Can you connect to the X32 with TCP? Anyway, I'd like to see what you did.
Martin
On 2014-02-25 21:02, Dennis Engdahl wrote:
Martin:
I hope you received my previous e-mail with the attachment. If not, please let me know.
The X32 responds to commands by sending the response to the IP and port from which it received the command. These are the problems with the present approach which my routine solves:
- The "from" port used while sending a command is assigned by the
system, and is not reported to the user. Therefore, the user has no way to set up a listener on that port to receive the X32's response.
- Even if we modify the existing routines to allow the user to specify
the "from" port, after doing so, the same port cannot be used again to set up udpreceive. The system returns an "in use" error when trying to do so. In Winsock, the "from IP", "from port", "to IP", and "to port" must be unique for a connection to be set up. Since the user is specifying the "from port", "to IP", and "to port", and since the "from IP" is static, only one connection can be set up at a time. Both udpsend and udpreceive try to set up a connection. If the "from port" is static, the second connection fails.
My routine allows the setting of the "from port". Then, my routine only sets up one connection, and sends and receives on that one connection. Since the user is specifying the "from port", more than one connection can be established (by more than one patch) by specifying different (known) ports (see the help page for my routine.)
Thank you for your response, Martin. I am more than willing for you to take over the routine if you wish, or to solve this another way if you wish. I just wish to communicate with the X32.
Sincerely,
Dennis Engdahl engdahl@snowcrest.net (530) 926-2996
On Tue, 25 Feb 2014, Martin Peach wrote:
Date: Tue, 25 Feb 2014 12:58:57 -0500 From: Martin Peach martin.peach@sympatico.ca To: Jonathan Wilkes jancsika@yahoo.com, Dennis Engdahl engdahl@snowcrest.net, "pd-dev@iem.at" pd-dev@iem.at Subject: Re: [PD-dev] Requesting SVN commit access
Yes I'd be happy to include anything that works better in mrpeach/net. I'm curious as to what is special about the Behringer X32 that makes it hard to communicate with the existing externals.
Martin
On 2014-02-25 12:53, Jonathan Wilkes wrote:
Hi Dennis, I'm not sure who has the "keys to the kingdom" here. But at far as the update for Martin's library you can just contact him directly (along with any documentation that explains your changes). Then he can push the updates himself. Generally that's the process for updates to preexisting libraries.
Of course you can also get svn access to add your own library for other things.
Best, Jonathan
On Tuesday, February 25, 2014 10:29 AM, Dennis Engdahl engdahl@snowcrest.net wrote: To the list members:
My name is Dennis Engdahl. I have been developing computer programs since the days of the keypunch (and paper tape), and have taught computer science at the college level for 20 years. I am now retired, and have started an internet providing company which my sons now run.
I am an expert at communications software (TCP/IP, etc.), and am interested in pd to communicate with my church's new Behringer X32. Since the UDP routines Martin Peach wrote are not able to receive data successfully from the X32, I researched the problem and created a new routine which will communicate. If you're interested in the details, you can either look at my source, or pm me.
At this time, I would like to commit this routine (udpsndrcv.c) and its help file to Martin's area, to allow others to communicate with hardware with the same requirements as the X32.
I am interested also in the audio aspects of pd, and may be developing other routines to help out in the future.
Please allow me SVN commit access to be able to accomplish this.
Thank you,
Dennis Engdahl engdahl@snowcrest.net mailto:engdahl@snowcrest.net (530) 926-2996
Pd-dev mailing list Pd-dev@iem.at mailto:Pd-dev@iem.at http://lists.puredata.info/listinfo/pd-dev
Pd-dev mailing list Pd-dev@iem.at http://lists.puredata.info/listinfo/pd-dev
Pd-dev mailing list Pd-dev@iem.at http://lists.puredata.info/listinfo/pd-dev