Results 1 to 10 of 10

Thread: Send and receive data via usb

  1. #1

    Thread Starter
    Hyperactive Member Ivenesco's Avatar
    Join Date
    Sep 2007
    Location
    Poland, Lublin
    Posts
    325

    Send and receive data via usb

    Hello,
    I'm trying to learn some specific WM programming, so I'll be glad if anyone can write me anything about it, or show tutorials etc.

    Subject:
    Receiving and sending data via buil-in usb port.
    I'm planning to connect some kind of controller to my pda, and I need to send data to it.
    Also, I'll need to receive data from sensors (connected to that controller?).

    I'll be glad for any tutorial or reference, thanks!
    "Only two things are infinite; the universe and human stupidity, and I'm not sure about the former."
    Albert Einstein

  2. #2
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    40,106

    Re: Send and receive data via usb

    Gee, that sounds...like a PDA that is about to be used as a robot controller. Cool.

    I haven't really tried that exactly. I used TCP to communicate data out from a PDA that was docked, but from the sounds of it, you are probably talking about something like the SerialPort object. Would that be correct? I haven't used that in the CF, but I have used it in a desktop system to communicate with a robot controller via a Bluetooth dongle. If serial communication is what you will be doing, that would be relevant.
    My usual boring signature: Nothing

  3. #3

    Thread Starter
    Hyperactive Member Ivenesco's Avatar
    Join Date
    Sep 2007
    Location
    Poland, Lublin
    Posts
    325

    Re: Send and receive data via usb

    Great!
    It's exactly what I'm planing to do: learn how control robot with PDA ;-)
    It's kind of... weird project, and I'm not sure where to start, so I"ll be glad for any help. And, if you know something about robot controllers, it'd be helpfull too (I have a lot to learn about it, so any help would be great).

    I've found one solution:
    -Connect microcontroller to usb, and write C program on this controller to control servo, engine etc. So, PDA send data to microcontroller and it's doing proper action. Or, sensor send signal to this microcontroller, and it send digital version to PDA via usb.

    It's only one sample way, how to do this, and still I'm not good at this, so I'll be glad for any tutorials etc. on how to do it ;-)

    In case of microcontrollers, I fonud this 2 (which looks proper):
    http://www.arduino.cc/
    http://focus.ti.com/docs/toolsw/fold...430-f2013.html
    Last edited by Ivenesco; Mar 25th, 2009 at 06:37 PM.
    "Only two things are infinite; the universe and human stupidity, and I'm not sure about the former."
    Albert Einstein

  4. #4
    Frenzied Member Lightning's Avatar
    Join Date
    Oct 2002
    Location
    Eygelshoven
    Posts
    1,611

    Re: Send and receive data via usb

    What would be very helpful is a driver for the device you connect to your PDA. Otherwise it is quite difficult. Do you have a driver?
    VB6 & C# (WCF LINQ) mostly


    If you need help with a WPF/WCF question post in the NEW WPF & WCF forum and we will try help the best we can

    My site

    My blog, couding troubles and solutions

    Free online tools

  5. #5

    Thread Starter
    Hyperactive Member Ivenesco's Avatar
    Join Date
    Sep 2007
    Location
    Poland, Lublin
    Posts
    325

    Re: Send and receive data via usb

    No, now I looking for proper device.
    "Only two things are infinite; the universe and human stupidity, and I'm not sure about the former."
    Albert Einstein

  6. #6
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    40,106

    Re: Send and receive data via usb

    Take a look at the serial port class. I like the look of that little controller. The one I bought went out of production more than a year ago, so it isn't worth recommending. I will continue using it for now, since it works well enough, but I found a nicer one (might be US only) about six months after buying.

    However, the controller looks like it is using a serial interface, so the SerialPort class might be the core item you will use to communicate. It looks like you should have that on the PDA, and there are examples out there on how to enumerate ports. I would guess that the USB port is a COM port on the PDA.
    My usual boring signature: Nothing

  7. #7

    Thread Starter
    Hyperactive Member Ivenesco's Avatar
    Join Date
    Sep 2007
    Location
    Poland, Lublin
    Posts
    325

    Re: Send and receive data via usb

    "However, the controller looks like it is using a serial interface, so the SerialPort class might be the core item you will use to communicate."

    So, I'll need to cut one side of USB cabel, to get single threads, and connect them to controller port? Or to pins?
    "Only two things are infinite; the universe and human stupidity, and I'm not sure about the former."
    Albert Einstein

  8. #8
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    40,106

    Re: Send and receive data via usb

    I certainly don't see a USB connector, but I do see what looks like a 9 pin serial connector. There are USB to serial converters, though they are oddly expensive. I don't know whether you can simply cut a USB cable and work with it, but it might do. You should have four lines in USB, one of which +V, Gnd, TX and RX. You'd probably only want to hook up the Gnd, Tx and Rx, unless the controller can be powered by the USB, though I wouldn't think a PDA would source power. I'd want to do a bit more research on that whole thing, though. A converter would be the first thing I'd be looking into.

    Funny that all controllers seem to still be using serial while no computers have that port anymore.
    My usual boring signature: Nothing

  9. #9

    Thread Starter
    Hyperactive Member Ivenesco's Avatar
    Join Date
    Sep 2007
    Location
    Poland, Lublin
    Posts
    325

    Re: Send and receive data via usb

    I've bought texas instruments controller (http://focus.ti.com/docs/toolsw/fold...430-f2013.html), and it has "Spy-Bi-Wire" connector, and 14 analog pins. Maybe it'd be possible to use this connector to read data from usb... I'll see what can be done, but it'll take me a while (controller is en route to me from USA, and I don't have a lot of time now to make experiments).
    Btw. I've asked my friend, who is studying some kind of IT in Dublin, and he's going to talk about it with school-mates. Maybe they know how to solve it.
    "Only two things are infinite; the universe and human stupidity, and I'm not sure about the former."
    Albert Einstein

  10. #10
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    40,106

    Re: Send and receive data via usb

    At the very least, they can probably afford to cut a few cables and experiment. When I was in school there were plenty of people who would get into something like that.
    My usual boring signature: Nothing

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width