Solved

Get data from an external device.

Posted on 2011-03-17
2
664 Views
Last Modified: 2012-05-11
I'm asking this question as a beginner tackling a hard external device problem.  So any general advice or lessons are greatly appreciated.

I am trying to connect and capture data from an external device connected to my PC.  This device is connected via a db9 serial cable to a usb converter, then into my usb port.  The data represents a 3-digit number on a simple hand-held display.  
I am running ubuntu 10.10 running on vmware.  I am running this on a windows 7 machine, but I want to keep it all within vmware linux if at all possible.  
I can see the data on the hand-held display and I'm connected via my data port, but I have no idea how to capture this data on my PC.

1. The first thing I want to do is verify that I can connect through a normal linux command prompt program just to verify that I can read the data.  
How do I accomplish this?  

2. The second thing I want to do is to capture the data into a python program.  This seems like mission impossible, given I'm still trying to figure out step 1.  But I want to attempt anyway.   ideally I want to do the following:

    prompt> python mycode.py
        - connect to device
        - read data
        - print value from device

What libraries, procedures, and steps do I need in order to capture this data from a python code?  

--------------begin device specs---------------
Serial data format:
1200 Baud, 8 bits, No Parity, One stop bit

Pinout descriptions for the device:
Pin 1, NC
Pin 2, power in or out, diode protected, Vout = Vbatteries or Vdcpower, Vin =
12VDC max
Pin 3, power in or out, same as pin 2
Pin 4, NC
Pin 5, data out, serial data, 1200 baud, N-8-1
Pin 6, Common
Pin 7, Common
Pin 8, NC

Data format:
x Device use only, Hex value
0x7E ASCII Tilda
0x20 ASCII Space
H Hundreds digit in ASCII (0x30 to 0x32)
T Tens digit in ASCII (0x30 to 0x39)
O Ones digit in ASCII (0x30 to 0x39)
0x2E ASCII Period
0x20 ASCII Space
0x4D or 0x4B ASCII M or K depending on display units selected
0x50 ASCII P
0x48 ASCII H
x Device use only, Hex value
0x0A ASCII Line feed
0x0D ASCII Carriage return
--------------end device specs---------------
0
Comment
Question by:tmonteit
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 3

Accepted Solution

by:
Alberto Cortes earned 500 total points
ID: 35162389
Read next cookbook for USB devices in vmware workstation:
http://www.vmware.com/support/ws45/doc/devices_usb_ws.html#1020963
0
 

Author Comment

by:tmonteit
ID: 35162401
More info....I found the device using lsusb -v.  
Now trying to figure out how to connect to it via some type of tty terminal program.  Hopefully the cookbook has some info.

Bus 002 Device 006: ID 067b:2303 Prolific Technology, Inc. PL2303 Serial Port
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               1.10
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0        64
  idVendor           0x067b Prolific Technology, Inc.
  idProduct          0x2303 PL2303 Serial Port
  bcdDevice            3.00
  iManufacturer           1
0

Featured Post

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
plsql job on oracle 18 78
Nifty tent 7 57
sed/awk/tail: how to read 3'de last line 4 44
Ruby or Python 7 61
Monitor input from a computer is usually nothing special.  In this instance it prevented anyone from using the computer.  This was a preconfiguration that didn't work.
In the modern office, employees tend to move around the workplace a lot more freely. Conferences, collaborative groups, flexible seating and working from home require a new level of mobility. Technology has not only changed the behavior and the expe…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question