# Passing a variable from at command send to response handler

**URL:** <https://forum.sierrawireless.com/t/passing-a-variable-from-at-command-send-to-response-handler/6733>\
**Category:** Open AT\
**Created:** [September 13, 2013, 3:43pm UTC](https://forum.sierrawireless.com/t/passing-a-variable-from-at-command-send-to-response-handler/6733 "2013-09-13T15:43:23Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![cbradford](https://avatars.discourse-cdn.com/v4/letter/c/eb8c5e/32.png) [@cbradford](https://forum.sierrawireless.com/u/cbradford)\
**Post date:** [September 13, 2013, 3:43pm UTC](https://forum.sierrawireless.com/t/passing-a-variable-from-at-command-send-to-response-handler/6733/1 "2013-09-13T15:43:23Z")

</div>

Hello,

Is there a way to pass a variable from the adl\_atCmdSend(…) call, and have the variable in the response handler?

From the documentation, it looks like paras.contxt could do this, but it doesn’t seem to work.

Any help is appreciated.

Thanks for your time.

---

<div class="post-metadata">

**Author:** ![davidc](https://avatars.discourse-cdn.com/v4/letter/d/a183cd/32.png) [@davidc](https://forum.sierrawireless.com/u/davidc)\
**Post date:** [September 14, 2013, 5:19am UTC](https://forum.sierrawireless.com/t/passing-a-variable-from-at-command-send-to-response-handler/6733/2 "2013-09-14T05:19:31Z")

</div>

Hiya,

Don’t forget that the context variable is a pointer to your data, NOT the data itself.

You have to adl\_memGet() some memory first, then call the command with the context, and don’t forget to adl\_memRelease() the variable in your handler when you’ve finished with it or you will end up with a memory leak.

ciao, Dave
