我正在使用 HDP 样本并且我有一个血压传感器 (http://www.andonline.com/medical/products/details.php?catname=&product_num=UA-767PBT-C)。我从中获取数据,但我不知道如何将其解析为人类可读的内容。
这是我到目前为止尝试过的类似:
while(fis.read(data) > -1) {
String value = null;
BigInteger bi = new BigInteger(data);
// for(byte b:data){
// value+=b;
// }
Log.d("read data binary", "the data "+bi.toString(2));
Log.d("read data decimal", "the data "+bi.toString());
Log.d("read data hexa", "the data "+bi.toString(16));
Log.d("read data pure", "the data "+data);
// Log.d("read data in for", "the data "+value);
我得到类似的东西:
05-01 20:17:56.208: D/读取数据六进制(4760):数据-00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005-01 20:17:56.208: D/丁/丁/丁/丁/read data pure (4760): data [B@40d67e70 05-01 20:18:04.626: D/ read data binary(4760):数据-00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005-01 20:18:06.828: D/丁/丁/丁/丁/读取数据十进制(4760):数据-0576160767677597715480386547121881849032192752633260581611407011853157254121988717573734877969134052424768517755583145720631774483604063081880432610973919518566690840732483917669693281934080872472643538204409333772095149193754543981303816862226602900932185731291218078343359909141826950522259981065979565825353771918309503909195400250270592097346140180255661323498680525840321588156171474185334819513148415443728234379507600359229093281074473243790684599034208199088683338454677621174483491191074351971358537028690315653099028602232230871902656137643830877283946170700882775921345249124458496887893344541537861170446155618915889154457316279931810886758741778466015814266662502325019252008275552963949417505527790579950678630694847351385927023263169674418774269260054062018597523133414318281716321106676019125971120320369677915824373299981376100493615932096583905733998938604880344209979507207389461881566668730566105933697505053128626488714804178563386957441767127359946655045064697358061551371027355282580217366653953689149217957268335824794738057555973823505958847701190906572003379211131572099550194123133402637104389561589064917255194334844269183378807442410026970212304915398750162342030862720562356574960395088223916289512342191699176716017309140213638536098383639091011729776310430620082118888497862622038695401701710387402100087840950940846152066514765108855402410952099725385450736354603210781118974198215554193785785859382435002755250153009251411946038850315108576684984106702193657963347897709677566091677495576556681656068507314031372074156531214767021895212919495909358260588291818568553609578646758938365326563499166628415041706131521582622947791012917744251071555344476280175567553030365868879087958701356749275597544555441192209535828193783528540378443653793007478915664994969246893177676787034473169357958664807853394146528881072611495728346161885141354339050534315795112871110590890270640490572109200167490678091854953195502952814139817930997734428369811037792170901222000605941722889749066363212792188473959033320542149557873698406208807103283915464017738102761293835485103233871320167686509199843523640244281618906825238870441363628235844748462133103276301174838663071551726880398794656562034968579187231564731597466312085292931401626425031219367372880105669524021703795487930074660269606852850348561943174481059683047939007210225601490478637988520094254176801854728550931572581072192577323801255123376568421142859931699183781795327546624931509936963718203679145081654772615676143950491156457709879833213770861474166550002893895004539378141404484514321501254425186584306317322820119080073521246583023928855680771674834459485547140458179583411000552946721557465941584607592684759973667328534420531200360125049393165249939125462273655943012452796198719607891446709638525939136041376672224464954765768003499209670257743095489459555485012164498854972198547405433983837840151414071849172134515511345320372998343869719318698995124097830586163312565522099108379088383907029795001179557033732925854106484925992046251994418246510444641426185467437327268959477603463411587255087111960727666751094267733565670470254329185066819049347190875320805571892878980923324446702125088753743095489459555485012164498854972198547405433983837840151414071849172134515511345320372998343869719318698995124097830586163312565522099108379088383907029795001179557033732925854106484925992046251994418246510444641426185467437327268959477603463411587255087111960727666751094267733565670470254329185066819049347190875320805571892878980923324446702125088753743095489459555485012164498854972198547405433983837840151414071849172134515511345320372998343869719318698995124097830586163312565522099108379088383907029795001179557033732925854106484925992046251994418246510444641426185467437327268959477603463411587255087111960727666751094267733565670470254329185066819049347190875320805571892878980923324446702125088753
任何人都知道如何解析它,好吗?
PS:很抱歉把所有东西都放在了logcat里,但也许有人发现了任何联系