Bi2Bi Communication: Toward Encouragement of Sustainable Smart Mobility

Sustainable urban mobility refers to the sustainable transportation mode in terms of social, environmental, and climate impacts. Cycling has emerged as one of the most sustainable means of urban travel due to its flexibility, low costs, reduced carbon emissions, improved traffic, and mobility in cities. Vehicle-to-vehicle (V2V) communication is becoming a reality standard. Non-motorized vehicles, such as bikes, are expected to participate in V2V and Vehicle-To-Everything (V2X) networking alongside cars and trucks, although they have gotten significantly less attention. In this paper, we analyze and experimentally evaluate Bike-to-Bike (Bi2Bi) wireless communication in different urban scenarios, considering full topo-morphological characteristics of urban environments by means of deterministic 3D Ray Launching hybrid simulations. Communication and data exchange between bikes relies on the IEEE 802.15.4 standard, and specifically, on ZigBee. We analyze Bi2Bi communication and cooperation towards sustainable smart mobility, following a holistic approach providing a tool based on the city platform to monitor and understand the impact of mobility at both city and citizen level and to provide accurate information on carbon footprint reduction, for multiple city/system stakeholders.


I. INTRODUCTION
Sustainable transport systems have gained significant attention in recent years because of the growth of energy use and air pollution. The reports issued by the Intergovernmental Panel on Climate Change (IPCC) indicate that city traffic causes a proportion for approximately 13% of the global total of CO2 (carbon dioxide) emissions [1]. Pollution is about more than just emissions. Noise levels in cities can also be considered a pollutant, with associated long-term health risks. Therefore, some cities are even highlighting noise pollution in their sustainability agendas. Reducing the flow of motorized vehicles on urban roads helps reduce the emission of polluting gases from combustion engines, such as CO2, and noise levels [2]. Thus, overcoming these problems is a common concern in the development of a city.
Cycling is the most sustainable means of urban travel, practical for most short and medium-distance trips -commute to and from work and school, shopping, visiting friends -and for leisure and exercise. Cycling has emerged as one of the most important alternative modes of transport because of its flexibility, low costs, reduced personal carbon and collective footprint, improved traffic flow, and mobility in cities, as well as potential contributions to the development of more sustainable cities. Bikes can play an important role in achieving sustainability for cities, through a set of data that can be got during their movement within the city if they have a set of requirements, such as internet connection, besides a set of sensors. The Internet of Things (IoT) concept is based on technology advancements that have resulted in low-cost electronic miniaturized components with adequate processing capacity temperature, humidity, and air quality measurements collected by sensors attached to bikes during their journeys within the city. Finally, we present the "Pamplona City App," a mobile application that allows, among other things, citizens to organize their routes according to their interests, monitor their carbon footprint and know the impact of their mobility on the city. It aims to encourage citizens to use sustainable transportation modes by showing the percentage of CO2 reduction compared to the use of vehicles using fossil fuels. In addition, noise pollution is also reduced.
Our contributions can be summarized as follows: • A performance evaluation of Bi2Bi wireless communication, considering full topomorphological complexity of urban scenarios, by means of deterministic volumetric channel estimations. An in-house implemented 3D Ray Launching tool with hybrid co-simulation capabilities is employed and adapted for the specific use case of bicycle connectivity considering multiple link types.
• A performance evaluation of Bi2Bi wireless communication.
• A performance assessment of the ZigBee-based wireless communication between bikes in different sub-urban scenarios. • Processing and analyzing collected environmental monitoring data, then visualizing them on an interactive dashboard. • Present some of the functionalities of the Pamplona CityApp developed in the framework of the STARDUST project, which encourages sustainable urban mobility and allows carbon footprint monitoring.
A schematic description of the contribution within this work is depicted in Fig. 1.

II. RELATED WORK
During recent years, several researchers have come up with ideas for a network of bikes that exchange information among themselves. They have also evaluated which wireless network technology is appropriate to achieve that connection. Eisenman et al. [8] have introduced a project called "BikeNet" based on mobile operators' infrastructure with GSM subscriber modules for the bikes. The BikeNet was unpromising due to the high charges for operating the network. Isemann et al. [9], have proposed a chaotic ad-hoc network for data messaging for bikes, independent from 3rd party network infrastructures. The proposed communication network requires a minimum number of active bikes to make an RF link to the following bike; otherwise, the bikes are isolated. Santos et al. [10] have evaluated in less powerintensive wireless technologies for Bi2Bi connectivity operating in the 2.4GHz ISM band. The relative positioning of bikes and antenna orientation affect the link performance. Ref.
Contribution Comment [8] • It introduced the concept of a "bike area" network with the capability of biketo-bike and bike-to-environment communication. • It presented a mobile sensing-based system embedded into a bicycle to gather quantitative data about cyclist's rides and environmental variables. • It displays information and query submission on a web server: BikeView.
• One of the earliest research in the field of bicycle networking to improve cyclist fitness. • High charges for operating the network because it based on mobile operators' infrastructure. [9] • It presented a chaotic ad-hoc network for data messaging for bicycles.
• It proposed a decentralized communication network between bicycles independent from 3rd party network infrastructures. • It used AX.25, a data link layer protocol, to transport the data.
• The implementation provides a significant cost advantage by using a decentralized network involving existing phone operators. • The system requires a minimum number of active bicycles to make an RF link to the next bicycle. [10] • It evaluated the performance of wireless communication links in Bicycle-to-Bicycle links that operate in an ISM band of 2.4GHz. • It assessed the range, throughput, and packet loss ratio of these wireless technologies.
• Position, orientation, and type of the antenna influence the radiation pattern and affect the link performance. • The positioning of bicycles can significantly affect the link performance. [11] • It presented a solution for monitoring cycling environments by combining a network of body sensors and a dynamic mesh network of bicycles. The combination forms a multihop wireless sensor network providing the connectivity between each bicycle and the sink. • It relied on ANT+ wireless technology to gather the sensed data from the cyclist in an ad-hoc manner, and on 6TiSCH technology to send these data to the sink.
• The combination of the ANT+ and 6TiSCH provides a real time, dynamic sensor communication channel that cover cycling events without need to cellular network coverage. • One of the limitation that could faces the prototype is necessity for a fixed central node. [12] • It proposed a protoype of Multimodal Alerting Interface with Networked Short-Range Transmissions (MAIN-ST) to connect bicycles and advances bicycle safety by providing cyclists with enhanced hazard awareness.
• It presented an approach to move a bicycle onto a connected vehicle network and provide novel safety features using this connectivity. [13] • It presented an IoT-based smart bike system for cycling training.
• The design of the system covered both hardware and software components.
• The system offers web and mobile App for monitoring the important parameters for training and collaborating between cyclists and trainers.
• The design did not provide the ability of bike-2-bike communication.
• High-cost system design for public purpose. [14] • It introduced an IoT Crowd Sensing platform that provides a series of services including the monitoring of the air pollution and anti-theft service.
• GSM-based platform with high power consumption.
• The communication between bikes themselves is unavailable. [15] • It presented a cooperative bike communication system, in which bike groups in the form of platoons are interconnected by means of ZigBee nodes.
• A brief analysis of wireless communications is presented. [16] • It examined the impact of the bike structure and the location of the transceiver, taking into account 6 different antenna locations within the bike frame.
• It shows which places are better suited for mounting the transceiver on the bike. [17] • It presented wireless connectivity to detect vulnerable road users, including the detection of bikes, taking into account operating frequencies in the 2.4 GHz bands. • It provided a radiation diagrams for vehicles and bikes as well experimental values of RSSI distributions.
• The communication between bike and car is based on using in-car wireless devices in the 2.4 GHz band, which requires a prior connection setup between bike and car to the built-in Wi-Fi hot-spot placed inside the car. This loses the flexibility of the system. [18] • It presented anti-thief and certification bike management system using RFID technology. • It provided wireless characterization for the presented system • It is suitable for specific purpose, since the RFID tag mounted to the body of the bike during the production stage. [19] • It presented two methods aimed at determining the distance between the bicycle's location on the track and the anchor node. The first method was based on traditional log-normal shadowing model (LNSM), whereas the second approach was based on a proposed hybrid particle swarm optimization-artificial neural network (PSO-ANN).
• The presented methods help to control the transmitted power of the sensor nodes, thus the power consumption of the WSN can be reduced and the battery life of the sensor node extended. • It is based on a fixed anchor node and not a moving node. [20] • It presented a bike-sharing system implementation architecture compatible with the IEEE 1451 standard family. Each e-bike has been equipped with sensors to measure available battery energy, ozone and detect fall.  Municio et al. [11] have presented a solution that relied on ANT+ wireless technology to communicate with the different bike sensors, and 6TiSCH, which builds the long-range 6LoWPAN network of bikes.
The specific characteristics of bike to infrastructure as well as of Bi2Bi connectivity require to consider the impact in terms of wireless channel behavior and hence, overall system performance. Experimental characterization of Bi2Bi communication links has been presented in [10], considering different WLAN, 802.15.4 CrossBow nodes and Bluetooth transceivers, all of them operating in 2.4GHz frequency bands. The experimental setup considered constant separation between bikes of 1m and as scenarios, an empty parking lot as well as an urban pedestrian area. A cooperative bike communication system is described in [15], in which bike groups, in the form of platoons, are interconnected by means ZigBee nodes, where a brief analysis of wireless communications is presented. The impact of the bike structure as well as the location of the transceiver antennas has been described in [16], considering 6 different antenna locations within the bike frame. Specific antennas have also been considered for the integration of wireless sensor network capabilities within bikes, by embedding a helical antenna within the bike frame, considering frequencies of operation in the 170MHz or the 430MHz bands [9]. Wireless connectivity in order to enable vulnerable road user detection involving the detection of bikes is described in [17], where the radiation diagrams for vehicles and bikes as well experimental values of RSSI distributions have been obtained, considering operating frequencies in the 2.4 GHz bands. Wireless characterization has also been performed for other bike related applications, such as the integration of RFID chips for anti-theft systems [18], with experimental validation of reader ranges, the implementation of indoor/outdoor bike tracking systems supported by particle swarm optimization-artificial neural network processing of path loss calculations [19], or multimodal communication capabilities in order to implement an optimized e-biking sharing infrastructure among others [20]. The different approaches in relation with communication solutions within bike scenarios have been summarized in Table I.

III. SYSTEM ARCHITECTURE
In this section, we describe the hardware and software architecture of the bike2bike network system.

A. HARDWARE ARCHITECTURE
The hardware architecture is divided in two layers: perception layer and communication layer as shown in Fig.2.

• Perception Layer
The perception layer is the physical layer that is generally in a smart environment scenario, to cope with the sensing and gathering of information about the environment. The gathered information can be location, temperature, humidity, air quality, etc. This gathered information transmits through the communication layer toward the upper layer.

• Communication Layer
The Communication layer handles the connectivity, message routing among remote devices, and routing between devices and the upper layers.

B. SOFTWARE ARCHITECTURE
The software architecture is divided into three layers: sensor data acquisition layer, management, and visualization, as shown in Fig. 3.

• Data Acquisition Layer
The Data Acquisition layer is composed of several communication protocols and software components for data acquisition such as the Message Queue Telemetry Transport (MQTT)-it is a publish-subscribe, lightweight network protocol to transfer messages between devices-to transmit sensory data and commands between the upper layers and the perception layer.

• Data Management Layer
The Data Management layer acts as an intermediate layer between the IoT devices that gather data and the applications accessing the data for analysis purposes and services. The sensory data comes from the acquisition layer with varying formats and structures. Therefore, the data management layer pre-processes the data to handle missing data, remove redundancies, and integrate data from different sources into a unified schema before being committed to storage. The storage of data is performing in relational or non-relational databases or both of them.

• Application Services and Data Visualization
Layer The application services and data visualization layer uses the data stored, aggregated, filtered and processed in the previous layer to provide end users with services such as analysis and device control. In addition, data can be visualized either through reports or dashboards.

IV. Bi2Bi ZigBee Communications Assessment
Once presented the proposed system and, this section presents the assessment of the ZigBee-based wireless communication between bikes in different sub-urban scenarios where bikes are commonly present. First, the algorithm employed for deterministic radio propagation analysis is presented. Then, simulation results for the scenarios under analysis are shown. And finally, wireless communication quality experiments for several use cases are presented.

A. 3D RAY LAUNCHING TECHNIQUE
The design of accurate propagation models for realistic wireless vehicular communications, and Bi2Bi communications in particular, must take into account unique characteristics such as the antenna placement and the characteristics of different surrounding environments [21]. Urban environments encompass a wide variety of scenarios which are characterized by the combinations of different objects and elements such as buildings, pedestrians, urban furniture, vegetation and different kind of vehicles (buses, cars, trucks, bikes, scooters, motorcycles, etc.). In the same way, their size and density have a great impact on the propagation of wireless signals [22]. Propagation phenomena such as reflection, refraction, diffraction and scattering, as well as the Non-Line-of-Sight (NLoS) and Quasi-Line-of-Sight (QLoS) situations make this kind of scenarios very complex in terms of radio propagation. Besides, the mobility of the elements within these scenarios changes the radio propagation conditions continuously, being the main challenge for channel modeling in vehicular communications, and extensively, in Bi2Bi communications.
In general, channel modeling approaches are classified as Empirical, Stochastic, Geometry-based stochastic or deterministic [23]. Unlike empirical and stochastic models, deterministic models provide an accurate modeling of all the elements within the specific scenario under analysis [24], making them the most accurate option for radio planning tasks of urban and sub-urban environments [25] [26]. In the literature, many V2V propagation models and channel simulators can be found [27] [28], but further investigations are needed regarding the Bi2Bi wireless communications.
With the aim of analyzing the Bi2Bi channel in urban scenarios, an in-house developed deterministic 3D-RL simulation tool has been employed in this work. The detailed operating mode of this deterministic algorithm can be accessed in [29], and it is based on the creation of complete 3D scenarios, where the complete volume is meshed into a fixed number of cuboids. The transmitter antennas and their characteristics are the input parameters of the algorithm. Then, rays are launched form the transmitter following a combination of electromagnetic theory and equations based on Geometrical Optics (GO) and Geometrical Theory of Diffraction (GTD). The propagation parameters are calculated along the path of each ray, which interacts with all the elements within the scenario, creating radio propagation phenomena such as reflection, refraction, and diffraction. These characteristics, added to the implementation of the material properties of all the elements within the scenario (conductivity and permittivity) lead to an efficient and robust technique already employed and validated in many different environments, including large urban environments [30] [31].
The next two subsections present the radio propagation analysis performed for ZigBee wireless communication between bikes in two different environments where bikes are usually present. First, a University campus has been assessed, and then, a common urban scenario. The campus environment presents some building, empty spaces and many vegetation elements. Furthermore, the urban scenario contains narrower spaces between buildings and higher density of obstacles, such as cars. Finally, empirical evaluation for both scenarios is presented, using ZigBee-based transceivers.

B. Bi2Bi COMMUNICATION IN UNIVERSITY CAMPUS ENVIRONMENT
Nowadays, many students and academic staff use bikes to go to the university. Thus, a Bi2Bi radio link estimation at a university campus is important. In this context, a 3D Ray Launching scenario replicating the campus of the Public University of Navarre in Spain has been created to study the feasibility of the proposed Bi2Bi communication system in university campus environment. The created scenario of the campus is illustrated in Fig. 4. The dimensions of the scenario are 590 m of length, 290 m of width and 30 m of height, resulting in a volume of 5.1 million m3. The existing elements and materials at the campus such as trees, foliage, grass, streetlights, baskets, benches, cars and buildings were all taken into account while simulating the presented scenario. Moreover, since the dielectric properties of any material depend on the radio frequency, temperature and humidity levels, the dielectric properties of the materials used in the presented scenario were taken from [32] for a considered humidity level of 20% and a Temperature of 20 C. The dielectric properties of these materials are depicted in Table II.   In the performed simulations, the transmitter was placed on the front part of the bike at three different locations, as illustrated in Fig. 4 (a). The purpose of choosing these locations is to estimate the radio coverage under LoS and NLoS Bi2Bi links. One of the main advantages of the 3D-RL code is the ability to perform analysis at any location in the three-axis within the 3D scenario. Fig. 5 shows the estimated RF power distribution planes at 2.41 GHz for the transmitter placed at the three locations at 1.15 m from the ground level.  From Fig. 5, it can be seen that one bike can cover the half of the campus. Moreover, it is shown that higher radio coverage is offered by bikes placed at locations 2 and 3 due to the low buildings density. However, the bike at location 1 is surrounded by buildings, resulting in signal attenuations.
From Fig. 5 (a), it can be observed that a reliable Bi2iB communication can reach 150 m radius from the transmitter bike at location 1. For a transmitter placed at location 2, high link quality is offered at 180 m radius, as illustrated in Fig. 5  (b). Finally, From Fig. 5 (c), it is demonstrated that a Bi2Bi communication can reach 200 m for a transmitter placed at location 3.

C. Bi2Bi COMMUNICATION IN URBAN SCENARIO
Another important condition to be taken into account for a reliable Bi2Bi communication is the urban scenario, which is a complex environment with high buildings, vegetation and vehicles density levels. In this context, the 3D Ray Launching algorithm has been used to perform radio coverage estimation for Bi2Bi communication in urban scenario. The presented scenario in Fig. 6 is a replica of a real part of the city of Pamplona in Spain. The created scenario has dimensions of 510 m in length, 285 m in width and 50 m in height, resulting in a total volume of 7,267,500 m3. The scenario is created considering all the existing components in the real scenario such as bikes, buildings, trees, streetlights, vehicles, human body, baskets, benches and all the metallic elements, as it is illustrated in Fig. 6 (c). The dielectric properties of these components are those of Table II. The created urban scenarios have been simulated using cuboids size of X = 6 m, Y = 6 m and Z = 2m. The angular resolution of both vertical and horizontal ray launching is ∆θ = ∆φ = 1°. Diffractions have been taken into account in this scenario and the number of the defined reflections until extinction is 6. The transmitter bikes have been placed at three different locations, as it is shown in Fig. 6 (a). The purpose of choosing these locations is to estimate the radio coverage under different density levels.  From Fig. 7, it can be observed that the received power levels are higher than the receiver's sensitivity threshold at large areas surrounding the transmitters located at the three locations. Moreover, it is shown that higher radio coverage is offered by bikes placed at locations 1 and 2 due to the low buildings' density. However, the bike at location 3 is surrounded by buildings, resulting in signal attenuations. From Fig. 7 (a), it can be seen that a reliable Bi2Bi communication can reach 200 m radius from the transmitter bike at location 1. For a transmitter placed at location 2, high link quality is offered at 190 m radius, as illustrated in Fig. 7 (b). Finally, From Fig. 7 (c), it is demonstrated that a Bi2Bi communication can reach 150 m for a transmitter placed at location 3. VOLUME XX, 2017 9

D. EXPERIMENTAL EVALUATION
This subsection presents several experiments with ZigBee modules set on the bikes. The aim of these experiments is to study the performance of the wireless communication between two moving bikes, in terms of packet losses. For that purpose, two different scenarios have been tested. On one hand, a path along a wide sub-urban environment has been measured, which contains different zones with different types of buildings and urban furniture. In addition, the path has significant altitude changes (see Fig. 8a). On the other hand, the second suburban scenario is specific one: a University campus (see Fig. 8b,c). This scenario corresponds to the scenario simulated with the 3D RL (see Fig. 4). Fig. 8 shows the Bi2Bi measurements carried out using the IEEE 802.15.4 modules for path 1 (Fig. 8a) in a sub-urban area and paths 2 (Fig. 8b) and 3 (Fig. 8b) on the UPNA university campus. In Fig. 8a and 8b, the first bike (transmitter) is 10m ahead of the second bike (receiver). In the case of Fig. 8c, the bikes (transmitter and receiver) go in opposite directions around the UPNA Library building. For all the cases, a packet has been sent every 5 seconds. It is worth noting that this value of 5 seconds has been chosen in order to test the ZigBee-based dynamic wireless link between bicycles under difficult conditions (ZigBee technology was designed to deploy monitoring Wireless Sensor Networks with low data rates).    (Fig. 10a and  10b) where the lost packets have been reflected with a level below the sensitivity of the devices that is -100 dBm. As can be seen in the results shown in Fig.9, 30 to 40% of packet losses is a significant value, but it is very important to note that the measurements correspond to a dynamic wireless link, where both bikes are moving along paths that go by a changing environment. Thus, the main reason for such losses is the changing environment itself. For example, the Library Building present in the campus scenario (Fig. 8b,c) is the responsible of most of the lost packets due to the shadowing effect that creates when the two bikes are in NLoS situation. This effect can be clearly seen in the results shown in Fig. 10b, where the packets lost due to the building effect are indicated. In the same way, the graph also shows how very few packets are lost when there is no building between the bikes (LoS situation). The same effect can be seen in the results from In the presented work, the estimated received power levels using the 3D-RL algorithms are not compared to the ZigBee commercial nodes RSSI for multiple reasons. First of all, the RSSI is based on the radio signal power amount measurement. It is only an indication of the RF energy detected at the antenna port. The RSSI reported may include energy from background noise and interferences, resulting in high signal strength values. In some complex scenarios, it is possible to measure high RSSI values and still have communication errors. Thus, The RSSI is an approximation for signal strength received on an antenna and not for link reliability estimation. It only gives an indication of the received power. For this purpose, the received power levels are estimated in the proposed scenarios for a more accurate RF analysis. Moreover, the measured RSSI levels are often less accurate than the received power levels, with an estimated error between 1 dB and 10 dB, and more depending on the hardware used [33].
The use of LPWAN systems operating within ISM bands provides flexibility in terms of rapid deployment and adoption, but are also subject to inherent limitations such as interference. The 2.4 GHz spectrum can exhibit high levels of background interference, owing to multiple sources such as intra-system, inter-system or external interference sources. In this sense, considering the employed transmission bit rates and the expected density of bike users as compared with the total amount of potential users (e.g., static users connected to 2.4GHz WLAN or BT/BLE connections, or pre-existent wireless sensor networks for telemetry/telecontrol purposes within the urban infrastructure), in the pilot case described in this work, interference levels are within the usual interference background levels within the urban area of Pamplona (i.e., spectral density values in the 0-6GHz range in the order of -100 dBm/Hz to -95 dBm/Hz). This leads in general to normal operation in terms of packet error rate. However, a larger increase in device density, leading from dense to ultra-dense transceiver environments can lead to an increase in the background noise level and hence to degradation in system operation. In this sense, intensive coverage/capacity analysis is compulsory in order to adequately characterize traffic distribution as well as to map interference, in order to consider alternative options, such as LPWAN operating within other frequency bands, or the use of other systems such as IEEE 802.11 ah (sub 1 GHz WLAN focused on massive IoT deployments and currently under development) of 5g NR FR1 transceivers. This is a topic that is currently under analsyis will be discussed in future works.

V. SYSTEM IMPLEMENTATION
This section describes the hardware, software, components, and tools used to implement the system. The hardware part represents the mobile IoT node (in our case, the bike) that supports sensing, data gathering, exchanging data between bikes, and then sending it to the back-end server. The second part is the software part, where the collected data is stored and processed to be later displayed on the client web portal.

A. Hardware Implementation
This section outlines the hardware, and wireless technology used in the implementation phase for the mobile IoT nodes. Fig. 11, illustrate the implementation components.

• Mobile IoT Node
The mobile IoT node is composed of a microcontroller board, a wireless network module, GPS module, power source, and a set of sensors to monitor environmental parameters such as temperature, humidity, and different types of gases to monitor the air quality. All of them placed on a box attached to the bike as shown in Fig. 12. The box is closed from the top and it is perforated with several holes from the bottom, which enables the sensors to sense and makes it far from weather conditions such as rain.

FIGURE 12. Mobile IoT Node
We used a Waspmote microcontroller board, it has an ATmega 1281 microcontroller with a clock speed of 8MHz. It has also a slot for a SD card up to 2GB and sub system such as timer, UART, SPI, I2C. To obtain the humidity level from the environment, we used 808H5V5 humidity sensor. The MCP9700A sensor used to monitor the temperature. The TGS2442 sensor used to measure the changes in concentration of Carbon Monoxide (CO). The MiCS-2610 sensor used to measure the variation of the Ozone (O3) concentration. The MiCS-2710 sensor used to measure the presence of concentrations of Nitrogen Dioxide (NO2). The MQ-136 sensor used to detect the Sulfur Dioxide (SO2) in the air. The Waspmote GPS module is used to track and map bike movements within the city. The tracking and mapping feature can also be used to recover stolen bikes. It can also examine and analyze the behavior of bikers in terms of the most frequently used tracks by them, which has an impact on infrastructure improvements. Transferring data from an IoT node to the next layer is done through an IEEE 802.15.4 wireless network module to send all sensor measurements to the server over a MQTT protocol.
During this phase of work, we focus on validating the feasibility of the concept and ensuring that the communication link between the nodes works efficiently. The consumption and cost optimization can be carried out in the future.
On the other hand, the use of a dynamo installed in a bicycle hub for energy harvesting could help to overcome the problem of partial node death due to energy exhaustion.

B. Software Implementation
This section outlines the development tools and technologies used in the implementation phase for the Bike2Bike system. Fig. 13 illustrates the implementation components.

• Backend IoT
In this layer, we have used Node.js to build a server application to create a private Mosca MQTT broker to handle all the messages from the clients (Mobile IoT Nodes) and rerouting them to their appropriate destinations. Also, the server application processes the coming data and act as a data access layer for saving and retrieving data in/from the databases. We have used two types of databases. The first is a relational database; MySQL, an open-source relational database management system. The second is a non-relational database; MongoDB, an open-source document-oriented database as shown in Fig. 14. The mobile IoT node connects to the broker, and it can subscribe to any message "topic" in the broker. The coordinator of the mobile IoT node publishes its sensor readings as messages, besides other readings it has received from the router nodes to the broker under the topic "IoTNodeData". Once the data arrived at the broker, the server application processes this data, extracts the information, and saves sensor data into the database. The connection between the node and broker can be a plain TCP/IP connection or an encrypted TLS connection for sensitive messages.

• Application and Data Visualization
The application layer uses Grafana, a multi-platform opensource analytics, and an interactive visualization web application. Grafana consumes the data stored in MongoDB and MySQL to visualize it in a graphical representation as shown in Fig. 15. As it can be seen, the dashboard offers several panels; each of these panels displays a graphical representation of the data set.   Fig. 17 shows the historical temperature measurements. Fig. 18 shows the real-time measurements of temperature and humidity level for the day of June 17, the pie chart shows the current measurement, while the line chart shows historical measurements by hours on the day of June 17. We combined the pie chart and line chart in one figure to minimize the space taken up by the two figures, so it may look different from what it looks like in Figure 15. Fig. 19 shows the real-time measurements of air quality for the day of June 17. Fig. 20 illustrate the map of bike movements within the city of Pamplona.

C. Use case -CityApp
In our case, the Pamplona CityApp, developed within the framework of the STARDUST [34] project, allows people to organize their routes according to their interests, answering questions such as: which route do I have to take to visit the Museum of Navarra between 10 and 12 in the morning, eat in a vegetarian restaurant and go to a jazz concert starting at 8 in the afternoon. When generating the route, the app even takes into account some of the user's own requirements, such as, for example, taking into account that user has a pollen allergy to avoid passing close to heavily wooded areas. In case of cycling the route, the app shows the locations and availability of the bike parking (known as igloos), analyzes the CO2 reduction compared to the use of vehicles using fossil fuels and shows the citizen's contribution to the sustainability of the city. The app has an initial screen ( Fig. 21.a) which shows, in addition to relevant tourist information, information on sustainable mobility and energy efficiency in the city (results of the H2020 european STARDUST project). The services include a set of preselected filters that limits the scope of the search, and a complete and customizable search tool for events, locations and mobility proposals. A highly demanded service is the planning of routes in the city related to the San Fermines: "Pamplona en San Fermines". Also noteworthy is the monitoring service to monitor the carbon footprint and to improve the sustainability of the city. When one of the services is selected (Fig. 21.b corresponds to the case of Pamplona in San Fermines), the app shows the different geolocated elements that the user can access. In case of being interested in the events, the user can select this option and, for a given date, view the events on the map.
The user can organize his route in the City taking into account the geolocated events and his interests. In this case, by selecting the TODOS option ( Fig. 22.a), the user can view information on each event (Fig. 22.b) and select those events that interest him (Fig. 22.c). When selecting several events, the app proposes you to make a route, which is created by clicking on the "Create Route" button. The result is a route that passes through the different events and that can be selected to be carried out in different means of transport. In addition, the app indicates the level of emissions that are reduced if the route is carried out on foot or by bike (Fig. 22.d). The route can be viewed by the user on Google Maps by clicking on the "Start Route" button.
By pressing this button, the app locally saves information about the user's interests, which are considered when providing him information about events. This allows the information to be tuned to the interests of the user. The collaborative system here described allows collecting data from citizens in order to know the state of the city (noise, electromagnetic and air pollution), and at the same time to know the mobility patterns and habits of the citizens. This information makes it possible to know the carbon footprint of citizens' travel and to actively promote policies to reduce this footprint. With the help of this application, citizens have an interesting help to manage their mobility and synchronize it with the events and situation of the city, but they can also know their personal and collective contribution to the goal of sustainable development. In the same way, decision-makers can know the degree of involvement of citizens and can promote the right policies to minimize the carbon footprint of their city. Four important stakeholders are clearly identified: the user of the city app, the other citizens, the city council and the company that manages the shared bicycles. Each of these stakeholders obtains relevant information for the planning of resources and activities, and also obtains information on the sustainability of their activities individually, and in relation to other citizens. Figure 23 shows the carbon footprint information provided to the user, but the App also provides information on the user's relative contribution to the common target over time.
The information about the user's interests is kept as local information and is not shared with third parties, ensuring the privacy of the information. Furthermore, the app shows the user the reduced amount of personal and collective carbon footprint depending on the mode of transport.

CONCLUSION
In this work, we propose a bike to bike communication system integrated within the multi-modal smart city platform of the city of Pamplona, with the aim of enhancing transportation and transit within the urban surroundings of the city, following a holistic approach from the physical layer to the impact on end user application and interaction. In this sense, wireless channel characterization for the bike links has been performed with full 3D Ray Launching simulation technique implemented in-house and optimized in order to handle large scenarios with full topo-morphological considerations, which enables the viability analysis in the use of LPWAN technologies, such as ZigBee in order to provide interactive capabilities. Evaluation results have been obtained in relation with range, throughput, and packet loss ratio for different urban scenarios within the municipality of the city of Pamplona, in Spain. Wireless communication quality experiments for several use cases are presented, considering different link types and conditions. As a use case, we have developed the "Pamplona CityApp", a mobile application for sustainable mobility in which people can organize their routes according to their interests, can know and monitor the personal and collective carbon footprint, enforcing sustainable mobility and energy efficiency in the city. The proposed platform enables services aimed towards different stakeholders, such as bike users, bike platform service providers, local/regional authorities and the general public.