Setup a communication channel between a Tap and IoTize Studio
Your PC and Tap can communicate with each other with varying levels of complexity. All methods are shown below:
Update firmware
It is good practise to first apply any firmware updates.
1. Direct BLE communication
An easy way to work with Taps is to use BLE, for which you need a BLE enabled PC and Windows 10 OS (version 10586 or higher). If your PC does not support Bluetooth, simply purchase a USB Bluetooth Adapter Dongle (note: some dongles are incompatible with Windows 10 BLE peripheral manager).
2. Direct UART communication
-
Configure IoTize Studio: Set IOTZ Explorer | Studio | Connection to Tap | Protocol to 'UART'.
-
Connect Taps via UART using pins P1B7 (TxUART) and P1B8 (RxUART). See Host technologies: UART for details.
3. Direct Socket communication (Access Point/Network)
You can use direct Socket communication to connect IoTize Studio directly to your Tap either via the local WiFi network or an Access Point (default method).
-
Connect the Primer Kit to the PC with a USB cable (to power the Tap) and check that these settings are correct:
-
Set IOTZ Explorer | Studio | Connection to Tap | Protocol to 'Socket', and check Socket host name\IP is correct (default is 192.168.4.1 as long as you are in Access Point mode).
- Set IoTized Application | Incoming communication (Wireless) | WiFi | Enable WiFi to Yes.
-
Set WiFi mode to 'P2P(Access Point)' to use the Taps WiFi, or 'Network (station)' to use another WiFi network.
-
Connect to the Sensor demo (you need both the Tap and Studio connected to the same network):
-
Connect your PC to the right network. In Access Point mode, you have to be connected directly to the Tap by WiFi. Click on the Internet access icon on your PC.
- Select the network offered by your Tap (named 'Sensor demo_xxxxx' where xxxxx are the last digits of its Serial Number) and connect to it using the default security key ABCD1234. See How to change password if you have problems connecting.
- In IoTize Studio, go to IOTZ Explorer | Studio | Connection to Tap. Select 'Socket' as Connection Protocol and enter 192.168.4.1 as Socket hostname/Ip.
-
If you are already in station mode and you have a common access to the network, you just have to enter the IP address of your Tap. To find it, use Tap Manager, connect using either NFC or BLE, and read the IP address it in the WiFi section of the 'Info' page.
-
Click first on Test connection button to check that the communication works, then click on the Monitor button in Studio to start running the Sensor demo on the Primer.
Why use a Socket / MQTT relay between your Tap and IoTize Studio
If you have an 'NFC-only' Tap, or your PC does not have Windows 10 (or can't use BLE), you must setup a relay. This relay connects your smartphone to the Tap via BLE or NFC, and to your PC via your IP network/cloud, and allows you to:
- Apply the configuration from IoTize Studio to the Tap (through the mobile as relay).
- Test your monitoring HTML pages from IoTize Studio.
There are 2 relay modes:
Socket relay
- This is the simplest mode to implement
- It offers the highest data transfer rate
- It is recommended by default
- It requires that your mobile device and your PC have access to a common IP network, for example through:
- A company WiFi network
- The WiFi hotspot of your mobile device
MQTT relay
- This mode is based on an MQTT broker
- An implementation is provided by IoTize for TapNLink Primers (and more generally for Taps which have been provisioned in IoTize cloud platforms)
- For standard Taps you have to implement your own broker (contact us)
- It can work in ALL network configurations
- It is not yet available from an iOS device
4. Socket relay
- Start a socket relay using Tap Manager either on an Android device or an iOS device.
- Configure IoTize Studio to use the same IP as your socket relay.
- You can now use the relay to configure your Tap and to test your monitoring app from IoTize Studio:
- Tap Manager (Monitoring menu) shows the number of packets which have been exchanged.
- In Studio, click on Monitor, and see the Webapp view.
5. MQTT relay
Both the PC and the mobile device must access the MQTT broker through an internet access. See How to use an MQTT broker for details. Note:
- a MQTT relay will be much slower than a Socket relay.
- You can also use MQTT to communicate directly between the Tap and Studio if your TAP has an internet access (WiFi model only).