Announcement

Collapse
No announcement yet.

Managing multiple CGI requests and serial port access

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

  • Managing multiple CGI requests and serial port access

    Hello,
    I have written some code based on the CGI.C example, that is working fine. When triggered, it loads the contents of the serial buffer and sends it out to be processed by a javascript\html page. The CGI is triggered every few seconds.

    This is working well for a single user, but the final project several users may be connected at once. This causes problems as the CGI script reads and clears the serial buffer, so the next thread has no data.

    Is there a simple way around this? Is there a ram-based filesystem I could use (there are too many writes to use the flash filesystem) to pass data between different instances of the same code? Can I keep a loop running at the end of the startup process polling the serial port and making the contents available to the CGI?

    How easy is it to store information and pick it up from later threads?

    Thanks
Working...
X