This is a total hack, but for those of you who are getting 'Connection unsuccessful' error and are sure that the serial port is working fine (i.e. by checking it with a program like TeraTerm and typing in '99') then you can set chk to be 1 (or 2 or 3), depending on which pde you had uploaded into the Arduino.
% query script type
fwrite(a.aser,[57 57],'uchar');
chk=fscanf(a.aser,'%d');
chk = 1; % SHOULDN'T HAVE TO DO THIS!