Communication between devices via High-Frequency audio

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 :wink: ) 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.

uh… Chromecast Dongle uses 802.11ac (2.4GHz/5GHz) 1x2 MISO Wi-Fi
there is NO WAY you could transmit video (let alone 4K video) using “sound” frequency

EDIT : though it does seem that at one point(don’t know if still) they used Ultrasonic to pair
https://www.theverge.com/2014/6/26/5846726/chromecast-will-use-ultrasonic-sounds-to-connect-nearby-devices

That is not quite what I meant.

The Chromecast does use WiFi. But I noticed that during the pairing process it does use HF sound to send some data. Probably a device ID of the Chromecast.
I found that one out since I paired one of my Chromecast dongles and the Google Home App asked permission to use my microphone in order to pair with the dongle.

Other streaming stuff happens over WiFi.

[quote=380320:@Dave S]it does seem that at one point(don’t know if still) they used Ultrasonic to pair
https://www.theverge.com/2014/6/26/5846726/chromecast-will-use-ultrasonic-sounds-to-connect-nearby-devices [/quote]

Exactly. And they still seem to use ultrasound. And that makes it interesting.
If one device can transmit data, via the means of a microphone and a speaker, to another, I mean… not large amounts of data, since ultrasonic sound has a low bandwidth. But still able to transmit just enough to be able to point to some other means of communication, like TCP over WiFi.

After that, all communication can go through a TCP connection.