how to read external digital input in android? - android

Are there anyway to read digital signal input using android device? is it possible with USB cable or any other app ?
there is a sensor to get count of products in production floor. We need to get that counting signal into android device when products are going through the sensor.
we saw some ways like IOIO, arduino. But we need to just read the input with not goigng such a big development hardware or software
Thanks a lot for any idea

check out protocoder http://www.protocoder.org It has a really good support for ioio boards. Pretty easy to use and no need to install anything in your computer :)

Related

Is there any way to monitor bluetooth traffic?

So, what I want is just to scan the environment and see if any packages are sent without pairing or connecting to a device. Just a general scan of bluetooth in the air and being able to see some of what comes up, like packages exchanged and maybe some information of them. Everything I've read so far is about pairing or connecting first.
Thanks in advance!
The question is old, but since nobody gave an answer I try to fill the gap.
Bluetooth is, because of its technical specifications (frequency hopping etc.), difficult to sniff. A monitor mode like in WiFi doesn't exist out of the box. You would need to scan all Bluetooth channels at the same time. And then there is the challenge that since you managed to detect something, you need to know the next hop (to which channel the devices jump next). There are commercial hardware that can do that. Also some open source projects come up like Ubertooth, but with less capabilities.
You could try to purchase an Ubertooth and play with it.

Can you manipulate Raspberry Pi sensor data on an Android smartphone?

I am new to using the RPi and just got the A+ model which I have been using to generate different types of data from external sensors. I was wondering if it is possible to send this data it is gathering to an android device in real-time, and if so the best method? I want to be able to notify the user (through a an app made with the Ionic framework) when the data enters a particular range etc.
And also is it possible to do this whilst the user is walking around with both the devices in hand?
The short answer to the question is: Yes, you can ;-)
The longer answer is much longer, since there are many ways to do this.
The one I personally would choose as the simplest is classic Bluetooth (not LE) using the SPP profile, which basically makes the BT link a serial connection between the RPi and the phone.
On this serial link you invent you own streaming protocol suitable for the data you want to transfer.
On the RPi side you install a module such as this: https://www.sparkfun.com/products/12577
(There are many alternatives, but the RN42 module is very foolproof...)
Don't know the level of your hardware skills, you might need something more plug and play if you feel uncomfortable hooking up the 4 wires needed for 3.3V power and serial communications between the Pi and the BT Module...
On the phone side you install https://github.com/don/BluetoothSerial, which gives you an API reachable from Ionic where you can receive the BT data stream.
With that and a bit of coding on both sides you are good to go.
I've used a Raspberry Pi in combination with an Android smartphone & Lego NXT.
Communication was achieved using Bluetooth on Raspbian. I used a cheap $1 USB Bluetooth dongle. The Bluetooth stack had to be compiled for Raspi, which may not be necessary anymore. Steps can be found here: Bluetooth error: Native Library bluecove_arm not available
Bluetooth seems most logical to me.
I'm at work at the moment, hence the lightweight answer, if you'd like to discuss this further then please leave a comment and I'll be happy to provide more verbose response.
You can upload the data to any cloud services. You can use Xively/Box. Xively is specially made for real time data collection.
To connect RPi to Xively, refer this: https://xively.com/dev/tutorials/pi/
For Box, refer this: http://www.sbprojects.com/projects/raspberrypi/webdav.php
You can then use Xively API in your android app. You can see GitHub for this
Google app store already has some apps for you, if you want to use
It might look a little complex. But its really simple once you follow the above methods.

How to sniff Bluetooth traffic in Android?

I would like to know if there are any apps/api tools to track all the bluetooth connections happening in android? I tried using hcidump via BusyBox, but the trace is truncated, it does not display all the data I need.
I am trying to receive data from blood pressure monitor in android using Bluetooth HDP profile. However, the connection works at the beginning, and then stops. Therefore, I would like to use some packet sniffer to see the low level bluetooth connection for better debugging.
I found out that traces from hcidump tools are not truncated, and I think this is a perfect solution. However, I have to copy the trace from android to the pc evry time (e.g. sending by e-mail) and therefore it is a cumbersome work. Would be great if there was a tool to get access to the terminal emulator of android. Btw, BusyBox provides also some other very useful tools from Linux.
There are two options for this currently, the first is to use a software-defined radio that supports the ISM band (at least 2.4 to 2.485 GHz). This will allow you to grab any radio signals within the bluetooth range and will be especially useful if you're trying to identify interfering signals.
The downside is that you'll be receiving totally raw waveforms which you then need to demodulate using something like the gr-bluetooth stack.
The other option is a specialized device like the Ubertooth.

Bluetooth protocol and implementing a position system with four devices

I'm studying Bluetooth protocol and implementing a position system reading RSSI in dBm from some devices. System will be implemented with 3 fix stations with an known latitude and longitude and a mobile station. Positioning will be done on mobile station with the power received in dBm from each fix station and the typically position algorithm.
In order to increase the efficiency of the system, some parameters from Bluetooth devices needs to be changed. This parameters could be:
Scan time on fix stations to decrease time on response to Inquires.
Inquires access codes to get answered to inquires just from selected devices(our 3 fix stations)
Some others.
There are some scenarios that can be used to do that depending on used tecnologies(some of them are limited):
Fix stations with Linux OS(no problem to modify parameters), mobile station with Android (seems to have just typically functions on its Bluetooth library but bluetooth setting are difficult or impossible to be modified).
See: http://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html
All stations running Linux OS, and C++ on mobile station(seems to be easy to run from shell scripts hcitool for fix stations modifying our settings, but it seems difficult to implement source code on C++ to get RSSI with our need values on dBm of links to fix stations on mobile station).
The nasty way. All stations running Linux OS and shell scripts, on mobile station running under shell scripts parsing values from RSSI from output redirection of hcidump after lunching inquires.
It seems to be very difficult to find useful info related to this scenario. Maybe some one of you can help to choose best scenario and to describe how should be implemented.
(Sorry if something it's not explained in a better way.. my English is terrible..)
Thanks.
I'm sorry, I didn't follow everything you wrote, but I think the first step is to get down to the HCI layer on the fixed stations. That is fairly straight-forward to accomplish and gives you a fair bit of control.
As you mentioned, hcitool is very useful, but it doesn't matter what tool or language you use. You can access HCI commands from any language.
For example, I did something like this with Voyage Linux on an ALIX box. Voyage is debian based so now problem to load BlueZ, PyBluez, and Python. Python made it easy to quickly prototype a solution which you can convert to C++ later if need be. (More here.)
But that's just an example - use whatever stack you are comfortable with as long as you can get at the HCI layer. (Getting past the HCI layer requires you to work with a specific chipset and load code directly into the Bluetooth chipset.)
On the mobile device you might be severely limited: if you are trying for potential real world implementation. If this is just for the lab, you should get rooted Android devices that use the standard Bluez stack and then, like on the fixed devices, you can get at the HCI interface. Android is, after all, just Linux so you can do what you want if you have root.

Is it possible to use Android to control relays?

This isn't a highly technical (or specific) question. I just want to know if it is possible to use an android app to control 12V relays.
I want to use this running android:
http://www.mini-box.com/pico-SAM9G45-X
with this touchscreen attached:
http://www.mini-box.com/INNOLUX-7-TFT-with-touchscreen
I want to mount this in my car and write a simple android application that can be used to control my lighting in the car (via several 12V relays). I have a lot of background programming in many different languages, so I am not worried about the application part. However, I have very little experience using software to control hardware.
Any ideas for this would be great. Thanks!
First you'll need to get Android running on your Pico board. There are several releases of Android ported to Pico for you to play with here: http://arm.mini-box.com/index.php?title=Releases
Once you accomplish this, I recommend wiring up an ADK board to the pico and using that to interface with your relays. http://developer.android.com/guide/topics/usb/adk.html The most popular and widely documented ADK board designs are based on Arduino or PIC chips so if you have experience with either I don't think it will be too much trouble. Writing the application would entail writing a program on the ADK which listens for input from an Android app which you also create and reacts accordingly. There's a handful of good information you can find with google searches to help you out and also some dedicated discussion groups.
Alternatively, it may be possible to use the remaining unused pins on the Pico to talk to your relays. I don't know for certain though if the Android ports support this or not.
It should be a fun project to keep you busy for a couple weeks. Good luck, and be sure to write up some information on it if you get it working!
you can find so many relay boards which come with wifi and they have their own app. which you can install in your Android phone or PC or iphone(you can find a ios app for same board). and you can also modify apps according to your choice and there are products which come with input pins also so you can control lights or anything else using those input. you can check this product check this Android control realy and there are so many products available.

Categories

Resources