## 1 Introduction  
In this modern era of technology, Industry 4.0 will allow companies to implement innovative manufacturing techniques by acquiring real-time data using a large number of interconnected smart devices, thanks mainly to the Industrial Internet of Things (IIoT) [1]. In most cases, WSNs are employed for the manufacturing process due to their monitoring capacity, deployment flexibility, and scalability, which leads to an optimization of operating costs. However, the deployment of wireless communication systems, and WSNs in particular, within industrial environments presents specific difficulties and challenges, due mainly to the electromagnetic noise caused by machinery, the intrinsic harsh industrial environment (in many cases with many metallic objects and structures), and the dynamism of the wireless channel, which, added to the present strong multipath propagation, make this type of environment very difficult to analyze in terms of radio propagation planning. In order to tackle these challenges, it is necessary to carry out accurate radio-planning analyses of the wireless channel [2]. The literature presents several studies where different wireless communication technologies and aspects are analyzed within industrial environments. Thus, a survey analyzes WSN reliability in industrial automation and control systems in order to replace wired solutions in factory applications [3]. In [4], another survey analyzes IoT applications in smart logistics, focusing on the challenges and key technologies involved, such as the WSN. In [5], a wireless time-synchronous network that allows machine-to-machine (M2M) data sharing is presented. References [6; 7] focus on communication among nodes and real-time data-gathering challenges in industrial environments. In [8], the performance of Long-Range Wide Area Network (LoRaWAN) technology for energy harvesting is explored in industrial automation, including a node lifetime analysis and an assessment of battery replacement. Reference [9] presents a battery-less industrial monitoring system that uses LoRaWAN technology to improve operational reliability in an electrorefinery. In [10], Narrow-Band IoT (NB-IoT) technology is used in order to enhance the digitalization of the oil and gas industry by employing industrial waste heat. Reference [11] presents a rail monitoring system that utilizes IoT sensors and edge computing for real-time data collection, obtaining the train speed and the number of carriages. References [12; 13] introduce smart systems for wastewater monitoring using an IoT real-time algorithm to detect and locate harmful wastewater discharges. In [14], the creation and testing of a garbage bin-level monitoring system that operates with LoRaWAN technology and GPS units for recording the location of the trash bin are presented. In [15], self-sustainability and long-range operation Bluetooth sensor node is presented in order to analyze and monitor the aerodynamics of wind turbines. Finally, reference [16] presents the tracking of forklifts in an industrial environment using measurements with Ultra-Wide Band (UWB) technology and simulations with a location algorithm. Following this trend, this work, which is an extension of a conference proceedings [17], proposes the deployment and optimization of a ZigBee-based WSN within the facilities of the Galeo Enrollables Company, located in Navarre (Spain). The company designs and manufactures technical and solar protection curtains. Due to the current state of lack of control over manufacturing times and administrative tasks for many of the machinery, the company wants to integrate the ad-hoc design of WSN into the Enterprise Resource Planning (ERP) system in order to carry out effective management of the entire manufacturing plant with the aim of controlling and optimizing all their resources and processes. In this sense, the proposed and deployed WSN acquires real-time data from different machinery and workstations within the workshop in order to supply it to the ERP system.