gpg-connect-agent produces invalid output when using hex encoding.
Example:
nephirus@soridormi:~$ gpg-connect-agent --hex 'scd random 16' /bye D[0000] 19 FD 22 34 52 77 11 5B AE 28 EB ED 01 45 99 DB .."4Rw.[.(...E.. OK
There is no space after 'D'. This is an invalid Assuan message:
Assuan manual, 3.1 Server responses:
... There must be exactly one space after the ’D’. ...
Without '--hex' flag, output is correct:
nephirus@soridormi:~$ gpg-connect-agent 'scd random 16' /bye D �<������k����9? OK