You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Not familiar with protobuf and Meshtastic packet, I try to send a request want_config_id to USB serial port streaming mode, but my Heltec Lora32 V3 is keeping protocol in plain text instead of Protobuf.
Any thoughts ?
void MeshtasticProtocol::encodeFrame(const QByteArray &input, QByteArray &output)
{
output.clear();
output.append(START1);
output.append(START2);
output.append(input.size() / 256); // MSB of protobuf length
output.append(input.size() % 256); // LSB of protobuf length
output.append(input);
}
bool MeshtasticProtocol::sendPacket(const ::google::protobuf::MessageLite *packet)
{
QByteArray input;
input.resize(packet->ByteSizeLong());
packet->SerializeToArray(input.data(), packet->ByteSizeLong());
QByteArray output;
encodeFrame(input, output);
qint64 ret = port_->write(output);
return (ret != -1);
}
void MeshtasticProtocol::requestWantConfigID()
{
meshtastic::ToRadio packet;
packet.set_want_config_id(0x10F2C); // request only my nodeinfo and skip other nodes in the db ?
if(sendPacket(&packet))
qDebug() << "meshtastic want_config_id sent";
}
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi All,
Not familiar with protobuf and Meshtastic packet, I try to send a request want_config_id to USB serial port streaming mode, but my Heltec Lora32 V3 is keeping protocol in plain text instead of Protobuf.
Any thoughts ?
Thanks,
Thierry
Beta Was this translation helpful? Give feedback.
All reactions