### GET device/start Source: https://wiki.keonn.com/rfid-systems/payment-systems/advango-100/advango-pos-api Starts the device. ```APIDOC ## GET device/start ### Description Start the device. ### Method GET ### Endpoint device/start ``` -------------------------------- ### AdvanGo Start Response Source: https://wiki.keonn.com/rfid-systems/payment-systems/advango-100/rest-api-integration Example XML response received after successfully issuing the start command. ```XML response 1660117094949 OK 2.3.0 start ``` -------------------------------- ### GET /device/start Source: https://wiki.keonn.com/rfid-systems/payment-systems/advango-100/rest-api-integration Starts the AdvanGo operation, enabling the RF and initiating data flow. ```APIDOC ## GET /device/start ### Description Starts the AdvanGo operation. Once called, the RF is enabled and data begins flowing from the unit. ### Method GET ### Endpoint $DEVICE_IP/device/start ``` -------------------------------- ### Install Hamachi from Scratch Source: https://wiki.keonn.com/remote-access/step-by-step Commands to manually install and configure the Hamachi package on a Keonn reader system. ```bash sudo ln -s /lib/ld-linux-armhf.so.3 /lib/ld-linux.so.3 sudo dpkg --force-architecture --force-depends -i /home/keonn/logmein-hamachi_2.1.0.203-1_armhf.deb sudo hamachi login sudo hamachi set-nick "Nick-For-This-Computer" (e.g. sudo hamachi set-nick "spain.bcn.advansafe.001" sudo hamachi attach logmein-email-account (e.g. sudo hamachi attach test@gmail.com) cd /etc/init.d sudo update-rc.d logmein-hamachi defaults ``` -------------------------------- ### GET adgo/session/start Source: https://wiki.keonn.com/rfid-systems/payment-systems/advango-100/advango-pos-api Starts the session, changing the status to STARTED. ```APIDOC ## GET adgo/session/start ### Description Starts the session, changing the status to STARTED. ### Method GET ### Endpoint adgo/session/start ``` -------------------------------- ### GET /device/start and /device/stop Source: https://wiki.keonn.com/rfid-systems/payment-systems/advanpay-120/advanpay-pos-integration-using-rest-api Starts or stops the device operation. ```APIDOC ## GET /device/start ### Description Starts the device operation. ### Method GET ### Endpoint http://{ip}/device/start ## GET /device/stop ### Description Stops the device operation. ### Method GET ### Endpoint http://{ip}/device/stop ``` -------------------------------- ### Install software via apt Source: https://wiki.keonn.com/software/advannet/development/embedded-development Commands to update repository indexes and install packages. ```bash keonn@AdvanReader-m4-150#sudo apt-get update ``` ```bash keonn@AdvanReader-m4-150#sudo apt-get install lighttpd ``` -------------------------------- ### Device Start Event Message Source: https://wiki.keonn.com/rfid-systems/payment-systems/advanpay-120/advanpay-pos-integration-using-rest-api An example of the XML message received when the device starts in payment mode. ```xml ADVANNET/1.1 Content-Length:476 Content-Type:text/xml eventMessage 1612521348306 OK com.keonn.advannet.impl.event.DefaultAdvanNetEvent ADVANNET_INFO com.keonn.spec.event.AdvanNetEvent$AdvanNetEventType AdvanNet-instance-34:03:de:a2:87:f1--1 Device[AdvanPay-cf-eu-120] started in mode: ADVANPAY_PAYMENT ``` -------------------------------- ### Install script dependencies Source: https://wiki.keonn.com/software/advannet/advanced-features/export-inventory-to-external-server Install the required curl and libxml-xpath-perl packages on the reader. ```bash sudo apt-get install curl sudo apt-get install libxml-xpath-perl ``` -------------------------------- ### Install avahi-discovery on Linux Source: https://wiki.keonn.com/rfid-components/reader-connectivity/scan-device-ip Install the avahi-discovery package to enable network device discovery on Linux systems. ```bash sudo apt-get install avahi-discover ``` -------------------------------- ### GET /devices//start Source: https://wiki.keonn.com/software/advannet/development/rest-api-development Starts the reading process for the specified device. ```APIDOC ## GET /devices//start ### Description Starts the reading operation on the specified AdvanReader device. ### Method GET ### Endpoint http://:3161/devices//start ### Parameters #### Path Parameters - **deviceID** (string) - Required - The unique identifier of the device. ``` -------------------------------- ### Install Graphical Desktop Environment Source: https://wiki.keonn.com/faq-tips/hdmi-port Commands to install the XFCE4 desktop environment and configure the user session to launch it automatically. ```bash sudo apt-get update sudo apt-get install -y xfce4 **(it may take several minutes to complete)** sudo echo "exec ck-launch-session startxfce4" > /home/keonn/.bash_login sudo chown keonn:keonn /home/keonn/.bash_login sudo chmod 644 /home/keonn/.bash_login sudo reboot ``` -------------------------------- ### Install Development Dependencies Source: https://wiki.keonn.com/software/advannet/development/embedded-development/embedded-cc Commands to update package lists and install necessary build tools and libraries. ```bash sudo apt-get update sudo apt-get install libreadline-dev build-essential ``` -------------------------------- ### Start and Stop Device via REST API Source: https://wiki.keonn.com/rfid-systems/payment-systems/advanpay-120/advanpay-pos-integration-using-rest-api Controls the device state using HTTP GET requests. ```bash curl http://{ip}/device/start ``` ```bash curl http://{ip}/device/stop ``` -------------------------------- ### Install Wireless Dependencies Source: https://wiki.keonn.com/software/advannet/development/embedded-development/embedded-networking Install necessary packages for wireless networking on the AdvanReader. ```bash sudo apt-get update sudo apt-get install wireless-tools sudo apt-get install wpasupplicant sudo apt-get install usbutils ``` -------------------------------- ### Install BalenaEtcher on Linux Source: https://wiki.keonn.com/rfid-components/reader-upgrade/working-with-images Commands to install the BalenaEtcher software on a Linux system. ```bash sudo dpkg -i etcher-*.deb sudo apt install -f ``` -------------------------------- ### Attach Existing Hamachi Installation Source: https://wiki.keonn.com/remote-access/step-by-step Commands to log in and attach an already installed Hamachi client to a specific LogMeIn account. ```bash sudo hamachi login sudo hamachi set-nick "" sudo hamachi attach ``` ```bash sudo hamachi login sudo hamachi set-nick "AdvanReader-m4-150.shop1.device1" sudo hamachi attach test@gmail.com ``` -------------------------------- ### Update and Install Build Infrastructure Source: https://wiki.keonn.com/software/advannet/development/embedded-development Commands to refresh repository indexes and install essential build tools on the AdvanReader system. ```bash keonn@AdvanReader-m4-150#sudo apt-get update keonn@AdvanReader-m4-150#sudo apt-get install build-essential ``` -------------------------------- ### Verify Hamachi Installation Source: https://wiki.keonn.com/remote-access/step-by-step Command to check if the Hamachi service is installed and running on the reader. ```bash sudo hamachi ``` -------------------------------- ### Launch BalenaEtcher on Linux Source: https://wiki.keonn.com/rfid-components/reader-upgrade/working-with-images Command to execute the BalenaEtcher application after installation. ```bash balena-etcher ``` -------------------------------- ### Configure and Start AdvanNet Source: https://wiki.keonn.com/software/advannet/development/embedded-development/embedded-advannet Commands to clear persisted settings, remove temporary files, and start the AdvanNet service. ```bash sudo rm -rf /root/.advannet/conf ``` ```bash rm -rf /home/keonn/tmp/AdvanNet-2.x.x ``` ```bash cd /home/keonn/kernel sudo bin/keonn-kernel.sh ``` ```bash sudo /etc/init.d/keonn-startup.sh start ``` -------------------------------- ### Install Mosquitto MQTT broker and clients Source: https://wiki.keonn.com/software/advannet/services/mqtt-service/setting-a-mqtt-server-for-testing-101 Updates the package list and installs the Mosquitto server and client utilities on Debian-based systems. ```bash sudo apt-get update sudo apt-get install mosquitto mosquitto-clients ``` -------------------------------- ### POST /adgo/session/start Source: https://wiki.keonn.com/rfid-systems/payment-systems/advango-100/advango-pos-api Manually starts a new session. ```APIDOC ## POST /adgo/session/start ### Description Manually starts a new session. ### Method POST ### Endpoint http://:ip/adgo/session/start ``` -------------------------------- ### Run sample application Source: https://wiki.keonn.com/software/advannet/development/embedded-development/embedded-java Commands to execute the sample application and access help documentation. ```bash $ sudo ./run03.sh -d -a 1 -s S0 -t AB $ sudo ./run03.sh --help ``` -------------------------------- ### Bring Up Wireless Interface Source: https://wiki.keonn.com/software/advannet/development/embedded-development/embedded-networking Activate the wireless interface after configuration. ```bash sudo ifup wlan0 ``` -------------------------------- ### Navigate and Compile Samples Source: https://wiki.keonn.com/software/advannet/development/embedded-development/embedded-cc Commands to enter the source directory and compile the C/C++ samples. ```bash cd embedded-c make clean && make ``` -------------------------------- ### Perform GET request to AdvanGo API Source: https://wiki.keonn.com/rfid-systems/payment-systems/advango-100/advango-pos-api Example of a basic GET request to the AdvanGo API using curl. ```bash curl http://:ip/adgo/autosession ``` -------------------------------- ### GET /adgo/session/status Source: https://wiki.keonn.com/rfid-systems/payment-systems/advango-100/advango-pos-api Retrieves the current status of the system session (IDLE, STARTED, or STANDBY). ```APIDOC ## GET /adgo/session/status ### Description Retrieves the current status of the system session. ### Method GET ### Endpoint http://:ip/adgo/session/status ``` -------------------------------- ### Execute Readasync Sample Source: https://wiki.keonn.com/software/advannet/development/embedded-development/embedded-cc Command to run the readasync sample application with specific antenna parameters. ```bash cd embedded-c ./readasync tmr:///dev/ttyO1 --ant 1,2 ``` -------------------------------- ### Device Operation Control Commands Source: https://wiki.keonn.com/rfid-systems/payment-systems/advango-100/rest-api-integration HTTP GET requests to start or stop the AdvanGo unit operation. ```http HTTP GET $DEVICE_IP/device/start ``` ```http HTTP GET $DEVICE_IP/device/stop ``` -------------------------------- ### Configure Device Startup in connectors.xml Source: https://wiki.keonn.com/old-pages/configuration Define device startup behavior by adding a device block within the DEVICE_MANAGER section of the connectors.xml file. ```xml .. ... ... .. ``` ```xml .. adrd@1 DEFAULT_DEVICE_RUNTIME CONTROLLER_MODE_ASYNCH true true ... ``` -------------------------------- ### Create Database Source: https://wiki.keonn.com/software/advannet/services/sqlservice/mysql-examples Initializes a new database named advannet. ```sql CREATE DATABASE advannet; ``` -------------------------------- ### GET /adgo/session/data Source: https://wiki.keonn.com/rfid-systems/payment-systems/advango-100/advango-pos-api Retrieves the session data containing the list of unique tags read since the session started. ```APIDOC ## GET /adgo/session/data ### Description Retrieves the session data containing the list of unique tags read since the session started. ### Method GET ### Endpoint http://:ip/adgo/session/data ``` -------------------------------- ### GET /device/start Source: https://wiki.keonn.com/rfid-systems/payment-systems/advango-100/rest-api-integration Enables the AdvanGo unit to accept RF commands. ```APIDOC ## GET /device/start ### Description Enables the AdvanGo unit, leaving it ready to accept RF commands. ### Method GET ### Endpoint $DEVICE_IP/device/start ### Response #### Success Response (200) - **status** (string) - Indicates the operation status (e.g., OK). - **op** (string) - The operation performed (start). #### Response Example response 1660117094949 OK 2.3.0 start ``` -------------------------------- ### GET adgo/session/data[/:ts] Source: https://wiki.keonn.com/rfid-systems/payment-systems/advango-100/advango-pos-api Returns all EPCs read since the session started, or within the last specified duration. ```APIDOC ## GET adgo/session/data[/:ts] ### Description Returns all the epc read since the session started. Optionally, if :ts is provided, it'll return the EPCs read in the last :ts ms instead. ### Method GET ### Endpoint adgo/session/data[/:ts] ### Parameters #### Path Parameters - **ts** (integer) - Optional - Time window in milliseconds. ``` -------------------------------- ### Start and Stop Reading via HTTP GET Source: https://wiki.keonn.com/software/advannet/development/rest-api-development Control the reading state of the device using the identified device ID. ```http http://192.168.1.173:3161/devices//start ``` ```http http://192.168.1.173:3161/devices//stop ``` -------------------------------- ### Configure Hamachi Startup and Cron Jobs Source: https://wiki.keonn.com/remote-access/step-by-step Moves the startup script to the system directory, sets permissions, and adds recurring tasks to the root crontab. ```bash sudo mv /home/keonn/custom-start-hamachi.sh /sbin sudo chmod 770 /sbin/custom-start-hamachi.sh sudo chown root: /sbin/custom-start-hamachi.sh sudo su echo "*/15 * * * * /sbin/custom-start-hamachi.sh" >> /var/spool/cron/crontabs/root echo "0 0 * * * /etc/init.d/logmein-hamachi restart" >> /var/spool/cron/crontabs/root echo -e "" >> /var/spool/cron/crontabs/root chown root:crontab /var/spool/cron/crontabs/root shutdown -r now ``` -------------------------------- ### Trigger Manual Inventory HTTP Requests Source: https://wiki.keonn.com/rfid-systems/automatic-inventory-and-tracking/advantrack-200 Use these HTTP GET requests to start an inventory or retrieve location data from the AdvanTrack-200 device. ```http http://192.168.1.168:3161/devices/AdvanTrack-200-eu/start ``` ```http http://192.168.1.168:3161/devices/AdvanTrack-200-eu/location ``` -------------------------------- ### Initialize and Configure GPIO Lines Source: https://wiki.keonn.com/software/advannet/development/embedded-development Commands to export GPIO pins and set their direction to input or output via the sysfs interface. ```bash root@AdvanReader-m4-150#cd /sys/class/gpio root@AdvanReader-m4-150#echo 50 > export root@AdvanReader-m4-150#echo out > /sys/class/gpio/gpio50/direction (For an output line) root@AdvanReader-m4-150#echo in > /sys/class/gpio/gpio48/direction (For an input line) ``` -------------------------------- ### Install ntpdate on AdvanReader Source: https://wiki.keonn.com/software/advannet/development/local-ntp-server Commands to update package lists and install the ntpdate utility if it is missing. ```bash sudo apt-get update sudo apt-get install ntpdate ```