iOS-Arduino communication: any cheap solution? - ios

I'd like to have an iPhone and an Arduino-based device talk to each other. Here are the requirements:
I want to fully rely on iPhone's built-in components without any peripherals (for example, HiJack).
The less configuration before the two can communicate, the better. This means a WiFi-based is not desirable, because we'll need to set up Wi-Fi credentials for the Arduino beforehand.
Bitrate is not important. Only a few bytes are exchanged.
As cheap as possible.
I see that Bluetooth 4.0 LE (for example, Stack Overflow question iPhone - Any examples of communicating with an Arduino board using Bluetooth?) meets my requirements, but are there any cheaper solutions?
One thing that came into my mind is sound - the way Chirp used to share data between two iOS devices, but I don't know if is feasible on Arduino and, if it is, how much it would be. Any other solutions?

I can think of a few options:
Bluetooth, you can get a cheap one from eBay for about $10
Wi-Fi using Electric Imp (cost around $30), which is very easy to setup using the brilliant BlinkUp technique. See the project ElectricImp, control central heating via iPhone for an example.
Chirp is a brilliant idea as well. From a hardware prospective I see it is feasible to do in Arduino; you just need a MIC circuit ($8) and speaker.
However, the real challenge is the software side, i.e., the algorithm that you will use to encode data as sound and vice versa. If such algorithm requires intensive calculation, you might not be able to do it in Arduino, and you can consider using an ARM-based microcontroller.

Related

Why isnt UWB technology used for big file transfers?

I am working on my thesis right now and i have to compare near field communication technologies (WPAN) which can transfer files.
everybody is talking how great UWB is for locating things and how fast it is, but there is no one (but apple) that used it for file transmission. But why? Its has a bigger bandwith then Wifi Peer to Peer?
Apple seems to use it for airdrop and both for android and ios there is an API to develop based on this technology. But it looks that its designed for location services and only work with specific devices for location. So I would not be able to use it for example to transfer files between iOS/Android and a Raspberry Pi in Near Field.
Can anyone explain me, if UWB can transfer files and, or why i should use Wifi-Direct instead of UWB if I want to transfer Files that are >1GB with the fastest speed (but without internet of course)
Thank you very much
IR-UWB is more popular than MC-UWB
UWB modulation schemes can broadly be divided into two categories
multi-carrier UWB (MC-UWB): used for high throughput data transmission, 480 Mbps
impulse-radio UWB (IR-UWB): used for localization, sensing.

ESP8266 Node MCU powered by battery

I am new to ESP8266 and started just building basic devices using it. However I am using USB 5V wall adapter as nodeMCU has USB UART converter to 3.3V.
If I want to make it battery powered what is simple , small ( in volume so that it can fit along with nodemcu and sensors in a small case) and economical approach that keeps my nodemcu still safe?
-One option I can think of is to connect a Li-ion battery of 3.7V to VIN.
-Another one is to use bigger voltage and use a converter to convert it down to around 5V and then use that to connect to VIN.
Please let me know if this works ? else if there is any better option please do suggest. Also if you are referring to any items/products please help give the exact model numbers so that I can search on internet to consider buying them.
Lastly I am not much aware of electric circuits & terminology yet ( learning them), so please help explain me in basic terms possible.
Ps: this question was seen on stackoverflow some times but I couldnt find one single consolidated answer and am confused by it. Appreciate your understanding.
Thanks,
Sridhar.
This really would be better suited for the electronics sister site or a esp8266.com forum but for what it's wort here's my input.
IMHO the most convenient option you have is to buy a devkit with a LiPo connector. I recommend a WeMOS D1 mini plus a fitting battery shield. An alternative is the Adafruit Feather HUZZAH.
It can sometimes be a bit of a challenge to find the right connectors for those boards. Gotcha! different revisions of those boards might use different connectors. Currently the WeMOS battery shield uses a 2 pin JST PH 2.0mm.
No, you cannot power a NodeMCU using a 3.7v li-ion battery directly. A fully charged Li-ion battery outputs a voltage of 4.2v. The NodeMCU board has a (5v and above) vin slot along with two 3.6v slots. If you directly connect the battery to the 3.6v, it may fry the NodeMCU board. So typically, there are 3 ways you can connect the battery without frying your board in this scenario:
You can use a boost converter to convert the 4.2v output to 5v. Then connect it to vin. This will draw more current and battery discharges quickly (eg: MT3608 step up boost converter).
You can use a buck converter to convert the 4.2v to a steady 3.6v (eg: LM2596 step down converter).
Finally, the most efficient way is to connect a 3.3v LDO in middle. The difference between using a buck and LDO is, buck provides a constant and steady 3.6v output, where as LDO's output depends on the input voltage from battery (eg: S111733PI).

Is it possible to associate single wireless network card to multiple WiFi Access Points at a time?

Is it possible to associate single wireless network interface controller (WNIC) with multiple Wireless Access Points (WAP) at a time? If not: why?
I've never heard about such a feature, so I assume it's technically impossible or fairly difficult and rarely implemented. Is it really that difficult/impossible to implement driver providing such a feature? Is it software or hardware difficulty?
I assume that TCP/IP protocols' specifications doesn't limit us at all because if I attach multiple WNICs to my computer, I can easily connect to multiple APs.
If it's software difficulty, than what's the actual problem? Does Linux/Windows kernel or WNIC's drivers limits it? Or maybe system libraries (like libc on GNU/Linux systems)?
If it's hardware difficulty, what actually limits us? Antennas? Using single radio frequency at a time? If yes, than why can't we implement frequency hopping (like Kismet does)? Because of lost packets during time spent on other channels? If yes, than can we associate WNIC with multiple routers working on the same channel (I know that channel overlapping is bad)?
Note: I'm not talking about dual band routers. I assume that we consider most common WNIC and AP which both work on 2.4GHz channels. If I have to put my question into OS context, than I choose GNU/Linux context.
Yes. The basic technique is that the client tells AP 'A' that it is going to sleep and then talks to AP 'B' while A is buffering frames for it.
Microsoft research worked this out a while ago:
http://research.microsoft.com/en-us/um/redmond/projects/virtualwifi/
Many low-level drivers support Wi-Fi interface virtualization (e.g. the BRCM wl command has options which support this).
Apple's AirDrop and MultiPeer features for OS X and iOS use a similar technique, but instead of talking to a 2nd AP they talk to a peer device.

can iPhone detect digital signal through microphone?

I'm working on a project which needs the iPhone to detect a small set of voltage data (two different values of voltage representing 0 and 1 respectively). My initial thought is to detect it through microphone, but I'm not sure if iPhone would be able to detect these signals since it contains no info of frequency. I searched in iOS Developer resources and on google, but nothing clear about this problem. Can anyone help me with this question? Thanks a lot!
as per our discussion, it seems you want to send a digital signal to the iphone. Now there are two main ways to do this.
Either sign up to Apples MFi hardware licensing program which allows you to create hardware for the iPhone. MFi program. Or,
There is an easy way to do this but it would require the use of the headphone jack. For demonstration and testing purposes you can use the headphone jack and if its a simple on and off signal then you can get good results with the headphone jack overall and might not require to create yourself a piece of hardware. Here's a link to that Grab sensor data and send it through the iPhone headphone jack
In fact, using the headphone approach is not as bad as it may sound, you can receive a nice signal if needed. Anyway, it will suffice for your purposes. Have a look what this guy is doing. I suggest you start with the video demonstration to get an overall idea of this approach.
UPDATE 1
Have a look at this link. People are using the headphone port to detect voltage. The reason this works is because the iPhone jack is a combination earpiece (output only) and microphone (input only) connector. The microphone input is a single wire, with common ground to the earpieces.
The usual problem when trying to use an audio signal as digital signal input is that it is high-pass-filtered to avoid offsets (long term pressure changes which could destroy the dynamic range of the soundcards Analog-to-Digital converters). This means you will get only the changes of the digital signal (like "clicks"). Actually you will be better of the higher frequency your signal has, but it will be non-trivial to process it well then (this was what ordinary modems did very well).
If you can control the digital signals sent as sound (or to the microphone jack), make sure they are modulated the signal with one or more tones, like a morse transmitter or modem. Essentially you want to use your iPhone as an Aucoustic Coupler. This is possible, but of course a bit computationally expensive considering the quite low bandwidth.
Start by using some dirt simple modulation, like 1200-1800 Hz and make an FFT of it. There's probably some reference implementation for any sound card out there to get started with.
There have been some cool viruses recently that was said to be able to jump air-gaps, they used similar techniques as this one.
If you still really want a DC (or slowly changing digital signal), check out a solution using a separate oscillator that is amplitude-modulated by the incoming signal

How to capture raw signal from wireless router?

I have seen several projects now which derive novel spatial information from radio data collected from a typical wireless router:
http://wisee.cs.washington.edu/
http://www.extremetech.com/extreme/133936-using-wifi-to-see-through-walls
The idea of using a wireless router as a sort of passive radar is fantastic.
I am very interested in experimenting with data collected from a wireless router myself, but there is little information on how to go about actually interfacing with a wireless router and getting a raw stream of information collected by the device. Similar questions have been asked on here before, but I am yet to see a satisfactory answer.
I don't have the rep points necessary to link to the other questions but see:
'Capture Raw Signal from WiFi card as You Would a Sound Card'
'raw wifi “signal data” access'
I am looking for a solution that would let me use a low-cost device such as the oh so common WRT54G wireless router. If your answer involves custom radio hardware, you needn't bother posting.
As far as I know, the only option using a commodity hardware is to use Intel 5300 Wifi card. You can get the complex CSI (amplitude and phase info therein) from the three antenna on it from a sample of subcarriers (OFDM). You can take a look at this site:
http://dhalperi.github.io/linux-80211n-csitool/
If you read the wisee research paper you will find the platform they use for the system, it is USRP N210 from Ettus plus GNU radio software.
So it is not your usual WiFi AP they are using but the SDR solution this question also hints about.
WiFi devices are build to handle physical layer in silicon and the monitor mode is the best thing you can get without going the SDR path. You can get quite a lot of information from it - the radiotap header contains for example received signal strength and receiving antenna information. But if you really want to explore physical layer of WiFi then commodity hardware is not going to cut it.

Resources