**6. Model**

There is a gateway with LoRa technology and WiFi which is the general hub of all the nodes. This gateway receives data from all devices and sends the information to a platform called the things network. The devices that are held as nodes are divided into three technologies: BLE, LoRa, and ZigBee. The LoRa modules make the direct transmission to the gateway, each LoRa node contains its own ID allowing the things network to distinguish which device is making the transmission. The BLE modules work as beacons, this allows any BLE module that is running like a beacon scanner to receive data, but in order to read the information it is necessary to decrypt the packets, this scanner contains a LoRa transmitter, this way it is possible to communicate with the main gateway and send all the information of the BLE modules. Zigbee nodes work in the same way, there is a mesh topology in which everyone communicates with each other, but there is a coordinator who creates the network, this coordinator has a LoRa module that allows communication with the gateway.

The developed network consists of four parts:

• Zigbee Nodes: A set of high-level wireless communication protocols, based on the IEEE 802.15.4 standard, i.e., communicating using the 2.4 Ghz frequency. It consists of five devices, a device is configured as coordinator, the main function of this device is to create the network in mesh topology, in this way the other four devices can be connected to the network and have communication between them, allowing an additional device withdrawn from the coordinator because the information packet passes through the other devices to the coordinator. Each of the devices contains a temperature sensor, allowing measurement of the ambient temperature in different locations within the university. The coordinator sends a signal to know which devices are connected to the network and these send their temperatures every 5 min. After obtaining all data, the coordinator sends the information through another protocol called LoRa to the gateway.

	- 1. Garbage sensor: This device contains a sensor called Time of Flight, which measures distance by means of infrared. The main function of this device is to measure the amount of garbage that is in a boat, in this way you can anticipate that the boat will be full, and the garbage will fall. The device makes a constant monitoring every 3 min and goes back to sleep to lower its consumption. Those monitors take a measurement of the sensor and send the value of that measurement to the gateway, after sending it back to sleep.
	- 2. Light Sensor: This device also using the Time of Flight sensor knows the amount of environmental light, so it is possible to know if it is day or night, if a door is open among other applications. The functionality of this device is very similar to that of garbage with the variation of the data sent to the gateway.
	- 3. Accelerometer sensor: The node contains an accelerometer sensor, which function is to mediate accelerations in *x*, *y*, *z*. This way, it is possible to know if there was displacement or some change of state of an object. This node takes a measurement every 5 min to know if there was any change in its location, if so, it sends a message to the gateway notifying with the values in *x*, *y*, *z* to know what its displacement was.
	- 4. Gyroscope Sensor: It is a mechanical device used to measure, maintain, or change the orientation in the space of an appliance or vehicle. It is essentially composed of a body with rotational symmetry that rotates around the axis of such symmetry. It informs if there was any movement on the device's own axis. The node takes a measurement every 5 min if there is no change in the sensor and sends a value. If a change occurs before the measurement is taken, the device wakes up to carry out a transmission.
	- 5. Environmental sensor: This node presents humidity and temperature sensors allowing knowledge of the temperature and humidity in a certain space. This node takes a sensor measurement every hour due to the little change that occurs in that period of time.
	- 6. Gateway: it is the device that acts as a connection interface between devices and allows sharing resources between two or more computers. The gateway used contains the LoRa and WiFi protocols. This gateway obtains all the transmitted data through the LoRa protocol, these data are then transmitted through WiFi allowing them to be found on the ThethingsNetwork platform. In this platform it is possible to display the data separately from each node. Knowing when it made its last transmission, the frequency of transmission of each device and its measurements. This device obtains all the data transmitted by the ZigBee coordinator, all the data transmitted by the LoRa nodes and the data transmitted by the BLE concentrator.

In Figure 3, a representative scheme of the sensors according to the wireless technology and their respective application is presented. Coordinating nodes are observed that will serve as a bridge between three of the studied technologies: WiFi, ZigBee, and Bluetooth Low Energy (BLE).

**Figure 3.** Network sensors under each technology.

In Figure 4, a satellite map of the university campus of the Universidad Panamericana in Guadalajara, Mexico is shown. We have an outline of the approximate positions of the main sensors, so that it serves as a basis for taking measurements. This map is useful to get an idea of the green areas, buildings, or constructions, pedestrian and vehicular routes and the approximate total area where the sensors are located.

**Figure 4.** Network sensors position along the university campus.

The coexistence between Bluetooth and BLE in the same device is ensured by the common MAC layer. This layer also performs channel quality measurements (such as Received Signal Strength Indication (RSSI), Quality of service, and packet loss rate for Bluetooth) to update the channel map with "good" channels and eliminate those channels marked as "bad".
