Enabling IoT interoperability through opportunistic smartphone-based mobile gateways