Index
1. Introduction
2. Controls
3. Bracket Encoding
1. Introduction
Any user that is used to using a terminal program should feel very comfortable with our Terminal page. For example, if you connect our service to a Linux serial port then you can access the device over the internet using the terminal page.
2. Controls
2.1 Terminal Screen
The black terminal screen will display the text received from another device. When it has focus and a key is pressed on the keyboard the character will be sent to your other devices. This should make it look and feel like any other terminal program. Under the terminal screen there are three controls:
Control | Description |
---|---|
View Help Page Button | When you click this button this help page will be displayed. |
Connected Control | This control will let you know whether you are connected to the Webifi service. When you are not connected then “Not connnected” will be displayed in red. That means you have to start the service with valid credentials. Once connected this control will change to displaying “Connected” in green. |
Clear Button | Click this button to clear the content of the Terminal screen and move the cursor to the top left corner. |
2.2 Connection and Data Options
On the left we have the connection controls. This is used for entering your credentials for establishing a connection to the Webifi server. The connect name, password and network names must be entered before clicking the start button. The network names this instance is part of can be set at any time by clicking the Set Network Names button. For more details about how our technology works please click the button below:
Read more
If the connection was successful the red box under the terminal screen will turn green saying “Connected”. If the Save connection details checkbox is checked then after successfully establishing a connection your details will be stored to your browser’s local storage. The next time you load this page your details will be loaded in the connection text boxes.
On the right we have send and receive data options. If you click on the terminal screen then every character you press will be sent, just like a normal terminal. The problem is that a lot of mobile devices don’t bring up a keyboard when a text box is not active. The Data to Send text box solves this problem. Enter the text you would like to send and click the Send Data button.
Next we have the Send data format controls:
Checkbox | Description |
---|---|
Add Carriage Return | When you click the Send Data button a carriage return character (13 decimal) will be appended to the data you entered in the text box before sending. |
Add Line Feed | When you click the Send Data button a line feed character (10 decimal) will be appended to the data you entered in the text box before sending. |
Bracket Encoded | The data entered in the Data to Send text box will be interpreted as Bracket Encoded data before sending. Please see the Bracket Encoding section later in this document for more details. |
The last control are for setting Receive data formatting options:
Control | Description |
---|---|
ANSI | The data will be interpreted as having colour and cursor control through a system of escape sequences. This is the default for Linux terminals. For more details please google ANSI VT100. |
Bracket Encoded | When this radio button is selected all the received data will be displayed as bracket encoded data. Please see the Bracket Encoding section later in this document for more details. |
Hex | When this option is selected all data will be displayed as hexadecimal numbers. |
Cursor Enabled | If this checkbox is ticked the cursor will flash on the terminal screen. |
2.3 Advanced Options
The Send to Session IDs text box allows the user to send the data to a specific device. If you need to send data to more than one session ID then they need to be comma delimited without any spaces. For example, if you would like to send data to session IDs 13 and 45 then you need to enter:
13,45
The Send to Networks text box allows you to send data to any of your networks. Each network name must be on a new line. If both the Send to Session IDs and Send to Networks text boxes are empty then the data will be sent to the default networks that you are listening to. These are the networks specified in the Network names text box explained earlier in this document.
The data type is an optional field which can be used by the receiving device for more information about the data. The “Send Discover Message” button will send a discovery message. Any device which is discoverable will respond with a Discovery response message. This is how you find the session IDs of your connected devices.
On the right, after you successfully connected to the Webifi server, the Session ID will be shown here. If another device wants to only send data to this page then it needs to use this session ID. The Request count will increment each time a new request is started (only used when WebSocket is disabled). This will happen when data is received or when the download times out and a new download request is started. The send count will increment each time a message is sent.
When the Discoverable checkbox is checked and this page receives a discovery request it will automatically send back a Discovery response. This will send your instance name and session ID back to the device that sent the discovery message. If the “Use WebSocket” check box is ticked this page will use WebSocket for communication, otherwise Long Polling will be used. The Instance name text box sets the name which will be seen by other devices when this page responds to a discovery request.
3. Bracket Encoding
Bracket encoding is a handy way to mix visible ASCII characters and non-visible characters. The encoding works as follows:
- Any visible character can be used except open square bracket
- If an open square bracket is needed then you need to enter two square brackets. For example, if you need to send [help], then you need to enter [[help] in the text box.
- Any non visible ASCII character is displayed or entered as the decimal value between square brackets.
For example, if you would like to send: Read sensor 1 to another device with a carriage return and a line feed you can enter the following:
Read sensor 1[13][10]