I think I found an error in cgminer version "3.12.0" this is the version bitmaintech is shipping with batch 8 antminer s3. might be on newer batches as well...
the json returned from the "stats" command is invalid.
this is the json returned.
{\"STATUS\":[{\"STATUS\":\"S\",\"When\":1410555313,\"Code\":70,\"Msg\":\"CGMiner stats\",\"Description\":\"cgminer 3.12.0\"}],\"STATS\":[{\"CGMiner\":\"3.12.0\",\"Miner\":\"7.0.0.3\",\"CompileTime\":\"Tue Aug 26 10:43:10 CST 2014\",\"Type\":\"S3\"}{\"STATS\":0,\"ID\":\"BMM0\",\"Elapsed\":149,\"Calls\":0,\"Wait\":0.000000,\"Max\":0.000000,\"Min\":99999999.000000,\"GHS 5s\":459.00,\"GHS av\":469.49,\"baud\":115200,\"miner_count\":2,\"asic_count\":8,\"timeout\":18,\"frequency\":\"225\",\"voltage\":5,\"hwv1\":7,\"hwv2\":0,\"hwv3\":0,\"hwv4\":3,\"fan_num\":2,\"fan1\":2520,\"fan2\":2280,\"fan3\":0,\"fan4\":0,\"fan5\":0,\"fan6\":0,\"fan7\":0,\"fan8\":0,\"fan9\":0,\"fan10\":0,\"fan11\":0,\"fan12\":0,\"fan13\":0,\"fan14\":0,\"fan15\":0,\"fan16\":0,\"temp_num\":2,\"temp1\":43,\"temp2\":41,\"temp3\":0,\"temp4\":0,\"temp5\":0,\"temp6\":0,\"temp7\":0,\"temp8\":0,\"temp9\":0,\"temp10\":0,\"temp11\":0,\"temp12\":0,\"temp13\":0,\"temp14\":0,\"temp15\":0,\"temp16\":0,\"temp_avg\":42,\"temp_max\":44,\"Device Hardware%\":0.0000,\"no_matching_work\":0,\"chain_acn1\":16,\"chain_acn2\":16,\"chain_acn3\":0,\"chain_acn4\":0,\"chain_acn5\":0,\"chain_acn6\":0,\"chain_acn7\":0,\"chain_acn8\":0,\"chain_acn9\":65535,\"chain_acn10\":0,\"chain_acn11\":0,\"chain_acn12\":0,\"chain_acn13\":0,\"chain_acn14\":0,\"chain_acn15\":0,\"chain_acn16\":0,\"chain_acs1\":\"oooooooo oooooooo \",\"chain_acs2\":\"oooooooo oooooooo \",\"chain_acs3\":\"\",\"chain_acs4\":\"\",\"chain_acs5\":\"\",\"chain_acs6\":\"\",\"chain_acs7\":\"\",\"chain_acs8\":\"\",\"chain_acs9\":\"\",\"chain_acs10\":\"\",\"chain_acs11\":\"\",\"chain_acs12\":\"\",\"chain_acs13\":\"\",\"chain_acs14\":\"\",\"chain_acs15\":\"\",\"chain_acs16\":\"\",\"USB Pipe\":\"0\"}],\"id\":1}
the error is here:
\"STATS\":[{\"CGMiner\":\"3.12.0\",\"Miner\":\"7.0.0.3\",\"CompileTime\":\"Tue Aug 26 10:43:10 CST 2014\",\"Type\":\"S3\"}{\"STATS\":0,
its missing a comma between }{ in this part: \"S3\"}{\"STATS\":0
adding the comma makes it valid.
i'll add a work around in my app.