How to identify the attached devices through USB - java

I am developing USB to serial app, where mobile will attached with USB hub, and this hub is connected with with other devices through CP2102 cable. I am able to identify all devices and can read and write also. But the problem is all have same Vendor and product ID and other information also. And USB port number is also changing if we disconnect and connect.
So is there any way to identify the attached devices. Let me know if any other information required here.
I am using this example for development.
http://code.google.com/p/usb-serial-for-android/

Take a look at AN721, there is a tool that goes with this document that Silicon Labs provides to so you can customize your device's VID and PID, serial number and device strings. Serial number might be the easiest way to make your development devices unique, if you change the VID/PID then you'll need to create a custom driver with those new settings to get your device back.

Related

Get Devices connected to same wifi network in android programmatically?

I am developing an app in which the first thing i need is how to get devices that are connected to my wifi network or same wifi network .ie ip adress,device name etc.
I don't have any idea how to do that have searched alot but there are no examples available.
I have done one thing that i will ping 255 ips and whichever will respond will be the connected ips but the problem here is that there are virtual ips already assigned to some websites so i need to detect only the real device ip addresses.
I want to do the same thing as done in the app WifiTalkie
Follow Any one of the following:
Way1:
If you mean you want to see all the devices connected to your current WiFi connection (and you are not trying to do Ad Hoc networking), then you are essentially wanting to run a network scanner.
There are a bunch of these around. This one has the source available on github
http://rorist.github.com/android-network-discovery/
Way2:
Refer How to detect all the Devices connected in a WiFi network from Android App

Is it possible to get the mac addresses of all connected device in my home network?

I wanted to create a personal app that can display who's at home now by detecting all the devices connected to the network. Is it possible?
there are already routers that accept access from outside of your network and you can use that to get all the information you need.
If you want something better, you can write a program to run on your PC from home that will get all this information and sends them to you, and for this I would recommend you java and selenium

connecting two mobile phones over different network and then real time video streaming

I'm developing an application in which i want to connect two android phones over different networks and then want to stream user's video to one another with their own video e-g a user can see their own video and also the video of the friend who is connected with him over network.I want to do this thing without a server..Is it possible ??
I think this is possible see nanohttpd and you will have to connect both device using your app in same network and stream to a port listen to port

Android usb host serial communication with custom made board

I'm working with an android 4.0.3 tablet. I need it to communicate with a custom made board via USB serial at 9600 baud rate. The custom board's usb port allows serial connection. I was wondering of someone can point me in the direction on how i can get my application on my tablet to send and receive some information between the two. All the help is appreciated.
Dogz1
You should use USB Host API for doing this. The API documentation explain how to use the USB Host API, step by step in the official documentation page here : http://developer.android.com/guide/topics/usb/host.html
Also if you are working with something like an Arduino Board, and if your board has USB host capability, I would recomment using ADK for communication.

Is it possible to transfer data directly between two android devices to other users in the same network?

Let's say I have two android mobile devices, connected to the same wireless network, and that network hasnt external/internet access.
Without third party software, is it possible to transfer data through wifi without knowing the ip from each other and without creating an hotspot? Something like we do on Windows (if 2 pcs are on same network, they can share information directly without internet access)
Starting with the basics, I would like to develop an application, where android phones on same network appears on a list , and then a user choose on of them and writes something - and if the other user have the same app running, appears that on his phone (and then he can reply of course - basically, a chat.
I know this make no practical sense, but believe makes all the sense for what I need to do (it's not a chat of course). If anyone knows anything, please help me - i found nothing.
Thanks in advance.
If you want to send data or messages from one phone to another using the network you will eventually need the IP address of the recipient phone. However, If you don't care about targeting specific phones you could always send UDP broadcast packets that each device on the network should receive.
If you don't want to manually specify an IP you'll need to create a discovery protocol that a phone uses to discover all the other phones on the network. You could do this buy scanning all available IP addresses and checking to see if they are a valid android phone. Or you could have each phone broadcast its presence on the network using a UDP broadcast packet sent to a predefined port.
Once you have discovered all the phones on the network its really up to you to decide how you want to send the data between phones and there are hundreds of examples of how to send data between devices/computers/processes using sockets.

Categories

Resources