I've been playing around with the Ether Dream DAC and have been using the SD card feature and OSC to do shows which works great.
I want to take it one step further now and stream points directly using TCP as per this guide: http://ether-dream.com/protocol.html and I am using the structs specified on this page.
I'm using C++ and while I am reasonably experienced programming in c++ I am a total noob when it comes to network programming.
So far I have the following:
When the program starts it executes the following code:
Then I use the following code to send a point:Code:struct sockaddr_in dest; mysocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); memset(&dest, 0, sizeof(dest)); dest.sin_family = AF_INET; dest.sin_addr.s_addr = inet_addr("169.254.85.88"); dest.sin_port = htons(PORTNUM); connect(mysocket, (struct sockaddr *)&dest, sizeof(struct sockaddr)); char prepare = 'p'; int result = send(mysocket,(char*)&prepare,(int)sizeof(prepare),0); begin_command begin; begin.command='b'; begin.point_rate = 20000; result = send(mysocket,(char*)&begin,(int)sizeof(begin),0);
And the result is, basically nothing.Code:void testApp::sendPoint(int x, int y) { data_command d; d.command = 'd'; d.npoints = 1; d.data[0].x=x; d.data[0].y=y; d.data[0].control = 0; d.data[0].g = 65535; d.data[0].b = 0; d.data[0].i = 0; d.data[0].r = 65535; d.data[0].u1 = 0; d.data[0].u2 = 0; int result = send(mysocket,(char*)&d,(int)sizeof(d),0); }
Most of the time nothing is being drawn by the laser, but occasionally the dot appears for a split second then disappears, when this happens the LED2 light on the etherdream lights up briefly but for the rest of the time this light is off.
If it helps i'm on a mac using osx 10.6.8 and am using Xcode 3.2.6


Reply With Quote
