Acorn URI_Dispatch
John Sandgrounder (1650) 574 posts |
Hi. First post here, so I hope it is in the right place. I am trying to use the AcornURI module (version 0.22 14-Jan-2012) included in the Raspberry Pi Alpha build to send off a URI request to a webserver on a another computer. I want to do this with my own software without using a conventional browser and reading the Acorn URI Handler Functional Description tells me that I should be able to do so. But I can not make it work and can’t find any examples on the Internet. When my task issues the URI_Dispatch SWI, I get two messages back from the URI module (URI_Mprocess and URI_MReturnResult) indicating that the URI was claimed for processing, but the webserver logs do not show the request arriving. Does anybody have any examples of the code I need to use (preferably in BASIC) to get this working? |
Fred Graute (114) 645 posts |
Have you checked that URI_MReturnResult is actually returning a succesful result (bit 0 of flags at messageblock+20 = 0)? You can find an example program by John-Mark Bell (of NetSurf fame) here HTH |
John Sandgrounder (1650) 574 posts |
Yes, Thanks. I can see that URI_MReturnResult is returning a success flag. I have looked at the example program and it just causes NetSurf to be fired up. (I could do that). What I want is for the request to be sent to the webserver without firing up NetSurf. (In effect, I wany my program to behave as if it is a web browser and just swallow up the returned web page. I am not interested in seeing the webpage, but I do want the webserver to run the CGI script, so it deals with the message I am trying to sent it. |
Martin Bazley (331) 379 posts |
That’s not what AcornURI does. URI_Dispatch is used by applications which can’t handle Internet access to delegate the task to applications which can (say, NetSurf). It’s the module which enables you to double-click a URL in StrongED to launch it in a browser, and if you have Messenger Pro, that has a similar function for making URLs in plain text emails clickable. It is NOT a web browser, it’s a middleman between your program and an actual web browser. Maybe try wget? |
John Sandgrounder (1650) 574 posts |
OK – Thanks for that. I have tried wget – but the versions I have tried do not work on the Raspberry Pi. I just get an error message – “No writeable memory at this address”. |
patric aristide (434) 418 posts |
Try increasing the wimpslot. |
John Sandgrounder (1650) 574 posts |
Excellent :) Thank you all – that works a treat. It also works on VRPC as well. Problem solved. And so easy to use. :) |