AdvanGo Integration
Introduction
This page shows how to use the broader AdvanNet API to integrate your POS software with the AdvanGo.
There are two basic approaches:
On-demand: in this approach is the AdvanGo controller (POS SW usually) that queries the AdvanGo any time an inventory of the items need to be done.
Continuous: in this approach AdvanGo is operating continuously and new items detected are reported through: TCP/IP socket or HTTP endpoint
Integration options
On-demand
Application life cycle in the On-demand approach
The AdvanGo unit is configured to use Sequential mode
2. [OPTIONALLY] Disable the HTTP Digest authentication mechanism
By default AdvanGo units require HTTP authentication. Although recommended, this may be disabled.
Follow instructions in the link below
https://wiki.keonn.com/software/advannet/services/advannet-rest-service#h.ggrhqxg8ns3o
3. Enable AdvanGo operation
Warning Note
This won't enable the RF, it just leaves the unit ready to accept RF commands
Issue the command
HTTP GET $DEVICE_IP/device/start
The response should be something like
<?xml version="1.0" encoding="UTF-8"?>
<response>
<type>response</type>
<ts>1660117094949</ts>
<status>OK</status>
<msg-version>2.3.0</msg-version>
<op>start</op>
<data/>
</response>
4. Perform an inventory
Any time an item count is required
Issue the command
HTTP GET $DEVICE_IP/device/inventory
The response should be something like
<?xml version="1.0" encoding="UTF-8"?>
<inventory>
<type>inventory</type>
<ts>1660116060532</ts>
<status>OK</status>
<msg-version>2.3.0</msg-version>
<op>inventory</op>
<data>
<advanNetId>AdvanNet-instance-b0:d5:cc:fe:f3:87--1</advanNetId>
<deviceId>AdvanSafe-200-eu-f387</deviceId>
<inventory>
<class>INVENTORY</class>
<deviceId>AdvanSafe-200-eu-f387</deviceId>
<size>84</size>
<items>
<item>
<class>READ_EVENT</class>
<epc>30349a4ebc02558380f70329</epc>
<decoded>02528175023900</decoded>
<ts>1660116060461</ts>
<deviceId>AdvanSafe-200-eu-f387</deviceId>
<data>
<class>TAG_DATA</class>
<hexepc>30349a4ebc02558380f70329</hexepc>
<props>
<prop>TIME_STAMP:1660116060461</prop>
<prop>RSSI:-70</prop>
<prop>RF_PHASE:11</prop>
<prop>ANTENNA_PORT:1</prop>
<prop>MUX1:0</prop>
<prop>MUX2:0</prop>
<prop>FREQ:866061</prop>
<prop>GPI:[0,0,0,0]</prop>
</props>
</data>
</item>
<item>
[...]
</item>
[...]
</items>
</inventory>
</data>
</inventory>
5. Repeat inventories
Any time an item count is required repeat step 4
Continuous
Application life cycle in the On-demand approach
The AdvanGo unit is configured to use ADGO mode
2. Configure the data integration method
There are several different options
2.1 Using the REST API to fetch inventory data is the preferred approach
When using the Continuous mode, once started the AdvanGo operation the unit is reading continuously.
Warning Note
Read carefully the operation of /inventory API calls under Continuous mode, as it differs from the On-demand operation mode
When used in the Continuous mode, the Inventory REST API works as follows:
It's a non-blocking call, it will just take the time to process the call
It returns all reads in the last 2000 ms. That means this call has the be repeated between 500 and 1000 ms
Total reads in a sesion would result from aggregating all data from all the /inventory calls.
The data format is this
<?xml version="1.0" encoding="UTF-8"?>
<inventory>
<type>inventory</type>
<ts>1660116060532</ts>
<status>OK</status>
<msg-version>2.3.0</msg-version>
<op>inventory</op>
<data>
<advanNetId>AdvanNet-instance-b0:d5:cc:fe:f3:87--1</advanNetId>
<deviceId>AdvanSafe-200-eu-f387</deviceId>
<inventory>
<class>INVENTORY</class>
<deviceId>AdvanSafe-200-eu-f387</deviceId>
<size>84</size>
<items>
<item>
<class>READ_EVENT</class>
<epc>30349a4ebc02558380f70329</epc>
<decoded>02528175023900</decoded>
<ts>1660116060461</ts>
<deviceId>AdvanSafe-200-eu-f387</deviceId>
<data>
<class>TAG_DATA</class>
<hexepc>30349a4ebc02558380f70329</hexepc>
<props>
<prop>TIME_STAMP:1660116060461</prop>
<prop>RSSI:-70</prop>
<prop>RF_PHASE:11</prop>
<prop>ANTENNA_PORT:1</prop>
<prop>MUX1:0</prop>
<prop>MUX2:0</prop>
<prop>FREQ:866061</prop>
<prop>GPI:[0,0,0,0]</prop>
</props>
</data>
</item>
<item>
[...]
</item>
[...]
</items>
</inventory>
</data>
</inventory>
2.2 Using the AdvanGo HTTP Service that sends data to HTTP endpoints
Follow instructions here
https://wiki.keonn.com/software/advannet/read-modes/advango
2.3 Use the TCP/IP socket at port 3177 of the AdvanGo unit.
This is enabled by default, just connect to the port 3177 using a regular TCP/IP socket.
Several messages types will be received, filter by <alarmType>TAG_ADDED</alarmType>
Those messages represent new items being detected.
ADVANNET/1.1
Content-Length:452
Content-Type:text/xml
<?xml version="1.0" encoding="UTF-8"?>
<deviceEventMessage>
<type>deviceEventMessage</type>
<ts>1478216232082</ts>
<status>OK</status>
<event>
<type>TAG_ALARM</type>
<deviceId>AdvanPay-cf-us-120</deviceId>
<alarmType>TAG_ADDED</alarmType>
<epcs>303602c25c09bbe003deb652</epcs>
<sku>08433815099679</sku>
<readerPort>1</readerPort>
<mux1>0</mux1>
<mux2>0</mux2>
</event>
<deviceId>AdvanPay-cf-us-120</deviceId>
</deviceEventMessage>
3. Control the AdvanGo operation
Switch operation between on/off
Start operation
HTTP GET $DEVICE_IP/device/start
After the start operation, RF will be enabled and data will start flowing out from the AdvanGo unit
Stop operation
HTTP GET $DEVICE_IP/device/stop
After the stop operation, RF will be stopped.
4 Use data at POS level
When data from the AdvanGo unit is received, use it according to your own logic and business processes.