


I'm pretty sure this is the result of a bug in the scope and not in my code or libusb.Ĭonfusingly, commands must be terminated by \r while responses are terminted by \n. For example, the :WAV:DATA? command sends extra bytes after the \n which look like a buffer is not terminated correctly. The host should consider the data to be terminated with a \n, even if extra data is received. The scope will always return the amount of data requested, even if this causes data from old transfers to be returned.Ī response is always one line of text. If you read less than this, data may be lost or future transfers may be corrupted. The host must read the amount of data indicated by the Get Response Length packet in a single read. In this case the host must read the data and get the length again to find out how much, if any, data remains to be read. If there are more than 255 bytes of response data waiting to be read, Get Response Length will return 255. After the command is sent, the length of the response is obtained with the Get Response Length command, and then response data is read with Read Data. One byte indicating the length of data to read with Read Data below.Ĭommands are sent to the scope ony byte at a time with Send byte packets. The scope accepts GPIB commands over USB with a simple protocol which involves only control packets: Get Response Length Request I am not responsible for what you do to your hardware. There may be commands which can damage the scope in some way, and there are definitely commands that will crash the scope and erase the calibration data. Since the scope can have its firmware upgraded over USB, it is almost certainly possible to "brick" it if you get into firmware upgrade mode and send the wrong data. Most of this is not documented by Agilent or Rigol. Use this information and code at your own risk. I would also like to control the scope from other programs. Since I primarily use Linux, I need different software. It used to be a separate option you had to buy and was tied to a particular scope, but now it is free. It is not (easily) controllable by other programs.The USB protocol is undocumented, however, and the only software that supports it is Agilent's (Rigol's) Scope Connect software. These scopes have a USB interface built in and Agilent sells optional RS-232 and GPIB interfaces. I expect the others to be identical except for slight differences in firmware and the front-end electronics. I have the DSO3102A, so all this information is based on that model. There are four scopes in the series with different bandwidths: They are actually rebadged Rigol DS5000 series scopes. The DSO3000 series oscilloscopes from Agilent are low-cost (as digital scopes go) digital storage oscilloscopes.
