<section id=”llt1491837573460__section_7C43B0DC13254A3AB50AB331C0B67CDD” class=”section”>
<p class=”p”>The ability to <mark class=”highlight”>resend</mark> with modified metadata also applies to error database <mark class=”highlight”>resend</mark>ing. Error database <mark class=”highlight”>resend</mark>ing is performed through
hcicmd with the
<mark class=”highlight”>resend</mark>_errordb command:</p>
<ul id=”llt1491837573460__ul_hkm_xs1_j1b” class=”ul”>
<li class=”li”><mark class=”highlight”>resend</mark>_errordb <var class=”keyword varname”>mid</var>
<li class=”li”><mark class=”highlight”>resend</mark>_errordb <var class=”keyword varname”>mid</var> <var class=”keyword varname”>file name</var> <var class=”keyword varname”>len10|nl|eof</var>
<p class=”p”>If only the <var class=”keyword varname”>mid</var> is supplied, the message with that <var class=”keyword varname”>mid</var> is resent directly from the error database with preserved metadata .</p>
<p class=”p”>If three arguments are provided, the message from the file is sent with metadata from the error db for the given <var class=”keyword varname”>mid</var>. This <var class=”keyword varname”>mid</var> argument supports a range of mids in the same format as hcidbdump, and supports <mark class=”highlight”>resend</mark>ing multiple messages using this mid format:</p>
<pre class=”pre codeblock”><code>x.y.z = only this message</code></pre>
<pre class=”pre codeblock”><code>x.y.z1:x.y.z2 = x.y messages z1 through z2</code></pre>
<p class=”p”>These options takes two arguments:</p>
<pre class=”pre codeblock”><code><mark class=”highlight”>resend</mark>_errordb -m <var class=”keyword varname”>metafilename</var></code></pre>
<p class=”p”>This <mark class=”highlight”>resend</mark>s from the error database, but with modified metadata from a file. This file takes the same format as the SMAT metadata temp file.</p>
<p class=”p”>The mids that are used in the <mark class=”highlight”>resend</mark> come from the metadata file, meaning that when using metadata, <mark class=”highlight”>resend</mark>_errordb also supports <mark class=”highlight”>resend</mark>ing multiple messages.</p>
<p class=”p”>Another option takes four arguments:</p>
<pre class=”pre codeblock”><code><mark class=”highlight”>resend</mark>_errordb -m <var class=”keyword varname”>metafilename</var> <var class=”keyword varname”>msgfilename</var> <var class=”keyword varname”>len10|nl|eof</var></code></pre>
<p class=”p”>This performs an error database <mark class=”highlight”>resend</mark> using both message data and metadata from files. As with <mark class=”highlight”>resend</mark>, if the number of messages in both files do not match, the command returns an error without <mark class=”highlight”>resend</mark>ing any messages.</p>
<p class=”p”>If two or four arguments are used, but the first argument is not <code class=”ph codeph”>-m</code>, the command returns an error.</p>
<p class=”p”>As <mark class=”highlight”>resend</mark>_errordb takes from one to four arguments, the full form that is called from hcicmd is as follows:</p>
<pre class=”pre codeblock”><code>hcicmd -p <var class=”keyword varname”>process_name</var> -c “. <mark class=”highlight”>resend</mark>_errordb <var class=”keyword varname”>mid</var>”
hcicmd -p <var class=”keyword varname”>process_name</var> -c “. <mark class=”highlight”>resend</mark>_errordb -m <var class=”keyword varname”>metafilename</var>”
hcicmd -p <var class=”keyword varname”>process_name</var> -c “. <mark class=”highlight”>resend</mark>_errordb mid <var class=”keyword varname”>msgfilename</var> <var class=”keyword varname”>len10|nl|eof</var>”
hcicmd -p <var class=”keyword varname”>process_name</var> -c “. <mark class=”highlight”>resend</mark>_errordb -m <var class=”keyword varname”>metafilename</var> <var class=”keyword varname”>msgfilename</var> <var class=”keyword varname”>len10|nl|eof</var>”</code></pre>
</section><section id=”llt1491837573460__section_BB652EB058F44D7BB4FA63D6236A94FF” class=”section”>
-n metadata_filename option
<p class=”p”>To simplify these options, hcidbdump enables dumping metadata from the error database into a file of the necessary format. The option for this is <code class=”ph codeph”>-n metadata_filename</code>.</p>
<pre class=”pre codeblock”><code>hcidbdump -n <var class=”keyword varname”>metadata_filename</var> -e -m <var class=”keyword varname”>mid</var> <var class=”keyword varname”>output_filename</var></code></pre>
<p class=”p”>For example:</p>
<pre class=”pre codeblock”><code>hcidbdump -n meta.txt -e -m 0.0.1:0.0.9999 out.txt</code></pre>
<p class=”p”>This generates the metadata file (meta.txt in the above example) which you can modify, use as the second argument to <code class=”ph codeph”><mark class=”highlight”>resend</mark>_errordb</code>.</p>
</section>