Is there a way to communicate with smartphone remotely via a sensor without using internet? - signal-processing

I want to detect and send/recieve data from a smartphone in some vicinity without using internet.

I've always thought it would be fun to do this with audio. Most modern ways of modulating a signal (like OFDM) will sound like a white noise hiss over audio, and you should be able to get a few KB/s in a normal room environment if the phones are close to each other.
It also has the benefit that the user can always tell when it's transmitting.

Multiple methods are possible.
You could use a private (isolated) local area network that is not connected to the internet. Either ethernet cabled or over WiFi.
Airdrop might not require an internet connection (a WAN connected access point).
Bluetooth BLE communication doesn't require an internet connection. You could use an ESP32 or Raspberry Pi to read sensor data and have a mobile device connect over BLE to the ESP32 or Pi (or another mobile device).
You could use audio. Play FSK tones or Morse Code on one device and receive and decode the audio modulations on another device. (I've tried both of these methods successfully.) Or you could use a speech synthesizer on one device and a voice transcription app on another.
You could use light. Flash the flashlight (or LED) on one device, and receive and decode the light pulse sequences using the video camera another device. (There may be apps in the App store that can do this.) Or display a bar code or QR code on one device and use the camera on another to decode the data in the bar code or QR code.
You could use MIDI. Bluetooth MIDI over BLE from device to device. Or with MIDI cables, using a bunch of Lightning to USB and USB to Midi adapters.
You might be able to use vibrations from the Taptic engine on one device, and detect the vibration sequences using the motion sensor API on another device.
With many Android devices, you can connect a USB to serial port dongle, and use a long RS232 serial cable between devices.
With an iPhone, you could use a Lightning to Ethernet adapter, plus a fiber optic media converter, and send signals over several kilometers of (private) fiber optic cabling. etc.

You might want to use the IR sensor on your phone by using an IR sensor library. (Search it on a search engine). If the does not have that, you can use a QR code generator library (Search it on a search engine) to transfer your data.

You could use a raspberry pi (for example) to take readings from your sensor and store them. Make it run a webserver and create its own wifi network (not connected to the www) where you can access a webpage that displays the readings. Or you can set it up so that the Pi logs into the wifi hotspot from your phone whenever available and then uploads the data or sends it in an email or whatever.
You can use an internet module, for example the FONA 800 or 808 by Adafruit to let your Pi talk with the internet, via a SIM card from hologram.io for example. The Pi can talk to the FONA in Python. But to be honest that doens't really answer your question with the proximity thing - but if I were you I would drop that and do the following:
Read the data from the sensor and save it to a csv file on the Pi
Once every hour (or whatever), connect to the internet via FONA/hologram.io SIM
Insert the data from the previous hour to a remote mysql database
Use PHP or something to display the data from the database nicely and access via your phone
That way, you can have as many sensors as you want and access all from your phone. As I said the proximity thing is not relevant for me, it's easier imho to go through cellular (+ I wouldnt know how to do it over lets say bluetooth)

Related

Data Transfer between iOS and PC over WiFi

I Need to create an iOS application and a PC application, the two need to be able to exchange data over Wi-Fi (either direct or via a wifi router).
The iOS app will act as a remote control for some of the features of the PC app, for instance, if a video is playing on the pc application then the iOS app will have buttons to control playback on the PC such as play, pause, stop etc, when one of these buttons is pressed then I need to send some bytes to the pc over wifi.
My questions are:
how should I go about sending data - Wifi direct or via wifi network that both devices are connected to?
can anyone help with example code to connect or send data to a specific device over wifi for either methods?
to be clear, I don't need help with creating the applications themselves - only the wireless transfer of data between the devices using the Wi-Fi radio whether it be direct or via a router.
The main question: is it possible to initiate a connection/send bytes under iOS over wi-fi to a pc on the same network or via wifi direct?
Help with the method to do this or example code would be helpful.

Access 30-Pin connector with code

I am trying to set one pin of the old iPhone 30-Pin Connect from low to high so the best would be from 0V to 3,3V. Is that possible with a simple PodBreakout board like this?
https://www.sparkfun.com/products/8295
If not can you send a constant voltage out of the iPhones audio jack (This could be a good method too, cause now apple used its 9-Pin Lightning Connector).
I already searched the web, some say you have to jailbreak your iDevice, some say you need an authentication Chip, and some say it works flawlessly without an authentication chip, but I cant find any help online.
Thanks
You can't "send a constant voltage" out of the audio jack. There is a series capacitor there that filters out DC and very low frequency signal components.
To get proper help on this you can apply for the MFi program. I think it's free for educational purposes. It's under 100$ for sure. There is an NDA involved.
If you want to avoid the MFi you can always use BLE to communicate with periphery.
Or try to implement software FSK (or DTMF) modem on one side and a hardware one on the other side (using the audio lines).
Since it seems you simply want so see a binary (on/off) signal - you could generate a fixed pitch tone in the app (2kHz for example) and use a narrow-band filter on the hardware side (audio-jack connection).
Or maybe (to make sure your app is present on the other side a 2kHz tone would mean 0 and a 4kHz tone could stand for 1.
The authentication chip (and an MFi license)) you are talking about is needed when you try to communicate with the iOs device:
via BT (excluding BLE)
via USB (30 pin connector or lighting connector)
via UART (30 pin connector or lighting connector)

Peer to peer data transfer via Wifi and/or Bluetooth

I am currently trying to develop an application that uses the device camera to record video. Currently i am using an Apple demo that gets the data incoming from the camera and display it in a layer. In a second phase i started documenting about how to transfer that data via Bluetooth and/or Wifi to an other iPhone (real time local streaming), but i am getting no information about whether this is possible or not. Some posts say that this is limited due to the limited maximum data transfer size over wifi or Bluetooth. Could anyone tell me if this is possible or not ? Could anyone give me an example ? Thanks.
Sure you can at least for WiFi. With Bluetooth there may be some issue with bandwidth. For network library, there is this excellent library with example that you can start with. You will need to learn at your own pace. Good luck!

iOS accessory SDK - 3.5mm jack control

I want to create a project which will interact with the iPhone/iPad via the 3.5mm jack. There are a bunch of these accessories on kickstarter.com. Although, I could't find any SDK that will provide me the possibility to get data from jack input.
I have seen that some people at progical.com have a sort of SDK that can manage this kind of connection but they haven't answered me yet (I applied for their SDK few months ago). Is there any alternative for that? I want to make this project in order to get my degree so the Apple MFI won't apply.
The project will consist in a bunch of sensors that will send data to my app using 3.5 audio jack. Using my app, I will process the received data.
The 3.5" Jack connector is originally supposed to send and receive audio data. It means that if a connection is plugged in, the OS will automatically redirect all audio signals to it (with a few exceptions). Thus, you can access the data using the built-in audio processing APIs of iOS, for example CoreAudio and audio queues.
As an example, you can generate and receive signals of different frequencies, which can be used to control and get information from external devices (you'll need some kind of electrical engineering for this to work, though - filtering, separating control frequencies, etc.).

Implementing Long Range Peer To Peer Data Exchange Over IOS

I am looking for a solution to be able to send location data between two iPhones. I looked into Bluetooth data exchange but it is only a 10 meter range.
I have looked at Bonjour, however I haven't seen anything yet that would allow you to broadcast as a server over a 3g network. Is this possible?
Would I be able to use the Game Center for sharing data that is non game related?
Thanks In Advanced...
Not true. GameCenter just passes data. It has no concept of whether the data is game date, location data, or whatever.
Also, I dont think you can't use Bonjour to find devices over 3G. I believe you have to use a game center match invitation for devices not on the same local subnet.
If both devices are connected to the same wifi network, you can use Bonjour.

Resources