>>Are you sure it is a control request, not a simple bulk transfer?
I tried it as bulk/interrupt transfer however there was no response from the
device. The vendor doc doesn't mention anything about the type of request.
This command happens to be the first command run by the demo application.
>>You need to know if you want to send hexadecimal data as ASCII characters
or bytes:
I checked from the USB monitor that the demo application sends it as
"020200013803"
I would like to summarize the whole situation again as there are some more
observations/developments and I might be able to rephrase it better now that
I have some light on USB spec & usb-serial port communication,
When I run the initial code (detailed in the first post) I am able to make
the device (a controller) execute the command since I see the response to
the command in the window of demo application provided by the vendor and,
further, the LED on the device glows indicating that it received the
command. However, I am not able to capture the same response on my program
through dev.read() command.
Secondly, perhaps more significantly, when I close the port through the demo
application (or close the demo app itself) neither the dev.write() nor
dev.read() works.
Now, earlier we believed that there might be some specific vendor command
which might be opening & setting the config such as baudrate, etc. However,
I have reliably learnt from vendor docs & vendor tech support that there
isn't any such specific config commands and that any read/write on port
should either respond with proper info/data or error code from the device.
I understand that managed_open() opens the port implicitly and passes the
handle. However, I am not able to figure out why the program works
(partially at least) when the port is opened via the demo program and stops
if I close the demo program. It shows exact same behaviour when I replace
the demo program with windows hyperterminal.
Some issue related to port opening & response capture which I am unable to
figure out.
On Mon, Jan 17, 2011 at 6:44 PM, Emmanuel Blot <eblot...@gmail.com> wrote:
> > This is a different command. As per the vendor, this is the first command
> to
> > run on port open.
>
> Are you sure it is a control request, not a simple bulk transfer ?
>
> >>> msg_str = binascii.unhexlify("020200013803")
> > Tried it, no difference.
>
> You need to know if you want to send hexadecimal data as ASCII
> characters or bytes:
> "02" and "\x02" are not the same.
>
> Cheers,
> Manu
>
>
> ------------------------------------------------------------------------------
> Protect Your Site and Customers from Malware Attacks
> Learn about various malware tactics and how to avoid them. Understand
> malware threats, the impact they can have on your business, and how you
> can protect your company and customers by using code signing.
> http://p.sf.net/sfu/oracle-sfdevnl
> _______________________________________________
> pyusb-users mailing list
> pyusb-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/pyusb-users
>
------------------------------------------------------------------------------
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand
malware threats, the impact they can have on your business, and how you
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
pyusb-users mailing list
pyusb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pyusb-users