
¹Ø¼ü×Ö£º 730 http¹¤×÷ģʽ post
1. HTTPD_ClientÊ×ÒªÓ¦ÓÃÓÚÍøÒ³·þÎñÆ÷£¬USR-G730Ä£¿é·¢Ë͵ÄÊý¾Ý£¬¿ÉÒÔ͸´«µ½ÍøÒ³·þÎñÆ÷½ÓÊÕ¡£ÍøÒ³·þÎñÆ÷·µ»ØÊý¾Ý¸øUSR-GPRS232-730Ä£¿éµÄ´®¿Ú¡£ÓÃÓÚ¼à¿Ø´®¿ÚÉ豸¡£
ʵÏÖ¹¦ÄÜ£ºÊµÏÖ´®¿ÚÉ豸·¢ËÍÊý¾Ý£¬Í¨¹ýUSR-GPRS232-730Ä£¿é£¬¿ÉÒÔÖ±½Ó·¢Ë͵½ÍøÒ³·þÎñÆ÷ÉÏ£¬ÍøÒ³·þÎñÆ÷¿ÉÒÔ½ÓÊÕÊý¾Ý£¬¶ÔÊý¾Ý½øÐÐÅжϴ洢µÈ²Ù×÷£¬web·þÎñÆ÷¸ù¾Ý´®¿ÚÉ豸ÇëÇóÊý¾Ý£¬·´À¡ÏàÓ¦µÄ¿ØÖÆÖ¸Áî¡£
½â¾öÎÊÌ⣺USR-GPRS232-730Ä£¿éÒ»°ã͸Ã÷´«ÊäÊý¾ÝÊÇͨ¹ýTCP »òÕßUDP ÐÒ飬ÒÔsocketͨѶµÄ·½Ê½Óë·þÎñÆ÷½¨Á¢Á´½Ó£¬Ä¿Ç°ÓÐÐí¶à¿ØÖƺ;ӪÉ豸µÄ·½Ê½²»ÊÇͨ¹ýSOCKETͨѶ£¬ÊÇͨ¹ýwebÍøÒ³¾ÓªºÍ¿ØÖÆ´®¿ÚÉ豸£¬
Ö»ÐèÒª¿Í‘ô¿ÉÒÔÉÏÍø£¬Í¨¹ýä¯ÀÀÆ÷¼´¿É¿ØÖƺͲéѯ´®¿ÚÉ豸µÄÊý¾Ý״̬µÈÐÅÏ¢¡£
2. ͨ¹ý´®¿ÚATÖ¸ÁîÀ´ÉèÖÃ,ATÖ¸ÁîºóÃæÐèÒª»Ø³µ»»ÐÐ
1>½øÈëÁÙʱATÖ¸Áîģʽ£º·¢ËÍ+++£¬ÊÕµ½aºó£¬3SÄڻظ´a£¬ÊÕµ½+okÒԺ󣬱íʾ³É¹¦½øÈëÁÙʱATÖ¸Áîģʽ
2>·¢ËÍATÖ¸Áî
a.ÉèÖù¤×÷ģʽΪHTTPD£º
AT+WKMOD=HTTPD
b.ÉèÖÃHTTPµÄÇëÇó·½Ê½£º
AT+HTPTP=POST
c.ÉèÖÃHTTPµÄURL:
AT+HTPURL=/2.php?
d.ÉèÖÃHTTPµÄÇëÇó·þÎñÆ÷µØÖ·ºÍ¶Ë¿ÚºÅ£º
AT+HTPSV=test.usr.cn,80
e.ÉèÖÃHTTPµÄÇëÇóÍ·ÐÅÏ¢£º
AT+HTPHD="Accept:text/html"
g.ÉèÖùýÂ˻ظ´ÐÅÏ¢µÄ°üÍ·£º
AT+HTPPK="ON"
h.±£´æ²ÎÊý£º
AT+S
3. ͨ¹ýÉèÖÃÈí¼þÀ´ÉèÖòÎÊý
1>Ñ¡Ôñ´®¿Ú²ÎÊý£¬´ò¿ª´®¿Ú£¬´®¿Ú²ÎÊý³ö³§Ä¬ÈÏÊÇ115200,n,8,1
2>½øÈëÅäÖÃ״̬£¬µã»÷½øÈëÅäÖÃ״̬ºó£¬»á·µ»Ø+okµÄ×Ö·û£¬ËµÃ÷½øÈëÅäÖÃ״̬³É¹¦
3>¹¤×÷ģʽѡÔñHTTPDĪ˹
4>ÉèÖÃhttpģʽÏà¹Ø²ÎÊý
ÇëÇó·½Ê½£ºÖ§³ÖGETºÍPOSTÁ½ÖÖ£¬±¾ÎÄÒÔPOSTΪÀý
ÇëÇóURL£º/2.php?
·þÎñÆ÷µØÖ·£º test.usr.cn
·þÎñÆ÷¶Ë¿Ú£º80
ÇëÇóÍ·ÐÅÏ¢£ºAccept:text/html[0D][0A]
Test.usr.cnÕâ¸ö·þÎñÆ÷µÄ¹¦ÄܾÍÊÇ£¬´®¿Ú·¢ËÍʲôÊý¾Ý£¬·þÎñÆ÷¾Í½«ÊÕµ½µÄÊý¾Ý·µ»Øµ½´®¿Ú¶Ë¡£
ͨ¹ý´®¿Ú·¢ËÍtest123£¬ÔÚ´®¿ÚÈí¼þµÄ½ÓÊÕ´®¿Ú¾Í»áÊÕµ½123£¬¼ûÏÂͼÖеÄÊý¾Ý¡£Í¼ÖеĽÓÊÕ¿òÖÐÊÕµ½2´Î test123£¬ÉÏÃæÄǸöÊÇ·¢ËÍÊý¾ÝµÄ»ØÏÔ£¬ÏÂÃæµÄtest123ÊÇ·þÎñÆ÷·µ»ØµÄÊý¾Ý¡£»ØÏÔ¹¦ÄÜÊÇÕâ¸öÉèÖÃÈí¼þµÄ ¹¦ÄÜ£¬»»³ÉÆäËûµÄÈí¼þ²âÊÔ£¬¾ÍÖ»ÓзþÎñÆ÷µÄ·µ»ØÊý¾Ý¡£
×¢Ò⣺test.usr.cnÊÇÎÒ˾ÌṩµÄ²âÊÔ·þÎñÆ÷£¬Æä¶Ë¿ÚºÅÊÇ80£¬¶ÔÓ¦µÄ·¾¶ÊÇ/2.php?
Í·ÐÅÏ¢ÊÇAccept:text/html£¬ÓÃÎÒ˾µÄ²âÊÔ·þÎñÆ÷²âÊÔʱ£¬Í·ÐÅÏ¢¿ÉÒÔ²»ÌîдµÄ¡£
ÔÚʵ¼ÊµÄÓ¦ÓÃÖУ¬ÕâЩ²ÎÊýÒª¸ù¾Ý·þÎñÆ÷µÄʵ¼ÊÇé¿öÀ´ÌîдµÄ£¬ÕâЩ²ÎÊý¶¼¿ÉÒÔÔڴ·þÎñÆ÷µÄ¹¤³ÌʦÄÇÀï»ñÈ¡µ½µÄ¡£