Shop Learn
Wiznet W5500 Uploading a File — Parallax Forums

Wiznet W5500 Uploading a File

Bobb FwedBobb Fwed Posts: 1,119
edited 2021-06-18 14:33 in Propeller 1

I have a Wiznet WIZ850io using the W5500_Driver from Github, and it's working great as a web host. I created a parsing system to parse data and send values back and forth through the web interface and display different pages depending on the URL.

The problem: I want to be able to upload and send a file to the Propeller, but when I add the input type="file" ... tag and submit the form, all I get in the data string is the file's name. I don't see anything about a file being sent (in the data string or in the TCP read size).

I tried GET and POST with no difference. I am using only a single socket, since that was the simpler implementation; do I need multiple sockets to upload a file? What am I missing? I can't even find any good information on if the W5500 supports file uploads.

The end game: since the W5500 has "32Kbytes Memory for Tx/Rx Buffers", I figure I'll try setting up the program to allow uploads of new Propeller programs. I've done similar things in the past, but not being able to see the uploaded file is a big hurdle I've been working on all day.

Comments

  • I still haven't figured out what is missing to upload files to the Propeller through the web interface. But I took a different route.
    Using Netcat, I can send the file without a problem. I'm still able to have the web interface through the same socket, I just detect a HTTP header vs. the first few bytes (XTAL and PLL) of my program. I even setup a few simple command line features, incase I want to check things on Netcat without pulling up a browser.

    I found out that the buffer on the chip is limited to 16KB total for RX. But it doesn't really matter because [however the W5500 handles RX] it doesn't actually affect how large of a transmission can be received. So for the purposes of not completely reprogramming how the W5500_Driver object handles incoming data, I just set the RX buffer to 1KB, then the program arrives in 1KB chunks.
    Sending a 20KB program to an IOT Propeller takes about 11 seconds, including writing the program to EEPROM.

    I'm going to continue to look into uploading files through the web interface, since it would be simpler for other people to use, but with the Netcat work around, it's a lower priority.

Sign In or Register to comment.