Hello,

I'm trying to communicate with an Analog Devices evaluation board (SDP-H1
<http://www.analog.com/en/design-center/evaluation-hardware-and-software/evaluation-boards-kits/eval-sdp-h1.html>).
AD has a windows software that initializes the board and can be used to
read the data coming from the USB connection with the board.

I have been trying to write something in pyusb that can do the same and
work with my Raspberry Pi. *So far, I have figured out how to initialize
the board. I need help in understanding the protocol used in fetching data
from it.*

Device Descriptor: http://shailendra.me/USB.html
Here is the PCAP file of the USB trace:
https://github.com/vcidst/vcidst.github.io/blob/master/sdph1-data_clean.pcap
(you can use wireshark to open pcap files)

I've read a lot of write-ups of people reverse engineering USB protocols
which mostly include looking at the control transfers. However, this device
only has two bulk endpoints and all the communication is done with bulk
transfers.

Quick facts about the PCAP file:
* Replaying packets 1-108 initialize the board.
* At packet 109 (use filter frame.time_relative >= 40), In the windows
software I chose sample size 1048576 and press Continuous Capture button.
* Packets 109 to 119 prepare the capture from SDP-H1.
* From packet 120, 6 packets of similar structure are sent/received again
and again.
* After that, I see 6 packets of different structure at
(frame.time_relative >= 41.059593)
* Packets after (frame.time_relative >=41.073968) are of different
structure again until the end.
* Towards the end, I stop the capture from the windows software thus the
last few packets should be stop packets .

My questions now are,
1. Is this device following any standard USB protocol format that I am not
familiar with?
2. I'm currently replaying the packets to initialize the device, is there a
better way to do this?
3. (a basic question that I still don't understand) in USB Communication,
after I have sent Bulk Write request. Do I need to send a bulk read request
if I need to read some data? Can the program just not read whatever the
device sends without me sending the device anything?
4. The data packets here are huge and I was wondering if I need to send the
entire packets whenever sending a bulk write request. Is there a way I can
figure out what is essential information in the packet and what is not?

(I have read the Bulk Transfer section
<http://www.beyondlogic.org/usbnutshell/usb4.shtml#Bulk> from USB in a
Nutshell but still didn't understand why it has to be this way unlike say,
RS232 communication where the device can keep on sending data in continuous
mode)

PS: Happy Holidays to everyone!

Thanks!
Shailendra
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
pyusb-users mailing list
pyusb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pyusb-users

Reply via email to