# A Novel SDWSN-Based Testbed for IoT Smart Applications
## 3 System Model
### WSN Physical Network Setup for Node Distribution on the Ground
#### 3.3.2 Small-Scale Physical Network  
This network implementation focuses on non-RPi and RPi network design. The design focuses on the LaunchPad modules, which transfer sensing data such as temperature, RSSI, humidity, accelerometer, and so on to a development board as part of a data collection effort and modifies the functionality of network entities in real time as part of the soft-warization process for the network of SensorTags and development boards only. As leaf nodes, Figure 17 displays two sets of modules that include two development boards and two SensorTags. One development board is also assigned the role of coordinator. The SensorTag CC1352R modules are programmed using OAD functionality via Bluetooth Low Energy (BLE) using a smartphone. The leaf nodes provided multiprotocol and dual-band communication over the TI 15.4 Stack and BLE protocols simultaneously. The TI 15.4 Stack is used for communication between leaf nodes and the coordinator, while BLE is used for communication between each module and the smartphone.  
The SimpleLink Starter app for iOS and Android offers significant support for the CC1352R LaunchPad modules, which are used for configurability in this paper. Hence, this app facilitates the OAD to modify the functionality of LaunchPad modules. This app connects the LaunchPad modules to a smartphone through Bluetooth Low Energy (BLE) and supports reading LaunchPad button states, controlling LEDs, and receiving real-time sensing data such as RSSI, temperature, humidity, and accelerometer. It also allows for MQTT cloud communication to the IBM Quicksstart server or any other cloud service. This enables a cloud view in which the LaunchPad module can be controlled from any web browser. Figure 18 displays the environment of the Starter application.  
Figure 17: The network configuration for two development boards as sensor nodes and two SensorTags as sensors.  
\begin{table}
\begin{tabular}{l r} \hline \hline Active mode TX current consumption & 24 mA \\ Active mode RX current consumption & 20 mA \\ Idle mode & 13 mA \\ Low power mode current consumption & 0.6 mA \\ Supply voltage range & 2-3.6 v \\ \hline \hline \end{tabular}
\end{table}
Table 3: Power parameters for Cooja mode based on [33].  
To program the LPSTK development board as a coordinator, debugging in CCS using the \"Collector\" program is required. \"Tera Term\" is used to display the real-time received values after receiving sensing values from various leaf nodes in a coordinator's terminal window using TI 15.4 Stack. The received data from multiple leaf nodes in the coordinator's console is shown in Figure 19. The RSSI and temperature readings regarding this experiment are displayed in the coordinator's console.  
Figure 20 depicts the physical network design with RPi using two SensorTags programmed as leaf nodes and one development board as a coordinator/router node. The  
Figure 19: Temperature and RSSI data received by the coordinator node.  
Figure 18: Over-the-air debugging (OAD) and sensing reading on the Starter app.  
development board is connected via USB cable to the RPi. A smartphone is also available to either reconfigure the SensorTags via OAD functionality or to monitor the real-time data of each SensorTag. BLE and TI 15.4 Stack communication protocols are utilized for smartphone-SensorTags and SensorTags-development board interaction, respectively.  
To gain access to the USB port of the RPi and display the real-time outcome on a terminal screen such as \"Putty\", building a Python script following the Putty installation on \"Raspbian\" is required, as shown in Figure 21.  
The results of running the code in the terminal window, which include the received sensing data from SensorTags on the development board and then on the RPi, are shown in Figure 22.  
Figure 21: Python script.  
Figure 22: The received data from Temp and RSSI of each SensorTag on RPi terminal.