# How to send AG command PACKET using python script(from gateway to Xbee's)????

**URL:** <https://forums.digi.com/t/how-to-send-ag-command-packet-using-python-script-from-gateway-to-xbees/17298>\
**Category:** XBee - 802.15.4\
**Tags:** connectport-x2\
**Created:** [August 26, 2016, 8:18am UTC](https://forums.digi.com/t/how-to-send-ag-command-packet-using-python-script-from-gateway-to-xbees/17298 "2016-08-26T08:18:45Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![vivek2varma](https://avatars.discourse-cdn.com/v4/letter/v/7ba0ec/32.png) [@vivek2varma](https://forums.digi.com/u/vivek2varma)\
**Post date:** [August 26, 2016, 8:18am UTC](https://forums.digi.com/t/how-to-send-ag-command-packet-using-python-script-from-gateway-to-xbees/17298/1 "2016-08-26T08:18:45Z")

</div>



---

<div class="post-metadata">

**Author:** ![mvut](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.digi.com/mvut/32/31_2.png) [@mvut](https://forums.digi.com/u/mvut)\
**Post date:** [August 26, 2016, 9:46am UTC](https://forums.digi.com/t/how-to-send-ag-command-packet-using-python-script-from-gateway-to-xbees/17298/2 "2016-08-26T09:46:29Z")

</div>

you need to use the DDO\_set\_PARM command.

---

<div class="post-metadata">

**Author:** ![vivek2varma](https://avatars.discourse-cdn.com/v4/letter/v/7ba0ec/32.png) [@vivek2varma](https://forums.digi.com/u/vivek2varma)\
**Post date:** [August 27, 2016, 2:30pm UTC](https://forums.digi.com/t/how-to-send-ag-command-packet-using-python-script-from-gateway-to-xbees/17298/3 "2016-08-27T14:30:37Z")

</div>

Sir,  
Can you give an example on python script. please

---

<div class="post-metadata">

**Author:** ![vivek2varma](https://avatars.discourse-cdn.com/v4/letter/v/7ba0ec/32.png) [@vivek2varma](https://forums.digi.com/u/vivek2varma)\
**Post date:** [August 27, 2016, 2:30pm UTC](https://forums.digi.com/t/how-to-send-ag-command-packet-using-python-script-from-gateway-to-xbees/17298/4 "2016-08-27T14:30:39Z")

</div>

I tried by giving AT command with AGFFFF as a FRAME.  
like, Xbee.send(“\x7E\x00\x08\x08\x00\x41\x47\x46\x46\x46\x46\x57”). it is not the way…  
please help me…

---

<div class="post-metadata">

**Author:** ![mvut](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.digi.com/mvut/32/31_2.png) [@mvut](https://forums.digi.com/u/mvut)\
**Post date:** [August 29, 2016, 8:41am UTC](https://forums.digi.com/t/how-to-send-ag-command-packet-using-python-script-from-gateway-to-xbees/17298/5 "2016-08-29T08:41:59Z")

</div>

It would be more like:

Ddo\_set\_param (“00:13:A2:00:40:64:5E:6C”, AG1)  
See [http://www.digi.com/wiki/developer/index.php/Module:xbee#ddo\_set\_param.28.29](http://www.digi.com/wiki/developer/index.php/Module:xbee#ddo_set_param.28.29)
