Detect USB to send USB Serial using Android Tablet - java

I would like to ask how to get and detect the USB.
The red one wire connect to usb to have 2 connections
The second wire connect to CPU to debug using Android Studio
Connect to terminal like printer(this one i want to connect but i cant figure it out how to detect and send data from this).
because I'm trying to send data from the serial port, but the thing here is that the device has 3 usb ports. Its similar to COM PORTS in windows.
I'm using Java and Android Studio.

Related

Finding exact device in the LAN Java / Android

I'm developing a Java application which should listen on specific port on computer using Sockets.
The another app, which will run on Android device connected to the same WiFi, should find this computer with my Java program.
How can I find the computer in the network?
I've tried it in the small LAN (where are all devices connected to 192.168.*.*) using InetAddress.getByName(ipAddress).isReachable(); but in the bigger network (like eduroam or my school WiFi) I'm not able to scan whole network.
Is there another option how to connect two devices to each other apart from using Sockets and scanning whole network?
I'm not sure I understand your entire system requirements, but I'm thinking you could create a very small database at a hosting site (such as this) and have your PC periodically upload its private IP address to that database.
Then, when you need to connect to the PC on your android device, you query the database and determine the PC's current address, then connect to the device.

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

Send data to USB port

I wonder how to send data to USB port without have any device connected to it. The problem I'm facing, is sending a simple "logical one" to the chosen USB port, so next I could check the D+ output of the USB cable on the osciloscope. It is needed for the further conversion of the USB signal to the analog output ended with BNC plug.
Currently I play arround a little with http://usb4java.org/index.html and checked its examples https://github.com/usb4java/usb4java-javax-examples/tree/master/src/main/java/org/usb4java/javax/examples. I know the idVendor and idProduct values of my port/cable, but I don't know how could I simply send data "to USB port" without connected any device to it.

RXTX issue with Bluetooth COM Port

I have an application made of a device I made to connect through USB emulating a Serial port. Now, I need to connect the same device via bluetooth so I'm using a RN-42 (Bluetooth to serial port) in my device to send the data over RF.
Then I pair my device in Windows with the laptop's internal BT module which creates to COM ports a Outgoing and a Incoming one. Then if I connect using Br#ay's terminal I receive the expected data when I connect to the Outgoing COM port.
The problem is that when I use my Java app where I am using the last RXTX libraries, I can discover the COM port (which is the problem that everyone has, at least thats all what i found in forums) and it seems to connect but then I don't receive no data. Using the same exact program but connecting using a cable it works just fine as the terminal does.
I also tried to use the BlueCove libraries, I can find the bluetooth devices but I don't really know how to discover it services and then connect to it using RFComm. I can't find a complete example of how to do that.
Any help will be appreciated!
I'm getting similar problem with default Windows Bluetooth stack.
With Toshiba stack communication is ok.

write to android USB port and send it to a RS232 microbot port

I have an old android phone (2.2) and I need to use it to transfer a (.tok) file to Basic Stamp micro RS232 using a USB-Serial converter in between. So bluetooth is out of question. My only option is to write to the USB port of my android and make the BS2 micro receive it.
I`ve never programmed Android so need some guidance as to how I do this, specially when my api level is 8. I need a simple program that reads a downloaded (from the processing local linux PC) file from sdcard and then send it to USB port without any processing. That file is then received by the RS232 port of bot.
Android 2.2 API does not have USB host capabilities.
Host capabilities was not made available until Android 3.1.
This means you can't write an android program on your v2.2 phone that will control the USB communication.
I'm also guessing that even if you did update your OS, the phone doesn't have a USB-A port necessary to power the bus.
no need "usb host", work an older android devices like 2.2 http://code.google.com/p/android-serialport-api/

Categories

Resources