dsap Setup Instructions¶
Purpose¶
Use these instructions on an Assembly Laptop to install dsap,
initialize its local provisioning data, and prepare the system for
device flashing and provisioning.
Flashing and configuring devices using dsap is currently Windows-only.
Maintenance and development of dsap require a Linux-like environment,
such as macOS or Linux, and are not part of this procedure.
After you complete this setup, continue with the dsap Flashing Instructions (production).
Setup Overview¶
Before starting, confirm that you are working on an Assembly Laptop, that Windows PowerShell is available, and that you have permission to access Sonogen's private GitLab repositories.
This procedure will guide you through the following setup steps:
- Open Windows PowerShell, which must be used for this setup.
Do not use PowerShell 7,
pwsh, Windows Terminal's PowerShell 7 profile, or Windows PowerShell ISE for this procedure. - Install or verify
uvfrom Windows PowerShell. - Install or verify Git from Windows PowerShell.
- Configure SSH access for Sonogen's private GitLab repositories.
- Install
dsap. - Install the Texas Instruments MSP430 Flasher utility and required TI MSP430 FET drivers as a Windows Administrator.
- Check the MSP-FET firmware version and update it if needed.
- Initialize
dsap. - Optionally configure BioT API access for device provisioning.
1. Open Windows PowerShell¶
Long commands and multi-line command blocks in this guide may be copied
and pasted into Windows PowerShell. If Windows warns that the pasted
text contains multiple lines, click Paste anyway. This guide uses
multi-line commands intentionally so the pasted block waits for the
final press of the Enter key before it runs.
From the Windows Start menu, search for exactly:
Open the app named Windows PowerShell. Do not open PowerShell 7,
pwsh, Windows Terminal's PowerShell 7 profile, or Windows PowerShell
ISE for this procedure.
Confirm that the current shell is Windows PowerShell:
Expected results:
The major version should be 5, and you should see output similar to
this:
Desktop
Major Minor Build Revision
----- ----- ----- --------
5 1 26100 8328
C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
PowerShell 7 is a separate shell that runs side-by-side with Windows
PowerShell. It is launched as pwsh.exe and is not the validated shell
for this setup procedure.
2. Install uv¶
Follow the official Astral uv installation instructions for Windows:
https://docs.astral.sh/uv/getting-started/installation/
The official page includes Windows installation methods such as the
PowerShell installer and winget. If you want a quick reference,
Astral currently documents:
or:
After installation, close your PowerShell window, open a new one, and
confirm uv is available:
Example:
If uv is not recognized immediately after installation, close all
PowerShell windows and open a new Windows PowerShell session before
retrying uv --version.
3. Install Git for Windows¶
Follow the official Git for Windows installation page:
https://git-scm.com/install/windows
That page links to the currently maintained Windows installer and also
documents a winget option:
After installation, confirm Git is available:
Example:
If Git is not recognized immediately after installation, close all
PowerShell windows and open a new Windows PowerShell session before
retrying git --version.
4. Check for an Existing SSH Public Key¶
Valid SSH keys are required to install and run dsap. Providing your
public SSH key to the Sonogen Development Team will allow you to install
and run dsap commands without requiring a username and password.
Open Windows PowerShell and run:
If an existing public key file is listed, continue to the next step. If no public key file is listed, create a new ED25519 SSH key pair:
New-Item -ItemType Directory -Force "$env:USERPROFILE\.ssh"; `
ssh-keygen -t ed25519 -C "Assembly Laptop" -f "$env:USERPROFILE\.ssh\id_ed25519" -N ""
The -N "" option creates the key without a passphrase so this step can
run without an interactive passphrase prompt. NEVER EMAIL OR SHARE
THE PRIVATE KEY FILE.
5. Send the Public SSH Key to the Sonogen Development Team¶
Open Windows PowerShell and copy the public key to the clipboard:
If you are using a different existing public key file, replace
id_ed25519.pub with that file name. Email the copied public key to a
member of the Sonogen Development Team.
Operator STOP: Stop here until you receive confirmation from the Sonogen Development Team that your public key has been added to GitLab. The installation of
dsapcannot succeed until that access is in place.
Sonogen Development Team: Enable this public key as a read-only deploy key on both private GitLab repositories:
sonogen/dsapandsonogen/dsap-fw. For GitLab deploy-key instructions, see https://docs.gitlab.com/user/project/deploy_keys/.
6. Verify GitLab SSH Access¶
After the Sonogen Development Team confirms that the public key has been
added to GitLab, verify SSH access before installing dsap.
Open Windows PowerShell and run:
The first time you connect to GitLab, Windows may ask whether to trust
the gitlab.com SSH host key. To verify the prompt before accepting,
compare the displayed SHA256 fingerprint with GitLab's published SSH
host key fingerprints:
https://docs.gitlab.com/user/gitlab_com/#ssh-host-keys-fingerprints
When you're ready to proceed, type:
This records GitLab's host key in your SSH known_hosts file. After the
host key is accepted, the command may print a GitLab welcome or
authentication message. Continue to the next step after GitLab's host
key has been trusted.
7. Install dsap¶
dsap is installed as a uv tool from Sonogen's private GitLab
repository.
Open Windows PowerShell and run:
$env:UV_PYTHON_PREFERENCE="only-managed"; uv tool install --force --from git+ssh://git@gitlab.com/sonogen/dsap.git@latest dsap
If you later need to reinstall dsap or replace it with a beta or
release candidate build, use the same uv tool install --force ...
pattern with the requested source or version. If uv reports an
authentication or clone failure, check with a member of the Sonogen
Development Team.
After installation, confirm the CLI is available:
You should see output similar to:
usage: dsap [-h] [-v] {biot,init,mcu,mobile,params,sara,serial} ...
Device Setup and Provisioning (dsap). Flash firmware and provision Sonogen
devices.
options:
-h, --help show this help message and exit
-v, --version show program's version number and exit
commands:
For help with a command, run: dsap <command> -h
{biot,init,mcu,mobile,params,sara,serial}
8. Install MSP430 Flasher and TI FET Drivers¶
dsap mcu uses the Texas Instruments MSP430 Flasher to write firmware
to the MCU.
Before downloading the TI installers, make sure you have a free myTI account. If you do not already have one, register here:
https://www.ti.com/myti/nsdocs/register
Use the official TI sources:
- TI tool page: https://www.ti.com/tool/MSP430-FLASHER
- TI user's guide: https://www.ti.com/document-viewer/lit/html/slau654
- TI MSP430 FET Drivers download page: https://software-dl.ti.com/msp430/msp430_public_sw/mcu/msp430/MSP430_FET_Drivers/latest/index_FDS.html
8.1 Download Required Packages¶
From the TI tool page, download the Windows installer for MSP430 Flasher.
The MSP-FET also requires the TI low-level USB drivers package.
- If TI Code Composer Studio (CCS) is already installed on the Assembly Laptop, all the necessary drivers are in place. Proceed to step 8.2.
- If CCS is not installed, download the standalone TI MSP430 FET Drivers package from the TI MSP430 FET Drivers download page.
8.2 Install Required Packages¶
If MSP430 Flasher is installed as a regular user, the installer may not include required support files or enable logging support. Install MSP430 Flasher with Administrator elevation:
- Open File Explorer and go to the downloaded MSP430 Flasher installer.
- Right-click the installer and select Run as administrator.
- Approve the Windows User Account Control prompt.
- Complete the installation with the default TI options.
Install the standalone TI MSP430 FET Drivers package with Administrator elevation if CCS is not already installed:
- Open File Explorer and go to the downloaded FET drivers installer.
- Right-click the installer and select Run as administrator.
- Approve the Windows User Account Control prompt.
- Complete the installation with the default TI options.
dsap looks for the flasher executable under the standard TI
installation root and automatically uses the newest installed MSP430
Flasher version that matches one of these patterns:
If your TI installation places MSP430Flasher.exe somewhere else, you
do not need to move it. Instead, pass the actual executable path to
dsap mcu with --flasher.
Example:
9. Check the MSP-FET Firmware Version¶
After MSP430 Flasher is installed, connect the MSP-FET to the Assembly Laptop with the USB programming cable. Open Windows PowerShell in the MSP430 Flasher installation directory and run:
The command runs a FET detection sweep and checks whether the connected
FET firmware is compatible with the installed MSP430 Flasher version.
If prompted to select the FET, enter the listed FET number. In the
example below, enter 1.
If the FET firmware needs an update, MSP430 Flasher displays output
similar to this. When MSP430 Flasher asks whether to update the FET,
enter y and press Enter.
* -----/|------------------------------------------------------------- *
* / |__ *
* /_ / MSP Flasher v1.3.20 *
* | / *
* -----|/------------------------------------------------------------- *
*
* Evaluating triggers...done
* Executing FET detection sweep:
- 1: MSP-FET @ COM7 (FW update needed)
- Select FET number: 1
* Initializing interface @ COM7...done
* Checking firmware compatibility:
* The firmware of your FET is outdated.
- Would you like to update it? (Y/N): y
*********************************************************
*
* Initializing Update Bootloader.
* Programming new firmware:
* |||||||||||||||||||||||||||||||||||||||||||||||||| 100%
*********************************************************
*
* Initializing Update Bootloader.
* Programming new firmware:
* |||||||||||||||||||||||||||||||||||||||||||||||||| 100%
* Update was successfully finished.
*
*********************************************************
* Exit Update Bootlader and reboot firmware.
# Exit: 49
# ERROR: Could not find MSP-FET430UIF on specified COM port
*
* ----------------------------------------------------------------------
* Driver : closed (No error)
* ----------------------------------------------------------------------
*/
The # Exit: 49 error at the end is expected while the FET reboots
after the firmware update.
Run the same command again:
When prompted to select the FET, enter the listed FET number again. In
the example below, enter 1. Confirm that MSP430 Flasher reports that
the FET firmware is up to date before continuing.
* -----/|------------------------------------------------------------- *
* / |__ *
* /_ / MSP Flasher v1.3.20 *
* | / *
* -----|/------------------------------------------------------------- *
*
* Evaluating triggers...done
* Executing FET detection sweep:
- 1: MSP-FET @ COM7
- Select FET number: 1
* Initializing interface @ COM7...done
* Checking firmware compatibility:
* FET firmware is up to date.
*
* ----------------------------------------------------------------------
* Driver : closed (No error)
* ----------------------------------------------------------------------
*/
10. Initialize dsap¶
After installing dsap, run this command to create the local
provisioning environment:
On a first-time setup, you should see output similar to:
Creating certificate bundle directory ✅
Creating certificate staging directory ✅
Creating mobile code directory ✅
Creating label directory ✅
Creating local config template ✅
Initializing device baseline ✅
dsap init also creates C:\Users\<USER>\dsap\config.toml as a
commented template for local, non-secret overrides. Uncomment any values
on an Assembly Laptop that need to differ from the package defaults,
such as BioT endpoints, mobile QR URLs, UID/model-number settings, or
MSP430 Flasher discovery paths. Do not store credentials, bearer tokens,
service-user secret keys, or refresh tokens in config.toml; BioT
credential state belongs only in biot.json.
11. Optional BioT API Access¶
BioT API access is required for Assembly Laptops that will create BioT
device objects and download certificate bundles with dsap serial
--create. If this laptop will not provision devices in the BioT portal,
skip this section.
Confirm you have BioT admin credentials for a user that can manage
Service Users. dsap biot does not store the admin password, but it
does store the admin refresh token needed for future certificate
downloads.
Run the interactive BioT setup command:
The command prompts for:
- the BioT API endpoint;
- the BioT admin username;
- the BioT admin password;
- the BioT owner organization UUID for
sonogen; - the device template API name, for example
sonogen_device, not the visual portal name; - the service-user name;
- the BioT
Tenant-Idheader for organization-scoped requests.
Default values are presented in brackets. The default service-user name
uses the current host name and local date/time in the format
<host_name>-YYYYMMDD.HHMM. To accept defaults, press Enter. Once all
steps are complete, dsap will be ready to create device objects in the
BioT cloud.
If the command reports ACCESS_DENIED from the BioT User Management
Service, confirm that the BioT admin account can manage service users,
then retry with the BioT Tenant-Id header set to the organization UUID
for the organization where the operation should run. If BioT reports
that MFA or a password reset is required, complete that login
requirement outside dsap and rerun the command. Contact the Sonogen
Development Team if access is still denied.
Note:
dsap biotcreates the configuration file atC:\Users\<USER>\dsap\biot.jsonon Windows and~/dsap/biot.jsonon macOS or Linux. Do not email, share, or commit this file; it contains sensitive service-user credentials and a BioT administrator refresh token that allow BioT device provisioning and certificate downloads. Protect this file as an administrator credential.
12. Continue to Flashing and Provisioning¶
After setup is complete, use the dsap Flashing Instructions (production) for the operator device workflow:
- Flash MCU firmware with
dsap mcu. - Generate the serial number and certificate bundle with
dsap serial --create. - Upload device certificates with
dsap sara. - Set final device parameters with
dsap params.
For detailed command behavior and developer troubleshooting, see the dsap Flashing Instructions (development).
13. Troubleshooting Notes¶
- If
dsapis not recognized, confirm theuv tool install --force ...step completed successfully and open a new Windows PowerShell session. - If installation behaves unexpectedly, confirm
UV_PYTHON_PREFERENCE=only-managedwas included inline with theuv tool install --forcecommand. - If you are switching between stable, beta, or release candidate
builds, rerun the install command with
--forcesouvreplaces the previousdsapinstall cleanly. - If
dsap serial --createreports that the BioT config file is missing, complete the optional BioT API access section before provisioning devices in BioT. - If
dsap serial --createreportsACCESS_DENIEDwhile downloading the certificate bundle, the stored BioT administrator credentials can authenticate but are not allowed to call the Device Certificate API. Confirm thatdsap biotwas run with a Manufacturer Admin account, and include the BioTtraceIdwhen contacting BioT support. - If
dsap initfails, verify thatdsapwas installed successfully on the Assembly Laptop before retrying. - If MSP430 Flasher does not list the MSP-FET during the firmware check, verify that CCS is installed or that the standalone TI MSP430 FET Drivers package was installed as a Windows Administrator. Then unplug and reconnect the MSP-FET and confirm Windows Device Manager recognizes it.
- If the
uv tool installcommand reportsHost key verification failed, GitLab's SSH host key has not been trusted yet. Runssh -T git@gitlab.com, verify the displayed fingerprint, accept it, and retry theuv tool installcommand. - If GitLab host-key verification still fails, remove stale GitLab host entries and retry the SSH verification:
- If the error changes to
Permission denied (publickey), GitLab's host key is trusted but SSH access is not working. Confirm the private key exists on the Assembly Laptop and the matching public key is enabled as a read-only deploy key on the required private GitLab repositories. - If
uvreports another SSH authentication error, confirm the Assembly Laptop public key is enabled as a read-only deploy key on both private GitLab repositories. - If
uvor Git works in one shell session but not another, the missing command may be caused by a stalePATH. Close all PowerShell windows, open a fresh Windows PowerShell session, and retryuv --versionandgit --version. - Make sure you're using Windows PowerShell. Open the app named Windows PowerShell from the Start menu and run the shell verification commands from section 1.
- If
uvstill is not recognized, check whether the executable exists:
Test-Path "$HOME\.local\bin\uv.exe"; `
Get-Command uv -ErrorAction SilentlyContinue; `
[Environment]::GetEnvironmentVariable("Path", "User") -split ";"
If uv.exe exists but Get-Command uv prints nothing, confirm
$HOME\.local\bin is present in the user Path, then open a new
Windows PowerShell session.
15. If Git still is not recognized, check whether the executable exists:
Test-Path "$env:ProgramFiles\Git\cmd\git.exe"; `
Get-Command git -ErrorAction SilentlyContinue; `
[Environment]::GetEnvironmentVariable("Path", "Machine") -split ";"
If git.exe exists but Get-Command git prints nothing, repair or
reinstall Git for Windows so Git is available from the command line,
then open a new Windows PowerShell session.
References¶
- Astral
uvinstallation: https://docs.astral.sh/uv/getting-started/installation/ - Git for Windows install page: https://git-scm.com/install/windows
- Microsoft Windows PowerShell startup documentation: https://learn.microsoft.com/en-us/powershell/scripting/windows-powershell/starting-windows-powershell
- Microsoft PowerShell 7 installation documentation: https://learn.microsoft.com/en-us/powershell/scripting/install/install-powershell-on-windows
- GitLab SSH key documentation: https://docs.gitlab.com/user/ssh/
- GitLab.com SSH host key fingerprints: https://docs.gitlab.com/user/gitlab_com/#ssh-host-keys-fingerprints
- GitLab deploy-key documentation: https://docs.gitlab.com/user/project/deploy_keys/
- TI MSP430 Flasher tool page: https://www.ti.com/tool/MSP430-FLASHER
- TI MSP430 Flasher user's guide: https://www.ti.com/document-viewer/lit/html/slau654
- TI MSP430 FET Drivers download page: https://software-dl.ti.com/msp430/msp430_public_sw/mcu/msp430/MSP430_FET_Drivers/latest/index_FDS.html
- TI myTI account registration: https://www.ti.com/myti/nsdocs/register