question

agalindo avatar image
0 Votes"
agalindo asked TiejunZhou-7599 commented

How to generate .bin from web files (Web server application)

Hi everybody,

I am working with AZURE RTOS and I have implemented an HTTP web server application. I started from the example available in CubeIDE. Everything is working properly but now I need to modifiy the HTTP web page. For this, it is necessary to generate a .bin file from the .js, .css and .html files:


190476-image.png

Could somebody help me with this issue? I think it should exists a script or something like that for it.

Thanks in advance.


azure-rtos
image.png (3.1 KiB)
· 4
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @AlexisGalindoFlores-3902 ,
Can you share the device you are using and the link to the example you followed in CubeIDE?
I would recommend you look at our getting-started guides: https://github.com/azure-rtos/getting-started

Thanks!

0 Votes 0 ·

Sure @asergaz .

I'm using the following example available in CubeIDE libraries:

X-CUBE-AZRTOS-F4\1.0.0\Projects\STM32F429ZI-Nucleo\Applications\NetXDuo\Nx_WebServer

There are others examples using the same approach. I will take a look to your recommendation anyway. Thanks!

1 Vote 1 ·

Could you share more details on generating a bin file on server side? Do you mean to upload file from client, respond a dynamic web page to client or something like what PHP does?

0 Votes 0 ·
agalindo avatar image agalindo TiejunZhou-7599 ·

It's easier than that. The thing is that it is necessary to store the web files into the flash memory (.html, .js and .css). The procedure shown in several examples is generating a .bin including these files but I don't know how to do it. i'm trying it using perl but I'm not an expert in this language so it is difficult to me to understand what I'm doing.

0 Votes 0 ·

1 Answer

TiejunZhou-7599 avatar image
0 Votes"
TiejunZhou-7599 answered TiejunZhou-7599 commented

If I understand correctly, you are trying to put some files on web server so you don't need to generate the web page dynamically. Here is a sample. To use files from file system (flash memory in your case), you will need to open a FileX media and pass it to nx_web_http_server_create. In callback function, if you want the file system to handle the requested URI, simply return NX_SUCCESS as shown here.


· 3
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hello @agalindo ,

Please share with us if you have any other questions related with your original post. Otherwise could you go ahead and mark the above as answer?

Thank you so much.

Remember:
- Please accept an answer if correct. Original posters help the community find answers faster by identifying the correct answer. Here is how.

0 Votes 0 ·

Hi @asergaz and @TiejunZhou-7599, I'm still trying to generate the .bin file for access to the web server content. I need to store it in the flash memory.

Regards.

0 Votes 0 ·

@agalindo , any luck on the NetX Web server?

0 Votes 0 ·