Internet Module / Socket Programming
Terry Swanborough (455) 53 posts |
Hi I would like to communicate with the Raspberry Pi via the Ethernet port. Eventually using PIC devices as detectors sending data back to the I have a couple of Pis to test software with or one end could be an Iyonix. I have reasonable programming knowledge regarding RISCOS in C,BASIC,Assembler but have no knowledge of how to interface with Ethernet. My initial investigations have led me to the following documentation. http://www.riscos.com/support/developers/prm/internet.html I also have started :-) reading the Internet module in PRM5A, Is this documentation still valid regarding the PI. These documentations mention the following libs:- I have also read about EasySockets module but I dont think this is 32bit. I have the C/C++ compiler from RISCOS Open and the latest update is ROOL_DDE24.Hopefully that all I need. TIA Terry |
|
Malcolm Hussain-Gambles (1596) 811 posts |
Hi Terry, I’ve used the ROOL compiler to write !NewsUK and !WeatherUK. I’ll look at getting something up tonight here |
|
Terry Swanborough (455) 53 posts |
Hi Malcolm It would be great if you could do some simple tutorials to get people started not just for my own selfish reasons:-) I suspect If people can find the resources they need and are new to RISCOS they are more likely to persevere with the operating system. Sometimes if the learning curve is to steep people will give up and use a different OS some of us :-) have a soft spot for RISCOS but Regards TIA Terry |
|
Rob Heaton (274) 515 posts |
Some examples of programming using sockets with RISC OS would be great! |
|
Malcolm Hussain-Gambles (1596) 811 posts |
I’m just doing the client socket side at the moment, as that’s all I’ve done. But it should be enough to get people started at least. I’ve done the basic outline now for a client, but I need to add a fully working example. Most (if not all) programming on RISC OS is pretty easy once you know what to do, it’s pulling it together that is a nightmare – or was for me. One thing I would like to do is a bi-monthly meeting for RISC OS programmers in the North of England, a get-together and show of code (not that a lot of my code I’m that proud of ;-)) and bounce ideas around. |
|
John Sandgrounder (1650) 574 posts |
and another also in West Lancashire, but Leeds is a long way – and hull is on the other side of the world. The North of England is a big place. |
|
John Sandgrounder (1650) 574 posts |
If you are looking for a really quick way to implement Ethernet communication with a Raspberry Pi, then you could try using Wget on the client and cgi scripts with !Webjames on the server. You could have it up and running in 24 hours. Works a treat – and the real benefit is that the method can also be used to communicate between different operating systems on different hardware. |
|
Malcolm Hussain-Gambles (1596) 811 posts |
@John, I don’t mind travelling to Manchester once a month. As I said it would need to central, but more to most of the people. |
|
John Sandgrounder (1650) 574 posts |
Manchester could be OK (near the M62?) Keep us posted. |
|
Terry Swanborough (455) 53 posts |
Hi Malcolm Thanks for the tutorial, I think with this and the other documentation I Anyway thanks for your efforts so far, Very useful Regards Terry |
|
Malcolm Hussain-Gambles (1596) 811 posts |
I’ve just released an update for NewsUK (not yet reached !Store yet). |
|
WPB (1391) 352 posts |
That’s welcome news, Malcolm. So, why are downloads much quicker? What did you do!? Can’t say I’ve noticed a problem with corrupt images, but I’ll keep an eye out. |
|
Malcolm Hussain-Gambles (1596) 811 posts |
I’ve just released another update ;-) This one is far more exciting though! You can now use most of the BBC News Feeds (+ the main Sports feed, I hate sports but I figured it maybe popular with other people). I should add something to save which feed you are loading, and also allow changing of feeds mid-refresh. |
|
patric aristide (434) 418 posts |
Seems like a fair assumption ;-) Keep up the good work Malcolm! |
|
Etienne SOBOLE (3572) 28 posts |
In the original post, Terry spoke about this page I’d like to know where I can found the described library while acorn doesn’t exist anymore ! Their example use those includes (which are the same in Linux Workd :))
Thank’s |
|
Chris Mahoney (1684) 2165 posts |
The libraries are included with the DDE (in AcornC/C++.Export.APCS-32.Lib.TCPIPLibs). You can put “${NET5LIBS}” in your makefile to get the libraries and their dependencies. |
|
Etienne SOBOLE (3572) 28 posts |
Thank’s. But for the moment I do not use Makefile. How can I simply compile and link a simple c file ? |
|
Tristan M. (2946) 1039 posts |
Wish I’d seen this ages ago. Just the plain old POSIX Linux networking interfaces are supported. It’s what I used when I started the uSynergy port. |
|
Alan Adams (2486) 1149 posts |
One quirk to beware of: many versions of the RISC OS internet stack return the error number plain. RO5 returns it with the aded base value of 20E00 hex. |