{"action":"created","issue":{"url":"https://api.github.com/repos/chazshi/mico-image/issues/1","labels_url":"https://api.github.com/repos/chazshi/mico-image/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/chazshi/mico-image/issues/1/comments","events_url":"https://api.github.com/repos/chazshi/mico-image/issues/1/events","html_url":"https://github.com/chazshi/mico-image/issues/1","id":118189572,"number":1,"title":"img 发送接收流程","user":{"login":"EcutDavid","id":10692276,"avatar_url":"https://avatars.githubusercontent.com/u/10692276?v=3","gravatar_id":"","url":"https://api.github.com/users/EcutDavid","html_url":"https://github.com/EcutDavid","followers_url":"https://api.github.com/users/EcutDavid/followers","following_url":"https://api.github.com/users/EcutDavid/following{/other_user}","gists_url":"https://api.github.com/users/EcutDavid/gists{/gist_id}","starred_url":"https://api.github.com/users/EcutDavid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EcutDavid/subscriptions","organizations_url":"https://api.github.com/users/EcutDavid/orgs","repos_url":"https://api.github.com/users/EcutDavid/repos","events_url":"https://api.github.com/users/EcutDavid/events{/privacy}","received_events_url":"https://api.github.com/users/EcutDavid/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-11-21T11:01:16Z","updated_at":"2015-11-23T07:56:04Z","closed_at":null,"body":"为了解决mico模块发送接收图片的问题，需要确认发送接收流程，本issue用于解决此问题。"},"comment":{"url":"https://api.github.com/repos/chazshi/mico-image/issues/comments/158872355","html_url":"https://github.com/chazshi/mico-image/issues/1#issuecomment-158872355","issue_url":"https://api.github.com/repos/chazshi/mico-image/issues/1","id":158872355,"user":{"login":"1113240207","id":15042680,"avatar_url":"https://avatars.githubusercontent.com/u/15042680?v=3","gravatar_id":"","url":"https://api.github.com/users/1113240207","html_url":"https://github.com/1113240207","followers_url":"https://api.github.com/users/1113240207/followers","following_url":"https://api.github.com/users/1113240207/following{/other_user}","gists_url":"https://api.github.com/users/1113240207/gists{/gist_id}","starred_url":"https://api.github.com/users/1113240207/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/1113240207/subscriptions","organizations_url":"https://api.github.com/users/1113240207/orgs","repos_url":"https://api.github.com/users/1113240207/repos","events_url":"https://api.github.com/users/1113240207/events{/privacy}","received_events_url":"https://api.github.com/users/1113240207/received_events","type":"User","site_admin":false},"created_at":"2015-11-23T07:56:04Z","updated_at":"2015-11-23T07:56:04Z","body":"更新文件传输JSON数据格式\r\n2015/11/23 15:51 对msg_id为1和11的数据帧进行的修改，增加了file_type项,同时file_name限制为最大4个字节的字符\r\n\r\n```\r\n======================设备上传文件 APP接收文件====================\r\n/*--------------start-----------------*/\r\n\"{\r\n\t\"msg_id\": 1,                    //id为1,(设备-->APP) ---->int32\r\n    \"file_name\": \"test\",\t\t\t//文件名  ------> string (文件名限制为4个字符'0'-'9','a'-'z','A'-'Z')\r\n    \"file_type\": 1,\t\t\t\t\t//文件类型 1:jpg格式 2:PNG格式 为以后传输其他文件预留接口 ------>int32\r\n    \"file_len\": 2233  \t\t\t\t//文件大小共2233 Byte ------> int32\r\n}\"\r\n\r\n/*--------------start_ACK-----------------*/\r\n\"{\r\n\t\"msg_id\": 2,                    //id为2,(APP-->设备)---->int32\r\n    \"state\":0,                      //0:APP可以接收文件  1:APP正在接收文件 2:APP正在发送文件\r\n                                    //只有在state为0的情况下,才可以进行文件传输\r\n    \"file_name\": \"test\",\t\t\t//文件名  ------> string\r\n    \"file_len\": 2233  \t\t\t\t//文件大小共2233 Byte ------> int32\r\n}\"\r\n\r\n\r\n/*--------------文件流-----------------*/\r\n\"{\r\n\t\"msg_id\": 3, \t\t\t\t\t//id为3,(设备-->APP)---->int32\r\n    \"file_name\": \"test\",\t\t\t//文件名  ------> string\r\n    \"group_num\": 0,\t\t\t\t\t//组号为0  ------> int32\r\n    \"file_mem_len\": 384,\t\t\t//文件子包长度  ------> int32\r\n    \"file_mem_info\": \"00010203\"\t    //文件子包内容，是字符格式(传输的数据是384*2个字符)  ------> string \r\n}\"\r\n\r\n/*--------------文件流_ACK-----------------*/\r\n\"{\r\n\t\"msg_id\": 4,                    //id为4,(APP-->设备)---->int32\r\n\t\"re_send\": false,               //重发标志位\r\n    \"file_name\": \"test\",\t\t\t//文件名  ------> string\r\n    \"group_num\": 0\t\t\t\t\t//组号为0  ------> int32\r\n}\"\r\n\r\n\r\n/*--------------end-----------------*/\r\n\"{\r\n\t\"msg_id\": 5,                    //id为5,(设备-->APP)---->int32\r\n    \"file_name\": \"test\"\t\t\t\t//文件名  ------> string\r\n}\"\r\n\r\n/*--------------end_ACK-----------------*/\r\n\"{\r\n\t\"msg_id\": 6,                    //id为6,(APP-->设备)---->int32\r\n    \"file_name\": \"test\"\t\t\t\t//文件名  ------> string\r\n}\"\r\n\r\n\r\n======================设备下载文件 APP下发文件====================\r\n/*--------------start-----------------*/\r\n\"{\r\n\t\"msg_id\": 11,                    //id为11,(APP-->设备)---->int32\r\n    \"file_name\": \"test\",\t\t\t //文件名  ------> string (文件名限制为4个字符,'0'-'9','a'-'z','A'-'Z')\r\n    \"file_type\": 1,\t\t\t\t\t //文件类型 1:jpg格式 2:PNG格式 为以后传输其他文件预留接口  ------>int32\r\n    \"file_len\": 2233  \t\t\t\t //文件大小共2233 Byte ------> int32\r\n}\"\r\n\r\n/*--------------start_ACK-----------------*/\r\n\"{\r\n\t\"msg_id\": 12,                    //id为2,(设备-->APP)---->int32\r\n    \"state\":0,                       //0:设备可以接收文件  1:设备正在接收文件 2:设备正在发送文件\r\n                                     //只有在state为0的情况下,才可以进行文件传输\r\n    \"file_name\": \"test\",\t\t     //文件名  ------> string\r\n    \"file_len\": 2233  \t\t\t\t //文件大小共2233 Byte ------> int32\r\n}\"\r\n\r\n/*--------------文件流-----------------*/\r\n\"{\r\n\t\"msg_id\": 13, \t\t\t\t\t//id为3,(APP-->设备)---->int32\r\n    \"file_name\": \"test\",\t\t    //文件名  ------> string\r\n    \"group_num\": 0,\t\t\t\t\t//组号为0  ------> int32\r\n    \"file_mem_len\": 384,\t\t\t//文件子包长度  ------> int32\r\n    \"file_mem_info\": \"00010203\"\t    //文件子包内容，是字符格式(传输的数据是384*2个字符)  ------> string \r\n}\"\r\n\r\n/*--------------文件流_ACK-----------------*/\r\n\"{\r\n\t\"msg_id\": 14,                    //id为4,(设备-->APP)---->int32\r\n\t\"re_send\": false,                //重发标志位\r\n    \"file_name\": \"test\",\t\t     //文件名  ------> string\r\n    \"group_num\": 0\t\t\t\t\t //组号为0  ------> int32\r\n}\"\r\n\r\n/*--------------end-----------------*/\r\n\"{\r\n\t\"msg_id\": 15,                    //id为5,(APP-->设备)---->int32\r\n    \"file_name\": \"test\"\t\t\t \t //文件名  ------> string\r\n}\"\r\n\r\n/*--------------end_ACK-----------------*/\r\n\"{\r\n\t\"msg_id\": 16,                    //id为6,(设备-->APP)---->int32\r\n    \"file_name\": \"test\"\t\t\t \t //文件名  ------> string\r\n}\"\r\n\r\n```\r\n\r\n\r\n"}}