{"action":"created","issue":{"url":"https://api.github.com/repos/brocaar/loraserver/issues/4","repository_url":"https://api.github.com/repos/brocaar/loraserver","labels_url":"https://api.github.com/repos/brocaar/loraserver/issues/4/labels{/name}","comments_url":"https://api.github.com/repos/brocaar/loraserver/issues/4/comments","events_url":"https://api.github.com/repos/brocaar/loraserver/issues/4/events","html_url":"https://github.com/brocaar/loraserver/issues/4","id":144709137,"number":4,"title":"Question: Implementation of mac commands","user":{"login":"ivajloip","id":170915,"avatar_url":"https://avatars.githubusercontent.com/u/170915?v=3","gravatar_id":"","url":"https://api.github.com/users/ivajloip","html_url":"https://github.com/ivajloip","followers_url":"https://api.github.com/users/ivajloip/followers","following_url":"https://api.github.com/users/ivajloip/following{/other_user}","gists_url":"https://api.github.com/users/ivajloip/gists{/gist_id}","starred_url":"https://api.github.com/users/ivajloip/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ivajloip/subscriptions","organizations_url":"https://api.github.com/users/ivajloip/orgs","repos_url":"https://api.github.com/users/ivajloip/repos","events_url":"https://api.github.com/users/ivajloip/events{/privacy}","received_events_url":"https://api.github.com/users/ivajloip/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2016-03-30T20:24:24Z","updated_at":"2016-04-16T14:33:03Z","closed_at":null,"body":"Hi Orne,\r\n\r\nYesterday I started looking into the MAC commands and here is how I imagine them to work (let me know if that seems OK to you). \r\n\r\n* `LinkCheckReq`/`LinkCheckAns` is somewhat clear (I think that we take `lsnr` or 0 if `lsnr` is negative and the number of times the packet was received and construct the answer).\r\n* The other MAC commands should be sent by the users (in my opinion through the web interface). It sounds somewhat OK for me if only one set of MAC commands can be saved per device. I would expect that the MAC commands would be more important than the user data if we have to choose between the two (although that might be configurable) as they are supposed to optimize the performance of the end device. I would also expect that in the MAC commands set there are only commands with unique CID. The reason for this assumption is that I did not see any requirement for the order of the MAC commands' answers and if this is the case, then having multiple times the same CID would lead to ambiguous answers. Generally it seems reasonable to be able to send multiple `NewChannelReq`, but I guess it is not that crucial. The user will be able to see the answers to the last set of MAC commands through the web interface.\r\n\r\nI have already implemented the part for `LinkCheckReq`/`LinkCheckAns` (as described above), but I was not able to test it today, so ~~I will test it tomorrow~~ I will test it as soon as my end device recovers from whatever happened to it  and push it to my fork. Depending on our discussion I can implement the rest as well and make a pull request.\r\n\r\nWhat do you think about all that?\r\n\r\nThanks,\r\nIvaylo Petrov"},"comment":{"url":"https://api.github.com/repos/brocaar/loraserver/issues/comments/210827761","html_url":"https://github.com/brocaar/loraserver/issues/4#issuecomment-210827761","issue_url":"https://api.github.com/repos/brocaar/loraserver/issues/4","id":210827761,"user":{"login":"brocaar","id":165497,"avatar_url":"https://avatars.githubusercontent.com/u/165497?v=3","gravatar_id":"","url":"https://api.github.com/users/brocaar","html_url":"https://github.com/brocaar","followers_url":"https://api.github.com/users/brocaar/followers","following_url":"https://api.github.com/users/brocaar/following{/other_user}","gists_url":"https://api.github.com/users/brocaar/gists{/gist_id}","starred_url":"https://api.github.com/users/brocaar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brocaar/subscriptions","organizations_url":"https://api.github.com/users/brocaar/orgs","repos_url":"https://api.github.com/users/brocaar/repos","events_url":"https://api.github.com/users/brocaar/events{/privacy}","received_events_url":"https://api.github.com/users/brocaar/received_events","type":"User","site_admin":false},"created_at":"2016-04-16T14:33:03Z","updated_at":"2016-04-16T14:33:03Z","body":"I've had a quick look at the diff: https://github.com/brocaar/loraserver/compare/master...Acklio:mac-commands?expand=1\r\n\r\nFirst of all, thanks for your efforts!\r\n\r\nHowever, the diff is huge. This makes it really hard to give good feedback and to shape it into a mergable state as it covers a lot of parts of the architecture. As well I'm a bit surprised by the amount of work that you already did. I would have preferred to discuss the right implementation and approach first."}}