从字节6开始解码有效负载

时间:2019-12-02 21:42:49

标签: javascript decode payload lora

我正在从设备发送文本数据。该文本包含在字节6的数组中。请问有人可以帮助我确定如何从字节6解码该数组吗?

Base64是:

  

AwYABgABMTIzNEtn

我目前使用的代码是:

function Decode(fport, bytes) {
  // Decode plain text; for testing only 
  return {
      receivedString: String.fromCharCode.apply(null, bytes)
  };
}

这显然以文本形式返回完整的字节字符串,如下所示:

Picture of full byte string as text

我不希望从前5个字节返回数据,因为这些是停止符,等等。我仅对提取“ 1234Kg”感兴趣

欢迎提出任何想法!

谢谢, 李

0 个答案:

没有答案