{"action":"opened","issue":{"url":"https://api.github.com/repos/tinyos/tinyos-main/issues/338","labels_url":"https://api.github.com/repos/tinyos/tinyos-main/issues/338/labels{/name}","comments_url":"https://api.github.com/repos/tinyos/tinyos-main/issues/338/comments","events_url":"https://api.github.com/repos/tinyos/tinyos-main/issues/338/events","html_url":"https://github.com/tinyos/tinyos-main/issues/338","id":69605592,"number":338,"title":"LPL channel probing is too short","user":{"login":"tim-ist","id":1457772,"avatar_url":"https://avatars.githubusercontent.com/u/1457772?v=3","gravatar_id":"","url":"https://api.github.com/users/tim-ist","html_url":"https://github.com/tim-ist","followers_url":"https://api.github.com/users/tim-ist/followers","following_url":"https://api.github.com/users/tim-ist/following{/other_user}","gists_url":"https://api.github.com/users/tim-ist/gists{/gist_id}","starred_url":"https://api.github.com/users/tim-ist/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tim-ist/subscriptions","organizations_url":"https://api.github.com/users/tim-ist/orgs","repos_url":"https://api.github.com/users/tim-ist/repos","events_url":"https://api.github.com/users/tim-ist/events{/privacy}","received_events_url":"https://api.github.com/users/tim-ist/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-04-20T14:54:12Z","updated_at":"2015-04-20T14:54:12Z","closed_at":null,"body":"We experimented with RPL in LPL mode in Cooja and got low PDR (e.g. 93%) even on a small network of 9 nodes. The reason for the losses was that the duration of the channel probing (5 ms) was much less than the inter-packet interval in the packet train (8 ms). Therefore, sometimes receivers could not detect the TX, hitting the inter-packet holes during all TX attempts (we configured it to 5).\r\nThe attached screenshot clearly demonstrates the problem. Look at the node 1 trying to transmit to node 2 (blue is TX, green is RX, grey is idle listening).\r\n![screenshot1](https://cloud.githubusercontent.com/assets/1457772/7231187/32379da2-e774-11e4-9fb9-323bdf7ef2bb.png)\r\n\r\nNote that broadcast frames (which do not request for an ACK) are sent much more densely (node 6).\r\n\r\nThe problem is in two timing settings. On the sender side, there is the CC2420_ACK_WAIT_DELAY inserted after the TX-completed interrupt and before the sendDone is signalled (unlike broadcasts for which it is signalled immediately). This constant is set to 256 jiffies which for 32768Hz clock gives 256*30.5us=7.8ms.\r\n\r\nOn the receiver side the probing duration is controlled by the number of reads from the CCA pin, MAX_LPL_CCA_CHECKS=400. The actual duration I could only observe in Cooja and it is around 5ms.\r\n\r\nPartial solution: set CC2420_ACK_WAIT_DELAY = 36 which is around 1.1ms. It is enough for hardware-generated ACKs and solves the problem. Although, it may break software acknowledgements if they require more time due to processing.\r\n\r\nI tried to disable hardware ACKs, commenting out the following lines in support/blip/blip.extra:\r\n#PFLAGS += -DCC2420_HW_ACKNOWLEDGEMENTS \r\n#PFLAGS += -DCC2420_HW_ADDRESS_RECOGNITION\r\nBut this broke down everything.\r\n\r\nI am willing to fix this issue, but I would be happy to receive some feedback/guidelines first.\r\nThis was done on TinyOS 2.1.2 but nothing has changed in the CC2420 LPL code since that time."}}