# AAF + I/OXCard + Modbus

**URL:** <https://forum.sierrawireless.com/t/aaf-i-oxcard-modbus/7134>\
**Category:** ALEOS Application Framework\
**Created:** [April 3, 2014, 10:01pm UTC](https://forum.sierrawireless.com/t/aaf-i-oxcard-modbus/7134 "2014-04-03T22:01:25Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![wleeb](https://avatars.discourse-cdn.com/v4/letter/w/b77776/32.png) [@wleeb](https://forum.sierrawireless.com/u/wleeb)\
**Post date:** [April 3, 2014, 10:01pm UTC](https://forum.sierrawireless.com/t/aaf-i-oxcard-modbus/7134/1 "2014-04-03T22:01:25Z")

</div>

I am looking for assistance on an application we are developing. The requirements are making available an analog and multiple discrete values from the on-board I/OX card of a GX400 to a client application utilizing the WAN interface. Ideally we would like to make the GX400 a modbus slave exposing these values that can be read by a master on demand. Can someone give me a call to quickly discuss the application and possible configurations for this use case?

---

<div class="post-metadata">

**Author:** ![cbugot](https://avatars.discourse-cdn.com/v4/letter/c/c37758/32.png) [@cbugot](https://forum.sierrawireless.com/u/cbugot)\
**Post date:** [April 4, 2014, 8:27am UTC](https://forum.sierrawireless.com/t/aaf-i-oxcard-modbus/7134/2 "2014-04-04T08:27:19Z")

</div>

Hi,

You can access I/O with the “devicetree” API. Some elements on the tree are dedicated to IO access. You can then use the “socket” API to open a server socket. You would have to implement a Modbus Slave module, or you could implement your own protocol. If you need your socket available to the WAN you need to forward a WAN port to the local interface (by default the AAF server socket are not reachable from WAN for security reasons). To forward the port you have to configure it in ALEOS in “Security\>Port Forwarding” and forward your port to 127.0.0.1.

I hope this will help.  
Cheers,  
Cuero

---

<div class="post-metadata">

**Author:** ![thedevo](https://avatars.discourse-cdn.com/v4/letter/t/6bbea6/32.png) [@thedevo](https://forum.sierrawireless.com/u/thedevo)\
**Post date:** [August 19, 2014, 11:03pm UTC](https://forum.sierrawireless.com/t/aaf-i-oxcard-modbus/7134/3 "2014-08-19T23:03:44Z")

</div>

What version of ALEOS supports the I/O XCard?

When using the Device tree  
local DIN1 = ‘system.aleos.io.in1’ works fine…  
local din1 = assert(devicetree.get (DIN1))

local DIN2 = ‘system.aleos.io.in2’  
local din2 = assert(devicetree.get (DIN2))  
produces an error at runtime.  
In thread: 0xcded0: error: main.lua:67: handler not found

Is there new firmware that is available that enables this to work?

Also is there a link to the Device tree for the GX400 with the I/OXCard  
“The list of all variables and their meaning is partially device-dependent, and is given in a separate document.” Where is this separate document?

---

<div class="post-metadata">

**Author:** ![thedevo](https://avatars.discourse-cdn.com/v4/letter/t/6bbea6/32.png) [@thedevo](https://forum.sierrawireless.com/u/thedevo)\
**Post date:** [August 20, 2014, 6:59pm UTC](https://forum.sierrawireless.com/t/aaf-i-oxcard-modbus/7134/4 "2014-08-20T18:59:45Z")

</div>

Just a quick update, I upgraded to ALEOS 4.3.6 and the DIN2 now works as expected.

I am still looking for documentation for the devicetree and the GX400 with the I/O XCard…

The closes thing I could find is: [https://eclipse.googlesource.com/mihini/org.eclipse.mihini/+/5d104425f63a99568466ac223b5e292789abcb1f/agent/agent/treemgr/maps/aleos.map  
 ](https://eclipse.googlesource.com/mihini/org.eclipse.mihini/+/5d104425f63a99568466ac223b5e292789abcb1f/agent/agent/treemgr/maps/aleos.map)

but that doesn’t include the extra I/O

---

<div class="post-metadata">

**Author:** ![thedevo](https://avatars.discourse-cdn.com/v4/letter/t/6bbea6/32.png) [@thedevo](https://forum.sierrawireless.com/u/thedevo)\
**Post date:** [September 16, 2014, 8:59pm UTC](https://forum.sierrawireless.com/t/aaf-i-oxcard-modbus/7134/5 "2014-09-16T20:59:00Z")

</div>

I thought I would add this since I finally found the documentation for the devicetree  
[developer.sierrawireless.com/Res … ccess.aspx](http://developer.sierrawireless.com/Resources/Resources/AirLink/ALEOS_AF/TechArticle_AAF_Device_Parameter_Access.aspx)

Although it still doesn’t have the Xcard I/O
