Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is Nak Limit?

Am trying to understand how the Android Open Accessory API works with the Arduino ADK board, I've been able send and receive information but I just want to know how everything works. I got to this function description:

int AndroidAccessory::read(void *buff, int len, unsigned int nakLimit) {
  return usb.newInTransfer(1, in, len, (char *)buff, nakLimit); 
}

From some googling I figured that NAK is some code that gets sent if something went wrong during the handshake, so is NAK limit the number of communication errors one is able to receive?

like image 477
SoftwareDev Avatar asked Dec 31 '11 03:12

SoftwareDev


People also ask

What does Nak stand for?

Short for negative acknowledgment, NAK is a signal sent by computers or network devices connected to a network as an indication a signal was not received or corrupted during transmission. If the signal is properly received an ACK is sent. Was this page useful? Yes No

What is NAK (Negative Acknowledgment)?

What is NAK (Negative AcKnowledgment)? Short for negative acknowledgment, NAK is a signal sent by computers or network devices connected to a network as an indication a signal was not received or corrupted during transmission. If the signal is properly received an ACK is sent.

What is NAK and why is it dangerous?

NaK is highly reactive with water (like its constituent elements) and may catch fire when exposed to air, so must be handled with special precautions. NaK containing 40% to 90% potassium by weight is liquid at room temperature.

Is NAK a solid liquid or gas?

Various commercial grades are available. NaK is highly reactive with water (like its constituent elements) and may catch fire when exposed to air, so must be handled with special precautions. NaK containing 40% to 90% potassium by weight is liquid at room temperature.


1 Answers

NAK is no Communication error. It simply states that the Device is not ready to send a reply or that there are no data to send at this moment. As I understand it the NAK limit in this function will just make sure that there's a defined end for the function. In case of Full Speed USB a NAK will be generated every 1ms. For more information about the NAK try this: http://www.beyondlogic.org/usbnutshell/usb3.shtml#USBPacketTypes

like image 131
user1176976 Avatar answered Oct 08 '22 10:10

user1176976