Webifi.me

Test Page Help

 

Index

1. Introduction
2. Connection Controls
3. Send Data Controls
4. State Controls
5. Receive Data and Messages

1. Introduction

It is always tricky testing a communication interface when you don’t have anything to communicate with. The Test Page solves this problem by making it easy for a user to communicate with any implementation of our libraries or products.

All the controls on the page are broken down into four sections and described in detail. This page can also be used to see how the Webifi Javascript library is implemented. For example, when using Google Chrome, press F12 when you are on the Test Page. This will open the Development Tools.
Google Chrome Development Tools
At the top of the Development Tools menu, select Sources and in the left file menu select js -> webifiTestPage.js. This will display the Javascript source code for this page. This is handy for seeing how the Javascript library is used.

2. Connection Controls

The connection control is used for entering your credentials for establishing a connection to the Webifi server.
Test page connection control
The connection details and network names are configured in your account page after logging in on webifi.me. The Network names text box is used to enter all the default networks this page will be part of. For more details about how our technology works please click the button below:
Read more

Click the Start button to create a new connection. The messages textbox will show an error message or a connection established message. 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.

3. Send Data Controls

Test page send data controls
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 in the connection control explained earlier in this document.

The Send data text box will be the data field that is sent. The data type is an optional field which can be used by the receiving device for more information about the data. When the Add send count to string checkbox is checked then an incrementing count is added to the send data before it is sent. This makes it easy for the receiving device to see if any packets were skipped. The Send data button will send a packet containing all the information from the text boxes and the Discover 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.

4. State Controls

Test page state controls
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. The Instance name text box sets the name which will be seen by other devices when this page responds to a discovery request.

5. Receive Data and Messages

Test page receive data and messages controls
The Received data text box displays all the data that was received by this page. The Messages text box displays connection and error messages. When a discovery response is received the name and the session ID of the other device’s details are displayed in the Messages text box.