Linux Serial subsystem development
 help / color / mirror / Atom feed
From: "Batdelger.O" <david.batdelger@grapecity.mn>
To: linux-serial@vger.kernel.org
Subject: Fwd: Fwd: Re: pl2303 linux driver does not work
Date: Wed, 05 Nov 2014 12:11:00 +0800	[thread overview]
Message-ID: <5459A354.2000006@grapecity.mn> (raw)
In-Reply-To: <5459A26A.2080204@grapecity.mn>


Thank you for your quick response.
It's  just simple python code. I'm not sure if flow control is correct. 
I also used gtkterm and tried by every option.  I'm new at usbserial 
devices. How to know how should it be?

    import time
    import serial
    import sys

    ser = serial.Serial(
         port='/dev/ttyUSB0',
         baudrate=4800,
         parity=serial.PARITY_ODD,
         stopbits=serial.STOPBITS_ONE,
         bytesize=serial.EIGHTBITS,
         # timeout=0
    )

    # RTS 0 DTR 1. not sure it's correct one. I tried by reverse.
    ser.setRTS(False)
    ser.setDTR(True)


    print ser.isOpen()

    ON="\x1B\x5D"
    ser.write(ON)
    ser.flushOutput()
    print "after write"
    # read = ser.read()
    # sys.stdout.write("RECEIVED:" + read + "\n")
    ser.close()


-- 
Best regards,
Batdelger.O R&D engineer
Grapecity Mongolia LLC


On 2014.11.05 10:25, Greg KH wrote:
> On Wed, Nov 05, 2014 at 09:37:59AM +0800, Batdelger.O wrote:
>> Hello
>> Hope you guys are doing great.
>> I've got problem with pl2303 Linux driver. In a nutshell, my mission is to
>> control magnetic card reader/writer with PL-2303 XA / HXA chip from the
>> Linux. I'm using Ubuntu 14.04(kernel version: 3.13.0-39-generic). Everything
>> is going fine. Giving no errors. Writing data via usb-serial seems to work.
>> But the device is not receiving data. If that issue familiar with you,
>> please give me advice.
> How exactly are you "writing data"?  And have you set up flow control
> properly?
>
> thanks,
>
> greg k-h
>

-- 
Best regards,
Batdelger.O R&D engineer
Grapecity Mongolia LLC






       reply	other threads:[~2014-11-05  4:11 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <5459A26A.2080204@grapecity.mn>
2014-11-05  4:11 ` Batdelger.O [this message]
2014-11-05  4:29   ` Fwd: Fwd: Re: pl2303 linux driver does not work Greg KH
2014-11-06  2:28     ` Batdelger.O
2014-11-06  3:36       ` Greg KH
2014-11-05 19:58         ` Batdelger.O

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5459A354.2000006@grapecity.mn \
    --to=david.batdelger@grapecity.mn \
    --cc=linux-serial@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox