Find the answer to your Linux question:
Results 1 to 7 of 7
Hi there - thanks for looking. I'm interfacing with a device using putty and right now I have to use a reference document to dissect the data I'm sending and ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jun 2010
    Posts
    4

    Building a simple program with Putty commands


    Hi there - thanks for looking.

    I'm interfacing with a device using putty and right now I have to use a reference document to dissect the data I'm sending and receiving. I'd like to build a program that can build packets according to user input and then dissect them upon receipt; basically an [ english <=> proprietary packet structure ] program that talks to the device via USB.

    The packets come in varying sizes, but are composed of well-defined fields and values.

    What do you think the easiest way to accomplish this would be? I'm running Windows XP. Thank you for your time .

  2. #2
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,512
    Putty is basically just a terminal emulator. It can't do much and while it is not uncommon for Linux users to utilize it that doesn't help with what you want to do. You will need to write some Windows program using Java, C#, C, C++, or whatever that will "talk" to the device and do the data conversions you need.

    BTW, why are you using putty? I am presuming that the device has a tty-type interface such as telnet or ssh or a raw command-line that allows a terminal emulator such as putty to communicate with it. That said, you still aren't providing us much information to do more than I did in the paragraph above to help you.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  3. #3
    Just Joined!
    Join Date
    Jun 2010
    Posts
    4
    Thanks for the response rubberman -

    I'm using putty to communicate to the devices exactly like this guy is:

    [I can't post links quite yet... if you search youtube for "Tagsense Active RFID ZR-USB and ZT-100" it's the only one that comes up with that name.]


    So I send the device commands through a serial interface using the terminal emulator, but I would like to communicate serially with a program that I create instead of manually feeding/retrieving data using Putty.

    Does this help? Would I be able to do something like this using C?

    Thanks again for your time, I truly appreciate it.

  4. #4
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,512
    Ok. So it's an RFID tag reader, much like a bar-code scanner. I take it that the data comes back in readable ascii but just too compact to be very human-readable? If so, then a C or C++ program will work just fine. I assume that the device is recognized pretty much as a USB serial device. So, you should be able to open it for read+write access and do normal I/O with the file descriptor. To quote someone-or-other, "A piece of cake"...
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  5. #5
    Just Joined!
    Join Date
    Jun 2010
    Posts
    4
    Great! Thanks for the confirmation. With putty I have to specify the serial line (com5), speed, data size, and stop bits. Can you point me towards any resources that might explain how to accomplish this with C/C++?

  6. #6
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,512
    It varies with the operating system. Since you are running a Windows box, then I suggest some Microsoft programming resources, such as MSDN would be most appropriate for your needs. After all, this IS a Linux forum! But we're happy to help when possible.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  7. #7
    Just Joined!
    Join Date
    Jun 2010
    Posts
    4
    You've been very helpful. Thanks so much

Posting Permissions

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