PDA

View Full Version : Networking Questions



KPR
03-31-2009, 01:06 AM
Well I'm new to the propeller world and have lots of questions, please bear with me..

I have done a lot of searching and a lot of reading trying to learn as much as possible, but of course that just least to more questions..

I have a dev board and I have picked up a Nic kit and SD Socket kit from uController, all of this to try an do a demo of an web type app ( get info from another web page and display it ) .. I guess a simple web portal type of application.

My question is first off what is the best code example to use for the enc28c60 chip .. I would assume it would be Harrison's code from the propirc examples, latest version??

But the hardest thing for me to find info on so far would be code for a DHCP connection.. all the examples I have seen all have static IP's.. I need the dynamic connection, it will be a portable device with the mini colour lcd screen.. Plug it in, power it up and presto info..

Any help would be appreciated..

Once I get all of this figured out and have my first project under my belt, I'd love to build a digital answering machine with a web front end that would list the left messages and have it email me when someone leaves a message that can be retrieved via the web..

Kevin

Oldbitcollector (Jeff)
03-31-2009, 01:11 AM
Kevin,

Yes, Harrison's code is the best place to start. I believe he has a working
HTTP server framework you could build from. As for DHCP, I don't think it
has been implemented at this point. Will this Project sit behind a router?
You should be able to assign it a local static address and redirect In/Out with
the router tables.

OBC

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
New to the Propeller?

Visit the: The Propeller Pages (http://www.warrantyvoid.us/tiki-index.php?page=Propeller) @ Warranty Void.

Joel Rosenzweig
03-31-2009, 01:16 AM
The YBOX2 is a Propeller based device that uses the same Ethernet controller as yours, and it supports DHCP. And, the source is available from the YBOX2 project page.

Main Project Page here:
http://www.adafruit.com/index.php?main_page=product_info&cPath=26&products_id=95

Software here:
http://svn.deepdarc.com/code/ybox2/trunk/firmware/

I bought one a few weeks ago and it works great.

Joel-

Oldbitcollector (Jeff)
03-31-2009, 01:23 AM
@Joel:

I stand corrected! I didn't realize they had implemented DHCP in that project.

Thanks for posting it.

OBC

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
New to the Propeller?

Visit the: The Propeller Pages (http://www.warrantyvoid.us/tiki-index.php?page=Propeller) @ Warranty Void.

mctrivia
03-31-2009, 02:33 AM
any idea what is required to make file upload box and have the prop save the file to sd or flah?

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Need to make your prop design easier or secure? Get a PropMod (http://propmodule.com) has crystal, eeprom, and programing header in a 40 pin dip 0.7" pitch module with uSD reader, and RTC options.

jazzed
03-31-2009, 02:49 AM
mctrivia can you be more specific? upload box?

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
--Steve


Propalyzer: Propeller PC Logic Analyzer (http://www.brouhaha.com/~sdenson/Propalyzer)
http://forums.parallax.com/showthread.php?p=788230 (http://forums.parallax.com/showthread.php?p=788230)

mctrivia
03-31-2009, 02:53 AM
in html you can have file input box and submit in a form

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Need to make your prop design easier or secure? Get a PropMod (http://propmodule.com) has crystal, eeprom, and programing header in a 40 pin dip 0.7" pitch module with uSD reader, and RTC options.

Joel Rosenzweig
03-31-2009, 03:29 AM
I might be sounding like a YBOX2 salesman, but I really don't mean to. I just happen to stumble into it and really like it.

The YBOX2 has source + binaries to give you the file download + store to flash already. It turns out that the bootloader implements a tiny web server that you can talk to with your web browser or any other client you choose that can source HTTP put/get requests. The YBOX2 can receive files (widgets) that you push to it via cURL (http://en.wikipedia.org/wiki/CURL). You could modify the web server to present any UI you want, and have it process any HTTP messages you want. Once you decide on the format for sending data to the device, you can use the pre-existing primitives for storing the data to the EEPROM, or use OBEX primitives for writing to the SD card. The YBOX2 doesn't have an SD card, but you could wire one in yourself. All the pins are available for tapping into.

Joel-

KPR
03-31-2009, 03:32 AM
Wow.. I didn't expect such a quick response..

>> Joel Rosenzweig -- I might just buy one of these as well.. my prototyping skills ain't what they used to be.. and the YBOX2 is so complete and compact ( and expandable ) sd card and vga would be so sweet -- I guess a piggy back board could be easily made for this.. and brillidea's 3 inch lcd for $45USD ( $14,598.77 CDN ) would make it really complete

>> mctrivia -- in html you can have file input box and submit in a form -- Thats a great Idea .. I too am interested in this, anyone know if there is/are any examples of an ftp server in the object exchange?

Where's Harrison when you need him..

k.

mctrivia
03-31-2009, 03:36 AM
lol the exchange rate is not that bad. my site has daily update of exchange world wide.

though while bush was around it was more then 1for 1

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Need to make your prop design easier or secure? Get a PropMod (http://propmodule.com) has crystal, eeprom, and programing header in a 40 pin dip 0.7" pitch module with uSD reader, and RTC options.

Harrison.
03-31-2009, 04:40 AM
KPR,
The ybox2 would be the best example for what you want to do. The infowidget example implements a simple http client that displays weather information downloaded from a remote webserver.

mctrivia,
I have implemented HTTP multipart file uploads with the Propeller. The hardest part is parsing the request headers to get the boundary and filename information. I haven't gotten around to releasing the code yet.

Oldbitcollector (Jeff)
03-31-2009, 08:46 AM
Harrison. said...

I have implemented HTTP multipart file uploads with the Propeller. The hardest part is parsing the request headers to get the boundary and filename information. I haven't gotten around to releasing the code yet.


<Mouth drops open>
I really didn't think that was going to be possible with the Prop. Awesome work Harrison!
Please keep us apprised to that code release!

OBC

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
New to the Propeller?

Visit the: The Propeller Pages (http://www.warrantyvoid.us/tiki-index.php?page=Propeller) @ Warranty Void.

mctrivia
03-31-2009, 08:57 AM
This is great. I want to use a network interface for programing the prop instead of the prop plug. I don't need to know file size or name since name will be irelivent and size will always be 32k

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Need to make your prop design easier or secure? Get a PropMod (http://propmodule.com) has crystal, eeprom, and programing header in a 40 pin dip 0.7" pitch module with uSD reader, and RTC options.

KPR
03-31-2009, 09:29 AM
Isn't that how the YBOX2 does its firmware and widgets?

Mike Green
03-31-2009, 09:58 AM
Yes, the YBOX2 can download its firmware and widgets via the network interface.