MQX - Web Server with button HTML Page

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

MQX - Web Server with button HTML Page

3,175 次查看
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

标签 (1)
标记 (1)
5 回复数

2,313 次查看
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 项奖励
回复

2,313 次查看
samueldionisiod
Contributor II

My e-mail is samueldionisio@gmail.com

Thanks.

0 项奖励
回复

2,313 次查看
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

2,313 次查看
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 项奖励
回复

2,313 次查看
samueldionisiod
Contributor II

Good morning sun.

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

Thank you very much.

Hug.

0 项奖励
回复