{"action":"created","issue":{"url":"https://api.github.com/repos/EliasOenal/multimon-ng/issues/63","repository_url":"https://api.github.com/repos/EliasOenal/multimon-ng","labels_url":"https://api.github.com/repos/EliasOenal/multimon-ng/issues/63/labels{/name}","comments_url":"https://api.github.com/repos/EliasOenal/multimon-ng/issues/63/comments","events_url":"https://api.github.com/repos/EliasOenal/multimon-ng/issues/63/events","html_url":"https://github.com/EliasOenal/multimon-ng/issues/63","id":231913153,"number":63,"title":"Found a problem in the Decode function","user":{"login":"Zanoroy","id":8195365,"avatar_url":"https://avatars0.githubusercontent.com/u/8195365?v=3","gravatar_id":"","url":"https://api.github.com/users/Zanoroy","html_url":"https://github.com/Zanoroy","followers_url":"https://api.github.com/users/Zanoroy/followers","following_url":"https://api.github.com/users/Zanoroy/following{/other_user}","gists_url":"https://api.github.com/users/Zanoroy/gists{/gist_id}","starred_url":"https://api.github.com/users/Zanoroy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Zanoroy/subscriptions","organizations_url":"https://api.github.com/users/Zanoroy/orgs","repos_url":"https://api.github.com/users/Zanoroy/repos","events_url":"https://api.github.com/users/Zanoroy/events{/privacy}","received_events_url":"https://api.github.com/users/Zanoroy/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":96,"created_at":"2017-05-29T02:15:49Z","updated_at":"2017-06-02T03:51:06Z","closed_at":null,"body":"I have converted your code to C# to use with SDRShape.\r\n\r\nI found a problem in your code that results in sections of messages being missed and a false report of 'Invalid Offset'.\r\n\r\nIn the 'demod_flex.c' you have:\r\n`\r\n\r\n\t\tint mw2 = mw1+len;\r\n                ...\r\n\t\tif (mw1 > 87 || mw2 > 87){\r\n\t\t\tverbprintf(3, \"FLEX: Invalid Offsets\\n\");\r\n\t\t\tcontinue;\t\t\t\t// Invalid offsets\r\n\t\t}\r\n\r\n\t\tif (is_alphanumeric_page(flex))\r\n\t\t\tparse_alphanumeric(flex, phaseptr, PhaseNo, mw1, mw2-1, j);\r\n\r\n`\r\n\r\nYou are getting the message length from the VIW and adding it to the start position, but the start position is the first word, there for the length needs to be reduced by 1, which you are doing when calling the parse_alphanumeric, unfortunately you have the if statement above it checking that mw1 and mw2 fall within the buffer range (which with split messages they do not, your logic always results in mw2 being 88).\r\n\r\nChange the code to the following and it works: (I have not tested with numeric or tone only messages)\r\n`\r\n\r\n\t\tint mw2 = mw1+len - 1;\r\n                 ...\r\n\t\tif (mw1 > 87 || mw2 > 87){\r\n\t\t\tverbprintf(3, \"FLEX: Invalid Offsets\\n\");\r\n\t\t\tcontinue;\t\t\t\t// Invalid offsets\r\n\t\t}\r\n\r\n\t\tif (is_alphanumeric_page(flex))\r\n\t\t\tparse_alphanumeric(flex, phaseptr, PhaseNo, mw1, mw2, j);\r\n\r\n`\r\n\r\nI hope that made sense.\r\n"},"comment":{"url":"https://api.github.com/repos/EliasOenal/multimon-ng/issues/comments/305682312","html_url":"https://github.com/EliasOenal/multimon-ng/issues/63#issuecomment-305682312","issue_url":"https://api.github.com/repos/EliasOenal/multimon-ng/issues/63","id":305682312,"user":{"login":"jklnz","id":26646690,"avatar_url":"https://avatars1.githubusercontent.com/u/26646690?v=3","gravatar_id":"","url":"https://api.github.com/users/jklnz","html_url":"https://github.com/jklnz","followers_url":"https://api.github.com/users/jklnz/followers","following_url":"https://api.github.com/users/jklnz/following{/other_user}","gists_url":"https://api.github.com/users/jklnz/gists{/gist_id}","starred_url":"https://api.github.com/users/jklnz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jklnz/subscriptions","organizations_url":"https://api.github.com/users/jklnz/orgs","repos_url":"https://api.github.com/users/jklnz/repos","events_url":"https://api.github.com/users/jklnz/events{/privacy}","received_events_url":"https://api.github.com/users/jklnz/received_events","type":"User","site_admin":false},"created_at":"2017-06-02T03:51:06Z","updated_at":"2017-06-02T03:51:06Z","body":"Cool thanks - I have recompiled it and am running it now, I will let you know how it goes. Interesting you mention about Long messages as it looked like some of the messages that were missed yesterday were in a bunch of messages (e.g. about 6 pages came through within 5-10 seconds and one/two was missed)"}}
{"actor":{"display_login":"jklnz"}}