Skip to main content
Home
for DLMS smart meters
Open source solutions for DLMS smart metering

Main navigation

  • Home
  • Products
  • About us
  • Open Source
  • Community
  • Forum
  • Downloads
User account menu
  • Log in

Breadcrumb

  1. Home
  2. Auto Connect
gxdn
Profile picture for user Administrator
By Administrator , 23 January, 2018
Auto connect object is used to define how the meter will make a connection to the server.

This feature can be used with dynamic IP addresses when the meter IP address is unknown. The meter will establish the connection with a given interval to the reader service so the reader can read the meter when needed.

Properties

  • 1. Logical Name
    Logical name of the object.
  • 2. Mode
    Defines how device is making connection to the server.
  • 3. Repetitions
    How many times is try to connect to the server.
  • 4. Repetition delay
    How many seconds is waited before reconnect.
  • 5. Calling window
    Time window when device try to make connection to the server.
  • 6. Destination list
    Contains list of phone numbers, TCP/IP address, etc where connection is made.

Actions

There are no actions available for this object type.

  • Initialize
  • CallingWindow
  • Destinations
gxByteBuffer *str;
gxtime *start, *end;
const unsigned char ln[6] = { 0,0,2,1,0,255 };
cosem_init2((gxObject*)&autoConnect, DLMS_OBJECT_TYPE_AUTO_CONNECT, ln);
autoConnect.mode = DLMS_AUTO_CONNECT_MODE_AUTO_DIALLING_ALLOWED_ANYTIME;
autoConnect.repetitions = 10;
autoConnect.repetitionDelay = 60;
//Calling is allowed between 1am to 6am.
start = (gxtime*)malloc(sizeof(gxtime));
time_init3(start, -1, -1, -1, 1, 0, 0, -1);
end = (gxtime*)malloc(sizeof(gxtime));
time_init3(end, -1, -1, -1, 6, 0, 0, -1);
arr_push(&autoConnect.callingWindow, key_init(start, end));
//Add destination.
str = (gxByteBuffer*)malloc(sizeof(gxByteBuffer));
bb_init(str);
bb_addString(str, "www.gurux.org");
arr_push(&autoConnect.destinations, str);
//How to loop through all calling window items.
gxKey* k;
int pos, ret;
for (pos = 0; pos != object->callingWindow.size; ++pos)
{
    if (pos != 0)
    {
        bb_addString(&ba, ", ");
    }
    ret = arr_getByIndex(&object->callingWindow, pos, (void**)&k);
    if (ret != 0)
    {
        return ret;
    }
    time_print("From: %s", (gxtime*)k->key);
    time_print(" to:%s\r\n",  (gxtime*)k->value);
}
//How to loop through all destinations.
int pos, ret;
gxByteBuffer *dest;
for (pos = 0; pos != object->destinations.size; ++pos)
{
    ret = arr_getByIndex(&object->destinations, pos, (void**)&dest);
    if (ret != 0)
    {
        return ret;
    }
}

Book traversal links for Auto Connect

  • ‹ Association Logical Name
  • Up
  • Auto answer ›
  • Log in or register to post comments
  • Create new account
  • Reset your password

Book navigation

  • Activity calendar
  • Association Logical Name
  • Auto Connect
  • Auto answer
  • Clock
  • Compact data
  • Data
  • Demand register
  • Disconnect control
  • Extended register
  • GPRS modem setup
  • GSM diagnostic
  • IEC HDLC setup
  • IEC local port setup
  • IPv4 setup
  • IPv6 setup
  • Image transfer
  • Limiter
  • M-Bus Client
  • M-Bus master port setup
  • M-Bus slave port setup
  • MAC address setup
  • Modem configuration
  • PPP setup
  • Profile generic
  • Push Setup
  • Register
  • Register Monitor
  • Register activation
  • Register table
  • SAP assignment
  • Script table
  • Security setup
  • Single action schedule
  • Special days table
  • Status mapping
  • Tcp Udp Setup
  • Utility tables
  • Manufacturer custom objects

Hire Us!

Latest Releases

  • Tue, 06/09/2026 - 11:16
    gurux.dlms.java 4.0.95
  • Tue, 06/09/2026 - 10:03
    Gurux.DLMS.Python 1.0.199
  • Mon, 06/08/2026 - 13:39
    gurux.dlms.cpp 9.0.2606.0801
  • Mon, 06/01/2026 - 10:15
    gurux.dlms.cpp 9.0.2606.0101
  • Thu, 05/28/2026 - 16:06
    gurux.dlms.java 4.0.94

New forum topics

  • Error reading L&G Meter
  • Pass a TCP Client to GXNet
  • Australian EDMI Mk10D (Essential Energy area)
  • Strange mix of data notificiation vs get response
  • DLMS Connection
More
RSS feed
Privacy FAQ GXDN Issues Contact
Follow Gurux on Twitter Follow Gurux on Linkedin