Results 1 to 5 of 5

Thread: Ether dream streaming points

  1. #1
    Join Date
    Mar 2012
    Posts
    19

    Laser Warning Ether dream streaming points

    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:

    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);
    Then I use the following code to send a point:

    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);
    }
    And the result is, basically nothing.

    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

  2. #2
    Join Date
    Apr 2012
    Posts
    17

    Default

    Quote Originally Posted by donkeykong View Post
    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.
    From my understanding that means it works! The DAC has drawn your point - as you can see - and because there are no more data available it stops working. You should send a continuous stream of points in order to have a dot that is shown permanently.

  3. #3
    Join Date
    Mar 2012
    Posts
    19

    Default

    ^ Thanks for the reply. The sendPoint() method is running continuously within a loop, so thats not the problem there. The dot comes and goes sporadically, for instance it won't show up for 10 seconds then it will come and go very quickly for several seconds, then not appear, etc.

    Another thing that happens is that after I run my program I cannot use the board with any other programs such as osc, lfi player etc until I restart the ethernet connection.

  4. #4
    Join Date
    Apr 2012
    Posts
    17

    Default

    Quote Originally Posted by donkeykong View Post
    The sendPoint() method is running continuously within a loop, so thats not the problem there.
    OK, so here I can't help you because I can't see what you're doing exactly. In theory you have to fill the buffer of the card, then start your output and refill the buffer all the time to avoid it is runnung empty. In case you start the output and then send first points your buffer will be emtpy/run empty and you will not have a stable output.

    May be the vendor has some more ideas, unfortunately flow of information from his side is a bit tenacious.

  5. #5
    Join Date
    Apr 2010
    Location
    Grand Rapids, Mi
    Posts
    2,538

    Default

    You should jump into the chat irc listed on the top of the page, plenty of people in there that can help you.
    leading in trailing technology

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •