請問大佬們我如何給機(jī)器返回組裝為68 8c 00 03 0c 32 30 32 31 30 38 30 33 31 30 31 30 00 00 06 22 05 30 16 38 14 bc e5 這種格式。
我這邊普通發(fā)送過去就是字符串他們不認(rèn)識,要16進(jìn)制,而我的格式是這種
688c00470c32303231303830333130313000122205311357195805字符串他不認(rèn)識,請問怎么解決呢
接收16進(jìn)制數(shù)據(jù)
當(dāng)收到數(shù)據(jù)后用函數(shù)bin2hex($bin_data)可以將數(shù)據(jù)轉(zhuǎn)換成16進(jìn)制。
發(fā)送16進(jìn)制數(shù)據(jù)
發(fā)送數(shù)據(jù)前用hex2bin($hex_data)將16進(jìn)制數(shù)據(jù)轉(zhuǎn)換成二進(jìn)制發(fā)送。
http://m.wtbis.cn/doc/workerman/faq/send-recv-hexadecimal-data.html