Announcement

Collapse
No announcement yet.

Matchport AR

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Matchport AR

    I just started playing with the Matchport AR and the SDK. I've been able to do some neat stuff, but I seem stumped on one thing.

    I'm trying to display a web page, along with it's graphics. My project is based off of the CGI example. The problem is, I can get the web page to display, but the graphics dont get sent. When I try to go directly to one of the graphics files (e.g. http://addr/test/graphic.png) it doesn't get sent from the web server.

    I thought about calling HttpGetRequestUri() in my callback and passing that file into HttpSendFile() but HttpGetRequestUri() just returns the root path of the callback (i.e. /test) and not the fullname (i.e. /test/graphic.png).

    How can I get this to work?

  • #2
    Create a /http directory on the MatchPort. Deposit your html files there. Do not reference /http in the URL request. For example:
    ftp sample.html to /http
    http://<ip address>/sample.html

    Comment


    • #3
      Originally posted by garry0427 View Post
      Create a /http directory on the MatchPort. Deposit your html files there. Do not reference /http in the URL request. For example:
      ftp sample.html to /http
      http://<ip address>/sample.html

      Thanks for the info. However, if I do it this way, how do I hook into the SDK, such as the Serial API's without having me navigate to a new page?

      Essentially what I'm trying to accomplish is when I click an image, a string gets sent out of the serial port.

      Comment


      • #4
        The Evolution SDK includes support for CGI requests. This requires that the web page generate a POST request. If you can get the clicking action on your web page to cause a POST request, this method should work fine for you.

        See the CGI.c example included with the SDK for an example of how to process a POST request.

        Comment


        • #5
          Originally posted by jwilson View Post
          The Evolution SDK includes support for CGI requests. This requires that the web page generate a POST request. If you can get the clicking action on your web page to cause a POST request, this method should work fine for you.

          See the CGI.c example included with the SDK for an example of how to process a POST request.
          I seemed to have gotten this to work by creating the HTTP directory. Now when the browser requests the image files, the Matchport returns them from this directory and it bypasses my modified "cgi.c" file.
          Last edited by drewpt; 07-15-2008, 08:30 PM.

          Comment


          • #6
            You should using different URLs for the callback versus the file in flash.

            Comment


            • #7
              Originally posted by garry0427 View Post
              You should using different URLs for the callback versus the file in flash.

              Thank you. Once this clicked in my head, I was able to get it to work.

              Comment

              Working...
              X