{"action":"created","issue":{"url":"https://api.github.com/repos/cnlohr/esp82xx/issues/61","repository_url":"https://api.github.com/repos/cnlohr/esp82xx","labels_url":"https://api.github.com/repos/cnlohr/esp82xx/issues/61/labels{/name}","comments_url":"https://api.github.com/repos/cnlohr/esp82xx/issues/61/comments","events_url":"https://api.github.com/repos/cnlohr/esp82xx/issues/61/events","html_url":"https://github.com/cnlohr/esp82xx/issues/61","id":236755072,"number":61,"title":"Cannot upgrade via WEB [SOLVED, WITH PATCH]","user":{"login":"king2","id":2644588,"avatar_url":"https://avatars3.githubusercontent.com/u/2644588?v=3","gravatar_id":"","url":"https://api.github.com/users/king2","html_url":"https://github.com/king2","followers_url":"https://api.github.com/users/king2/followers","following_url":"https://api.github.com/users/king2/following{/other_user}","gists_url":"https://api.github.com/users/king2/gists{/gist_id}","starred_url":"https://api.github.com/users/king2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/king2/subscriptions","organizations_url":"https://api.github.com/users/king2/orgs","repos_url":"https://api.github.com/users/king2/repos","events_url":"https://api.github.com/users/king2/events{/privacy}","received_events_url":"https://api.github.com/users/king2/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2017-06-19T00:18:19Z","updated_at":"2017-06-19T20:25:01Z","closed_at":"2017-06-19T19:42:43Z","body":"Just accurately merged new fresh downloaded lib into my firmware and found a problem: I cannot upgrade mpfs or firmware via web interface.\r\n\r\nI have added some debug outputs to commonservices.c and can see that it receives strange data from web end. It succesfully parses commands (but strangely erased blocks in sequence of 8, 12, 13, 14..).\r\n\r\nI have tried to see which data comes to spi_flash_write ('x' command) and found nothing that looks like my firmware files - and data received looks strange. It received as\r\n99 00 33 00 00 66 00 00 44 00 00 11 00 44 00 00 00 00 00 11 00 44 00 66 cc 77 cc 00 00 00 00 00\r\ninstead of \r\nE9 03 00 60 04 00 10 40 00 00 10 40 6C 7C 00 00\r\n\r\nWhen I have commented colon2++ (just after FLASH_PROTECTION_BOUNDARY check), I got my first 'E' back, so I think that or we do not getting a char from web, or we do not should skip this char from data received.\r\n\r\nNext, I was wondered by 'r1 = r2 = fromhex1( *(colon2++) );' line. It assigns same values to both variables and check all these variables later one by one!\r\n\r\nHmmmm, maybe some compilers calls fromhex1 twice from this code?\r\n\r\nI have de-composed this line to:\r\nr1 = fromhex1( *(colon2++) );\r\nr2 = fromhex1( *(colon2++) );\r\n\r\nAnd WOW! It started to work.\r\n\r\nSo, I have one question and one proposal.\r\n1. Why colon2 was incremented (and its value was skipped)? Maybe something wrong here?\r\n2. Please, return two calls to fromhex1 back! Some compilers with some optimization settings can raise headache to users in this place.\r\n\r\nThanks!"},"comment":{"url":"https://api.github.com/repos/cnlohr/esp82xx/issues/comments/309563361","html_url":"https://github.com/cnlohr/esp82xx/issues/61#issuecomment-309563361","issue_url":"https://api.github.com/repos/cnlohr/esp82xx/issues/61","id":309563361,"user":{"login":"king2","id":2644588,"avatar_url":"https://avatars3.githubusercontent.com/u/2644588?v=3","gravatar_id":"","url":"https://api.github.com/users/king2","html_url":"https://github.com/king2","followers_url":"https://api.github.com/users/king2/followers","following_url":"https://api.github.com/users/king2/following{/other_user}","gists_url":"https://api.github.com/users/king2/gists{/gist_id}","starred_url":"https://api.github.com/users/king2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/king2/subscriptions","organizations_url":"https://api.github.com/users/king2/orgs","repos_url":"https://api.github.com/users/king2/repos","events_url":"https://api.github.com/users/king2/events{/privacy}","received_events_url":"https://api.github.com/users/king2/received_events","type":"User","site_admin":false},"created_at":"2017-06-19T20:25:01Z","updated_at":"2017-06-19T20:25:01Z","body":"I have created pull request #62 that will fix this problem."}}
{"actor":{"display_login":"king2"}}