Closed simortus closed 3 years ago
Hi @simortus What example are you using? Beautiful Copenhagen, I hope to return soon
closed due to inactivity
Hey, Sorry about the late reply, got busy with work and holidays. I hope you had a good time as well:) I am using the ABP example. I am using chirpstack loran server. Typically base64 is the go for, but no results. I use this to decode. let me know if I need to change something? Cheers. var result = ""; for(var i = 0; i < bytes.length; ++i){ result+= (String.fromCharCode(bytes[i])); } var decodedStr = (result).toString('base64'); // var decodedStr = (result).toString(); return decodedStr;
@wolftrax5 can you help here?
Where ?
On Wed, 19 Aug 2020 at 16.54, Sabas notifications@github.com wrote:
@wolftrax5 https://github.com/wolftrax5 can you help here?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/BeelanMX/Beelan-LoRaWAN/issues/42#issuecomment-676476103, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKQXXB5FUAF5IGZCA6DCQJLSBPRQZANCNFSM4PH4U2OQ .
-- Sent from Gmail Mobile
how you are implementing that function? and witch version of her chirpstack server are you using, can you share how are you implementing. the bytes should be an array of numbers, if you receive strings this will never return somethings and on a resents versions of chirpstack server, has a template of decode function.
const data = [65,66,67]
function decode (bytes) {
var result = ''
for (var i = 0; i < bytes.length; ++i) {
result += (String.fromCharCode(bytes[i]))
}
var decodedStr = (result).toString('base64')
// var decodedStr = (result).toString();
return decodedStr
}
console.log(decode(data))
//ABC
closed due to inactivity
Hi, thanks for your contribution, Can you tell what encoding are you using? i get unreadable chars on chirpstack! i want to add a chirpstack repo when I finalize this. If you are around in Copenhagen, lets get that beer 👍