Shop OBEX P1 Docs P2 Docs Learn Events
PropNIC Good Code Examples needed — Parallax Forums

PropNIC Good Code Examples needed

mctriviamctrivia Posts: 3,772
edited 2010-05-28 22:30 in Propeller 1
ucontroller.com has a great little nic card for $29.99 but some code examples are really needed.

1) How to aquire a Dynamic IP from the local DHCP server
2) How to download a xml/text file from a web server
3) How to send get/post commands to a web server

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Lots of propeller based products in stock at affordable prices.

Comments

  • StefanL38StefanL38 Posts: 2,292
    edited 2010-05-26 21:09
    search the obex for tcp

    best regards

    Stefan
  • mctriviamctrivia Posts: 3,772
    edited 2010-05-26 21:13
    ok but can someone provide a sample code to download a xml file using this?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Lots of propeller based products in stock at affordable prices.
  • MicrocontrolledMicrocontrolled Posts: 2,461
    edited 2010-05-27 00:17
    Yes, I second this, PLEASE someone tell how to download a text webpage!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Check out my new website!!

    Use the Propeller icon!! Propeller.gif

    Follow me on Twitter! Search "Microcontrolled"
  • WBA ConsultingWBA Consulting Posts: 2,935
    edited 2010-05-27 15:49
    I will third that request, especially if it will lead me into ways to strip data from a XML formatted gpx file downloaded from GeoCaching.com. I would like to be able to pull Lat,Long, etc from the attached file for a current project I am working on.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Andrew Williams
    WBA Consulting
    WBA-TH1M Sensirion SHT11 Module
    My Prop projects: Reverse Geo-Cache Box, Custom Metronome, Micro Plunge Logger
  • parts-man73parts-man73 Posts: 830
    edited 2010-05-27 18:16
    I've used the programs written for the Ybox2 with a PropNIC/SpinStudio or PropNIC/Demo Board setup and it all works good with minor changes for peripherals on different IO pins, etc.

    svn.deepdarc.com/code/ybox2/trunk/firmware/

    look particularly at "infowidget.spin" it retrieves and parses weather information. This sound similar to what you are looking to do.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Brian

    uController.com - home of SpinStudio - the modular Development system for the Propeller

    PropNIC - Add ethernet ability to your Propeller! PropJoy - Plug in a joystick and play some games!

    SD card Adapter - mass storage for the masses Audio/Video adapter add composite video and sound to your Proto Board
  • MicrocontrolledMicrocontrolled Posts: 2,461
    edited 2010-05-28 00:24
    I still don't get it. What part of that code is just downloading the webpage?? Sorry to be so difficult, but can we (the 3 of us) have a straightforward-no-bells-or-whisles example of how to JUST start the PropNIC and download the webpage code???

    Thanks,
    Micro

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Check out my new website!!

    Use the Propeller icon!! Propeller.gif

    Follow me on Twitter! Search "Microcontrolled"
  • mctriviamctrivia Posts: 3,772
    edited 2010-05-28 01:56
    that code may be helpful but the lack of notes makes it very difficult to follow.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Lots of propeller based products in stock at affordable prices.
  • localrogerlocalroger Posts: 3,452
    edited 2010-05-28 22:30
    Part of the problem is the Prop really doesn't have enough RAM to do tcp 'right' and leave room for anything else (especially a SD card). Harrison's stack (which is the engine in the YBOX2) is about the only thing out there, and there are several versions of it floating around. It doesn't do DHCP and the closest I know of to a web browser (as opposed to server) example is the ybox2 infowidget mentioned by Brian. I've given up on my attempts to make it work in Spin to pursue a system for executing larger business logic codebases from external storage, which will make it a lot easier to do file system, ethernet, and significant other stuff all at the same time.
Sign In or Register to comment.