I have a use case and I don't know if it's possible. The objective is to have a user tap their standard Android/iOS phone against my nRF5340's NFC antenna, and be able to download a file.
There appear to be a couple ways to transfer files over BLE (e.g. the OTS GATT service), but those seem to require companion apps on the devices to know how to get the file.
Here's my idea:
- The device hosts an HTTP server (based on the relevant sample), with the file transmitted in the response payload when a specific HTTP endpoint is requested.
- The device runs a HTTP Proxy BLE GATT service (is there a sample for this service?).
- User taps phone against the device to do an NFC-bootstrapped BLE connection (relevant sample).
- Over NFC or a QR code printed on the device, the phone gets a URL corresponding to the URL that serves the file.
- (This is the part where I need help): The phone makes a request to that URL, which is routed over the BLE connection to the HTTP proxy service on the device, which routes it to the local device-hosted HTTP server that serves the file.
For step 5, how do I get the phone to route the HTTP request over the BLE connection instead of over its normal LTE/5G cellular connection?
If there's another way of achieving this file transfer without requiring an app install on the phone, I'd love to hear that idea as well!