RCI Examples



EXAMPLES

Reboot
<rci_request version="1.1">
<reboot>
</reboot>
</rci_request>

Query all settings:
<rci_request version="1.1">
<query_setting/>
</rci_request>

Query only boot and serial settings:
<rci_request version="1.1">
<query_setting>
<boot/>
<serial/>
</query_setting>
</rci_request>


Query only device settings:
<rci_request version="1.1">
<query_setting>
<device_info/>
</query_setting>
</rci_request>

Query only GPIO pin states:
<rci_request version="1.1">
<query_state>
<gpio/>
</query_state>
</rci_request>

Get network statistics:
  <rci_request version="1.1">
      <query_state>
          <net_stats/>
      </query_state>
  </rci_request>

Setting IP address:
<rci_request version="1.1">
<set_setting>
<boot>
<static>on</static>
<dhcp>off</dhcp>
<autoip>on</autoip>
<ip>10.4.112.15</ip>
<subnet>255.255.0.0</subnet>
<gateway>10.4.1.1</gateway>
<eth_speed>auto</eth_speed>
<eth_duplex>half</eth_duplex>
</boot>
</set_setting>
</rci_request>

# Setting dynamic IP address:
<rci_request version="1.1">
<set_setting>
<boot>
<static>off</static>
<dhcp>on</dhcp>
<autoip>off</autoip>
</boot>
</set_setting>
</rci_request>

# Configuring serial port #1 for TCP Sockets mode with serial settings 9600 baud 8 data bits, no parity, 1 stop bit, no flow control:
<rci_request version="1.1">
<set_setting>
<profile>
<profile_type>tcp_sockets</profile_type>
</profile>
<serial>
<baud>9600</baud>
<databits>8</databits>
<stopbits>1</stopbits>
<parity>none</parity>
<flowcontrol>none</flowcontrol>
</serial>
</set_setting>
</rci_request>

# Configuring for wireless WPA Authentication via username and password
<rci_request version="1.1">
<set_setting>
<boot>
<static>off</static>
<dhcp>on</dhcp>
<autoip>on</autoip>
<ip>0.0.0.0</ip>
<subnet>0.0.0.0</subnet>
<gateway>0.0.0.0</gateway>
<channel>0</channel>
<wep_type>64bit</wep_type>
<wepkey_index>1</wepkey_index>
<protocol_mode>any</protocol_mode>
<ssid>Connect</ssid>
<rts_threshold>2347</rts_threshold>
<fragment_threshold>2346</fragment_threshold>
<max_txrate>11MB</max_txrate>
<country_code>United States</country_code>
<authentication>wpa_auth</authentication>
<encrypt>open,wep,tkip,ccmp</encrypt>
<eap>leap,peap,tls,ttls,gtc,md5,mashapv2,otp,ttls-chap,ttls-mschap,ttls-mschapv2,ttls-pap</eap>
<options />
<txpower>14dbm</txpower>
<wpa_username>administrator</wpa_username>
<wpa_password>himom</wpa_password>
</boot>
</set_setting>
</rci_request>



# Toggling GPIO pin #1 into a low (unasserted) state:
<rci_request version="1.1">
<set_state>
<gpio_mode>
<pin1>out</pin1>
</gpio_mode>
<gpio>
<pin1>unasserted</pin1>
</gpio>
</set_state>
</rci_request>





# TCP autoconnect using SSL
<rci_request version="1.1">
<set_setting>
<profile>
<profile_type>tcp_sockets</profile_type>
</profile>
<serial>
<baud>9600</baud>
<databits>8</databits>
<stopbits>1</stopbits>
<parity>none</parity>
<flowcontrol>none</flowcontrol>
</serial>
<autoconnect>
<state>on</state>
<trigger>data</trigger>
<service>ssl</service>
<desc></desc>
<address>10.4.112.9</address>
<port>3333</port>
<pattern></pattern>
<strip_pattern>off</strip_pattern>
<keepalive>on</keepalive>
<nodelay>off</nodelay>
</autoconnect>
</set_setting>
</rci_request>



# TCP autoconnect using raw TCP
<rci_request version="1.1">
<set_setting>
<profile>
<profile_type>tcp_sockets</profile_type>
</profile>
<serial>
<baud>9600</baud>
<databits>8</databits>
<stopbits>1</stopbits>
<parity>none</parity>
<flowcontrol>none</flowcontrol>
</serial>
<autoconnect>
<state>on</state>
<trigger>data</trigger>
<service>raw</service>
<desc></desc>
<address>10.4.112.9</address>
<port>2222</port>
<pattern></pattern>
<strip_pattern>off</strip_pattern>
<keepalive>on</keepalive>
<nodelay>off</nodelay>
</autoconnect>
</set_setting>
</rci_request>



# Setting gratuitous arp to 60
<rci_request version="1.1">
<set_setting>
<arp>
<garp>60</garp>
</arp>
</set_setting>
</rci_request>


# Setting Hostname
<rci_request version="1.1">
<host>
<name>goes_here</name>
</host>
</set_setting>
</rci_request>






The following RCI would work (change server name as appropriate) to enable an SNTP server as a time source, if that’s what you’re looking for:

<rci_request version="1.1">
  <set_setting>
    <time_source>
      <state>on</state>
      <type>sntp server</type>
      <sample_interval>60</sample_interval>
      <fqdn>app.idigi.com</fqdn>
    </time_source>
  </set_setting>
</rci_request>







PYTHON AUTO START <python><state>on</state><command>connect_test2.py</command><onexit>none</onexit></python>


XBEE DISCOVER
<sci_request version="1.0">
  <send_message>
    <targets>
      <device id="00000000-00000000-00409DFF-FF3C68F1"/>
    </targets>
    <rci_request version="1.1">
      <do_command target="zigbee">
        <discover/>
      </do_command>
    </rci_request>
  </send_message>
</sci_request>


GPS POSITION:
    <rci_request version="1.1">
      <query_state>
        <gps_stats/>
      </query_state>
    </rci_request>

 
Last updated: Aug 23, 2017

Filed Under

EmbeddedGateways

Recently Viewed

No recently viewed articles

Did you find this article helpful?