Results 1 to 10 of 125

Thread: creating a TCP/IP Transport

Hybrid View

  1. #1
    Join Date
    Apr 2003
    Posts
    111

    Default creating a TCP/IP Transport

    I am working to create a Device Manager for Integra Receivers, working backwards from the Denon device manager. everything is currently 232 but I am curious about adding TCP/IP functionality.

    If i go into the transport and configure it for IP it says that it connects, but nothing sends or receives. the manual says that the TCP/IP transport function are:

    Code:
     num, err = [transport]:Open( [url], [port number] )
    but where does this go?
    Last edited by 28seven; January 15th, 2009 at 06:07 PM.

  2. #2
    Join Date
    Apr 2003
    Posts
    111

    Default

    playing around with it a bit more now, I am getting events from the receiver but it seems that there is a different header on the commands then the RS232 protocol.

    so i guess the question is now how do i setup a header that is only sent when connected TCP/IP

    the protocol is linked below
    http://freenet-homepage.de/Messiahs/...nkyo/onkyo.xls

  3. #3
    Join Date
    Jan 2000
    Location
    Jupiter, FL
    Posts
    11,349

    Default

    I am not concinved that starting with the denon code is the best approach,.. it's quite complicated for your first transport. Shall we start from a clean slate?
    Ron
    No support through PM

  4. #4
    Join Date
    Apr 2003
    Posts
    111

    Default

    im all for doing it the right way.

  5. #5
    Join Date
    Jan 2000
    Location
    Jupiter, FL
    Posts
    11,349

    Default

    Looking at the protocol it appears that it is always 'CR' terminated for both serial and TCP/IP sadly the value of 'CR' 0x0D might appear in the DataSize field of the TCP/IP header. So technically we could not use the terminated transport. However I think we should try. The reason being that calling lua on each reached character is too much of a CPU hog.

    So I think we should use the terminated parser with CR as the terminator. And then detect if we received a full or partial packet. If we receive a partial packet hold the data and then merge it once the rest comes in.

    Sound fair?
    Ron
    No support through PM

  6. #6
    Join Date
    Apr 2003
    Posts
    111

    Default

    ok so i have taken a step back and am now trying to use tutorial 1 as my basis.

    are you saying all in my OnBuildCommand my return should be 'CR'? when i was using the denon transport i had it working with '1a'. in the protocol it says that it should be '0D'

    with tutorial 1 when i send a command it does not show up in the lua console, it just sends back a "no response to last send"

    what am i doing wrong here

Posting Permissions

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