|
-
Nov 10th, 2008, 02:18 PM
#1
Thread Starter
Hyperactive Member
[2005] Accessing Device on USB Port
Hi,
OK, I have been doing some research into accessing devices on a USB port and it's kind of helped, but not really. From what I understand, I can use the IO.Port namespace to access a device on a USB port (usually). Let me know if this is incorrect.
First, I made a simple program that looped through the ports available. I get COM1 and COM3, but I have 4 USB ports. Where are the others?
My Code:
Code:
Dim comm As New List(Of IO.Ports.SerialPort) 'list of comm ports
For Each PNstr As String In IO.Ports.SerialPort.GetPortNames() 'get a list of Com Port Names
comm.Add(New IO.Ports.SerialPort) 'insert new port into list
comm(comm.Count - 1).PortName = PNstr 'set the name
Next
ListBox1.DataSource = comm
ListBox1.DisplayMember = "PortName"
TIA,
Matt
VS 2010 / .NET 4.0 / ASP.NET 4.0
-
Nov 10th, 2008, 02:34 PM
#2
Re: [2005] Accessing Device on USB Port
usb ports do not show up as com ports unless you have a serial port adapter plugged into a usb port.
i did a lot of work for suburban cable / comcast in the philly area. i had an apartment in phoenixville.
-
Nov 10th, 2008, 02:38 PM
#3
Thread Starter
Hyperactive Member
Re: [2005] Accessing Device on USB Port
So how would I get a list of USB ports and how do I access the devices plugged into them?
Really? My gf is from Collegeville and I'm from Lansdale. Small world.
VS 2010 / .NET 4.0 / ASP.NET 4.0
-
Nov 10th, 2008, 03:01 PM
#4
Re: [2005] Accessing Device on USB Port
i was there from 1996 - 2002. The Trappe!
i am not certain what you are trying to do. you will need to talk to the driver for the device attached to the USB port.
-
Nov 10th, 2008, 03:04 PM
#5
Thread Starter
Hyperactive Member
Re: [2005] Accessing Device on USB Port
I've never been there but I have driven past the Trappe several times. Gadzooks!
Well, what I'm trying to do is take my music off of my iPod. I know there are programs out there but they all cost money (F that) and honestly I'd like to learn how to work with Serial Ports.
How do I find the driver for my iPod? Any clue?
VS 2010 / .NET 4.0 / ASP.NET 4.0
-
Nov 10th, 2008, 03:05 PM
#6
Re: [2005] Accessing Device on USB Port
It depends on the device you're plugging in. USB doesn't concern itself with "what" port a piece of hardware is on, just whether it's connected to the computer or not and that you can use it.
If it's a thumb-drive, it'll be in the list of drives.
If it's a printer, it'll be in the list of printers.
If it's a mouse or keyboard, it'll be in the mouse/HID list.
If it's something that emulates an old-fashioned COM port, it'll be in the Serial Port list as mentioned.
What are you trying to detect hooked up?
-
Nov 10th, 2008, 03:10 PM
#7
Re: [2005] Accessing Device on USB Port
Sorry, just missed your post about it being an iPod. iPods are a little flaky and love to exist in their own little worlds compared to all the other MP3 players out there, but it should attach and be detected as a drive.
Connect it and see. Reading other posts, I see people have figured out "which drive is the iPod" by checking all their drives for the specific directory structure of the iPod. When a drive matches up, they got it.
You can then transfer things on and off it with simple IO.FileSystem commands.
-
Nov 10th, 2008, 03:30 PM
#8
Re: [2005] Accessing Device on USB Port
Code:
Dim sDrv() As System.IO.DriveInfo = IO.DriveInfo.GetDrives
For sX As Integer = 0 To sDrv.Length - 1
If sDrv(sX).IsReady Then
Debug.Write("drive ")
Debug.WriteLine(sDrv(sX).RootDirectory)
Debug.WriteLine(sDrv(sX).Name)
Debug.WriteLine(sDrv(sX).VolumeLabel)
Debug.WriteLine(sDrv(sX).DriveFormat)
End If
Next
-
Feb 21st, 2009, 08:36 AM
#9
Member
Re: [2005] Accessing Device on USB Port
Hi Dewayne,
I have a similar question. The device plugged into my USB port emulates a serial port and shows up in the Windows XP Hardware Manager list as 'COMX'. Can I just treat it as a serial port and use your excellent serial port examples to work with it?
Thanks,
Jan Didden
-
Feb 21st, 2009, 08:39 AM
#10
Re: [2005] Accessing Device on USB Port
-
Feb 21st, 2009, 08:54 AM
#11
Member
Re: [2005] Accessing Device on USB Port
-
Feb 21st, 2009, 09:07 AM
#12
Member
Re: [2005] Accessing Device on USB Port
-
Mar 1st, 2009, 07:52 AM
#13
Member
Re: [2005] Accessing Device on USB Port
 Originally Posted by dbasnett
yes.
Hi Dewayne,
After I have found the serial ports on my system, I have to check which is the one for the external USB device I want to talk to. I would gess that I would check a driver property like manufacturer name or driver name (I have that information). The VB .NET Help info hints that such a function is available for a SerialPort but I can't find it anywhere. Do you (or anybody else) know where I can find that kind of stuff?
Thanks,
Jan Didden
-
Aug 17th, 2009, 07:50 AM
#14
Thread Starter
Hyperactive Member
Re: [2005] Accessing Device on USB Port
OK so I was a little dormant, but now I'm back. I've been all over the web and I still can't find a way to access the files on my iTouch. One would think this would be a highly published topic.
I tried looking for it in my drives but all I get back are C: and D: (OS backup). I tried looking at serial ports and get back COMM1 and COMM3, but neither are it. Where the hell is this device? Do I have to use its driver to access the files? If so, does anyone have a good tutorial to using a devices driver?
Any and all help is GREATLY appreciated!!
VS 2010 / .NET 4.0 / ASP.NET 4.0
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|