## 2 BLE _vs._ Other Wireless Solutions  
Before introducing the solution proposed in this paper, it is necessary to carry out an analysis of the wireless protocols commonly used in home automation. In fact, the choice of the wireless protocol is critical, because it determines the performance of the entire network on which the HEM solution is based. Some of the important features when selecting the appropriate short-range wireless technology for smart homes are the following:  
* cost of the radio technology: as many of the devices are small low-cost devices, the radio must not add too much additional cost to the bill-of-material; this also implies that the radio and device application in many cases need to share the same computing engine (micro-controller). * power consumption: many use cases require a battery or some kind of energy harvesting technology as a power source. * ease-of-use: it must be easy to associate a device with the network and with the Internet services. * security: the authentication and the encryption must be adequately supported by the wireless technology, and sometimes, end-to-end. security (all the way from sensors to the web services) is required. * available ecosystem: the possibility to connect to smart phones, tablets, PCs, home gateways, _etc._, is important; this requirement also drives volumes and has an important impact on the cost (a good example is Bluetooth Classic, where the large volumes of phones and phone accessories have lowered the costs). * range: it is necessary to have the capability to cover enough of a range or to have some capabilities to extend the coverage (repeaters, routers, _etc._) without having too big of an impact on the system cost. Table 1 shows how different wireless technologies fit specific verticals. It is useful to note that the green check-mark indicates that the protocol behaves well in the reference application, unlike the orange color, which indicates just a satisfactory behavior. On the contrary, the red cross indicates that the protocol is not suitable for that application. According to Table 1, the following conclusions can be deduced:  
* all three technologies have built-in link layer authentication and encryption, which sometimes needs to be completed with end-to-end security from the sensor to the web application;
* correctly used, Bluetooth Low Energy has the potential for less power consumption than IEEE 802.15.4 (less overhead);
* the lack of native support for IEEE 802.15.4 in mobile devices (smart phones, tablets, laptops, _etc._) is a problem, especially for mobile or temporarily mobile use cases;
* one of the major advantages of the technology for the smart grid area is the existing Bluetooth ecosystem, which makes it seamless for consumers to start using BLE in their smart grid devices. Bluetooth is already in mobile phones and many personal computers, which can provide the necessary user interface for smart energy applications. Thanks to Bluetooth, the integration of a smart ecosystem throughout the home could be made very easy and very fast;
* BLE and IEEE 802.11 devices are easy to associate with a network and mainly with Internet services, while this is often more difficult with IEEE 802.15.4 devices;
* IEEE 802.15.4 has a main advantage in its range, since many IEEE 802.15.4-based technologies (e.g., ZigBee) support meshing, whereby the coverage can be extended by using routers;
* reliable delivery of information is critical in smart home networks to obtain accurate automation functionality. Error detection and correction enable the identification and correction of the corrupted data in unpredictable communication channels. IEEE 802.15.4, IEEE 802.11 and Bluetooth use cyclic redundancy check (CRC) to validate the packets. In fact, a certain number of bits (checksum) is appended to the message being transmitted. Different technologies use 16, 8, 32 checksums, and the higher the checksum, the more powerful the error controls.