Announcement

Collapse
No announcement yet.

matchport http requests malformed

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

  • matchport http requests malformed

    So I have using the Matchport b/g for a project in school. I am using it with the atmega128 microcontroller.

    After a ton of playing with the serial output on the micro I am able to get http requests by using a function that prints to the USART (configured to the default UART settings the Matchport uses (IIRC 9600 baud, 8 data, 1 stop, no flow))

    What I print is kind of like this
    UART_String("GET /test.php http/1.1\n");
    UART_String("Host: 192.168.1.6\n\n");//where 192.168.1.6 is my home webserver


    I can't access the settings at the moment because I am on campus, but the important ones I can remember are: auto connect, flow control is 33, ip address is set to web server and port 80



    Now all of the above works, as I can watch it in wireshark. The problem is the http request is sent in peices rather than all out once. The first output from the matchport doesn't appear to contain any of the actual request (connection request I assume then). The second one contains the letter G from Get, the third one contains "ET /test.php..." and I can't remember where it stops, but I know it splits in the middle of the ip address again.

    Wireshark actually calls the first packet "malformed"

    I can get some screen shots later.

    In the end, with those results it eventually sends test.php and the http respsonse header. The problem is that sometimes I get an ACK back from the web server before the peices of the HTTP requests have been sent out, which then triggers my ISR on my atmega and I beleive that is stopping the HTTP request from finishing.

    It seems like such a short HTTP request should be able to be sent in a single packet without any problems. going to google.com or or even a really long host address seems to always send in a single request.

    Do I have a setting wrong? Does the matchport have a super short buffer?

    Any help would be awesome and much appreciated.

    BTW: I'll update this thread tonight with some wireshark screen shots. If you need to know more of my settings ill get them as requested, or I think there was a way to post a sequence of hex values if that is helpful.

  • #2
    Try enabling Pack Control. Otherwise the MatchPort-bg will send the first character immediately ('G') and then the remainder about every 20 ms.

    Ed

    Comment

    Working...
    X