1

I'm used ESP8266 receive data from atmega328pb via Serial and send these data to my MQTT broker (mosquitto). From server side I use NodeJS receive buffer but can not convert these data to string.

Sample buffer:
<Buffer 2b a1 71 2f c5 2b c2 d0 dc ec 3a 04 8c 62 4a 05 0d 0a>

Convert to Json:
{"type":"Buffer","data":[43,161,113,47,197,43,194,208,220,236,58,4,140,98,74,5,13,10]}

Convert to String uft8:
+�q/�+����:�bJ

My default text: 0100001100

How to fix this? Thank you.

hardillb
  • 54,545
  • 11
  • 67
  • 105
mangovn
  • 364
  • 2
  • 12

0 Answers0