MQX - Web Server with button HTML Page

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

MQX - Web Server with button HTML Page

2,026 Views
samueldionisiod
Contributor II

Hello,

I need an example that has a button in the HTML page by sending a command to the microconntrolador and getting an answer.

I use the reference example "httpsrv_twrk60n512"

I use the MQX4.0 with MK60DN512

Thanks.

Samuel

Labels (1)
Tags (1)
5 Replies

1,164 Views
soledad
NXP Employee
NXP Employee

Hello Samuel,

I create an example that you can use as reference. In the example I implemented 7 buttons in order to move servomotores.

Please let me know if this helps!!

Have a great day,
Sol

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

1,164 Views
samueldionisiod
Contributor II

My e-mail is samueldionisio@gmail.com

Thanks.

0 Kudos

1,164 Views
soledad
NXP Employee
NXP Employee

Hello Samuel,

I attached the complete example.

In Ethernet\Sources\web_pages you will find the web_page I named myPage.html, after modify the web_page you need to execute the request.js file. 

In Ethernet\Sources you will find the cgi.c file and main.c.

I hope this helps!!!

Regards

Sol

1,164 Views
samueldionisiod
Contributor II

Hello Sol.

Thanks for send.

I got a question, Why do you use the: HTTPSRV_CGI_REQ_STRUCT?

The reference of nxp is HTTPD_SESSION_STRUCT.

I try to send an value of my CGI, but the parameters received is null.

Please see above:

static _mqx_int cgi_toggle_led4(HTTPD_SESSION_STRUCT *session) {

  char buffer[100];

  uint_32 len = 0;

  uint_32 index = 0;

  boolean bParams = FALSE;

  uint_32 size = 0;

  uint_32 valid = 0;

  char *buffer_url;

 

  valid = session->valid;

  size = session->request.content_len;

...

Thanks.

0 Kudos

1,164 Views
samueldionisiod
Contributor II

Good morning sun.

Help yes ... can you please send me the complete example?

Thank you very much.

Hug.

0 Kudos