connecting Android App to Microcontroller ? - android

I`m working on home Automation project and I need to develop an Android App to control several devices.
Is it done through GSM module to connect between the Android App & my microcontroller ? or there is another better technique ?
how to connect Android App to GSM module ?
thanks in advance :)

with bluetooth you can connect an android app to external device.

Why don't you try to implement REST approach with 2 phones?
From the first phone try to update some variable in a server.
From the second phone keep fetching the value from the server. Your second phone needs to be connected with microcontroller using bluetooth / serial port.
That would be straight forward.

Related

Chat between mobile device and Android Emulator

I am trying to make chatting between an Android Device and an Android Emulator.My question is do they need to be on the same network to work?! What about if I tried between 2 real devices? How will I be able to detect the other device?
Any ideas?
Do they need to be on the same network to work?!
As long as they don't communicate via a server: Yes
What about if I tried between 2 real devices?
Should not make any difference. Just make sure they are on the same wifi network.
BTW, your PC running the Emulator will have to be connected to the same wifi/ethernet network as the physical Android device in case you use it.
How will I be able to detect the other device?
http://developer.android.com/training/connect-devices-wirelessly/nsd.html

Peer-Peer communication using wi-fi in android

I want to send a message from one android device to another through Wi-Fi.
I have two android devices , and Portable wifi Hotspot is enabled on both. I developed an application which displays a list of availabe wifi devices , and both of the devices lists each other.
Now I want to connect both and send a text from one device to another. What I know is that wifi transmitters transmit a beacon frame , which contains SSID , BSSID etc.
What should I do ? Should I apply a socket operation , but I don't have IP address.
I haven't done this so I can't provide code, but the answer is to use wifi- direct. http://developer.android.com/guide/topics/connectivity/wifip2p.html. That allows you to discover devices on wifi with you, then send data to them via normal sockets.
There is a wifi-direct sample app with the SDK.
Samsung recently released a simple API intended to make P2P apps easier to build - http://developer.samsung.com/chord
It only works on Android 4.0 and up, but it appears that is also the case with Wi-Fi Direct.

Android Bluetooth testing App

Ive written a test app based off the Bluetooth Chat app. What is the best way to test that, just to see if the connect is being made ect. with out the having a second device? So something like a Bluetooth Server with logging for Mac. (The test app is a Bluetooth Client)
Robert
You need to run your client test app on an Android device, on the Server side you can use the Bluetooth on your Mac.

Can I connect an IR sensor to my android phone?

Is there any way to connect sensors to the Android? I want to connect an infrared sensor to my android phone (version 2,2) so that I can control my phone with an IR remote control. Apparently reading signals from the USB port is pretty much impossible, any other
options?
use IOIO Board which provides android adb host driver.so that u can connect you phone with as usb Device . IOIO boards gives u adc,io,i2c,spi etc. which u can access using IOIO library with android sdk. just search "IOIO for android " in google .
This device in beta at the moment its targeted at the universal remote market
http://thinkflood.com/
I am looking for an ir receiver too and have sent an enquiry in. there its no developer info on the site, but the device can learn remote codes which, reading between the lines would imply it is a receiver as well as a transmitter.
I hope that this helps. If I make further progress I will let you know.

Read data from an Android USB attachment

Is there anyway to read data from an attachment through the USB port on an Android device? In particular, an EKG. Most the work can be done by the hardware of the device to simplify the output to a single number, a voltage reading. If its not possible, what about modifying an accessory that can already communicate with an android device? Thinking of devices that attach to android phones, what about sending the data as an audio signal to be read as the microphone from a headset and then analyzing the audio signal to convert it to a number that can be used to display a value.
Any ideas on how to make this work?
The Android handset can't be used as a "USB Host" (it's in the google android wishlist as a bug/enhancement request). That's what you'd need to connect regular USB devices like your EKG monitor and memory card readers, etc. to it. I wish it could do this too and star'd that enhancement to vote for it...
I'm not sure if this will work for you, but here's something I did recently for a project where I needed a smartphone to communicate with a host PC.
I used ADB on the PC to do port forwarding and then I used sockets to do the communication. Server socket on the phone, client on the PC. I can give you more details if you want.
Of course, the clear requirement here is to be able to install and execute code on the "device" which I don't think is applicable to your problem. Other than that, I found no other way to communicate over a USB connection through Android.

Categories

Resources