I transferred a state file from the EXA to my work station via SCPI but the file does not match the same file when I transfer using SMB using smbclient. When I copy the file back and use 'recall state' the EXA says it is corrupted.
I am using the LAN interface in perl. Comparing the two files I can see (at least) the 6 bytes in the first 16 are different.
The Register001.state is the file fetched with smbclient (which I can put pack and it works), test.state was transferred using SCPI. The 4 0xff in the first line are missing in the test.state file.
I used wireshark to monitor the transfer and the EXA is not sending the data.
I am using the SCPI command "mmem:data? \"D:\\User_My_Documents\\Instrument\\My Documents\\system\\Register001.state\"\r\n" to transfer the file.
Is there something I am not doing correctly?
[roger@lab-bunny-1 ate]$ hexdump -C Register001.state | head
00000000 00 01 00 00 00 ff ff ff ff 01 00 00 00 00 00 00 |................|
00000010 00 04 01 00 00 00 1c 53 79 73 74 65 6d 2e 43 6f |.......System.Co|
00000020 6c 6c 65 63 74 69 6f 6e 73 2e 48 61 73 68 74 61 |llections.Hashta|
00000030 62 6c 65 07 00 00 00 0a 4c 6f 61 64 46 61 63 74 |ble.....LoadFact|
00000040 6f 72 07 56 65 72 73 69 6f 6e 08 43 6f 6d 70 61 |or.Version.Compa|
00000050 72 65 72 10 48 61 73 68 43 6f 64 65 50 72 6f 76 |rer.HashCodeProv|
00000060 69 64 65 72 08 48 61 73 68 53 69 7a 65 04 4b 65 |ider.HashSize.Ke|
00000070 79 73 06 56 61 6c 75 65 73 00 00 03 03 00 05 05 |ys.Values.......|
00000080 0b 08 1c 53 79 73 74 65 6d 2e 43 6f 6c 6c 65 63 |...System.Collec|
00000090 74 69 6f 6e 73 2e 49 43 6f 6d 70 61 72 65 72 24 |tions.IComparer$|
[roger@lab-bunny-1 ate]$ mv data.file test.state
[roger@lab-bunny-1 ate]$ hexdump -C test.state | head
00000000 00 01 00 00 00 01 00 00 00 00 00 00 00 04 01 00 |................|
00000010 00 00 1c 53 79 73 74 65 6d 2e 43 6f 6c 6c 65 63 |...System.Collec|
00000020 74 69 6f 6e 73 2e 48 61 73 68 74 61 62 6c 65 07 |tions.Hashtable.|
00000030 00 00 00 4c 6f 61 64 46 61 63 74 6f 72 07 56 65 |...LoadFactor.Ve|
00000040 72 73 69 6f 6e 08 43 6f 6d 70 61 72 65 72 10 48 |rsion.Comparer.H|
00000050 61 73 68 43 6f 64 65 50 72 6f 76 69 64 65 72 08 |ashCodeProvider.|
00000060 48 61 73 68 53 69 7a 65 04 4b 65 79 73 06 56 61 |HashSize.Keys.Va|
00000070 6c 75 65 73 00 00 03 03 00 05 05 0b 08 1c 53 79 |lues..........Sy|
00000080 73 74 65 6d 2e 43 6f 6c 6c 65 63 74 69 6f 6e 73 |stem.Collections|
00000090 2e 49 43 6f 6d 70 61 72 65 72 24 53 79 73 74 65 |.IComparer$Syste|
I am using the LAN interface in perl. Comparing the two files I can see (at least) the 6 bytes in the first 16 are different.
The Register001.state is the file fetched with smbclient (which I can put pack and it works), test.state was transferred using SCPI. The 4 0xff in the first line are missing in the test.state file.
I used wireshark to monitor the transfer and the EXA is not sending the data.
I am using the SCPI command "mmem:data? \"D:\\User_My_Documents\\Instrument\\My Documents\\system\\Register001.state\"\r\n" to transfer the file.
Is there something I am not doing correctly?
[roger@lab-bunny-1 ate]$ hexdump -C Register001.state | head
00000000 00 01 00 00 00 ff ff ff ff 01 00 00 00 00 00 00 |................|
00000010 00 04 01 00 00 00 1c 53 79 73 74 65 6d 2e 43 6f |.......System.Co|
00000020 6c 6c 65 63 74 69 6f 6e 73 2e 48 61 73 68 74 61 |llections.Hashta|
00000030 62 6c 65 07 00 00 00 0a 4c 6f 61 64 46 61 63 74 |ble.....LoadFact|
00000040 6f 72 07 56 65 72 73 69 6f 6e 08 43 6f 6d 70 61 |or.Version.Compa|
00000050 72 65 72 10 48 61 73 68 43 6f 64 65 50 72 6f 76 |rer.HashCodeProv|
00000060 69 64 65 72 08 48 61 73 68 53 69 7a 65 04 4b 65 |ider.HashSize.Ke|
00000070 79 73 06 56 61 6c 75 65 73 00 00 03 03 00 05 05 |ys.Values.......|
00000080 0b 08 1c 53 79 73 74 65 6d 2e 43 6f 6c 6c 65 63 |...System.Collec|
00000090 74 69 6f 6e 73 2e 49 43 6f 6d 70 61 72 65 72 24 |tions.IComparer$|
[roger@lab-bunny-1 ate]$ mv data.file test.state
[roger@lab-bunny-1 ate]$ hexdump -C test.state | head
00000000 00 01 00 00 00 01 00 00 00 00 00 00 00 04 01 00 |................|
00000010 00 00 1c 53 79 73 74 65 6d 2e 43 6f 6c 6c 65 63 |...System.Collec|
00000020 74 69 6f 6e 73 2e 48 61 73 68 74 61 62 6c 65 07 |tions.Hashtable.|
00000030 00 00 00 4c 6f 61 64 46 61 63 74 6f 72 07 56 65 |...LoadFactor.Ve|
00000040 72 73 69 6f 6e 08 43 6f 6d 70 61 72 65 72 10 48 |rsion.Comparer.H|
00000050 61 73 68 43 6f 64 65 50 72 6f 76 69 64 65 72 08 |ashCodeProvider.|
00000060 48 61 73 68 53 69 7a 65 04 4b 65 79 73 06 56 61 |HashSize.Keys.Va|
00000070 6c 75 65 73 00 00 03 03 00 05 05 0b 08 1c 53 79 |lues..........Sy|
00000080 73 74 65 6d 2e 43 6f 6c 6c 65 63 74 69 6f 6e 73 |stem.Collections|
00000090 2e 49 43 6f 6d 70 61 72 65 72 24 53 79 73 74 65 |.IComparer$Syste|
Files such as state files and screen images are transferred in block data format. This means that it contains a header which describes how large the actual data portion of the file is. For example, when I read back a state file using Agilent Connection Expert (ACE), the header was “#6107533”. The “#” indicates block data format. The first number after the “#” indicates the number of digits to follow which will describe the number of bytes in the data. In this case, 6 digits. The six digits are “107533” and means that there should be 107533 bytes of data to follow.
Smbclient is probably handling the header correctly, but your Perl program might not be.
This is fine for reading the data into your computer. But when you transfer the data back to the analyzer, you need to strip off the original header before transferring it.
To determine where the error is occurring, save the file you read back from the analyzer originally. If it contains a block data header as described above, remove the header and re-save the file. Now, compare that file to the file on the D: drive of the analyzer. They should be identical. If they are, we know that the transfer from the analyzer to the computer was successful.
Then, transfer the file back to the analyzer, and compare it to the original (you might want to save the file to a different directory so that you can use the same filename). If the two files do not agree, but the previous check of the transfer from analyzer to computer was successful, then you know the problem is in the transfer from the computer to the analyzer.
I hope this helps -