Parallax / flash server ?????
mahuro
Posts: 8
Hi All,
I am new to the Parallax and spin ... I can see from reading around the posts that web access is feasible from the Parallax chip ... Can anyone with experience on this let me know if the following idea is possible, please ????:
Can the parallax, contact a FLASH server ( HTTP server broadcasting flash animations), download the some clips and stream to an attached LCD display ??? is that feasible ?? I need it for a project at Uni ... and if its possible I'll buy the chip and tools ..( just don't want to spend my money if there is no chance !!!)
Many thanks guys !!
Mahuro.
I am new to the Parallax and spin ... I can see from reading around the posts that web access is feasible from the Parallax chip ... Can anyone with experience on this let me know if the following idea is possible, please ????:
Can the parallax, contact a FLASH server ( HTTP server broadcasting flash animations), download the some clips and stream to an attached LCD display ??? is that feasible ?? I need it for a project at Uni ... and if its possible I'll buy the chip and tools ..( just don't want to spend my money if there is no chance !!!)
Many thanks guys !!
Mahuro.
Comments
Welcome, I expect that is feasible (but we need a POC before answering yes). This was mentioned before as well. Can the Spinneret act as an HTTP client or robot (as in web crawler) and download content (as opposed to serving content). In the non-embedded NET space, servers and even standalone clients can setup a read TCP socket to a URI and download the raw content. The key in your case will be is the flash served just like any other file or dynamic content - very likely yes as long a a (GET flash.swf) request is filled.
This module or mode of operation will actually be a very critical piece of the software stack and would also benefit RPC/RMI and Web Services (when we implement these).
I would expect that we would start (as usual) with the HTTP client code example by Timothy Swieter on the OBEX at...
http://obex.parallax.com/objects/615/
http://obex.parallax.com/objects/download/aux/83/
Brilldea_W5100_TCP_Client_Echo_Demo_indirect_Ver001.spin
I took a 2 min look at his code and everything looks the same as a listening server (init, rx, tx calls...) except for a call to open the port on the server hosting your TBD flash content...
ETHERNET.SocketOpen(0, ETHERNET#_TCPPROTO, socket, socket, @destIP[0])
We will just need to add this unit of work to the queue.
#1) Driving video streams to an LCD?: I think there are several post on the main forum that show video on an external display - I have not tried this.
#2) Streaming capture: now this is a different issue I don't have experience with. I would expect that a cog will need to be dedicated to packet streaming separate from the dispatch and request(s) cogs.
One question will be whether the W5100 can keep up with the stream. It has a 4 socket capability but can only service one cog at a time (We will need to test whether 4 cogs can control 4 sockets simultaneously or at least in queue)
Another question - can the Spinneret act as a gateway or proxy server? and continuously stream content between say 2 servers. It may need another W5100, or 2 Spinnerets can act as a bridge or cluster. Ignore my question here - it is far in the future.
The solution to your use case would be interesting.
thank you
/michael
And many thanks for your very helpful and comprehensive reply. First of all what is POC ?
I will check the HTPP tutorials you pointed out first and see how I can develop from there, actually connecting LCD compatibles is rather simple the question is how you get it to stream :
See the sequence of photos here, actually this is not using a spinneret , but a "standard" parallax chip that has been coupled with an Ethernet card that can contact the WEB via widgets:
http://www.adafruit.com/index.php?main_page=product_info&cPath=26&products_id=95
and also this:
http://www.flickr.com/photos/tankgrrl/4001474643/in/set-72157622438836765/
I'll report back after checking those tutorials, many thanks ..
Mahuro.
That altoid propeller powered networked video content delivery device is excellent. I suggest you post to the Propeller forum as well - I am sure a lot of developers would like to see this use of the propeller. Also your integration of the propeller based YBox2 into the 7'' TV is very interesting. I will look at this more when I get out of the office.
thank you for the links and info.
/michael
Thank you for your feedback, two questions for you if I may:
1- do you think I can go forward with the YBox2 ( Propeller), integrating the drivers you suggested :
http://obex.parallax.com/objects/615/
http://obex.parallax.com/objects/download/aux/83/
Brilldea_W5100_TCP_Client_Echo_Demo_indirect_Ver00 1.spin
2- should I try to go forward with the spinneret ? ( my device is a client, not a server, the server would be any common PC)
Also when implementing the code you suggested:
"I took a 2 min look at his code and everything looks the same as a listening server (init, rx, tx calls...) except for a call to open the port on the server hosting your TBD flash content...
ETHERNET.SocketOpen(0, ETHERNET#_TCPPROTO, socket, socket, @destIP[0])"
What would be the values to replace in that line ? what values for ETHERNET#_TCPPROTO ? , what values for socket, and @destIP[0] would be something like : @destIP[192.168.100.100] ??
I am new to spin, so I am trying to get to grips with the language, can you suggest a good book to follow while I work on this project ??
Many thanks for your Help.
Mahuro.
A1) The W5100 parallel driver and 4 protocol demo programs by Timothy D. Swieter are to get the full stack for the Spinneret started "in this forum" with more of a server focus I would think but client/server or server/server is completely doable. In your case like other members have commented, you will likely need to customize either the basic demo on OBEX or develop your own "web retrieving" client or some type of translation for the incoming stream packets. I don't really have expertise on streaming content capture/redirection. As an aide in scoping out your project, I would expect that if your PC-based prototype using whatever net capable language you like (C#,Java or VBasic .NET) is difficult to code up - then the propeller version will be even harder. Do you have any propeller hardware? You may want to write some basic LED/Serial code in SPIN and see how you like the environment and all the aux tools/support(excellent) and the 2k L1 and 32k L2 memory footprint before you invest time in a networked version of the chip - not really a good answer.
A2) The Spinneret IP address usually 192.168.0-100.100-255 (either DHCP or static - check what your router assigns or set it manually on your router and verify via ping), Router gateway (usually 192.168.0-100.1). You should also set your 6 hex MAC address digits - but they are not required at the TCP/IP level only for lower protocols.
If you look at the diff for the AJAX demo you will see what I modified from Timothy's demo in a side-by-side format. Click on the ZIP file, open it and click the HTML file (you may need a very wide monitor).
http://forums.parallax.com/attachment.php?attachmentid=75725&d=1290740567
From
http://forums.parallax.com/showpost.php?p=955667&postcount=12
You can also download the work that Bean has done on URI parameter decoding, what Mike G has done for get/post support, CassLan's rich client directory browsing code and Roy's HTTP demo with SD card and DHCP support on this forum as we go through the feasibility and POC (proof of concept) phase.
A3) I have followed a normal route as hardware work is not what I get paid to do (Hardware work is my form of relaxation), I have not used a book so far, there are 2 on the Parallax site. You could also try the PEK tutorial pages - I have not tried those either. I have learned the language over the past 2 years by writing code for my own devices - this is not the most efficient way as it surprising how much you can do with a few instructions. I think the OBEX should be used more, but I would say 50% of the instructions I have come across were from reading issue posts on the propeller forum.
However, I have read most of the user manual that ships with the propeller demo kit and the datasheets extensively (except most of the assembly parts) - I would also use these.
Also, you are in luck, the Spinneret can be programmed as just a propeller board, you can do serial i/o back to the PST and use pin 23 to flash the user LED on the board. I would do some very basic SPIN, do some concurrency code by starting/stopping and sharing data between other cogs and then move onto using the other SD, DHCP and W5100 object functions.
PEK
http://www.parallax.com/PropellerEducationKit/tabid/845/Default.aspx
PEK sticky (thread #1 on the propeller forum)
http://forums.parallax.com/showthread.php?t=89958
Books (I understand the "official" book is good)
http://www.parallax.com/Store/Books/Propeller/tabid/171/CategoryID/45/List/0/Level/a/SortField/0/Default.aspx
Also if you read the sticky thread at the top of this forum you will get some more answers. You are very welcome to join in on the collaboration that happens here, join the contest or use the server software stack as it evolves.
You will want to read the post by OrbitCollector on powering up the propeller (3 different ways), it will help with page 2 of the manual.
http://forums.parallax.com/showthread.php?t=127160
thank you
/Michael O'Brien
Thank you very much for your reply. Certainly there is a lot I need to dig in to get this moving, and the suggestions by all members of this forum has been very helpful.
I am a fairly good C, C++ programmer, and my experience with , microcrontrollers goes as far as the Atmel based Arduino boards allow. Unfortunately those chips are not "sturdy" enough to handle graphics ( very limited on board memory) that is the reason why I started to consider the Propeller for this project.
All suggestions from members of this forum seem to point out to the fact that my basic assumption about feasibility of this project using the Propeller was right and that with some development it can be done , besides the basic setup of the YBox2, capable of networking and displaying (although limited) at the same time is promising.
I will follow all the links and leads that you have kindly suggested and keep posting any interesting developments here.
Many many thanks for your kind help ... I am off now to get my Propeller and manual ....
Cheers,
Mahuro.