Fwd: Fwd: Re: pl2303 linux driver does not work

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




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





--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux