I have created an an app on my android, it connect to my PC with bluetooth, this app send data via bluetooth.
How can I see this received data on my pc?
I use dont use a plug module on my pc it's the incorporate bluetooth, so he dont have a serial port
I have try find on google but all speak of transfered file.
Probably the easiest way would be to open up a terminal on the PC that has an open connection to the appropriate COMM port (physical or virtual). If you have this connection open you can then see any data that comes in and accordingly can send data back out.
Basically, on either end you have a bluetooth connection. That is a replacement for a cable in essence. Assuming you are using a serial port profile this will allow bytes of data to be sent back and forth over Bluetooth. I believe you are at that stage.
The port on your PC receives the data but has no means of displaying it. An application such as 'SERIAL' for Mac OS, HyperTerminal or similar for Windows will be what you need to see the data.
Hope this helps. Good luck.
(Another way would be to write an application that interfaces to the serial port on your PC but, I wouldn't think that would be worth your while... the terminal application is what you need) :)
This website has a list of useful applications that will help you.
http://www.usconverters.com/index.php?main_page=page&id=15&zenid=4835fe9edad4ba7966f4cf6533711315
Related
I am trying to make an android application that will stream live sensor data (e.g. accelerometer, etc) from my android device to my desktop computer.
My android device is connected to a WiFi network and my desktop computer is connected to a network with an Ethernet cable.
There are android applications available that send data from an android device to a PC via WiFi, but both devices must be connected to the same network.
Is there a way to transfer data if the two devices are connected to different networks?
Thank you!
Due to the fact that nearly every network sits behind a firewall (in most cases your home router/nat-device) you need to implement port-forwarding to access network 2 from network 1.
Another aproach would be to set up a VPN (f.i. with SSH) between the 2 hosts.
If your PC is directly connected to the internet, and has a public ip (that means, if you have NOT a RFC 1918 Adress), then you are able to directly connect to that ip by just entering that ip. If not, you need to implement something to get behind the firewall.
Simple answer; to stream data between a PC and an Android device each residing on different networks you need an intermediate server to pass the data through.
Now, if this just a small app that you are doing for your own purpose I suggest using the free version of Firebase (see https://www.firebase.com/). Their sample application that you'll find there, a simple chat service, does pretty much exactly what you need. Simply let the application on your PC (preferably a web app) read the "messages" that you send from your Android device.
i'm working in an android app for comunication with a wireless sensors network, i save the data that i receive from the network in a record file, and now, i want to send that file (normally .txt) to a computer, kinda "server", by WiFi or 3G.
I already know use sockets communication if the "server" is connected to the same WiFi conexion, but the problem appears if i want maybe to send the file to a pc in other place, connected to other LAN. I've been reading about WEBSERVICES but i have some doubts about the communication with web sites, because i don't have one. Maybe, i should create a server online to have some URL where send the record files. (i don't know how to create ir neither :/)
to sum up, i want to send a file from a device (for example with ip 138.100.XX.XX) to another terminal, a pc (for example with ip 192.21.XX.XX)
¿any good tutorial about this? any advice?? what do you think about??
Thank you very much, also for reading :)
Laura
This link may have some help Android device to PC's socket connection.
(This talks about basic connection to other PC before sending data/files)
I'm working on a project to automate some tasks (such as play a song, play a video, receive bluetooth data, etc) on an Android phone from a PC.
Basically the PC will send a notifier to the phone and an app or something on the phone would then process the notifier and do 'something'. The opposite of this really:
http://code.google.com/p/android-notifier/
I've seen some examples showing how to send commands to an Android listener app or service via a network connection, but in this case, I would much rather the transmission be over a physical connection.
USB
Ideally, I'd like the connection to be via the USB port. But I've seen some posts online that suggest that the SDK does not natively support this. (Android apps, communicating with a device plugged in the USB port).
Is there some other SDK/API out there that makes this easier?
I've seen some posts on the ADB, but don't really get it... Would that work?
(http://developer.android.com/guide/developing/tools/adb.html)
Serial over USB
I've also seen some sites that show how to use a breakoutbox to perform bi-directional serial communication, but only with the G1. Is this possible with newer phones?
The Phone
I'm open to really any newish phone. I'm currently looking at the Galaxy S, because it has the video out through the headphone jack. I'm open to rooting if need be.
Implement a HTTP server in your app, then put your phone in USB Tether mode. This will create a local network between your phone and your PC. You should then be able to send HTTP request or create websockets using the phone's ip.
EDIT : I tested it, and it works, see here
What you can do is the phone acting as a server and then use adb to forward ports [1].
In this scenario the pc app would connect to localhost which would be redirected to the app on the phone via the usb cable.
But if you go this way, you might just as well simply connect directly to the phone's ip (without the adb port forwarding)...
[1] http://developer.android.com/guide/developing/tools/adb.html#forwardports
Is there a method to tether (USB wired) the GPS data from and Android phone to PC? I am using a GPSTether app currently that is based on the gpsd project.
I am loooking for alternatives that give more control and is less buggy than that app. Also, is there another method of doing this without using any third party apps?
I am working on a location aware software project and want to read the GPS data periodically. The GPSTether app does exactly that on a TCP port over telnet.
The ideal situation here would be to have a serial port over USB connection between your Android phone and your PC, and to stream NMEA across it from the phone. Unfortunately Android doesn't support USB in such a way natively.
GPSTether is a "hack" using the adb forwarding debug bridge in order to create the link between phone and PC, and then reads the NMEA from the location manager and sends it over the TCP/IP link created by adb forwarding.
If you are finding GPSTether too buggy, you really only have two choices either a) implement a version of GPSTether yourself, or b) come up with a different method for doing this. Both will involve quite a bit of coding.
For b), you might want to consider - writing NMEA to a file on the phone while it is connected to the PC as a USB Mass Storage device, and reading updates to the file from the PC regularly.
Or perhaps you could get a bluetooth dongle for your PC and "tether" the phone to the PC over bluetooth, by creating a bluetooth COM port connection for the GPS using something like the Android app BlueNMEA.
Or you could copy an FTP client program, and write the file to an FTP server on your PC over a WiFi connection (which would allow you to have the phone on the other side of the world from the PC).
This can be done using ShareGPS App available in Google Play Market and Franson GPSgate Client. You will have to redirect the android GPS NMEA signal to COM ports using these tools. In addition you will require to download AndroidSDK manager.
For detailed instruction see link below.:
http://sharedroid.jillybunch.com/user.html
Use Blue-NMEA http://max.kellermann.name/projects/blue-nmea/ on your android to send GPS NMEA data on bluetooth or on a local tcp server which can be accessed on PC by usb tethering or on WI-FI connection.
use VSPE (virtual serial port emulator) by eterlogic http://www.eterlogic.com/Products.VSPE.html (look for ur version of windows) and redirect data from tcp port to a com port of your choice and u r done with the settings. now configure 'google earth' ,'see you', 'GPSdata logger' or any other soft to listen to this com port which oftenly they will do by themselves.
http://max.kellermann.name/projects/blue-nmea/
sends nmea via bt com port or on a tcp port. make sure you read the readme to avoid common obstacles.
This is really late, but I have an old LG-P350 and on device manager it shows an NMEA interface. I don't really know how to use it though.
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.