Results 1 to 8 of 8

Thread: sending ASCII via tcp/ip

  1. #1
    Join Date
    Sep 2006
    Posts
    4

    Question sending ASCII via tcp/ip

    hi there, I downloaded the demo of girder yesterday but I'm having trouble with it

    I'm trying to send ASCII commands via tcp/ip to my projector.

    I've read through the forums, read the part on gis in the manual but I'm still having trouble.

    Is there a simple way of doing this i.e. like sending a serial command but instead of specifiing the com port I specify the ip port?

    btw; girder wouldn't load up for me unto I removed the audiomixer.dll from the plugin directory.

    thanks for your time.

    CaM

  2. #2
    Join Date
    May 2004
    Location
    Cardigan, UK
    Posts
    9,278

    Default

    Yes, you need to use the GIP plugin for this.

    If you just want to send then it's fairly straightforward, if you want to receive data back from the projector then it's a little more complex, but not too bad really.

    Suppose that the projector is on IP address 192.168.0.5 and the port is 1234 then you'd open the port using
    Code:
    local socket = gip.Open('192.168.0.5', 1234)
    if socket then 
      -- this should be okay, strictly speaking you should install a callback to check that the connection was made successfully
       socket:Write('some string')
    end
    See the manual for the gip library for full details and post here if you need any more help.

    What projector is it?

    By the way, there is an alternative way to do this using a 'serial' device, at least in Girder 4.0.6 and up. It does mean creating the device manually, since there is no DUI support for it yet, but the new serial.Classes.Queued2 device class does support either a serial or IP transport layer. This has the advantage that you should be able to use the DUI actions to send to the projector.
    --Rob

  3. #3
    Join Date
    Sep 2006
    Posts
    4

    Default more questions

    hi there, the projector is a projectiondesign action model two.

    I'll look into creating a device once I get my frist script to run

    so, I created a script, put it in the startup area (so I can test it). My code is the following (which btw doesn't seem to work).

    local socket = gip.Open('192.168.1.90', 1025)
    if socket then
    socket:Write(':POWR 1\0x0D')
    end

    am I right in assuming the socket:Write part is where I put my ascii command?

    If I open my ascii file in hyperterminal it actually displays it as

    %001 POWR 000001

    Are they both ascii?

    thanks for your help

    CaM

  4. #4
    Join Date
    May 2004
    Location
    Cardigan, UK
    Posts
    9,278

    Default

    That looks okay except you should use \r to terminate it (Carriage return in a Lua string)

    The %100 bit is the acknowldege response from the projector. You'll have to add a callback to the socket if you want to see the responses in Girder
    --Rob

  5. #5
    Join Date
    Sep 2006
    Posts
    4

    Default

    ok, I've finally got it working!

    lol, it took me a while to figure out I needed to include the gip plugin

    thanks for your help.

    CaM

  6. #6
    Join Date
    Dec 2001
    Posts
    11,560

    Default

    what projector is this?

  7. #7
    Join Date
    May 2004
    Location
    Cardigan, UK
    Posts
    9,278

  8. #8
    Join Date
    Sep 2006
    Posts
    4

    Default that is the one

    yep, that link shows the one I have.

    I can control it via cat5 or usb which is pretty cool

    imho it is one of the best 720p pj's. My only complaint with it is the lack of 12v trigger.

    CaM

Posting Permissions

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