cancel
Showing results for 
Search instead for 
Did you mean: 

Upload A Binary File In Web Server

ahmedzizou690
Associate II
Posted on June 07, 2014 at 16:46

Dear all,

If someone can solve my problem :

I'm working on STM3221G-EVAL Board ..

I want to know how can I upload a Binary File in a web server ...

Thanks
8 REPLIES 8
Posted on June 07, 2014 at 17:06

Not sure exactly what you're asking, you want to have a web server, and want to send it a file?

What software/protocol do you want to be using to do this?

You want the web server to serve up arbitrary binary files you supply, perhaps stored on an SDCard?

[DEAD LINK /public/STe2ecommunities/mcu/Lists/STM32Discovery/Flat.aspx?RootFolder=/public/STe2ecommunities/mcu/Lists/STM32Discovery/HTTP%20Server.%20Webpage%20in%20SD&FolderCTID=0x01200200770978C69A1141439FE559EB459D75800084C20D8867EAD444A5987D47BE638E0F&currentviews=235]https://my.st.com/public/STe2ecommunities/mcu/Lists/STM32Discovery/Flat.aspx?RootFolder=%2Fpublic%2FSTe2ecommunities%2Fmcu%2FLists%2FSTM32Discovery%2FHTTP%20Server.%20Webpage%20in%20SD&FolderCTID=0x01200200770978C69A1141439FE559EB459D75800084C20D8867EAD444A5987D47BE638E0F¤tviews=235
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
ahmedzizou690
Associate II
Posted on June 07, 2014 at 18:14

Thanks for your help, clive1.

Yeah! this is what i wanted :

-

I want the

web

server

to serve

arbitrary binary

files provided

, stored on

an SD card

?

But first, Could you tell me how can I implement an http server using the lwip v1.1.0 stack on STM3221G-EVAL board and how  to send it a file...

..

Thanks

Posted on June 07, 2014 at 21:45

Take STM32F2x7_ETH_LwIP_V1.0.2\Project\FreeRTOS\httpserver_socket\src\httpserver-socket.c, or current equivalent. This supports hard coded files which are compiled into the image.

You need to add SDIO code, along with the FatFs file system. You can write to the card on a PC, or alternatively you could create a USB MSC and access it like a flash drive.

In the other thread I showed how the file serving routines could be modified to pull data from the SD Card instead of the compiled file image.

I ported it to

http://www.ebay.com/itm/New-ARM-Cortex-M3-STM32F207VGT6-development-Board-Ethernet-USB-CAN-/150879911756?pt=LH_DefaultDomain_0&hash=item232124bf4c

,

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
ahmedzizou690
Associate II
Posted on June 09, 2014 at 12:21

Hi clive1,

Really i'm lost ,

the task is

really complicated

..

and

the countdown

is triggered

for the filing

of

project

...

Please

you can

give me

the steps

again

one by one

...

From

the configuration of the

boards

until the

file sent

by the web server...

Thanks.

 

ahmedzizou690
Associate II
Posted on June 09, 2014 at 12:44

Just for information :

I'm not using an RTOS but a standalone mode. In this mode, the ethernet system provides very poor functionality.

Posted on June 09, 2014 at 16:19

May be those are things you need to discuss with your project supervisor.

As I have suggested, break the problem into smaller tasks you can solve. Test the SDIO implementation, put a file system on top, get comfortable with opening and accessing files.

STM32F2xx_StdPeriph_Lib_V1.1.0\Project\STM32F2xx_StdPeriph_Examples\SDIO\uSDCard

STM32F2xx_StdPeriph_Lib_V1.1.0\Utilities\STM32_EVAL\STM322xG_EVAL\stm322xg_eval_sdio_sd.c

STM32F2x7_ETH_LwIP_V1.1.0\Utilities\Third_Party\FatFs_vR0.08a

STM32F2x7_ETH_LwIP_V1.1.0\Project\Standalone\httpserver

Consider using the RTOS, it might make things easier, otherwise you'll need to work the server code to find the correct place/method to support files from the SDCard via FatFs

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
ahmedzizou690
Associate II
Posted on June 10, 2014 at 12:47

Hi clive,

Please Can

you

give me

some

informations

about

the

connection between

the

STM32

BOARDS

pc

and router

..

Thanks.

Posted on June 10, 2014 at 19:08

To connect a node device to a hub/switch you use standard CAT5 ethernet cables with a one-to-one connectivity.

To connect two node devices (PC, STM32, etc) to each other you need a cross-over cable which switches the TX and RX pairs.

Generally when developing 100BT Ethernet systems you should use a router which can provide IP addresses via DHCP, and you allocate a unique MAC address to all you attached devices.

If you route signals through a HUB (10BT?), all input signals will be reflected on all other ports, you could connect a PC running WireShark to one port to observe all traffic. HUB != SWITCH

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..