A M B OX : D EVICE - TO -B LOCKCHAIN A MBIENT S ENSING FOR F OOD T RACEABILITY
arXiv:2604.11681v1 [cs.CR] 13 Apr 2026
A P REPRINT João Miguel Guerreiro Fernandes INESC-ID, Instituto Superior Técnico, Universidade de Lisboa, Portugal. [email protected]
Samih Eisa INESC-ID, Instituto Superior Técnico, Universidade de Lisboa, Portugal. [email protected]
Miguel L. Pardal INESC-ID, Instituto Superior Técnico, Universidade de Lisboa, Portugal. [email protected]
April 14, 2026
A BSTRACT From production to consumption, ensuring food quality and traceability depends on reliable monitoring of environmental conditions across the supply chain. Ambient sensing devices can collect relevant data such as temperature and humidity, but ensuring its integrity among stakeholders remains a challenge. This work presents AmBox, a system that enables device-to-blockchain ambient sensing for food traceability. AmBox connects sensors to a blockchain, ensuring secure, verifiable, and tamper-resistant data collection with minimal intermediaries. It manages sensor commissioning and operation with the adequate business context. AmBox can operate with standalone nodes or within a distributed node-mote architecture, allowing flexible deployment at different points along the supply chain. A prototype using Raspberry Pi and ESP32 hardware can record sensor data directly on Hyperledger Fabric. Experimental results show that AmBox provides timely and reliable data that can increase transparency and trust between the supply chain stakeholders. Keywords Sensors, Ambient Monitoring, Ambient Sensing, Supply Chain Monitoring, Agri-food Supply Chain
1
Introduction
The agri-food supply chain is essential for sustaining human life and supporting global economic development. It encompasses multiple stages, ranging from crop cultivation and harvesting to processing, storage, transportation, and final delivery to consumers [1]. Managing perishable goods, such as fresh produce, is particularly challenging due to their limited shelf life and high sensitivity to environmental conditions. Inadequate handling or monitoring can lead to product spoilage, food safety risks, increased waste, and a loss of consumer trust. Recent advances in Internet of Things (IoT) technologies and data analytics have significantly improved the feasibility of real-time supply chain monitoring [2]. Low-cost and energy-efficient sensors can now be deployed across diverse environments, including agricultural fields, transportation routes, and indoor storage or processing facilities. The data collected from these sensors enables continuous visibility into operational conditions and supports informed decision-making throughout the supply chain. Agri-food supply chains typically involve multiple independent organizations, each maintaining its own records and information systems. This fragmentation can lead to data inconsistencies, limited transparency, and disputes between stakeholders. Establishing a shared and trustworthy data layer is therefore important to ensuring data consistency, accountability, and trust across all participants.
AmBox
A P REPRINT
Blockchain technology offers promising capabilities for addressing these challenges by providing a decentralized, tamper-resistant, and auditable data infrastructure [3]. In a blockchain-based system, records are stored immutably and shared among participants without reliance on a centralized trusted third party. For supply chain applications, permissioned blockchains, such as Hyperledger Fabric [4], are particularly suitable, as participants are known, authenticated, and authorized in advance. These systems typically rely on Proof-of-Authority (PoA) consensus mechanisms, which offer higher efficiency and lower energy consumption compared to mining- or staking-based approaches used in public blockchains [5]. Once such a blockchain infrastructure is in place, an important challenge is enabling sensing devices to upload trustworthy data to the ledger in a timely manner and with minimal intermediaries. This is especially relevant in environments with constrained connectivity, where intermittent network access and energy limitations are common. In this paper, we propose AmBox (Ambient Monitoring Box), a system that integrates IoT sensing and blockchain technologies to enhance traceability, transparency, and food-safety monitoring in agri-food supply chains. AmBox enables direct and auditable recording of environmental data from the source and across multiple stages of storage and transportation, reducing reliance on third-party intermediaries and increasing trust among stakeholders. We develop a functional prototype of the AmBox system and evaluate its applicability in realistic scenarios. The prototype monitors key environmental parameters, including temperature, humidity, and atmospheric pressure, that are critical for preserving the quality of perishable goods. The system is evaluated through a series of experiments designed to emulate real-world operating conditions, with a particular focus on the cherry supply chain. Cherries are highly perishable fruits with a short shelf life and strict environmental requirements [6], making them a representative and demanding use case. The evaluation focuses on communication reliability, energy consumption, sensor accuracy, and the system’s robustness to network disruptions, all of which are essential for ensuring product quality throughout the distribution process. The main contributions of this work are as follows: • The design of a low-cost, modular, and portable system for environmental monitoring in agri-food supply chains, capable of operating under constrained connectivity while ensuring data reliability through blockchainbased auditing; • The development of two complementary hardware prototypes: AmBox Node, a Raspberry Pi-based sensing device with integrated environmental sensors and blockchain connectivity; and AmBox Mote, an ESP32-based auxiliary device equipped with external sensors and local storage, enabling delayed data forwarding when network access is unavailable; • An experimental evaluation using controlled scenarios to assess sensor accuracy, communication latency, energy consumption, and the system’s resilience to intermittent connectivity.
2
Background
This section reviews the key concepts and technological foundations underlying the development of the AmBox system, focusing on supply chains, blockchain technology, and the Internet of Things. 2.1
Supply Chain
A supply chain is a network of organizations that coordinate activities related to the production, processing, storage, transportation, and distribution of products to end consumers [7]. In the agri-food sector, supply chains are characterized by multiple stakeholders, geographically distributed operations, and strict requirements related to food safety and quality. Growing concerns regarding consumer health, environmental sustainability, and regulatory compliance have intensified the demand for improved traceability and transparency in agri-food supply chains. Accurate and timely access to data describing product origin, handling conditions, and logistics processes is important for ensuring accountability and maintaining consumer trust. To address these challenges, digital technologies, particularly blockchain and Internet of Things (IoT) solutions, are increasingly adopted to collect, share, and verify supply chain data in a reliable and auditable manner [8]. 2
AmBox
2.2
A P REPRINT
Blockchain
Blockchain is a distributed ledger technology that enables secure, transparent, and tamper-resistant storage of data through a consensus-driven, append-only structure [9]. By replicating the ledger across multiple nodes, blockchain eliminates the need for a centralized trusted authority while ensuring that recorded data cannot be altered retroactively. Permissioned blockchains, such as Hyperledger Fabric [4], are particularly suitable for enterprise and supply chain applications. In these systems, participation is restricted to authenticated entities, allowing for controlled access, improved performance, and compliance with organizational and regulatory requirements. Hyperledger Fabric further supports modular components, private channels, and fine-grained access control, enabling selective data sharing among stakeholders. Smart contracts, also referred to as chaincode in Hyperledger Fabric, are executable programs deployed on the blockchain that automate business logic and enforce predefined rules in a transparent and verifiable manner [10]. They play a key role in coordinating supply chain processes and ensuring consistent data handling across participants. 2.3
Internet of Things
The Internet of Things (IoT) refers to a network of interconnected physical objects equipped with sensors, software, and communication capabilities that enable autonomous data collection, exchange, and processing [11]. IoT systems are widely used to support monitoring and automation across domains such as agriculture, logistics, industrial production, and smart environments. In agri-food supply chains, IoT devices are commonly deployed to monitor environmental conditions, track product movement, and provide real-time visibility into storage and transportation processes. These capabilities are particularly important for perishable goods, where environmental deviations can rapidly affect product quality and safety. 2.3.1
Devices and Power
IoT devices typically rely on either microcontrollers or single-board computers, depending on the computational requirements of the application. Microcontroller-based platforms are optimized for low-power operation and are commonly used in battery-powered and resource-constrained scenarios, while single-board computers, such as the Raspberry Pi, provide greater processing capabilities and support more complex software stacks [12]. Power supply considerations play a critical role in IoT system design. Devices may operate on batteries, suitable for mobile or intermittently connected deployments, or rely on continuous power sources in fixed installations. Balancing energy consumption with sensing, processing, and communication requirements is essential for ensuring reliable long-term operation. 2.3.2
Communication
IoT communication relies on a variety of wireless technologies, including Wi-Fi, Bluetooth, Zigbee, and long-range solutions such as LoRa, each offering different trade-offs in terms of bandwidth, energy consumption, and coverage [13]. At the application layer, communication protocols such as MQTT, CoAP, HTTP, and gRPC are commonly used to exchange data between devices, gateways, and backend services. Depending on the deployment context, IoT devices may experience continuous, periodic, or delay-tolerant network connectivity [14]. In supply chain scenarios, particularly during transportation, connectivity disruptions are common, requiring systems to support local data storage and deferred data transmission to ensure reliable data collection and delivery.
3
Related Work
The integration of blockchain and Internet of Things (IoT) technologies has been widely investigated as a means to improve traceability, transparency, and trust in supply chain systems. Several studies have specifically focused on agri-food supply chains, where data integrity and environmental monitoring are essentials. A number of works propose blockchain-based architectures for validating and storing sensor data collected from IoT devices. Moudoud et al. introduced LC4IoT, a lightweight blockchain architecture that relies on oracles and a four-tier validation model to ensure the reliability of sensor data before recording it on the blockchain [15]. Balamurugan et al. proposed a traceability approach based on QR codes to track food products along the supply chain, aiming to improve data transparency and security [16]. Cocco et al. implemented a decentralized bread traceability system combining 3
AmBox
A P REPRINT
RFID technology, smart contracts, and cloud-based storage to record production and distribution events [17]. Khan et al. explored the use of private blockchain platforms together with deep learning models, such as Long Short-Term Memory (LSTM) and Gated Recurrent Units (GRU), to enhance supply chain security and enable demand forecasting and sales prediction [18]. In parallel, several studies have focused on the design of ambient and environmental monitoring devices for food logistics and cold-chain management. Sarkar et al. proposed a cold-chain monitoring device equipped with sensors for gas concentration, temperature, humidity, and light exposure, enabling detailed tracking of storage and transportation conditions [19]. Misra et al. investigated the use of UV-Vis-NIRS sensors for food fingerprinting, demonstrating how spectroscopic sensing combined with chemometric analysis can support quality assessment and authentication [2]. Other works advocate for the combined use of artificial intelligence, IoT, and blockchain technologies to enhance food safety, quality monitoring, and traceability through advanced sensing and data analytics techniques [20]. While these approaches demonstrate the potential of combining IoT, blockchain, and data analytics in agri-food supply chains, many existing solutions rely on centralized cloud infrastructures, assume continuous network connectivity, or require complex and costly sensing equipment. Moreover, limited attention is often paid to the practical constraints of real-world deployments, such as energy efficiency, intermittent connectivity, and low-cost hardware integration with permissioned blockchain platforms. In contrast, the AmBox system focuses on providing a lightweight, modular, and resilient monitoring solution that directly integrates IoT sensing devices with a permissioned blockchain, supporting delayed data submission and reliable operation under constrained connectivity conditions.
4
AmBox Design
AmBox is a compact and low-cost system designed to monitor environmental conditions in agri-food supply chains. Unlike traditional monitoring solutions that rely on centralized servers or trusted intermediaries, AmBox records monitoring data directly onto a blockchain, ensuring tamper resistance, decentralization, and transparent data sharing among stakeholders. The system is intended for deployment in storage facilities and transport vehicles, where it continuously monitors ambient conditions such as temperature and humidity that are essential to the preservation of perishable goods. 4.1
Requirements
The design of AmBox is guided by the following requirements: • Direct blockchain interaction: AmBox devices must be capable of interacting directly with blockchain peers through smart contracts, without relying on external gateways, centralized servers, or third-party intermediaries; • Connectivity resilience: Devices must operate autonomously during extended periods of limited or absent network connectivity, locally buffering monitoring data and securely uploading it once connectivity is restored; • Tamper-evident communication: All transmitted monitoring data must be protected using cryptographic mechanisms such that any modification during storage or transmission can be detected; • Energy autonomy: Devices must operate independently of external power sources for prolonged periods. Based on the identified deployment scenarios, each device should achieve a minimum battery life of 10 hours under typical operating conditions; • Scalability: The system must support deployments ranging from individual transport units to large-scale warehouse environments, allowing multiple devices to be easily added, configured, and managed within the same network. 4.2
Architecture
Figure 1 presents the overall architecture of the AmBox system. A dedicated sensing module is responsible for acquiring environmental data from the physical environment, while a controller module handles data processing, local storage, and communication with the blockchain. The architecture follows a modular and scalable design organized into three logical layers. 4.2.1
Sensing Layer
The sensing layer is responsible for capturing environmental parameters such as temperature, humidity, and atmospheric pressure. It can also integrate optional modules, including GPS receivers, and aggregate data from nearby devices. 4
AmBox
A P REPRINT
Figure 1: AmBox system architecture Two types of devices operate at this layer: • AmBox Node: The Node is the primary device in the system. It collects sensor data, performs local processing, stores data during offline periods, and submits signed records to the blockchain. A Node can operate independently or act as a hub for multiple Motes. It supports offline operation, digital signatures, and energy-efficient communication. • AmBox Mote: Motes are low-power sensing devices designed to increase spatial monitoring granularity. They collect environmental data and transmit it to a nearby Node using short-range communication technologies. Motes do not interact with the blockchain directly and rely on the Node to forward their data securely. Depending on the deployment scenario, the system can operate in two modes: a single-device configuration, in which an AmBox Node performs both sensing and blockchain communication, and a multi-device configuration, in which a Node aggregates data from multiple AmBox Motes. This hierarchical organization enables flexible and scalable deployments while minimizing energy consumption at the sensing edge [21]. Figure 2 illustrates the interaction between Nodes and Motes in a distributed sensing setup. 4.2.2
Data Processing and Storage Layer
The data processing and storage layer manages local data handling within the Node. It aggregates data received from onboard sensors and Motes, applies preprocessing when required, and securely stores records during periods of network unavailability. All stored data is digitally signed to ensure integrity and non-repudiation prior to blockchain submission. 4.2.3
Blockchain Integration Layer
The blockchain integration layer is responsible for submitting signed monitoring records to the blockchain via smart contracts. This layer ensures immutable logging, traceability, and secure access to monitoring data for authorized stakeholders. By directly interfacing with the blockchain network, the system avoids reliance on centralized intermediaries while maintaining auditability and transparency. 4.3
Lifecycle
To enhance reliability and enable remote supervision, each device periodically emits a heartbeat message that indicates its operational status during idle periods. The AmBox lifecycle spans from initial configuration to decommissioning, as illustrated in Figure 3. The process begins with a configuration phase, during which device parameters, credentials, and monitoring policies are defined. Following 5
AmBox
A P REPRINT
Figure 2: Multi-device deployment with AmBox Nodes and Motes
deployment and commissioning, the device enters the operational phase, where it performs continuous sensing and reports data to the blockchain according to the configured schedule.
Figure 3: AmBox lifecycle
When a decommissioning command is issued, the device terminates active monitoring and transitions to a heartbeat-only stage, in which it periodically reports its status to the operator infrastructure, enabling verification of proper shutdown and traceability of device usage.
5
System Features
This section describes the key functional and non-functional features of the AmBox system. These features capture the system’s core capabilities and design-level guarantees, independently of the specific hardware and software technologies used for implementation. 6
AmBox
5.1
A P REPRINT
Concurrency and Fault Tolerance
The AmBox system supports concurrent sensor operations by assigning independent data collection loops to each sensor. Sensor data is first stored locally in JSON format, enabling continued operation during temporary network or blockchain outages. Failed transmissions are retried automatically, ensuring continuity of operation and minimizing data loss. 5.2
Data Integrity
Each monitoring record is digitally signed using the RSA-SHA256 algorithm before submission to the blockchain. The corresponding public key is used to verify the signature on-chain. Any modification to the data after signing invalidates the signature, providing strong guarantees of integrity and authenticity. 5.3
Scalability and Flexibility
AmBox is implemented using a modular architecture that supports both standalone and multi-device deployments. A single Node can aggregate data from multiple Motes, while multiple Nodes can operate independently and submit data to the blockchain in parallel. This design enables horizontal scaling and flexible deployment across different stages of the agri-food supply chain.
6
AmBox Implementation
This section describes the implementation of the AmBox system, detailing the hardware and software components used to realize the proposed design, as well as the communication mechanisms between system entities. 6.1
Hardware Setup
The AmBox system consists of four main hardware and infrastructure components: the AmBox Node, the AmBox Mote, the Operator Server, and the Blockchain Network. 6.1.1
AmBox Node
The AmBox Node is implemented using a Raspberry Pi 4 Model B equipped with an ARM 64-bit CPU, 8 GB of RAM, and a 256 GB microSD card, running Raspberry Pi OS. It acts as the primary control unit of the system, responsible for sensor data acquisition, local processing and storage, and interaction with the blockchain network. The physical setup of the Node is shown in Figure 4. Environmental data is collected using a Sense HAT connected via the GPIO interface. The Sense HAT integrates the following sensors: • Temperature sensor with a measurement range of 0◦ C to 65◦ C (±2◦ C); • Relative humidity sensor with a measurement range of 0% to 100%; • Barometric pressure sensor with a measurement range of 260 hPa to 1260 hPa. For portable deployment and testing, the Node is powered by a 10 000 mAh rechargeable lithium-polymer battery pack, enabling extended operation in environments without continuous power availability. 6.1.2
AmBox Mote
The AmBox Mote is implemented using an ESP32-based M5Stack Core microcontroller, featuring 520 KB of SRAM and 16 MB of flash memory. A 16 GB microSD card is used for local buffering of collected sensor data. The Mote hardware setup is shown in Figure 5. Additional sensors are connected via a breadboard using I2 C-compatible interfaces. The deployed sensors include: • KY-001 temperature sensor (DS18B20) with a measurement range of −55◦ C to 125◦ C (±0.5◦ C); • KY-015 humidity sensor (DHT11) with a measurement range of 20% to 90% (±5%). Similar to the Node, the Mote is powered using a 10 000 mAh lithium-polymer battery bank, supporting mobile and energy-constrained deployments. 7
AmBox
Figure 4: AmBox Node hardware setup
Figure 5: AmBox Mote hardware setup (top and side views)
8
A P REPRINT
AmBox
6.1.3
A P REPRINT
Operator Server and Blockchain Network
For prototyping and experimental evaluation, both the Operator Server and the Blockchain Network were hosted locally on a laptop equipped with an Apple M1 processor and 8 GB of RAM. The Operator Server is implemented using the Express.js framework and exposes RESTful APIs for device management and monitoring. The blockchain network is deployed using Docker containers and configured with Hyperledger Fabric v2.5, including the Fabric CA, orderer, peers, and CouchDB state database. 6.2
Software Setup
This subsection describes the software environments and configurations used to implement the AmBox system components. 6.2.1
AmBox Node
The AmBox Node software is primarily implemented in TypeScript, with auxiliary components written in Python for sensor interfacing. The main application runs on the Node.js runtime and exposes HTTP endpoints using the Express.js framework, enabling remote configuration, commissioning, and state control. Upon startup, the Node can operate in one of three states: • Idle state: the Node is inactive and awaits instructions; • Heartbeat state: the Node periodically reports its operational status without collecting sensor data; • Monitoring state: the Node actively collects sensor data at configured intervals and attempts to report it to the blockchain. State transitions are triggered via HTTP requests. The last operational state and configuration parameters are persisted in a local JSON file (amboxConfig.json), allowing the Node to restore its previous state after a reboot and resume interrupted monitoring tasks. 6.2.2
AmBox Mote
The AmBox Mote is implemented using the Arduino framework in C++ and compiled using the Arduino toolchain. It operates exclusively as a sensing peripheral and does not communicate directly with the blockchain or the Operator Server. The Mote communicates with a designated Node via Bluetooth Low Energy (BLE). Libraries such as M5Stack.h, DallasTemperature.h, and BLEDevice.h are used to interface with hardware components and manage BLE communication. Device behavior is implemented using BLE characteristic callbacks. Configuration parameters are persisted in a local config.json file, and collected data is buffered locally before transmission to the Node. 6.2.3
Blockchain Implementation
The AmBox system uses Hyperledger Fabric to provide secure, decentralized, and tamper-evident storage of environmental monitoring data. The Fabric deployment includes a Certificate Authority, one orderer, and two organizations, each hosting a single peer node backed by CouchDB. Chaincode is implemented in TypeScript and deployed in a containerized environment using Node.js v18.20.7. AmBox Nodes communicate with Fabric peers via gRPC using the @hyperledger/fabric-gateway and @grpc/grpc-js libraries. Each transaction submitted by an AmBox Node includes a digital signature generated locally by the device. Signatures are verified on-chain using public key cryptography, ensuring data integrity, authenticity, and non-repudiation. The chaincode defines an asset model inspired by the EPCIS standard1 , where each asset represents an environmental report. Assets include metadata such as device identifier, product identifier, batch number, timestamp, and sensor readings, serialized in JSON format. The chaincode supports asset creation, querying, and retrieval of recent records. 6.3
Communication
The AmBox prototype employs Wi-Fi and BLE as its primary communication technologies, balancing availability, range, and energy efficiency. 1
https://vb.nweurope.eu/media/14881/epcis-standard-12-r-2016-09-29.pdf
9
AmBox
6.3.1
A P REPRINT
Node–Mote Communication
Communication between the AmBox Node and AmBox Motes is implemented using BLE. Motes operate as BLE peripherals that advertise sensor data, while the Node acts as a central device that scans for and connects to authorized Motes. Pairing is configured manually by sharing predefined BLE identifiers and the Node’s MAC address with the Mote, reducing the likelihood of unintended connections in dense environments. Once connected, the Node subscribes to BLE characteristics and receives sensor updates via notifications, following a publish-subscribe model that avoids active polling. The Node implements automatic reconnection logic to detect disconnections and re-establish links when Motes return within range, ensuring robustness under mobility and intermittent connectivity. 6.3.2
Node–Blockchain Communication
Communication between the AmBox Node and the blockchain is handled via the Hyperledger Fabric Gateway SDK for Node.js over secure gRPC channels protected by TLS. The Node loads its X.509 certificate and private key from the local file system and validates peer identities using the Fabric CA root certificate. Sensor data buffered locally is periodically read, digitally signed, and submitted to the blockchain by invoking the AddEvents chaincode function. Submissions are serialized using a mutex to prevent concurrent file access. If a submission fails due to network or endorsement issues, the data remains stored locally and is retried in subsequent reporting cycles. Each blockchain transaction follows these steps: 1. Collection and local buffering of sensor data from the Node and associated Motes; 2. Digital signing of the data and generation of a unique identifier; 3. Submission of the signed data to the blockchain via a chaincode invocation; 4. Endorsement and commitment of the transaction to the ledger; 5. Retention and retry of data in case of submission failure. 6.3.3
Node–Operator Server Communication
Communication between the AmBox Node and the Operator Server is implemented via a RESTful API over HTTPS. This interface supports remote configuration, commissioning, monitoring control, and heartbeat-based status reporting. Table 1 summarizes the API endpoints exposed by the Node.
Endpoint /init /configHeartbeat /configBlockchain /turnOff /startMonitoring /stopMonitoring
Table 1: AmBox Node API Endpoints Parameters Description None Starts the heartbeat service. ipaddr, port, Configures heartbeat parameters. heartbeat_timeout ipaddr, port, channel_name, Configures blockchain connection. chaincode_name None Stops heartbeat and powers down. prod_id, batch_no, interval, Starts monitoring. sensor_params None Stops monitoring and resumes heartbeat.
Figure 6 illustrates the overall communication sequence. After commissioning, the Node propagates configuration parameters to the Motes, which begin data collection. Upon decommissioning, monitoring stops, remaining data is transmitted, and the system transitions to heartbeat mode.
7
Evaluation
The AmBox system was evaluated in two complementary phases: (i) scenario-based validation and (ii) quantitative performance analysis. The first phase focused on validating core functional requirements, including connectivity resilience, data integrity, and secure synchronization, using both single-device and multi-device deployments. The 10
AmBox
A P REPRINT
Figure 6: AmBox communication sequence
second phase assessed system performance through controlled experiments measuring sensor accuracy, communication latency, and energy consumption. 7.1
Phase 1: Scenario-Based Validation
Two deployment configurations were evaluated: a standalone setup using a single AmBox Node and a distributed setup combining a Node with one or more AmBox Motes. 7.1.1
Setup 1: Single-Device Deployment
This setup evaluates the AmBox Node operating independently. The Node collected environmental data (temperature, humidity, and pressure) and transmitted signed records directly to the blockchain. The experiment assessed correct blockchain integration, resilience to network disruptions, and enforcement of data integrity. The Node was deployed with a local Wi-Fi connection and connected to a Hyperledger Fabric blockchain. It was configured to sample sensor data at regular intervals and submit aggregated records every 5 minutes. Under stable connectivity, data was successfully collected, signed, and committed to the blockchain without errors. To evaluate robustness under unstable network conditions, the Node’s Wi-Fi connection was intentionally interrupted three times, for durations of 2 minutes, 15 minutes, and 1 hour. During each disconnection period, the Node continued to collect sensor data and buffered it locally in its JSON-based storage. Upon restoration of connectivity, the Node automatically resumed communication with the blockchain and transmitted all buffered records in the correct temporal order. No data loss or corruption was observed, and timestamps confirmed that records were preserved exactly as collected. These results demonstrate that the local buffering and deferred submission mechanisms effectively provide resilience against temporary network outages. To validate data integrity guarantees, tampering tests were conducted on locally stored records. After collecting and digitally signing multiple records, specific fields (e.g., temperature values) were manually altered in the local buffer prior to blockchain submission. In all cases, the chaincode detected the inconsistencies during signature verification 11
AmBox
A P REPRINT
and rejected the tampered records. This confirms that AmBox reliably enforces data integrity through cryptographic signatures. 7.1.2
Setup 2: Multi-Device Deployment
This setup evaluates AmBox in a distributed configuration, where an AmBox Mote communicates with an AmBox Node via BLE. The objective was to assess Node–Mote interaction, BLE reliability, and end-to-end data integrity. The Mote sampled environmental data, digitally signed the measurements, and transmitted them to the Node over BLE. The Node aggregated the received data and forwarded it to the blockchain. This configuration enabled extended spatial coverage and validated multi-device synchronization. To assess resilience to local communication failures, BLE connectivity between the Node and Mote was intentionally disrupted by physically separating the devices. Disconnections were introduced for 2 minutes, 15 minutes, and 1 hour, mirroring the durations used in the single-device setup. During each disruption, the Mote continued sampling data and buffered records locally. Once proximity was restored, the Node automatically reconnected to the Mote and retrieved all buffered records. All recovered data was subsequently submitted to the blockchain, with no losses, duplication, or ordering issues observed. These results demonstrate that AmBox tolerates temporary BLE failures and guarantees eventual data consistency through local caching and deferred synchronization. As in Setup 1, integrity tests were conducted by altering signed records after collection. Any modification to data, whether during BLE transmission or while buffered on the Node, was detected during on-chain signature verification. This confirms that AmBox provides secure, end-to-end data integrity across distributed sensing devices. 7.2
Phase 2: Performance Analysis
This phase evaluates the performance characteristics of AmBox in terms of sensing accuracy, communication latency, and energy consumption. 7.2.1
Sensor Accuracy
Sensor readings collected by the AmBox Node and AmBox Mote were compared against calibrated reference sensors over a 5-hour period. Figure 7 shows the temperature measurements.
Figure 7: Temperature measurements over a 5-hour period 12
AmBox
A P REPRINT
The Node consistently reported higher temperature values than the reference sensors, which can be attributed to thermal interference from the Raspberry Pi’s CPU. In contrast, the Mote’s readings closely matched the reference values, benefiting from externally connected sensors and lower internal heat generation. Similar trends were observed for humidity measurements, where the Node reported slightly lower values, likely influenced by temperature effects. Pressure readings were consistent across devices, with only minor calibration differences. 7.2.2
Communication Performance
Communication latency was evaluated for two paths: Node-to-blockchain communication over Wi-Fi and Mote-to-Node communication over BLE. Latency was measured using round-trip time (RTT), with 40 message exchanges per scenario. Table 2 reports blockchain communication latency under local and remote deployment conditions. The local setup achieved an average latency of 148 ms, while the remote setup exhibited higher latency, averaging 628 ms, reflecting additional network overhead. Table 2: Node-to-blockchain communication latency Network Local Remote
Average (ms) 148.07 627.94
Min (ms) 70 343
Max (ms) 803 1992
BLE communication between the Node and Mote exhibited significantly lower latency, with an average of 46 ms, as shown in Table 3. This confirms the efficiency of local short-range communication for multi-device deployments. Table 3: Node–Mote BLE communication latency Average (ms) 46.07 7.2.3
Min (ms) 27
Max (ms) 109
Energy Consumption
Energy consumption was evaluated using a single 10 000 mAh battery under typical operating conditions. Both devices sampled all available sensors once per minute and submitted data to the blockchain every 10 minutes. Figure 8 illustrates the battery discharge profiles.
Figure 8: Battery discharge profiles of AmBox Node and Mote The AmBox Node operated for approximately 13 hours, while the AmBox Mote operated for approximately 51 hours before battery depletion. Both devices satisfy the minimum requirement of 10 hours of autonomous operation. The significantly longer battery life of the Mote reflects its more energy-efficient hardware design, while the Node’s consumption highlights potential optimization opportunities for future iterations. 13
AmBox
7.3
A P REPRINT
Transport Tracking Case Study
In addition to controlled experiments, a real-world case study was conducted during a 4-hour bus trip from Loulé to Lisbon. An AmBox Node, powered by a 10 000 mAh battery and placed inside a suitcase, collected environmental data every 5 minutes and attempted to upload records to the blockchain. Due to limited Wi-Fi connectivity during the journey, the system remained offline for most of the trip. Nevertheless, all data was collected and buffered locally, and successfully uploaded to the blockchain once connectivity was restored. After approximately 5 hours of operation, the battery level remained at 69%, indicating moderate power consumption suitable for extended transport scenarios. Temperature readings were higher than expected, primarily due to thermal interference from the Raspberry Pi CPU and the enclosed deployment environment. This limitation highlights the need for improved thermal isolation or external sensor placement in future hardware revisions. Overall, the case study confirms that AmBox can reliably operate under real-world mobility and connectivity constraints, preserving data integrity and ensuring eventual synchronization with the blockchain.
8
Discussion
The evaluation of the AmBox prototype highlights both the strengths of the proposed system and several areas for improvement that inform future design iterations. One of the most notable limitations observed concerns temperature measurement accuracy on the AmBox Node. The proximity of the temperature sensor to the Raspberry Pi’s CPU resulted in consistently higher readings compared to calibrated reference sensors, particularly when the device was deployed in an enclosed environment such as a suitcase. This indicates that thermal interference from the processing unit can significantly affect sensor accuracy, and suggests that similar effects may influence other onboard sensors. Future versions of the Node should therefore consider improved thermal isolation, external sensor placement, or hardware-level compensation techniques to mitigate heat-related measurement bias. Communication experiments demonstrated that the system performs reliably under local network conditions, while higher latency was observed when interacting with a remote blockchain network. This behavior is expected due to increased network distance and variability, and reinforces the importance of the local buffering and deferred synchronization mechanisms implemented in AmBox. These mechanisms enable uninterrupted data collection during connectivity outages and ensure eventual consistency once network access is restored, which is essential for mobile and geographically distributed supply chain deployments. In terms of energy consumption, both the Node and the Mote met the minimum operational requirement of 10 hours of autonomous operation, confirming their suitability for field use. The AmBox Mote exhibited significantly longer battery life than the Node, reflecting its lower-power hardware design and simpler processing tasks. While the Node’s shorter battery life remains acceptable, it highlights an opportunity for optimization through hardware selection, duty-cycling strategies, or offloading non-critical tasks to reduce energy consumption in future revisions. The system also demonstrated strong resilience in maintaining data integrity under intermittent connectivity conditions. Sensor data was consistently buffered locally during offline periods and successfully synchronized with the blockchain once connectivity was restored, without loss or duplication. Similarly, the Mote tolerated periods of Bluetooth unavailability and reliably recovered buffered data, confirming the effectiveness of the system’s fault-tolerant design. Finally, the evaluation confirmed that AmBox can detect unauthorized data modifications through cryptographic signature verification, providing a robust baseline for data integrity and trust. However, the security evaluation was limited to basic tampering scenarios. More sophisticated attack vectors, such as key compromise, replay attacks, or denial-of-service scenarios, were not considered in this prototype. Addressing these threats through extended threat modeling, stronger key management, and additional security controls represents an important direction for future work.
9
Conclusion
This paper presented AmBox, a modular and low-cost system for blockchain-backed environmental monitoring in agri-food supply chains. By integrating IoT sensing devices directly with a permissioned blockchain, AmBox enables tamper-evident and verifiable recording of ambient conditions such as temperature and humidity, without reliance on centralized intermediaries. Two deployment configurations, a standalone Node and a distributed Node–Mote architecture, were designed and evaluated, demonstrating flexibility across fixed and mobile supply chain scenarios. Experimental results confirmed the system’s ability to operate under intermittent connectivity, preserve data integrity, and reliably synchronize monitoring data with a Hyperledger Fabric blockchain. 14
AmBox
A P REPRINT
Future work will focus on improving sensor accuracy and energy efficiency, strengthening security through hardwarebased protections, and enhancing scalability and integration with existing supply chain management systems. These developments will further support reliable, end-to-end traceability in real-world agri-food deployments.
Acknowledgements Work supported by national funds through Fundação para a Ciência e a Tecnologia, I.P. (FCT) under projects UID/50021/2025 (DOI: https://doi.org/10.54499/UID/50021/2025) and UID/PRR/50021/2025 (DOI: https: //doi.org/10.54499/UID/PRR/50021/2025) and by Blockchain.PT – Decentralize Portugal with Blockchain Agenda, (Project no 51), WP 1: Agriculture and Agri-food, Call no 02/C05-i01.01/2022, funded by the Portuguese Recovery and Resilience Program (PRR), The Portuguese Republic and The European Union (EU) under the framework of Next Generation EU Program.
References [1] Y. Tsang, K. Choy, C. Wu, G. Ho, and H. Lam. Blockchain-driven iot for food traceability with an integrated consensus mechanism. Ieee Access, 7:129000–129017, 2019. doi:10.1109/access.2019.2940227. [2] N. N. Misra, Yash Dixit, Ahmad Al-Mallahi, Manreet Singh Bhullar, Rohit Upadhyay, and Alex Martynenko. IoT, big data, and artificial intelligence in agriculture and food industry. IEEE Internet of Things Journal, 9(9): 6305–6324, may 2022. doi:10.1109/jiot.2020.2998584. [3] D. Prashar, N. Jha, S. Jha, Y. Lee, and G. Joshi. Blockchain-based traceability and visibility for agricultural products: a decentralized way of ensuring food safety in india. Sustainability, 12:3497, 2020. doi:10.3390/su12083497. [4] Elli Androulaki, Artem Barger, Vita Bortnikov, Christian Cachin, Konstantinos Christidis, Angelo De Caro, David Enyeart, Christopher Ferris, Gennady Laventman, Yacov Manevich, et al. Hyperledger fabric: a distributed operating system for permissioned blockchains. In Proceedings of the thirteenth EuroSys conference, pages 1–15, 2018. [5] Yang Xiao, Ning Zhang, Wenjing Lou, and Y. Thomas Hou. A survey of distributed consensus protocols for blockchain networks. IEEE Communications Surveys & Tutorials, 22:1432–1465, 2019. URL https: //api.semanticscholar.org/CorpusID:102352657. [6] J. Błaszczyk and E. Dziedzic. ‘kordia’ sweet cherry fruit quality as function of the rootstock and storage conditions. Acta Scientiarum Polonorum Hortorum Cultus, 21:33–46, 2022. doi:10.24326/asphc.2022.6.3. [7] J. Mentzer, W. DeWitt, J. Keebler, S. Min, N. Nix, C. Smith, and Z. Zacharia. Defining supply chain management. Journal of Business Logistics, 22:1–25, 2001. doi:10.1002/j.2158-1592.2001.tb00001.x. [8] H. Feng, X. Wang, Y. Duan, J. Zhang, and X. Zhang. Applying blockchain technology to improve agri-food traceability: a review of development methods, benefits and challenges. Journal of Cleaner Production, 260: 121031, 2020. doi:10.1016/j.jclepro.2020.121031. [9] H. Dai, Z. Zheng, and Y. Zhang. Blockchain for internet of things: a survey. Ieee Internet of Things Journal, 6: 8076–8094, 2019. doi:10.1109/jiot.2019.2920987. [10] Konstantinos Christidis and Michael Devetsikiotis. Blockchains and smart contracts for the internet of things. IEEE Access, 4:2292–2303, 2016. URL https://api.semanticscholar.org/CorpusID:23397334. [11] Jonathan Charity Talwana and Huang Jian Hua. Smart world of internet of things (IoT) and its security concerns. In 2016 IEEE International Conference on Internet of Things (iThings) and IEEE Green Computing and Communications (GreenCom) and IEEE Cyber, Physical and Social Computing (CPSCom) and IEEE Smart Data (SmartData). IEEE, dec 2016. [12] F. Gand, I. Fronza, N. Ioini, H. Barzegar, S. Azimi, and C. Pahl. Fuzzy container orchestration for self-adaptive edge architectures. pages 203–232, 2021. doi:10.1007/978-3-030-72369-9_9. [13] Shilpa Devalal and A Karthikeyan. Lora technology-an overview. In 2018 second international conference on electronics, communication and aerospace technology (ICECA), pages 284–290. IEEE, 2018. [14] Anil Kumar, Jafer Hussain, and Anthony Chun. IoT Connectivity Considerations, pages 1–18. Apress, Berkeley, CA, 2023. ISBN 978-1-4842-8897-9. doi:10.1007/978-1-4842-8897-9_1. URL https://doi.org/10.1007/ 978-1-4842-8897-9_1. [15] Hajar Moudoud, Soumaya Cherkaoui, and Lyes Khoukhi. An IoT blockchain architecture using oracles and smart contracts: the use-case of a food supply chain. In 2019 IEEE 30th Annual International Symposium on Personal, Indoor and Mobile Radio Communications (PIMRC). IEEE, sep 2019. doi:10.1109/pimrc.2019.8904404. 15
AmBox
A P REPRINT
[16] S. Balamurugan, A. Ayyasamy, and K. Suresh Joseph. IoT-blockchain driven traceability techniques for improved safety measures in food supply chain. International Journal of Information Technology, 14(2):1087–1098, jan 2021. doi:10.1007/s41870-020-00581-y. [17] Luisanna Cocco, Katiuscia Mannaro, Roberto Tonelli, Lorena Mariani, Matteo B. Lodi, Andrea Melis, Marco Simone, and Alessandro Fanti. A blockchain-based traceability system in agri-food SME: Case study of a traditional bakery. IEEE Access, 9:62899–62915, 2021. doi:10.1109/access.2021.3074874. [18] Prince Waqas Khan, Yung-Cheol Byun, and Namje Park. IoT-blockchain enabled optimized provenance system for food industry 4.0 using advanced deep learning. Sensors, 20(10):2990, may 2020. doi:10.3390/s20102990. [19] Sutapa Sarkar, K.S. Akshatha, Ankit Saurabh, B. Samanvitha, and Md Faizan Sarwar. IoT enabled cold supply chain monitoring system. In 2022 IEEE 3rd Global Conference for Advancement in Technology (GCAT). IEEE, oct 2022. doi:10.1109/gcat55367.2022.9972137. [20] Showkat Ahmad Bhat, Nen-Fu Huang, Ishfaq Bashir Sofi, and Muhammad Sultan. Agriculture-food supply chain management based on blockchain and IoT: A narrative on enterprise blockchain interoperability. Agriculture, 12 (1):40, dec 2021. doi:10.3390/agriculture12010040. [21] D. Weyns, G. S. Ramachandran, and R. A. Singh. Self-managing internet of things. SOFSEM 2018: Theory and Practice of Computer Science, pages 67–84, 2017. doi:10.1007/978-3-319-73117-9_5.
16