Hi, I've written app for tablet.
My app uses external devices like RFID reader and thermal printer.
But devices are connected to the tablet using wired USB hub, then USB2Serial converter (FTDI or Prolific) and then device.
I'm talking with them sending/receiving simple bytes to/from virtual port in Android. It works great.
But now I'm thinking about making such solution more mobile. I would like to have wireless USB hub, and tablet without any wires.
I have found such devices:
Belkin F5U301
Cables To Go Wireless USB Hub
and a few more.
Unfortunately, none of them have Android support.
I think, there should be a special driver for receiving wireless data and connecting such data to the virtual port in Android.
I suppose, WiFi Direct should be implemented not only in Android device, but on the other side, too.
My question is rather: which device is able to connect to Android tablet - maybe using WiFi Direct, maybe Bluetooth - doesn't matter.
And that connection should be without any special protocols, just raw serial data without wire. That's the point.
Device(s): Samsung Galaxy S II, HTC Evo 4G, Amazon Kindle Fire
Thanks: 52
Thanked 199 Times in 144 Posts
All network communications require some sort of protocol. A protocol doesn't necessarily (and honestly, rarely) need anything to do with a the structure of the information being sent (this is, of course, excluding crucial info such as headers and footers and such). any protocol should be able to transmit raw serial data no problem.
With that said, if you are looking for wireless communications, you really only have a few options: TCP (or UDP), Bluetooth, or Infrared. Your choice will depend on various requirements such as max distance, speed, reliability, etc...
Looks like I can connect to this device without problem using standard WiFi connection. I can access this hub using it's IP address.
But what then? How can I communicate with each of the 4 devices connected to Wireless Hub separately?
I know - that depends on the IOGEAR's solution in this case: maybe for example 5001 port is for 1st device, 5002 for 2nd and so on...
But, what I'm asking is: do you know such working solution - maybe from another producer?
I would like to achieve such wireless connection to Android using any hardware - but working.
Device(s): Samsung Galaxy S II, HTC Evo 4G, Amazon Kindle Fire
Thanks: 52
Thanked 199 Times in 144 Posts
Ports are not registered on a per device basis (speaking of logical ports, not physical ports). There is only one primary port (and sometimes a single or even list of scondary/alternative ports) used for all devices on a network, and this port(s) is implementation dependant--that is, there are various ports that are standard for each protocol, however they are not required. Every device manufacture is granted the decision to either use the standard ports or use their own ports. More often than now, manufacturers use their own ports to add an extra layer of security (whether or not these alternate ports can actually be considered secure is subject for debate and is another issue entirely).
With that said, the best solution for you, given your requirements, is to use a Socket object (Socket | Android Developers). This provides a network connection to a specific host on a network. There are various constructors with different parameter lists that are useful for different scenarios. You will need to pick the best one for your particular implementation.
Once you have established a valid socket connection, you can use the appropriate methods to obtain InputStreams and OutputStreams for that connection. With those on hand, you can construct more specific stream objects (i.e. DataInputStream, FileInputStream, BufferedReader, etc..) required for your particular implementation requirements.
The Following User Says Thank You to jonbonazza For This Useful Post:
I've found serial-to-ethernet and serial-to-wireless converters which are accessible through socket connection to specific IP-port. For example: WiSnap-AAA at Serialio.com or VESP211-232.
jonbonazza, there is not a problem to connect using socket - that's clear to me.
Fornow the problem is: is that possible to connect through socket and create some kind of virtual serial port in Android?
As you understand, I wouldn't like to make a straight connection from my application to the IP address, but I would like to use virtual serial port im my system - no matter if created by local USB driver or by remote socket connection. Is that possible?
Interesting thread. I'm currently working with the GUWIP204 Wifi Hub. I'm trying to get it to work on mobile devices but I'm stuck at the same spot. I can connect via the IP but I can't get any data out of the stream or find how to define each port on the hub.
Has the OP made any progress on getting at this? My assumption is that the GUWIP204 data is encrypted and that's why I can't read anything.
But hey I'm just a cameraman what do I know about programming.
If anyone has any information on this beyond what's been posted I'd be appreciative!!