Skip to content
MLTK 0.20.0 documentation logo
Machine Learning Toolkit mltk.utils.jlink_stream.JlinkStream
Type to start searching
    MLTK Github Repository
    • Gecko SDK Documentation
    • Tensorflow-Lite Micro Repository
    • Tensorflow Documentation
    • API Reference
    • Utilities
    • J-Link Stream
    MLTK Github Repository
    • Basics
    • Overview
    • Why MLTK?
    • Installation
    • Command-Line
    • Modeling Guides
    • Usage
    • Tutorials
    • API Examples
    • API Reference
      • Model Operations
      • MLTK Model
      • Tensorflow-Lite Micro Model
      • Tensorflow-Lite Model
      • Keras Model
      • Data Preprocessing
      • Utilities
    • Reference Models
    • Reference Datasets
    • C++ Development
    • C++ Examples
    • Audio Related
    • Keyword Spotting Overview
    • Audio Feature Generator
    • Audio Utilities
    • Other Information
    • Frequently Asked Questions
    • Quick Reference
    • Supported Hardware
    • Notebook Examples Guide
    • Settings File
    • Environment Variables
      • default_options
      • is_connected
      • __init__
      • close
      • connect
      • disconnect
      • open
      • process
      • read
      • write
    • home
    • API Reference
    • Utilities
    • J-Link Stream
    • mltk.utils.jlink_stream.JlinkStream

    mltk.utils.jlink_stream.JlinkStream¶

    class JlinkStream[source]¶

    This allows for transferring binary data between a Python script and a JLink-enabled embedded device via the debug interface

    See the source code on Github: mltk/utils/jlink_stream

    Properties

    default_options

    Default configuration options

    is_connected

    Return if the device is connected

    Methods

    __init__

    close

    Close a device data stream

    connect

    Open a connection to an embedded device via J-Link

    disconnect

    Close the connection to the embedded device

    open

    Open a data stream to the embedded device

    process

    Process the device data streams

    read

    Read data from a data stream opened for reading

    write

    Write data to a data stream opened from writing

    __init__(options=None)[source]¶
    Parameters:

    options (Optional[JlinkStreamOptions]) –

    property default_options: JlinkStreamOptions¶

    Default configuration options

    Return type:

    JlinkStreamOptions

    property is_connected: bool¶

    Return if the device is connected

    Return type:

    bool

    connect(threaded=True, reset_device=False)[source]¶

    Open a connection to an embedded device via J-Link

    NOTE: The embedded device must be actively running the JLink library

    disconnect()[source]¶

    Close the connection to the embedded device

    open(name, mode='r')[source]¶

    Open a data stream to the embedded device

    Return type:

    JLinkDataStream

    Parameters:

    name (str) –

    close(name)[source]¶

    Close a device data stream

    Parameters:

    name (str) –

    read(name, max_size=None, timeout=None)[source]¶

    Read data from a data stream opened for reading

    Return type:

    bytes

    Parameters:
    • name (str) –

    • max_size (Optional[int]) –

    • timeout (Optional[float]) –

    write(name, data, timeout=None)[source]¶

    Write data to a data stream opened from writing

    Return type:

    int

    Parameters:
    • name (str) –

    • data (bytes) –

    • timeout (Optional[float]) –

    process()[source]¶

    Process the device data streams

    This is periodically called in a separated thread if ‘threaded=True’ in the connect() API. Otherwise, this should be periodically called.

    arrow_upwardBack to Top
    Previous J-Link Stream
    Next mltk.utils.jlink_stream.JLinkDataStream
    © Copyright 2025, Silicon Labs.
    Last updated on Mar 24, 2025.
    Created using Sphinx 5.3.0. and Material for Sphinx

    Important: We use cookies only for functional and traffic analytics.
    We DO NOT use cookies for any marketing purposes. By using our site you acknowledge you have read and understood our Cookie Policy.

    Got it