Sorry to trouble you. I got a clue from an earlier reply from Gert and fixed the problem. The fault is with the modem, which (I think) should send CONNECT\r\n but just sends CONNECT\r. -- Mike