Downlink buffer from string (url parameter)

Hi

I currently able to send downlink buffer to a device with this function :

msg.id = msg.payload.id; // get device id from param url
var pl = Buffer.from([0x5A,0x00,0x0A]);

return {
dev_id: msg.id,
port: 1,
payload: pl
};

Question :
I try to get from my url a string and use it to create my buffer. Ex: mynodered/update?id=myiddevice&upd=\0x5A\0x00\0x0A

msg.id = msg.payload.id; // get device id from param url
msg.upd = msg.payload.upd; // get upd from param url

var pl = Buffer.from(msg.upd);

return {
dev_id: msg.id,
port: 1,
payload: pl
};

Anyone can help me about that ?

Thanks

Welcome to all to answer my post please.