# Analysis of Low Cost Communication Technologies for V2I Applications
## 3 Materials and Methods
### Devices Configurations  
In order to optimize the results and achieve the best behavior, the main parameters of the devices were studied. The next lines highlight the main parameters, their values, and theirs meanings:  
* ZigBee: These devices were configured through XCTU tool. Regardless if the device was controlled by Arduino or Raspberry, the main parameters were:
* \(\bigcirc\) Networking:
* ID PAN ID: It determined the network to join. Value Range: 0-0 \(\times\) FFFFFFFFF. Value: 0. * JV, channel verification: Each network needed a coordinator, so it enabled a router to verify the existence of a coordinator on the same channel. Value: Enable (only for router devices). * CE, coordinator enable: Each network needed a coordinator, so it enabled the device to work as a coordinator. Value: Enable (router devices have this parameter disabled). * DH, destination address high: It set the destination address. Value: 0000. This value let the router communicate with the coordinator of the network without writing its address. * DL, destination address low. Value: 0000
* NI, node identifier: It set the name of the device. Value: Coordinator/router/router 2. * RF interfacing:
* PL TX power level (Transmit Power Level): Device output power. Value: Highest [4]. The higher the value, the better signal communication. * PM power mode: Module boost mode setting. Value: Enable. It improved sensitivity and increased output power, improving range. * EE encryption enable: Enable or disable ZigBee encryption. Value: Enable. So, the device had the network encrypted. * EO encryption options: Type of Security. Value: 0. It was the most simple security level, where only restrictions joined to the network. * KY encryption key: Password. Value: Password
* Serial interfacing:
* BD baud rate: It was the serial interface baud rate. Value: 9600. It must be the same as that of the microprocessor. * RO, packetization timeout: It set number of character times delay before transmissions began. Range value: 0 \(\times\) 0-0 \(\times\) FF. Value: 3. It was an experimental value. The higher the value, the more time it spent reading the message. If the value was too low (for instance, 0), it split up the message. * AP, API enable: It enables API mode communication. Value: Transparent mode. Enable API mode if you want to interact with the network capabilities of the module, but it was not our case. * Wi-Fi: The configuration of the technology is fixed in Arduino. You can only define the role of the device in the network. Meanwhile, in Raspberry you can configure two parameters: \(\odot\) socket.SOCK_STREAM: To achieve flow sockets under TCP protocol (Transmission Control protocol) for safe and reliable connections. The alternative is SOCK_DGRAM which uses UDP protocol (User Datagram Protocol). It is less reliable than TCP. \(\odot\) socket.AF_INET: To determine the family of socket, if the device will use networks or not. The alternative is AF_UNIX, but it is outdated. * nRF24L01+: The configuration of the technology is the same on both Arduino and Raspberry. The parameters are: \(\odot\) SetPayloadSize: It sets the number of bytes in the payload. Value: 32. It is the maximum payload size. \(\odot\) SetChannel: It sets the RF communication channel. Range: 0-125. Value: 0 \(\times\) 76. Both devices must have the same number. \(\odot\) SetDataRate: It sets the transmission data rate. Value: 1 Mb/s. It is the default value and the recommendation of the manufacturer. \(\odot\) SetPALevel: It sets the power amplifier level. Value: RF24_PA_MAX. It has lower levels, but it would set a weaker signal. \(\odot\) SetAutoACK: Enable or disable auto acknowledge packets. It sends an automatic answer if the message is rightly submitted. It is enabled by default. \(\odot\) SetRetries: It sets the number and delay of retries upon failed submit. Value: (15,15). It would try to send the message 15 times, with a time gap of \(15\times 250\) us. This parameter is only configurable in the network maker.