Football Fans: Download the 2012 Schedule App from Google Play!


Go Back   Android Forums > Android Development > Application Development

Application Development Dev Lounge for the Coder Folks



Reply
 
LinkBack Thread Tools
Old February 10th, 2012, 05:44 AM   #1 (permalink)
New Member
 
Join Date: Feb 2012
Posts: 4
 
Device(s): Acer Iconia A501
Thanks: 0
Thanked 0 Times in 0 Posts
Default Connect wireless USB hub

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.

Is there any solution for such problem?

Ciupaska is offline  
Reply With Quote
Sponsors
Old February 12th, 2012, 07:55 PM   #2 (permalink)
Over Macho Grande?
 
alostpacket's Avatar
 
Join Date: Nov 2009
Location: NY
Posts: 7,090
 
Device(s): GalaxyNexus(LTE), NexusOne, OG Droid, GalaxyTab 10.1(LTE), Eris, Logitech Revue (fishtank)
Thanks: 4,164
Thanked 3,126 Times in 1,292 Posts
Default

This may not be of much help to you yet, but in time almost all Android devices will support WiFi Direct (new in Android 4.0)

WiFiDirectDemo - Wi-Fi Direct Demo | Android Developers

You may want to also look at Alljyon:

https://www.alljoyn.org/
alostpacket is offline  
Reply With Quote
Old February 13th, 2012, 03:41 AM   #3 (permalink)
New Member
 
Join Date: Feb 2012
Posts: 4
 
Device(s): Acer Iconia A501
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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.

So, do you have any ideas?
Ciupaska is offline  
Reply With Quote
Old February 13th, 2012, 01:40 PM   #4 (permalink)
Over Macho Grande?
 
alostpacket's Avatar
 
Join Date: Nov 2009
Location: NY
Posts: 7,090
 
Device(s): GalaxyNexus(LTE), NexusOne, OG Droid, GalaxyTab 10.1(LTE), Eris, Logitech Revue (fishtank)
Thanks: 4,164
Thanked 3,126 Times in 1,292 Posts
Default

have a look at AllJoyn
alostpacket is offline  
Reply With Quote
Old February 13th, 2012, 09:45 PM   #5 (permalink)
Senior Member
 
Join Date: Jul 2010
Posts: 977
 
Device(s): Samsung Galaxy S II, HTC Evo 4G, Amazon Kindle Fire
Thanks: 52
Thanked 199 Times in 144 Posts
Default

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...
jonbonazza is online now  
Reply With Quote
Old February 14th, 2012, 04:09 AM   #6 (permalink)
New Member
 
Join Date: Feb 2012
Posts: 4
 
Device(s): Acer Iconia A501
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I know that only TCP and Bluetooth is the solution.
AllJoyn looks ok, but that is not the point, I think.

Look at this device:
IOGEAR - GUWIP204 - Wireless 4-Port USB Sharing Station

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.
Ciupaska is offline  
Reply With Quote
Old February 14th, 2012, 10:32 AM   #7 (permalink)
Senior Member
 
Join Date: Jul 2010
Posts: 977
 
Device(s): Samsung Galaxy S II, HTC Evo 4G, Amazon Kindle Fire
Thanks: 52
Thanked 199 Times in 144 Posts
Default

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.
jonbonazza is online now  
Reply With Quote
The Following User Says Thank You to jonbonazza For This Useful Post:
alostpacket (February 14th, 2012)
Old March 1st, 2012, 02:36 AM   #8 (permalink)
New Member
 
Join Date: Feb 2012
Posts: 4
 
Device(s): Acer Iconia A501
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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?
Ciupaska is offline  
Reply With Quote
Old April 2nd, 2012, 04:53 PM   #9 (permalink)
New Member
 
Join Date: Apr 2012
Posts: 1
 
Device(s):
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hey guys,

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!!
MeisterX is offline  
Reply With Quote
Reply

Bookmarks


Go Back   Android Forums > Android Development > Application Development User CP
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -5. The time now is 12:17 PM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
Custom vBulletin Skins by: Relivo