Setting a Password on the Bootloader
<p>As a test try just entering <code>self</code>, which is a Python reference to the ChipWhisperer object. You can explore other options &amp; Python will report the data-type, for example:</p>
<pre>>>> self
<__main__.ChipWhispererCapture object CWCaptureGUIobject at 0x05E27800>>>>< object at 0x05E2BAF80x06E61030></pre></li>
<li><p>You can also call methods. For example we can send a string with the following:</p>
<pre>>>> self.targetapi.drivergetTarget().ser.write("@@@")</pre></li><li><p>And to retreive the data we would call the read() function, where we specify the number of bytes to attempt to read. As before if we fail to get a response you may need to resend the [mailto:%22@@@ "@@@]" prompt:</p><pre>>>> self.targetapi.drivergetTarget().ser.write("@@@")
>>> self.targetapi.drivergetTarget()
>>> self.targetapi.drivergetTarget().ser.write("@@@")>>> self.targetapi.drivergetTarget()
<li><p>To make typing easier, create variables that point to the read and write functions:</p>
<pre>>>> read = self.targetapi.drivergetTarget()>>> write = self.targetapi.drivergetTarget().ser.write</pre></li>
<li>To set the bootloader on TSB, we need to modify a special page of FLASH memory. First, ensure you've recently (e.g. within < 30 seconds) received the <code>TSB</code> signon prompt. If not resend the <code>@@@</code> string until the call to <code>read(255)</code> returns the <code>TSB</code> prompt. You should read the next step before doing this however.</li>
<li><p>Send the command 'c' to read the last page of flash. Rather than printing to console, simply save this to a variable:</p>
>>> write('q')
>>> write([mailto:'@@@' '@@@'])
>>> read(255)
Approved_users, bureaucrat, administrator