{"action":"created","issue":{"url":"https://api.github.com/repos/Lora-net/packet_forwarder/issues/7","repository_url":"https://api.github.com/repos/Lora-net/packet_forwarder","labels_url":"https://api.github.com/repos/Lora-net/packet_forwarder/issues/7/labels{/name}","comments_url":"https://api.github.com/repos/Lora-net/packet_forwarder/issues/7/comments","events_url":"https://api.github.com/repos/Lora-net/packet_forwarder/issues/7/events","html_url":"https://github.com/Lora-net/packet_forwarder/issues/7","id":150679594,"number":7,"title":"Server Messages","user":{"login":"MKillev","id":16783944,"avatar_url":"https://avatars.githubusercontent.com/u/16783944?v=3","gravatar_id":"","url":"https://api.github.com/users/MKillev","html_url":"https://github.com/MKillev","followers_url":"https://api.github.com/users/MKillev/followers","following_url":"https://api.github.com/users/MKillev/following{/other_user}","gists_url":"https://api.github.com/users/MKillev/gists{/gist_id}","starred_url":"https://api.github.com/users/MKillev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MKillev/subscriptions","organizations_url":"https://api.github.com/users/MKillev/orgs","repos_url":"https://api.github.com/users/MKillev/repos","events_url":"https://api.github.com/users/MKillev/events{/privacy}","received_events_url":"https://api.github.com/users/MKillev/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-04-24T16:47:10Z","updated_at":"2016-04-25T11:21:36Z","closed_at":null,"body":"Hi,\r\n\r\nI have setup `Lora-net/packet_forwarder` and server;\r\nIs there any standart way to parse the data from messages? \r\nOr can I send only valid json messages with the `packet_forwarder`?\r\n\r\nOn the server I receive messages like this ones:\r\n\r\n```B5�UZ{\"stat\":{\"time\":\"2016-04-24 16:32:37 GMT\",\"rxnb\":2,\"rxok\":2,\"rxfw\":2,\"ackr\":0.0,\"dwnb\":0,\"txnb\":0}}\r\n+@�UZ{\"rxpk\":[{\"tmst\":2934474419,\"chan\":2,\"rfch\":1,\"freq\":868.500000,\"stat\":1,\"modu\":\"LORA\",\"datr\":\"SF7BW125\",\"codr\":\"4/5\",\"lsnr\":6.8,\"rssi\":-67,\"size\":18,\"data\":\"QBEREREAlAMEX5iCQB8ij0ZU\"}]}\r\n���UZ{\"rxpk\":[{\"tmst\":2921073603,\"chan\":0,\"rfch\":1,\"freq\":868.100000,\"stat\":1,\"modu\":\"LORA\",\"datr\":\"SF7BW125\",\"codr\":\"4/5\",\"lsnr\":7.8,\"rssi\":-71,\"size\":18,\"data\":\"QBEREREAkwMEoIEzjVYBnMfH\"}]}\r\ne��UZ{\"rxpk\":[{\"tmst\":2908126707,\"chan\":2,\"rfch\":1,\"freq\":868.500000,\"stat\":1,\"modu\":\"LORA\",\"datr\":\"SF7BW125\",\"codr\":\"4/5\",\"lsnr\":6.2,\"rssi\":-66,\"size\":18,\"data\":\"QBEREREAkgME/9mgCeWD3REa\"}]}\r\nO�UZ{\"rxpk\":[{\"tmst\":2894923683,\"chan\":0,\"rfch\":1,\"freq\":868.100000,\"stat\":1,\"modu\":\"LORA\",\"datr\":\"SF7BW125\",\"codr\":\"4/5\",\"lsnr\":8.2,\"rssi\":-65,\"size\":18,\"data\":\"QBEREREAkQMEi7mXjZsNpziU\"}]}\r\n```\r\n\r\nThanks in advance, any help will be appreciated."},"comment":{"url":"https://api.github.com/repos/Lora-net/packet_forwarder/issues/comments/214271344","html_url":"https://github.com/Lora-net/packet_forwarder/issues/7#issuecomment-214271344","issue_url":"https://api.github.com/repos/Lora-net/packet_forwarder/issues/7","id":214271344,"user":{"login":"mcoracin","id":12232585,"avatar_url":"https://avatars.githubusercontent.com/u/12232585?v=3","gravatar_id":"","url":"https://api.github.com/users/mcoracin","html_url":"https://github.com/mcoracin","followers_url":"https://api.github.com/users/mcoracin/followers","following_url":"https://api.github.com/users/mcoracin/following{/other_user}","gists_url":"https://api.github.com/users/mcoracin/gists{/gist_id}","starred_url":"https://api.github.com/users/mcoracin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mcoracin/subscriptions","organizations_url":"https://api.github.com/users/mcoracin/orgs","repos_url":"https://api.github.com/users/mcoracin/repos","events_url":"https://api.github.com/users/mcoracin/events{/privacy}","received_events_url":"https://api.github.com/users/mcoracin/received_events","type":"User","site_admin":false},"created_at":"2016-04-25T11:21:36Z","updated_at":"2016-04-25T11:21:36Z","body":"Hello,\r\n\r\nI'm not sure I fully get your question.\r\n\r\nThe message format sent by the gateway are formatted as described in the PROTOCOL.txt file you can found in the lora-net/packet_forwarder root directory.\r\n\r\nTypically there are few octets (4 to 12) describing the protocol version, the message type etc...\r\nThen, after those few octets, you have the JSON string which contains the actual packet data.\r\n\r\nSO the server has to parse the few bytes as a binary header, and then any JSON parser car handle the JSON string.\r\n\r\nRegards"}}