どのようにデータを送信していますか?ライブラリを使用しているか、生のバイトを送信していますか? the manualによると、あなたのデータコマンドは、エスケープシーケンスを開始するだけでなく、持っている必要がありデータ長指定:データサイズに関する
// Each escape sequence starts with the ASCII character 27 (0x1B),
// the equivalent to the ESC key. The contents of < > are a byte or byte stream.
// - Cid is connection id (udp, tcp, etc)
// - Data Length is 4 ASCII char represents decimal value
// i.e. 1400 bytes would be '1' '4' '0' '0' (0x31 0x34 0x30 0x30).
// - Data size must match with specified length.
// Ignore all command or esc sequence in between data pay load.
<Esc>Z<Cid><Data Length xxxx 4 ascii char><data>
注発言:「データペイロードの間にあるすべてのコマンドまたはESCシーケンスを無視"。
// Including a trailing 0 that snprintf insists to write
uint8_t header[8];
// Prepare header: <esc> Z <cid> <ascii length>
snprintf((char*)header, sizeof(header), "\x1bZ%x%04d", cid, len);
// First, write the escape sequence up to the cid. After this, the
// module responds with <ESC>O or <ESC>F.
writeRaw(header, 3);
if (!readDataResponse()) {
if (GS_LOG_ERRORS && this->error)
this->error->println("Sending bulk data frame failed");
return false;
}
// Then, write the rest of the escape sequence (-1 to not write the
// trailing 0)
writeRaw(header + 3, sizeof(header) - 1 - 3);+
// And write the actual data
writeRaw(buf, len);
これべき最も可能性の高い仕事を:
例えば、これはGSCore::writeData function in GSCore.cppがどのように見えるかです。代わりに、汚れたハック送信する前にエスケープ文字をエスケープする、つまり送信する前に2つの文字(0x27 0x27)で各0x27を置き換えることができます - しかし、これは野生の推測であり、あなたは手動で確認する必要があります。
私はライブラリnanopbを使用してデータをパックしています。ありがとう、私はあなたのアイデアを試し、それがうまくいったら報告します! – Unfixable
ありがとうございました!データサイズに関するあなたの提案は、私を問題の根源に導いてくれました。前 私は Y リモートアドレスに変更: UCIDリモートアドレス: リモートポートIは、メッセージ・タイプを使用 リモート・ポート:<データ レン4桁 ASCII>。 データサイズを含めると、モジュールはそのエスケープ文字を実行できませんでした! –
Unfixable