<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="FeedCreator 1.8" -->
<?xml-stylesheet href="http://wiki.netmodule.com/lib/exe/css.php?s=feed" type="text/css"?>
<rdf:RDF
    xmlns="http://purl.org/rss/1.0/"
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
    xmlns:dc="http://purl.org/dc/elements/1.1/">
    <channel rdf:about="http://wiki.netmodule.com/feed.php">
        <title>NetModule Router Wiki sdk</title>
        <description></description>
        <link>http://wiki.netmodule.com/</link>
        <image rdf:resource="http://wiki.netmodule.com/lib/tpl/netmodule5G/images/favicon.ico" />
       <dc:date>2026-04-07T09:14:44+00:00</dc:date>
        <items>
            <rdf:Seq>
                <rdf:li rdf:resource="http://wiki.netmodule.com/sdk/alarm-via-voice?rev=1643212621&amp;do=diff"/>
                <rdf:li rdf:resource="http://wiki.netmodule.com/sdk/block-check-calculator?rev=1670429338&amp;do=diff"/>
                <rdf:li rdf:resource="http://wiki.netmodule.com/sdk/castint2float?rev=1517586353&amp;do=diff"/>
                <rdf:li rdf:resource="http://wiki.netmodule.com/sdk/config-revert?rev=1650977019&amp;do=diff"/>
                <rdf:li rdf:resource="http://wiki.netmodule.com/sdk/connection-statistics?rev=1628068820&amp;do=diff"/>
                <rdf:li rdf:resource="http://wiki.netmodule.com/sdk/custom-wegpage-for-digital-output-pulse?rev=1642431905&amp;do=diff"/>
                <rdf:li rdf:resource="http://wiki.netmodule.com/sdk/customized-web-gui-extension-display-and-change-custom-config-paramters?rev=1643212293&amp;do=diff"/>
                <rdf:li rdf:resource="http://wiki.netmodule.com/sdk/dio2modbustcp?rev=1516809181&amp;do=diff"/>
                <rdf:li rdf:resource="http://wiki.netmodule.com/sdk/download-to-usb?rev=1441376856&amp;do=diff"/>
                <rdf:li rdf:resource="http://wiki.netmodule.com/sdk/ftp2sms?rev=1628068820&amp;do=diff"/>
                <rdf:li rdf:resource="http://wiki.netmodule.com/sdk/gps-tcp-server-gnsstogps?rev=1595342022&amp;do=diff"/>
                <rdf:li rdf:resource="http://wiki.netmodule.com/sdk/gps-udp-broadcast?rev=1507739657&amp;do=diff"/>
                <rdf:li rdf:resource="http://wiki.netmodule.com/sdk/gps-udp-client-gnsstogps?rev=1633688534&amp;do=diff"/>
                <rdf:li rdf:resource="http://wiki.netmodule.com/sdk/gps2serial-gnsstogps?rev=1616321029&amp;do=diff"/>
                <rdf:li rdf:resource="http://wiki.netmodule.com/sdk/gps2serial?rev=1585138871&amp;do=diff"/>
                <rdf:li rdf:resource="http://wiki.netmodule.com/sdk/hex2serial?rev=1511453801&amp;do=diff"/>
                <rdf:li rdf:resource="http://wiki.netmodule.com/sdk/httpget?rev=1435846544&amp;do=diff"/>
                <rdf:li rdf:resource="http://wiki.netmodule.com/sdk/ibis-example?rev=1679649265&amp;do=diff"/>
                <rdf:li rdf:resource="http://wiki.netmodule.com/sdk/ibis2ascii?rev=1493215727&amp;do=diff"/>
                <rdf:li rdf:resource="http://wiki.netmodule.com/sdk/log-to-syslog?rev=1475681765&amp;do=diff"/>
                <rdf:li rdf:resource="http://wiki.netmodule.com/sdk/monitor-system-load?rev=1473769278&amp;do=diff"/>
                <rdf:li rdf:resource="http://wiki.netmodule.com/sdk/mqtt_advanced_status?rev=1536677444&amp;do=diff"/>
                <rdf:li rdf:resource="http://wiki.netmodule.com/sdk/mqtt_dio?rev=1591696115&amp;do=diff"/>
                <rdf:li rdf:resource="http://wiki.netmodule.com/sdk/mqtt_simple_status?rev=1535616839&amp;do=diff"/>
                <rdf:li rdf:resource="http://wiki.netmodule.com/sdk/mqttlib-example?rev=1753366010&amp;do=diff"/>
                <rdf:li rdf:resource="http://wiki.netmodule.com/sdk/readinputregister-modbustcp-tempalam?rev=1643383807&amp;do=diff"/>
                <rdf:li rdf:resource="http://wiki.netmodule.com/sdk/reference?rev=1728890907&amp;do=diff"/>
                <rdf:li rdf:resource="http://wiki.netmodule.com/sdk/remote-configdownload?rev=1510841952&amp;do=diff"/>
                <rdf:li rdf:resource="http://wiki.netmodule.com/sdk/sdk?rev=1764596680&amp;do=diff"/>
                <rdf:li rdf:resource="http://wiki.netmodule.com/sdk/serial-point-to-multipoint?rev=1430916540&amp;do=diff"/>
                <rdf:li rdf:resource="http://wiki.netmodule.com/sdk/serialdatalogger?rev=1498051094&amp;do=diff"/>
                <rdf:li rdf:resource="http://wiki.netmodule.com/sdk/set-default-route-based-on-current-ssid?rev=1417019200&amp;do=diff"/>
                <rdf:li rdf:resource="http://wiki.netmodule.com/sdk/sleep-mode?rev=1626776906&amp;do=diff"/>
                <rdf:li rdf:resource="http://wiki.netmodule.com/sdk/softwareupdate-on-change?rev=1596183919&amp;do=diff"/>
                <rdf:li rdf:resource="http://wiki.netmodule.com/sdk/status-to-syslog?rev=1614698361&amp;do=diff"/>
                <rdf:li rdf:resource="http://wiki.netmodule.com/sdk/status-values-via-snmp?rev=1595320278&amp;do=diff"/>
                <rdf:li rdf:resource="http://wiki.netmodule.com/sdk/status2udp?rev=1430916345&amp;do=diff"/>
                <rdf:li rdf:resource="http://wiki.netmodule.com/sdk/tcp2sms?rev=1508777118&amp;do=diff"/>
                <rdf:li rdf:resource="http://wiki.netmodule.com/sdk/techsupport-local-backup?rev=1715175158&amp;do=diff"/>
                <rdf:li rdf:resource="http://wiki.netmodule.com/sdk/telnet-run-a-command-using-telnet?rev=1430916622&amp;do=diff"/>
                <rdf:li rdf:resource="http://wiki.netmodule.com/sdk/testing-the-sms-send-script?rev=1637604823&amp;do=diff"/>
                <rdf:li rdf:resource="http://wiki.netmodule.com/sdk/voicetodigitalout?rev=1724322640&amp;do=diff"/>
                <rdf:li rdf:resource="http://wiki.netmodule.com/sdk/vpn-supervision?rev=1548943108&amp;do=diff"/>
                <rdf:li rdf:resource="http://wiki.netmodule.com/sdk/webservices_get?rev=1693987005&amp;do=diff"/>
                <rdf:li rdf:resource="http://wiki.netmodule.com/sdk/webservices_post?rev=1693987066&amp;do=diff"/>
                <rdf:li rdf:resource="http://wiki.netmodule.com/sdk/webservices_send_postion?rev=1693989980&amp;do=diff"/>
                <rdf:li rdf:resource="http://wiki.netmodule.com/sdk/wifimodechanger?rev=1523284770&amp;do=diff"/>
                <rdf:li rdf:resource="http://wiki.netmodule.com/sdk/wifiprobingclients?rev=1590133957&amp;do=diff"/>
                <rdf:li rdf:resource="http://wiki.netmodule.com/sdk/wwan_switcher?rev=1534238353&amp;do=diff"/>
            </rdf:Seq>
        </items>
    </channel>
    <image rdf:about="http://wiki.netmodule.com/lib/tpl/netmodule5G/images/favicon.ico">
        <title>NetModule Router Wiki</title>
        <link>http://wiki.netmodule.com/</link>
        <url>http://wiki.netmodule.com/lib/tpl/netmodule5G/images/favicon.ico</url>
    </image>
    <item rdf:about="http://wiki.netmodule.com/sdk/alarm-via-voice?rev=1643212621&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2022-01-26T15:57:01+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>sdk:alarm-via-voice</title>
        <link>http://wiki.netmodule.com/sdk/alarm-via-voice?rev=1643212621&amp;do=diff</link>
        <description>Alarming with a Phonecall

To contact a technican with a phone call and check if he picked up the phone we can use the following SDK Script and the Voice Gateway feature. 

The Script will try to reach a phonenumber for a certain time, also retries after a specific time and give up after  a defined timeout.</description>
    </item>
    <item rdf:about="http://wiki.netmodule.com/sdk/block-check-calculator?rev=1670429338&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2022-12-07T16:08:58+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>sdk:block-check-calculator</title>
        <link>http://wiki.netmodule.com/sdk/block-check-calculator?rev=1670429338&amp;do=diff</link>
        <description>Block check character:
If you need to calulate the block check character, here is a simple example:

Non writeable characters can be used with \x within sprintf. 


//&lt;SOH&gt;P1&lt;STX&gt;(00000000)&lt;ETX&gt;a

test=sprintf(&quot;\x01P1\x02(00000000)\x03&quot;);
dump(test);

bcc=0;
for(i=1; i &lt; strlen(test); i++) {
    bcc ^= ord(explode(test)[i]);
}
    printf(&quot;0x%x\n&quot;, bcc);

printf(&quot;CHR: %s&quot;, chr(bcc));</description>
    </item>
    <item rdf:about="http://wiki.netmodule.com/sdk/castint2float?rev=1517586353&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2018-02-02T15:45:53+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>sdk:castint2float</title>
        <link>http://wiki.netmodule.com/sdk/castint2float?rev=1517586353&amp;do=diff</link>
        <description>Cast two integer into one float

Sometime there are 32Bit Float Values stored in 2 16bit Modbus Register. 

To work with those two register some byte jougling is needed:

We are assuming that in Register 0x0002 are the MSB and in 0x0001 are the LSB.
Therfore we need to shift the Register 2 16bit to the right  and perform an Bitwise-</description>
    </item>
    <item rdf:about="http://wiki.netmodule.com/sdk/config-revert?rev=1650977019&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2022-04-26T12:43:39+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>sdk:config-revert</title>
        <link>http://wiki.netmodule.com/sdk/config-revert?rev=1650977019&amp;do=diff</link>
        <description>This simple script will revert your config changes after the time has expired. (Default is 10 minutes)

	*  Run the script at Services -&gt; SDK -&gt; Testing
	*  Make your changes, please do not change SDK settings.

If you want to keep your config changes please stop the SDK script at Services</description>
    </item>
    <item rdf:about="http://wiki.netmodule.com/sdk/connection-statistics?rev=1628068820&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-08-04T09:20:20+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>sdk:connection-statistics</title>
        <link>http://wiki.netmodule.com/sdk/connection-statistics?rev=1628068820&amp;do=diff</link>
        <description>Connection Statistics



In many mobile use cases customers want to have additional information on network coverage, signal and connections quality, roaming and so on. 
This data can be generated using a SDK script such as logger.are. It queries cli status</description>
    </item>
    <item rdf:about="http://wiki.netmodule.com/sdk/custom-wegpage-for-digital-output-pulse?rev=1642431905&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2022-01-17T15:05:05+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>sdk:custom-wegpage-for-digital-output-pulse</title>
        <link>http://wiki.netmodule.com/sdk/custom-wegpage-for-digital-output-pulse?rev=1642431905&amp;do=diff</link>
        <description>Webpage Digital Output Pulse

This Skript will offer an additional webpage on the Web Manager HOME Page. 
You can trigger a Pulsesignal on the two Digital Outputs with a specific Length

This Way you can trigger a external Reset Signal for a device, e.g. a PC or a Measurment Device.</description>
    </item>
    <item rdf:about="http://wiki.netmodule.com/sdk/customized-web-gui-extension-display-and-change-custom-config-paramters?rev=1643212293&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2022-01-26T15:51:33+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>sdk:customized-web-gui-extension-display-and-change-custom-config-paramters</title>
        <link>http://wiki.netmodule.com/sdk/customized-web-gui-extension-display-and-change-custom-config-paramters?rev=1643212293&amp;do=diff</link>
        <description>WEB GUI Extension &amp; Custom Configuration Parameters

Customized GUI extensions to display and change custom config paramters.

Please use nb_userpage_register in stead of nb_page_register in case you want to show this page also to non-admin user


/* DESC: This script will generate a page which can be viewed in the Web Manager
 * Some custom config vars are displayed and can be changed
 * All custom.* in /etc/config/factory-config.cfg are free to use
 * Copyright (C) 2014 NetModule AG, Switzerla…</description>
    </item>
    <item rdf:about="http://wiki.netmodule.com/sdk/dio2modbustcp?rev=1516809181&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2018-01-24T15:53:01+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>sdk:dio2modbustcp</title>
        <link>http://wiki.netmodule.com/sdk/dio2modbustcp?rev=1516809181&amp;do=diff</link>
        <description>Access to the digital I/Os via Modbus TCP


/* DESC: This script can be used to access to the digital I/Os via Modbus TCP
 * Copyright (C) 2015 NetModule AG, Switzerland
 *
 *   Commands:   
 *     Read Coil Status (FC01)
 *     Read Input Status (FC02)
 *     Read Input Register (FC04)
 *     Force Single Coil (FC05)
 *     Write Multiple Coils (FC15)
 *        
 *   Mapping: 
 *     Coil status(digital I/O): 1=out1, 2=out2
 *     Input satus(digital In): 1=in1, 2=in2  
 *     Input register : …</description>
    </item>
    <item rdf:about="http://wiki.netmodule.com/sdk/download-to-usb?rev=1441376856&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2015-09-04T14:27:36+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>sdk:download-to-usb</title>
        <link>http://wiki.netmodule.com/sdk/download-to-usb?rev=1441376856&amp;do=diff</link>
        <description>Download a File and Store it to a USB Flash Drive

If you need to download a File and store it to a USB flash drive attached to a router you can use the script below.

You need to configure the download URL and the local File name at the beginning of the script</description>
    </item>
    <item rdf:about="http://wiki.netmodule.com/sdk/ftp2sms?rev=1628068820&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-08-04T09:20:20+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>sdk:ftp2sms</title>
        <link>http://wiki.netmodule.com/sdk/ftp2sms?rev=1628068820&amp;do=diff</link>
        <description>Forward File Content of Files on FTP Server via SMS


printf(&quot;This script does not speak here, see syslog instead&quot;);
nb_syslog('starting');
SITE = &quot;https://share.netmodule.com/router/test&quot;;

USR = &quot;anonymous&quot;;
PWD = &quot;anonymous&quot;;
FTPINTERVAL = 30;
MAXSERVERITEMS = 100;
MAXSENTITEMS = 200;
ALARMNUMBER = &quot;+4178949****&quot;;

// processed SMS
sentSMS = mkarray();

// main
while (1) {
    nb_syslog(&quot;checking %s for messages&quot;, SITE);
    nb_syslog(&quot;number of sent items is %s&quot;, length(sentSMS));
    if (le…</description>
    </item>
    <item rdf:about="http://wiki.netmodule.com/sdk/gps-tcp-server-gnsstogps?rev=1595342022&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-07-21T14:33:42+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>sdk:gps-tcp-server-gnsstogps</title>
        <link>http://wiki.netmodule.com/sdk/gps-tcp-server-gnsstogps?rev=1595342022&amp;do=diff</link>
        <description>Background

GPS was the first Global Navigation Satellite System (GNSS) and the term GPS is often used as a synonym for GNSS.

Older software often only checks for NMEA 0183 sentences starting with &quot;$GP&quot; (= GPS only) instead of looking for  all GNSS systems.</description>
    </item>
    <item rdf:about="http://wiki.netmodule.com/sdk/gps-udp-broadcast?rev=1507739657&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2017-10-11T16:34:17+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>sdk:gps-udp-broadcast</title>
        <link>http://wiki.netmodule.com/sdk/gps-udp-broadcast?rev=1507739657&amp;do=diff</link>
        <description>SDK Script gps-udp-broadcast.are


 /* DESC: This script sends the local GPS NMEA via UDP broadcast to multiple ports 
  * selected by NMEA type.
  * Copyright (C) 2017 NetModule AG, Switzerland
  */
BroadcastIP = &quot;192.168.1.255&quot;;

// Connect to GPS Deamon
int connect_gpsd() {
    nb_syslog(&quot;Connecting to GPS daemon.&quot;);
    sock = -1;
    while(true)
    {
        sock = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
        if (sock &lt; 0)
        {
            nb_syslog(&quot;Unable to open TCP socket. R…</description>
    </item>
    <item rdf:about="http://wiki.netmodule.com/sdk/gps-udp-client-gnsstogps?rev=1633688534&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-10-08T10:22:14+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>sdk:gps-udp-client-gnsstogps</title>
        <link>http://wiki.netmodule.com/sdk/gps-udp-client-gnsstogps?rev=1633688534&amp;do=diff</link>
        <description>Background

GPS was the first Global Navigation Satellite System (GNSS) and the term GPS is often used as a synonym for GNSS.

Older software often only checks for NMEA 0183 sentences starting with &quot;$GP&quot; (= GPS only) instead of looking for  all GNSS systems.</description>
    </item>
    <item rdf:about="http://wiki.netmodule.com/sdk/gps2serial-gnsstogps?rev=1616321029&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-03-21T10:03:49+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>sdk:gps2serial-gnsstogps</title>
        <link>http://wiki.netmodule.com/sdk/gps2serial-gnsstogps?rev=1616321029&amp;do=diff</link>
        <description>Background

GPS was the first Global Navigation Satellite System (GNSS) and the term GPS is often used as a synonym for GNSS.

Older software often only checks for NMEA 0183 sentences starting with &quot;$GP&quot; (= GPS only) instead of looking for  all GNSS systems.</description>
    </item>
    <item rdf:about="http://wiki.netmodule.com/sdk/gps2serial?rev=1585138871&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-03-25T12:21:11+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>sdk:gps2serial</title>
        <link>http://wiki.netmodule.com/sdk/gps2serial?rev=1585138871&amp;do=diff</link>
        <description>GPS NMEA Frames via Serial

The built-in GPS Function is TCP/IP only. If you want to retrieve the GPS NMEA frames over the serial interface of a Netmodule Router you can use this SDK script. 

Script Summary

This Script connects to the GPS server and forwards the data to the first serial interface.
GPS must be enabled and in RAW mode.
The default serial parameters for GPS are 4800 8N1 (8 databit, no parity, 1 stop bit, no flow controll). This parameter can be configured at the begining of the s…</description>
    </item>
    <item rdf:about="http://wiki.netmodule.com/sdk/hex2serial?rev=1511453801&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2017-11-23T16:16:41+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>sdk:hex2serial</title>
        <link>http://wiki.netmodule.com/sdk/hex2serial?rev=1511453801&amp;do=diff</link>
        <description>Hex Values over Serial

This Script can be used to send non ascii strings over the serial interface. This is ussually made to talk to external devices for managment or configuration. 

The Big diffrence is to define the non ascii String as follows


get_status=&quot;\xBF\xEF\x12\x00\x21&quot;;
set_power_mode=&quot;\xBF\xBC\x23\x00\x3F&quot;;</description>
    </item>
    <item rdf:about="http://wiki.netmodule.com/sdk/httpget?rev=1435846544&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2015-07-02T14:15:44+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>sdk:httpget</title>
        <link>http://wiki.netmodule.com/sdk/httpget?rev=1435846544&amp;do=diff</link>
        <description>Web services

To get from or post data to a web server you can easily use standard sockets.


if ((s = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP)) &lt; 0) exit(1);
if (connect(s, &quot;checkip.dyndns.com&quot;, 80) &lt; 0) exit(2);
if (send(s, &quot;GET / HTTP/1.0\r\n\r\n&quot;) == -1) exit(3);
if ((r = recv(s)) == NULL) exit(4);
printf(&quot;%s\n&quot;, r);
if (!strstr(r, &quot;HTTP/1.1 200 OK&quot;)) {
   i = substr(r, strstr(r, &quot;IP Address: &quot;) + 12, strlen(r));
   printf(&quot;IP Address: %s\n&quot;, left(i, strstr(i, &quot;&lt;/body&gt;&quot;)));
}
close(s);
exit…</description>
    </item>
    <item rdf:about="http://wiki.netmodule.com/sdk/ibis-example?rev=1679649265&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2023-03-24T09:14:25+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>sdk:ibis-example</title>
        <link>http://wiki.netmodule.com/sdk/ibis-example?rev=1679649265&amp;do=diff</link>
        <description>/* desc: This script will listen on the serial (IBIS) interface and parse for defined Fields.
    *  All Data will be saved in custom Config Fields
    *  copyright (c) 2017 netmodule ag, switzerland
    *  Version : 30.03.2022
*/


DEV = &quot;SERIAL2&quot;;
READ_TIMEOUT = 5; /* seconds */

LINE_NUMBER_RE = pcre_compile(&quot;^l([0-9]{3,3})$&quot;, 0);
TAGET_NUMBER_RE = pcre_compile(&quot;^z([0-9]{3,3})$&quot;, 0);

DEBUG=false;
 //true or false

template ibis_struct {
    line_number = &quot;&quot;;
    taget_nummer = &quot;&quot;;
}

ibis_da…</description>
    </item>
    <item rdf:about="http://wiki.netmodule.com/sdk/ibis2ascii?rev=1493215727&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2017-04-26T14:08:47+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>sdk:ibis2ascii</title>
        <link>http://wiki.netmodule.com/sdk/ibis2ascii?rev=1493215727&amp;do=diff</link>
        <description>// ä durch {
// ö durch |
// ü durch }
// ß durch ~
// Ä durch [
// Ö durch \ (Backslash)
// Ü durch ]



string ibis2ascii(string ibis) {

arr=explode(ibis);

for (i=0;i&lt;length(arr);i++) {

    
	
	switch(ord(arr[i])) {
    
	case 123:  // {
		arr[i]=&quot;ä&quot;;
		break;
	case 124:  // | 
		arr[i]=&quot;ö&quot;;
		break;
	case 125: // }
  		arr[i]=&quot;ü&quot;;
		break;
	case 126:   // ~
		arr[i]=&quot;ß&quot;;
		break;
	case 91:  // [
		arr[i]=&quot;Ä&quot;;
		break;
	case 92:   // \
		arr[i]=&quot;Ö&quot;;
		break;
	case 93:   //  ]
		arr[i]=&quot;Ü&quot;;
…</description>
    </item>
    <item rdf:about="http://wiki.netmodule.com/sdk/log-to-syslog?rev=1475681765&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2016-10-05T15:36:05+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>sdk:log-to-syslog</title>
        <link>http://wiki.netmodule.com/sdk/log-to-syslog?rev=1475681765&amp;do=diff</link>
        <description>Log Status Values to the Systemlog

For various purposes you can use the status data from our system and log it directly into the system log. 
This Way you don't have to worry about file transwers and file rotating as this is all done by  the system log deamon. 
The log data can be downloaded easily via the techsupport function.</description>
    </item>
    <item rdf:about="http://wiki.netmodule.com/sdk/monitor-system-load?rev=1473769278&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2016-09-13T12:21:18+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>sdk:monitor-system-load</title>
        <link>http://wiki.netmodule.com/sdk/monitor-system-load?rev=1473769278&amp;do=diff</link>
        <description>Monitor system load

using the SDK. Please start this script after boot.


/* DESC: This script monitors the system load
 * and makes warning entries in the log file
 *
 * Copyright 2016 NetModule AG, Switzerland (rfa)
 * http://wiki.netmodule.com/sdk/monitor-system-load
 */
CPUCORES=1;
// 1 for NB1600, 2700, 2710, 3700, 3710
// 2 for NB2800, NB3701, NB3711, NB3800

for(;;) {
  s = sysinfo();
  if (s.loads[0] &gt; 1.0 * CPUCORES)
    nb_syslog(&quot;Warning: system load last minute above %3.2f percent&quot;,…</description>
    </item>
    <item rdf:about="http://wiki.netmodule.com/sdk/mqtt_advanced_status?rev=1536677444&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2018-09-11T14:50:44+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>sdk:mqtt_advanced_status</title>
        <link>http://wiki.netmodule.com/sdk/mqtt_advanced_status?rev=1536677444&amp;do=diff</link>
        <description>Send Router Status Informations to an MQTT Broker - Advanced Version

Please use the Image 4.1.2.1 to have the mqtt function in our SDK. 

Script Summary

This script is an advanced version of the simple mqtt status script. It offers a lot more flexibilities because of the template changing topics, publishing messages and setting up mqtt connections as well as router status queries can be easily done through already provided functions. This can be applied to different use cases.</description>
    </item>
    <item rdf:about="http://wiki.netmodule.com/sdk/mqtt_dio?rev=1591696115&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-06-09T09:48:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>sdk:mqtt_dio</title>
        <link>http://wiki.netmodule.com/sdk/mqtt_dio?rev=1591696115&amp;do=diff</link>
        <description>Publish changed in the State of the Digital IN or OUT to a MQTT Broker.

Please us it with the rigger “sdk-startup”



/* desc: this script will publish router canges of the Digital in or Out 
 * to a mqtt Broker.
 * 
 * for details about status infos check api documentation about nb_status();
 * copyright (c) 2020 netmodule ag, switzerlan
 */
 
host = &quot;mz.mqttbroker.io&quot;; 
port = 1883;
username = &quot;test&quot;;
password = &quot;test&quot;;
topic = &quot;switch/location/&quot;;
/* 	qos values */
/*	0 = publish at most one …</description>
    </item>
    <item rdf:about="http://wiki.netmodule.com/sdk/mqtt_simple_status?rev=1535616839&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2018-08-30T08:13:59+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>sdk:mqtt_simple_status</title>
        <link>http://wiki.netmodule.com/sdk/mqtt_simple_status?rev=1535616839&amp;do=diff</link>
        <description>Send Router Status Informations to an MQTT Broker

Please use the Image 4.1.2.1 to have the mqtt function in our SDK. 

Script Summary

This script reads some defined values from the router via the nb_status() function. For a demo purpose the routers temperature, the service type and signal level from the modem as well as gps longitude and latitude get queried. Then nb_mqtt_publish() is used to publish the message to a given topic on the specified mqtt broker (see variables at the beginning of t…</description>
    </item>
    <item rdf:about="http://wiki.netmodule.com/sdk/mqttlib-example?rev=1753366010&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-07-24T14:06:50+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>sdk:mqttlib-example</title>
        <link>http://wiki.netmodule.com/sdk/mqttlib-example?rev=1753366010&amp;do=diff</link>
        <description>/* mqtt v311 connack codes */
CONNACK_ACCEPTED = 0;
CONNACK_REFUSED_PROTOCOL_VERSION = 1;
CONNACK_REFUSED_IDENTIFIER_REJECTED = 2;
CONNACK_REFUSED_SERVER_UNAVAILABLE = 3;
CONNACK_REFUSED_BAD_USERNAME_PASSWORD = 4;
CONNACK_REFUSED_NOT_AUTHORIZED = 5;

/* mqtt v5 return codes */
MQTT_RC_SUCCESS = 0;      /* CONNACK, PUBACK, PUBREC, PUBREL, PUBCOMP, UNSUBACK, AUTH */
MQTT_RC_NORMAL_DISCONNECTION = 0;   /* DISCONNECT */
MQTT_RC_GRANTED_QOS0 = 0;     /* SUBACK */
MQTT_RC_GRANTED_QOS1 = 1;     /* SUBA…</description>
    </item>
    <item rdf:about="http://wiki.netmodule.com/sdk/readinputregister-modbustcp-tempalam?rev=1643383807&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2022-01-28T15:30:07+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>sdk:readinputregister-modbustcp-tempalam</title>
        <link>http://wiki.netmodule.com/sdk/readinputregister-modbustcp-tempalam?rev=1643383807&amp;do=diff</link>
        <description>Read a Modbus TCP Slave Sensor and send an alarm email

This SDK Script will read out a Integer Register at Modbus TCP Slave Temperatur Sensor. 
If the Temperatur is above a define threshold we will send out a alarm email.

Device Setup

	*  NetModule NB1600 Industrial Router
	*  Papuch TH2E Ethernet thermometer and hygrometer

The thermometer is connected to the NB1600 via Ethernet.</description>
    </item>
    <item rdf:about="http://wiki.netmodule.com/sdk/reference?rev=1728890907&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-10-14T07:28:27+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>sdk:reference</title>
        <link>http://wiki.netmodule.com/sdk/reference?rev=1728890907&amp;do=diff</link>
        <description>This site contains an overview on the Reference Manual of our SDK API. 

The  Arena manual is the reference manual on the syntax and standard funcitons of the scripting language

The API Manual will describe the Netmodule productspecific functions.

As the the function can be very by Softversion you will find the newest Version of each Softwarebranch here:</description>
    </item>
    <item rdf:about="http://wiki.netmodule.com/sdk/remote-configdownload?rev=1510841952&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2017-11-16T14:19:12+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>sdk:remote-configdownload</title>
        <link>http://wiki.netmodule.com/sdk/remote-configdownload?rev=1510841952&amp;do=diff</link>
        <description>Download a Remote Config File and Delete it afterwards

A very simple Method to roll out configfiles on a bunch of Router: 

The Router will try to download a config file from a ftp server with a unique part in the URL. 
After the File was downloaded successfully it will be deleted on the remote ftp server.</description>
    </item>
    <item rdf:about="http://wiki.netmodule.com/sdk/sdk?rev=1764596680&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-12-01T13:44:40+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>sdk:sdk</title>
        <link>http://wiki.netmodule.com/sdk/sdk?rev=1764596680&amp;do=diff</link>
        <description>SDK

NetModule routers are shipping with a Software Development Kit (SDK) which offers a simple and fast way to implement customer-specific functions and applications. It consists of:

	*  An SDK host which defines the runtime environment (a so-called sandbox), that is, controlling access to system resources (such as memory, storage and CPU) and, by doing so, catering for the right scalability.</description>
    </item>
    <item rdf:about="http://wiki.netmodule.com/sdk/serial-point-to-multipoint?rev=1430916540&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2015-05-06T12:49:00+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>sdk:serial-point-to-multipoint</title>
        <link>http://wiki.netmodule.com/sdk/serial-point-to-multipoint?rev=1430916540&amp;do=diff</link>
        <description>Serial Point to Multipoint

This script reads messages coming from the local serial port and forwards them via TCP to a all remote host (and vice versa).
The local port can be the physical RS-232 (SERIAL1) or a virtual one using a USB adapter (SERIAL2).</description>
    </item>
    <item rdf:about="http://wiki.netmodule.com/sdk/serialdatalogger?rev=1498051094&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2017-06-21T13:18:14+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>sdk:serialdatalogger</title>
        <link>http://wiki.netmodule.com/sdk/serialdatalogger?rev=1498051094&amp;do=diff</link>
        <description>Serial Datalogger

This Script can be used to a read  from the serial interface and store the data in a file. 
It will create new files periodicly with a timestamp in the file name to have smaller files to handle. 
You can combine this with the uploader.are script from the</description>
    </item>
    <item rdf:about="http://wiki.netmodule.com/sdk/set-default-route-based-on-current-ssid?rev=1417019200&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2014-11-26T16:26:40+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>sdk:set-default-route-based-on-current-ssid</title>
        <link>http://wiki.netmodule.com/sdk/set-default-route-based-on-current-ssid?rev=1417019200&amp;do=diff</link>
        <description>Set fake default route dynamically based on SSID

This script checks every 5 seconds which interface should be used as default gateway. As the default gateway is managed by the link-manager, a fake default gateway is configured by this script. 

Conditions could be any, here it depend on which WLAN SSID the router is connected.</description>
    </item>
    <item rdf:about="http://wiki.netmodule.com/sdk/sleep-mode?rev=1626776906&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-07-20T10:28:26+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>sdk:sleep-mode</title>
        <link>http://wiki.netmodule.com/sdk/sleep-mode?rev=1626776906&amp;do=diff</link>
        <description>Using the Sleep Mode of the NB1601 and NB800

For optimizing the power consumption you can put the NB1601 / NB800 into a deep sleep state over our SDK API. 

In the Deep Sleep State the CPU is basicly not running. The only component still running is our Power Managment Chip and will consum a very low current (&lt;1mA). Please keep in mind you still need to have power supply attached to the router in the deep sleep State.</description>
    </item>
    <item rdf:about="http://wiki.netmodule.com/sdk/softwareupdate-on-change?rev=1596183919&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-07-31T08:25:19+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>sdk:softwareupdate-on-change</title>
        <link>http://wiki.netmodule.com/sdk/softwareupdate-on-change?rev=1596183919&amp;do=diff</link>
        <description>/* DESC: This downloads a Textfile that contains a version number and compares is with the installed software version. 
 * DESC: If the Version if diffrent a software update will be started.
 * Copyright (C) 2017 JJ NetModule AG, Switzerland
 */
 


updateversionurl=&quot;http://share.netmodule.com/public/system-software/latest/NB2710.version&quot;;
updateimageurl=&quot;http://share.netmodule.com/public/system-software/latest/NB2700_Software_Release.img&quot;;



versionfile=&quot;swversion.text&quot;;
currentversion=nb_stat…</description>
    </item>
    <item rdf:about="http://wiki.netmodule.com/sdk/status-to-syslog?rev=1614698361&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-03-02T15:19:21+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>sdk:status-to-syslog</title>
        <link>http://wiki.netmodule.com/sdk/status-to-syslog?rev=1614698361&amp;do=diff</link>
        <description>Log Statusdata to the internal syslog. 
Example with LTE Data for two links. 


/* DESC: A Script that can be used for a longtime logging of a NetModule Wireless Router. The Target is the syslog.
 * Copyright (C) 2013 NetModule AG, Switzerland
 */
INTERVAL = 15;



w1upsince=0;
w2upsince=0;

while (true) {

    w = nb_status(&quot;wan&quot;);
    ww = nb_status(&quot;wwan&quot;);
    st = nb_status(&quot;system&quot;);


if(w.WANLINK3_STATE==&quot;up&quot; &amp;&amp; w1upsince == 0) {
w1upsince=uptime();
} 


if (w.WANLINK4_STATE==&quot;up&quot; &amp;&amp; w2u…</description>
    </item>
    <item rdf:about="http://wiki.netmodule.com/sdk/status-values-via-snmp?rev=1595320278&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-07-21T08:31:18+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>sdk:status-values-via-snmp</title>
        <link>http://wiki.netmodule.com/sdk/status-values-via-snmp?rev=1595320278&amp;do=diff</link>
        <description>Get status values via SNMP

using the SDK. Please do not forget to enable SNMP v3.


Sample script

can be run in the SDK test window.

/* DESC: This script extends MIB entries of the SNMP agent 
 * with values from nb_status
 * Copyright (coffee) 2014 NetModule AG, Switzerland
 */

if (nb_snmp_register(&quot;TEMPERATURE&quot;, 1, &quot;s&quot;, &quot;ro&quot;) == -1)
   exit(1);
if (nb_snmp_register(&quot;RSRQ&quot;, 2, &quot;s&quot;, &quot;ro&quot;) == -1)
   exit(2);

if (nb_snmp_link() == -1)
   exit(3);

while (1) {
   status = nb_status(&quot;wwan&quot;);
  …</description>
    </item>
    <item rdf:about="http://wiki.netmodule.com/sdk/status2udp?rev=1430916345&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2015-05-06T12:45:45+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>sdk:status2udp</title>
        <link>http://wiki.netmodule.com/sdk/status2udp?rev=1430916345&amp;do=diff</link>
        <description>Send status values to a remote UDP server

For testing copy this file into the testing window (SERVICES-&gt;SDK-&gt;Testing) 
and set the arguments &lt;server ip&gt; &lt;udp port&gt; &lt;frequency in sec&gt; e.g. 192.168.1.104 4000 10


/* DESC: This script sends status values to a remote UDP server.
 * Copyright (C) 2012 NetModule AG, Switzerland
 */

void usage() 
{
    printf(&quot;usage: status2udp.are &lt;server ip&gt; &lt;udp port&gt; &lt;frequency in sec&gt;\n&quot;);
    exit(1);
}

if (argc &lt; 4) {
    usage();
}

SERVER = argv[1];
PORT =…</description>
    </item>
    <item rdf:about="http://wiki.netmodule.com/sdk/tcp2sms?rev=1508777118&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2017-10-23T16:45:18+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>sdk:tcp2sms</title>
        <link>http://wiki.netmodule.com/sdk/tcp2sms?rev=1508777118&amp;do=diff</link>
        <description>/* DESC: This script send a SMS received by a TCP message &quot;&lt;number&gt;:&lt;text&gt;&quot;
 * Don't forget to configure and enable the SMS service first
 * The number format is international e.g. +4912345678
 *
 * Copyright (C) 2017 NetModule AG, Switzerland (rfa)
 */

PORT = 2000;

if ((s = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP)) &lt; 0) 
  exit(1);
if (bind(s, PORT, &quot;&quot;) == -1)
  exit(2);
if (listen(s, 1) == -1) 
  exit(3);

while (true) {
  if (c = accept(s)) {
    while (true) {
      if ((r = select(c, 10)…</description>
    </item>
    <item rdf:about="http://wiki.netmodule.com/sdk/techsupport-local-backup?rev=1715175158&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-05-08T13:32:38+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>sdk:techsupport-local-backup</title>
        <link>http://wiki.netmodule.com/sdk/techsupport-local-backup?rev=1715175158&amp;do=diff</link>
        <description>Use this Techsupport with a periodicle trigger to your need. 
This will create a zip file in the sdk flash space. with a timestampe in the filename. 
You can download the file via scp.



now = localtime(time());
timestamp = strftime(&quot;%Y%m%d%H%M%S&quot;, now);
printf(&quot;%s&quot;,timestamp);
file_copy(&quot;/host/various/techsupport&quot;,sprintf(&quot;ts_%s.zip&quot;,timestamp));</description>
    </item>
    <item rdf:about="http://wiki.netmodule.com/sdk/telnet-run-a-command-using-telnet?rev=1430916622&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2015-05-06T12:50:22+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>sdk:telnet-run-a-command-using-telnet</title>
        <link>http://wiki.netmodule.com/sdk/telnet-run-a-command-using-telnet?rev=1430916622&amp;do=diff</link>
        <description>Run a command using Telnet



/* DESC: This script runs a shell command using telnet.
 *       Only the first response line is returned.
 *       Don't forget to enable the telnet server
 *       For special chars in command string use escape: apostrophe = &quot;\x27&quot;
 * Copyright (C) 2014 NetModule AG, Switzerland, rfa
 */

string telnet(ip, port, user, password, cmd)
{
  if ((sock = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP)) &lt; 0) return NULL;
  if (connect(sock, ip, port) &lt; 0) return NULL;
  try {
…</description>
    </item>
    <item rdf:about="http://wiki.netmodule.com/sdk/testing-the-sms-send-script?rev=1637604823&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-11-22T18:13:43+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>sdk:testing-the-sms-send-script</title>
        <link>http://wiki.netmodule.com/sdk/testing-the-sms-send-script?rev=1637604823&amp;do=diff</link>
        <description>How to test the SMS send script:

1. Enable the SDK



2. Add a SCRIPT



3. Select the SMS send script



4. Add a TRIGGER



5. Define the trigger



6. Add a JOB (= SCRIPT + TRIGGER)



7. Define the job



8. Fire the test trigger



9. Check result (Exit Code 0 = no error)</description>
    </item>
    <item rdf:about="http://wiki.netmodule.com/sdk/voicetodigitalout?rev=1724322640&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-08-22T10:30:40+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>sdk:voicetodigitalout</title>
        <link>http://wiki.netmodule.com/sdk/voicetodigitalout?rev=1724322640&amp;do=diff</link>
        <description>SDK-Script for testing



/* DESC: This script can be used to switch a digital out port by phone calls
*
* Voice License needed, prepatation:
* 
* SERVICES-&gt;Voice Gateway-&gt;Administration: Administrative status = enabled
* SERVICES-&gt;Voice Gateway-&gt;Administration: Call routing = SDK
* SERVICES-&gt;Voice Gateway-&gt;Endpoints: Add voice endpoint Voice-over-Mobile / Modem 1
*
* SERVICES-&gt;SDK-&gt;Administration: Administrative status = enabled
* SERVICES-&gt;SDK-&gt;Testing: &lt;copy this script into the textbox and r…</description>
    </item>
    <item rdf:about="http://wiki.netmodule.com/sdk/vpn-supervision?rev=1548943108&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2019-01-31T13:58:28+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>sdk:vpn-supervision</title>
        <link>http://wiki.netmodule.com/sdk/vpn-supervision?rev=1548943108&amp;do=diff</link>
        <description>Supervision of a VPN Tunnel

The built-in link supervision function of the NetModule Routers will not work with a host behind a VPN Tunnel. To have the avability to supervise a VPN Connection the ping_supervision_timeout.are SDK Script can be used.

Script Summary</description>
    </item>
    <item rdf:about="http://wiki.netmodule.com/sdk/webservices_get?rev=1693987005&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2023-09-06T07:56:45+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>sdk:webservices_get</title>
        <link>http://wiki.netmodule.com/sdk/webservices_get?rev=1693987005&amp;do=diff</link>
        <description>/* DESC: This script will supervise a specified host.
 * Copyright (C) 2023 NetModule AG, Switzerland, rfa
 */

// int nb_transfer_get(string usr, string pwd, string url, string path)
// https://httpbin.org/get?par=val&amp;par...

usr = &quot;&quot;;
pwd = &quot;&quot;;
file = &quot;out.txt&quot;;

company = &quot;NetModule&quot;;
data = &quot;12.345&quot;;
url = sprintf(&quot;https://httpbin.org/get?company=%s&amp;data=%s&quot;, company, data);

ret = nb_transfer_get(usr , pwd , url, file);

printf(&quot;nb_transfer_get() returns: %s\n&quot;, ret == -1 ? &quot;ERROR&quot; : &quot;OK&quot;);…</description>
    </item>
    <item rdf:about="http://wiki.netmodule.com/sdk/webservices_post?rev=1693987066&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2023-09-06T07:57:46+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>sdk:webservices_post</title>
        <link>http://wiki.netmodule.com/sdk/webservices_post?rev=1693987066&amp;do=diff</link>
        <description>/* DESC: This script will supervise a specified host.
 * Copyright (C) 2023 NetModule AG, Switzerland, rfa
 */

// int nb_transfer_post(string usr, string pwd, string url, string path, string pp)
// https://httpbin.org/post?par=val&amp;par...

usr = &quot;&quot;;
pwd = &quot;&quot;;
pp=&quot;&quot;;
file = &quot;out.txt&quot;;

company = &quot;NetModule&quot;;
data = &quot;12.345&quot;;
url = sprintf(&quot;https://httpbin.org/post?company=%s&amp;data=%s&quot;, company, data);

ret = nb_transfer_post(usr , pwd , url, file, pp);

printf(&quot;nb_transfer_post() returns: %s\n&quot;, r…</description>
    </item>
    <item rdf:about="http://wiki.netmodule.com/sdk/webservices_send_postion?rev=1693989980&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2023-09-06T08:46:20+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>sdk:webservices_send_postion</title>
        <link>http://wiki.netmodule.com/sdk/webservices_send_postion?rev=1693989980&amp;do=diff</link>
        <description>/* DESC: This script will supervise a specified host.
 * Copyright (C) 2023 NetModule AG, Switzerland, rfa
 */

// int nb_transfer_get ( string usr, string pwd, string url, string path)

usr = &quot;&quot;;
pwd = &quot;&quot;;
file = &quot;out.txt&quot;;

gps_long = nb_status(&quot;gnss&quot;).GNSS1_LONGITUDE;
gps_lat = nb_status(&quot;gnss&quot;).GNSS1_LATITUDE;
url = sprintf(&quot;https://httpbin.org/get?longitude=%s&amp;latitude=%s&quot;, gps_long, gps_lat);

ret = nb_transfer_get (usr , pwd , url, file);

printf(&quot;nb_transfer_get() returns: %s\n&quot;, ret == …</description>
    </item>
    <item rdf:about="http://wiki.netmodule.com/sdk/wifimodechanger?rev=1523284770&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2018-04-09T14:39:30+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>sdk:wifimodechanger</title>
        <link>http://wiki.netmodule.com/sdk/wifimodechanger?rev=1523284770&amp;do=diff</link>
        <description>### Change Wifi mode if AP is available


## Variable that hold the configs for both WLAN Modes
ClientConfig=&quot;&quot;;
ApConfig=&quot;&quot;;
nextWlanMode=&quot;access-point&quot;; // defines if we change to Client Mode or AP Mode


IFC = &quot;WLAN1&quot;;
homeNetwork = &quot;NMFFM&quot;;
MIN_SIGNAL = -110;


ApConfig=sprintf(&quot;%s %s&quot;,ApConfig,&quot;wlan.0.status=1&quot;);
ApConfig=sprintf(&quot;%s %s&quot;,ApConfig,&quot;wlan.0.mode=access-point&quot;);
ApConfig=sprintf(&quot;%s %s&quot;,ApConfig,&quot;wlan.0.regdom=DE&quot;);
ApConfig=sprintf(&quot;%s %s&quot;,ApConfig,&quot;wlan.0.settings.channel=1&quot;)…</description>
    </item>
    <item rdf:about="http://wiki.netmodule.com/sdk/wifiprobingclients?rev=1590133957&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-05-22T07:52:37+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>sdk:wifiprobingclients</title>
        <link>http://wiki.netmodule.com/sdk/wifiprobingclients?rev=1590133957&amp;do=diff</link>
        <description>/* DESC: This script shows WiFi probing clients and works with 2 WiFi cards.
 * Copyright (C) 2020 NetModule AG, Switzerland
 */


while (1) {
	sleep(3);
	for (card = 1; card &lt;= 2; card++) {
		IFC=sprintf(&quot;WLAN%d&quot;, card);
		tracks = nb_wlan_tracking(IFC);

		count = sprintf(&quot;%s_STATION_COUNT&quot;, IFC);
		nr_tracks = struct_get(tracks, count);
 
		if (is_void(nr_tracks) || nr_tracks &lt; 1) {
   			nb_syslog(&quot;no tracks found on %s&quot;, IFC);
   			continue;
		}

		nb_syslog(&quot;%s: stations tracked (%d)&quot;, IF…</description>
    </item>
    <item rdf:about="http://wiki.netmodule.com/sdk/wwan_switcher?rev=1534238353&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2018-08-14T09:19:13+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>sdk:wwan_switcher</title>
        <link>http://wiki.netmodule.com/sdk/wwan_switcher?rev=1534238353&amp;do=diff</link>
        <description>Change WWAN Hotlink according to the Service Type

The following script can be used to check the service type (LTE, UMTS and so on) of several wwan connections and automatically use the best service type as hotlink. This however does not take signal strength and other factors into account. The script currently only runs once when triggered. If you would like to change that please incorporate a loop on the bottom of the script, but  use some longer sleep periods, to prevent unwanted changing of y…</description>
    </item>
</rdf:RDF>
