Learning the ScanJet protocol