I’m trying to do the following: download a small file (200KB) from the attached flash-drive on my ConnectPort X4. It is running a Python script based on the http://www.digi.com/wiki/developer/index.php/Module:digiweb callback routine:
if path.startswith("/getFileFromUSB"): print "** Trying to send a file from the USB Flash drive" print time.clock() response = open("A/%s"%(path.split('/',2)), 'rb').read() print time.clock() return (digiweb.TextPlain, response)
However, this means that every file that I read takes up some 3 seconds for barely 200KB of data. I see the same issue when downloading from the internal Flash memory (/FS/WEB/…)
Is this a setting somewhere, or is the hardware really limited to about 70 KB/second?
Note: using this in your digiweb callback makes every file on the USB drive potentially readable by anyone with access to the device.