I want to send HEX to my End Device from Node Red. The Hex is from 2 to 16 bytes long.
I my function node I have
// Get AppID and DevID as saved from last uplink
const appId = msg.payload.app_id;
const devId = msg.payload.dev_id;
const bytes = ‘03’;// Set Topic
msg.topic =${appId}/devices/${devId}/down
;//Set Payload
msg.payload = {
dev_id: devId,
port: 2,
confirmed: false,
schedule: ‘replace’,
payload_raw: Buffer.from(bytes).toString(‘base64’),
//payload_raw: bytes
};return msg;
I my Console I see
What encoder do I need?