I do have a weight scale. When I use it (to find out that I need less time coding and go out there to burn calories ) I can transmit the weight to my iPhone. Not via WiFi or Bluetooth.
No… it does so by transmitting a high-frequency sound signal. My iPhone picks up the signal and somehow decodes it to the information it needs to display and store my weight.
The Chromecast dongle does something like that, too. It uses that HF sound to help pair the Chromecast with a smartphone.
That opens up some awesome possibilities.
Say, you have a Raspberry Pi project going on. You have a Pi connected with a display. But you want to be able to somehow pair or control it with an iOS device. What if it is somehow possible for the Pi to receive an HF signal that an iOS transmitted. That signal can carry all sorts of data. Say, network SID + password etc. And some other info, like TCP-port to connect via some HTTP socket.
This way you can create a project, to run on a Pi and…
- hook up the Pi to a monitor or TV. It is not connected to the network i[/i].
- have another app on iOS (or Desktop) that wants to “pair” with the Pi.
- The iOS app transmits an HF signal with some encoded data (SID, Network Password, TCP port)
- The Pi decodes the signal, changes the network settings (can be done by changing a file on the SD card)
- The Pi reboots, connected to the network
- Now the Pi is connected to the network
- The iOS app starts listening on the port that he “broadcasted” to the Pi.
- The Pi has been configured in such a way that it starts an app that completes the process of pairing the iOS app and the Pi app. Since the Pi knows on what port the iOS app is listening to (IP and port have been encoded in the HF signal), the iOS can now control the Pi app.
I think that the sound signal is some kind of audible barcode. The listener app just needs to start scanning for a frequency to detect the pulses of a certain frequency. The transmitter should repeat the pulses sequence a few times. The listener detects the start of a sequence and decodes it.
Of course, both the Pi-app and iOS-app are both created with Xojo.
Now, the question arises… is it possible to make communication like this happen in a Xojo app?
It sure sounds interesting enough.