• Tags
  • Documentation
  • Order
  • Register
  • Login
Duet3D Logo Duet3D
  • Tags
  • Documentation
  • Order
  • Register
  • Login

HTTP Connection thru async C#.

Scheduled Pinned Locked Moved
Duet Web Control
2
3
229
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • undefined
    stevenim
    last edited by 23 Jul 2020, 17:05

    Hi,

    I'm making HTTP GET requests over Ethernet with my Duet 3 MB6HC v1.01 board running with Firmware version 3.1.1 and I'm trying to send GCode commands with the "/rr_gcode?gcode=" command but I'm seeing that not all my requests are making it to the board. For example, in my case I need to set the output of all 9 of my GPIO pins simultaneously and I try to do this by making 9 GET requests in parallel with HttpClient async operations in C# which, while looking in Wireshark, takes a total of ~800ms from setting the first GPIO pin to the last one thru 9 individual M42 commands.

    So I was wondering if this was a timing issue in that I would add a delay of some sort between requests (I noticed that adding 300ms between requests that all my requests actually register with the board)? Or could this be a driving issue where I drive too many individual GET requests in such a short amount of time? How can I achieve making a sizable amount of GET requests at a time while also having the board actually respond to those requests? Should I format my code such that it looks at failed responses since I occasionally see out-of-order packets and reset flags within the TCP layer (but not all the time). Heck, sometimes I see that all 9 of my requests go through with no issue in Wireshark but not all get registered on the board since after making a "rr_model?key=state.gpOut", I see that not all are set even after I saw that all requests got thru with an OK status (Note that this is still within the ~800ms I make all requests).

    Thank you for your time.

    1 Reply Last reply Reply Quote 0
    • undefined
      dc42 administrators
      last edited by dc42 23 Jul 2020, 17:25

      Have you tried sending all M42 commands in a single line? For example:

      M42 P0 S1 M42 P1 S0.5 M42 P2 S0

      Max GCode line length for Duet 3 is 200 chars AFAIR.

      Duet WiFi hardware designer and firmware engineer
      Please do not ask me for Duet support via PM or email, use the forum
      http://www.escher3d.com, https://miscsolutions.wordpress.com

      1 Reply Last reply Reply Quote 0
      • undefined
        dc42 administrators
        last edited by dc42 23 Jul 2020, 17:27

        PS - I suspect the issue is that the Duet web server can respond to a maximum of 4 HTTP requests concurrently.

        Duet WiFi hardware designer and firmware engineer
        Please do not ask me for Duet support via PM or email, use the forum
        http://www.escher3d.com, https://miscsolutions.wordpress.com

        1 Reply Last reply Reply Quote 0
        1 out of 3
        • First post
          1/3
          Last post
        Unless otherwise noted, all forum content is licensed under CC-BY-SA