.. _headlabel-refx-cmd-bss: BSS (Backend Server Settings) ============================= The `AT@BSS` command is used to configure the IP address (or domain name) and port of the backend server, transmission mode, connection mode, etc. .. code-block:: none Example: AT@BSS=gl601###,,,192.168.1.10,590,0,0,60,0,,,,012F$ +ACK:BSS,123456789012345,C031,10,0,,012F,20210407101530,1234$ AT@BSS?gl601###,,0C37$ +QRY:BSS,123456789012345,C031,10,0,1,1,,,192.168.1.10,590,0,0,60,0,,,,0C37,20210407101530,1234$ .. tabularcolumns:: |p{2.2em}|p{12.2em}|p{5.8em}|p{14em}|p{4.8em}| .. table:: :width: 100% :widths: auto +-------+----------------------------------+---------------+------------------------------------+-----------------+ | Parts | Fields | Length (Byte) | Range/Format | Default | +=======+==================================+===============+====================================+=================+ | Head | Header | 3 | AT@ | AT@ | + +----------------------------------+---------------+------------------------------------+-----------------+ | | Command Word | 3 | BSS | BSS | + +----------------------------------+---------------+------------------------------------+-----------------+ | | Leading Symbol | 1 | = | = | + +----------------------------------+---------------+------------------------------------+-----------------+ | | Password | 8-16 | | gl601### | +-------+----------------------------------+---------------+------------------------------------+-----------------+ | Body | Reserved | 0 | | | + +----------------------------------+---------------+------------------------------------+-----------------+ | | Reserved | 0 | | | + +----------------------------------+---------------+------------------------------------+-----------------+ | | `IP Address/Domain Name` | <=128 | | | + +----------------------------------+---------------+------------------------------------+-----------------+ | | `Port` | <=11 | 1-65535 or 1-65535|1-65535 | 30059 | + +----------------------------------+---------------+------------------------------------+-----------------+ | | `Transmission Mode` | 1 | 0, 1 | 0 | + +----------------------------------+---------------+------------------------------------+-----------------+ | | `Connection Mode` | <=2 | 0, 1, 2, 10 | 0 | + +----------------------------------+---------------+------------------------------------+-----------------+ | | `Stay Time` | <=4 | 0-3600 (seconds) | 10 | + +----------------------------------+---------------+------------------------------------+-----------------+ | | `Connection Time` | <=14 | 0 or HHMM|HHMM|HHMM | 0 | + +----------------------------------+---------------+------------------------------------+-----------------+ | | Reserved | 0 | | | + +----------------------------------+---------------+------------------------------------+-----------------+ | | Reserved | 0 | | | + +----------------------------------+---------------+------------------------------------+-----------------+ | | Reserved | 0 | | | +-------+----------------------------------+---------------+------------------------------------+-----------------+ | Tail | Sequence Number | 4 | 0000-FFFF ('0'-'9', 'A'-'F') | | + +----------------------------------+---------------+------------------------------------+-----------------+ | | Tail | 1 | $ | $ | +-------+----------------------------------+---------------+------------------------------------+-----------------+ - `IP Address/Domain Name` The IPv4/IPv6 address or domain name of the backend server. - `Port` The port of the backend server and local port of terminal. The format of this field is `Server Port` or `Server Port|Local Port`. If the format of this field is 'Server Port', it means that the port number of backend server is 'Server Port' and the terminal will use the automatically assigned port number for data transmission and reception. If the format of this field is 'Server Port|Local Port', then 'Server Port' represents the port number of the backend server and 'Local Port' represents the port number of the terminal. The terminal will use the 'Local Port' as the local port for data transmission and reception. - `Transmission Mode` - **0** - TCP/IP. - **1** - UDP/IP. - `Connection Mode` Specify the network connection mode. - **0** - Automatic. The terminal autonomously decides whether to maintain a long connection with the backend server according to its current working status. For example, in this mode, the terminal will try to maintain a long-term connection with the backend server after detecting motion. Otherwise, it will only connect to the backend server when it needs to send data. - **1** - Online on demand. The terminal connects to the backend server only when it needs to send data; when all the data is successfully sent, the terminal will continue to keep the connection with the server for the time indicated by 'Stay Time', after which the device will cut off the connection; in addition, the terminal will also follow the time indicated by 'Connection Time', connect to the backend server regularly every day and keep at least the time indicated by 'Stay Time'. - **2** - Always online. The terminal always tries and keeps connected to the backend server. At this point, the values of 'Stay Time' and 'Connection Time' are invalid. - **10** - Offline mode. The terminal will never connect to the backend server until this mode is changed. This mode does not clear the reports that have been generated, but the device does not generate any new reports. - `Stay Time` The time to stay connected to the backend server. This field is only valid for 'Connection Mode': 0, 1. In order for the backend server to send commands to the terminal in time when necessary, the terminal will also keep at least the time indicated by 'Stay Time' connection with the backend server when there is no data transmission. - `Connection Time` The time to connect to the backend server every day. Up to 3 time points can be specified. This field is only valid for 'Connection Mode' 0, 1. In order for the backend server to send commands to the terminal in time when necessary, the terminal will connect to the server at the time HH:MM every day, and will remain connected for at least the time indicated by 'Stay Time'. For example, 'Connection Time' is 1015 and the 'Stay Time' is 180, indicating that the terminal is connected to the backend server at 10:15 local time each day and the connection between the terminal and the backend server shall be maintained for at least 3 minutes. For example, 'Connection Time' is 0200|1000|1800 and the 'Stay Time' is 180, indicating that the terminal is connected to the backend server at 02:00, 10:00 and 18:00 local time each day and the connection between the terminal and the backend server shall be maintained for at least 3 minutes. In particular, this field equals 0 meaning that the terminal does not periodically connect to the backend server every day.