Hi,<br><br>I am currently implementing ieee1284 compatibility & nibble mode at device side.<br>My device is connected to DB25 of host.<br><br>Currently my driver at device side, supports compatibility mode and nibble mode, and <br>
working fine with data transfers in both directions.<br><br>I struck-up where am trying to issue a Device ID request to the host.<br>
Basically, I would like to read the Device ID of my printer (which is of thermal printer).<br clear="all"><br>I have used the below application code to issue a Device ID request on host side:<br><br>=========================<br>
mode = IEEE1284_MODE_NIBBLE | IEEE1284_DEVICEID;<br>if (ioctl(dat.fd, PPNEGOT, &mode)) {<br> perror("PPNEGOT (1)");<br> close(dat.fd);<br> return 1;<br>}<br><br>#define MAX_DEVICEID_LEN 1024<br>len = MAX_DEVICEID_LEN;<br>
ret = read(dat.fd, dat.buf, len);<br>if (ret < 0) {<br> perror("read");<br> close(dat.fd);<br> return 1;<br>}<br><br>============================<br>Here the ioctl (PPNEGOT) is failing by saying "No such device or address".<br>
<br>I am wondering that it is passing when I try to read the data from host in nibble mode.<br>I could confirm that nibble mode is working fine, but Device ID request in nibble mode is throwing the above fault.<br><br>Please help me in this regards,<br>
<br>-- <br><i style="font-family:garamond,serif;color:rgb(51, 51, 51)">regards,</i><div style="font-family:garamond,serif;color:rgb(51, 51, 51)"><i>-Nagesh A</i></div><br>