RFID (Radio Frequency IDenfication) technology is becoming a key driving force for next generation IT systems, following the vision of the "Internet of Things". The OW2 AspireRFID project aims at developing and promoting an open-source middleware to ease the development, deployment and management of RFID-based applications and sensor-based applications. This middleware is lightweight, standards-compliant, scalable and privacy-friendly. OW2 Aspire implements and completes several specifications from consortiums such as EPC Global and NFC Forum. The Aspire architecture is mainly based on the collection and filtering of RFID events and sensors data from OSGi-based low-cost gateways to JavaEE high-end servers powered with OSGi (i.e., JOnAS). This presentation shows how we have benefited from the OSGi platform (modularity, provisioning, and dynamicity) to build the AspireRFID middleware, including specific aspects of, and tools for, OSGi, such as: * JMX management with MOSGi * Component-Based Software Engineering with iPOJO * RFID tag readings published via the Event Admin mediator * Sensor data collection and filtering performed through wires, dynamically and automatically managed by the Wire Admin service, thanks to the WireAdmin Binder engine and its W-ADL. The OW2 Aspire RFID project is supported by the FP7 Aspire project. A short demonstration using industry quality RFID devices on a scale model may conclude the presentation.