Files
HaloKeymind/research/linux_chromium_web_serial_tty/index.html
T
2026-10-10 06:44:36 +00:00

2447 lines
43 KiB
HTML

<!doctype html>
<html lang="en" class="no-js">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<meta name="description" content="Documentation for the open source MeshCore firmware">
<link rel="canonical" href="https://mikecarper.github.io/MeshCore/research/linux_chromium_web_serial_tty/">
<link rel="icon" href="../../assets/images/favicon.png">
<meta name="generator" content="mkdocs-1.6.1, mkdocs-material-9.7.7">
<title>Linux chromium web serial tty - MeshCore Docs</title>
<link rel="stylesheet" href="../../assets/stylesheets/main.ec1eaa64.min.css">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,300i,400,400i,700,700i%7CRoboto+Mono:400,400i,700,700i&display=fallback">
<style>:root{--md-text-font:"Roboto";--md-code-font:"Roboto Mono"}</style>
<link rel="stylesheet" href="../../_stylesheets/notification_builder.css?v=20261006-channel9">
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.9.4/dist/leaflet.css">
<link rel="stylesheet" href="../../_stylesheets/extra.css">
<link rel="stylesheet" href="../../_stylesheets/firmware_picker.css?v=20261001-feedback-1">
<link rel="stylesheet" href="../../_stylesheets/telemetry_decoder.css">
<link rel="stylesheet" href="../../_stylesheets/management_decoder.css">
<link rel="stylesheet" href="../../_stylesheets/filter_tool.css">
<link rel="stylesheet" href="../../_stylesheets/preset_test.css?v=20260923-2">
<link rel="stylesheet" href="../../_stylesheets/esp32_partition_catalog.css?v=20261001-1">
<script>__md_scope=new URL("../..",location),__md_hash=e=>[...e].reduce(((e,_)=>(e<<5)-e+_.charCodeAt(0)),0),__md_get=(e,_=localStorage,t=__md_scope)=>JSON.parse(_.getItem(t.pathname+"."+e)),__md_set=(e,_,t=localStorage,a=__md_scope)=>{try{t.setItem(a.pathname+"."+e,JSON.stringify(_))}catch(e){}}</script>
</head>
<body dir="ltr">
<input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="__drawer" autocomplete="off">
<input class="md-toggle" data-md-toggle="search" type="checkbox" id="__search" autocomplete="off">
<label class="md-overlay" for="__drawer"></label>
<div data-md-component="skip">
<a href="#linux-chromium-web-serial-after-pyserial" class="md-skip">
Skip to content
</a>
</div>
<div data-md-component="announce">
</div>
<header class="md-header md-header--shadow" data-md-component="header">
<nav class="md-header__inner md-grid" aria-label="Header">
<a href="../.." title="MeshCore Docs" class="md-header__button md-logo" aria-label="MeshCore Docs" data-md-component="logo">
<img src="../../_assets/meshcore.svg" alt="logo">
</a>
<label class="md-header__button md-icon" for="__drawer">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3 6h18v2H3zm0 5h18v2H3zm0 5h18v2H3z"/></svg>
</label>
<div class="md-header__title" data-md-component="header-title">
<div class="md-header__ellipsis">
<div class="md-header__topic">
<span class="md-ellipsis">
MeshCore Docs
</span>
</div>
<div class="md-header__topic" data-md-component="header-topic">
<span class="md-ellipsis">
Linux chromium web serial tty
</span>
</div>
</div>
</div>
<script>var palette=__md_get("__palette");if(palette&&palette.color){if("(prefers-color-scheme)"===palette.color.media){var media=matchMedia("(prefers-color-scheme: light)"),input=document.querySelector(media.matches?"[data-md-color-media='(prefers-color-scheme: light)']":"[data-md-color-media='(prefers-color-scheme: dark)']");palette.color.media=input.getAttribute("data-md-color-media"),palette.color.scheme=input.getAttribute("data-md-color-scheme"),palette.color.primary=input.getAttribute("data-md-color-primary"),palette.color.accent=input.getAttribute("data-md-color-accent")}for(var[key,value]of Object.entries(palette.color))document.body.setAttribute("data-md-color-"+key,value)}</script>
<label class="md-header__button md-icon" for="__search">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.52 6.52 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5"/></svg>
</label>
<div class="md-search" data-md-component="search" role="dialog">
<label class="md-search__overlay" for="__search"></label>
<div class="md-search__inner" role="search">
<form class="md-search__form" name="search">
<input type="text" class="md-search__input" name="query" aria-label="Search" placeholder="Search" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="search-query" required>
<label class="md-search__icon md-icon" for="__search">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.52 6.52 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5"/></svg>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11z"/></svg>
</label>
<nav class="md-search__options" aria-label="Search">
<button type="reset" class="md-search__icon md-icon" title="Clear" aria-label="Clear" tabindex="-1">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"/></svg>
</button>
</nav>
<div class="md-search__suggest" data-md-component="search-suggest"></div>
</form>
<div class="md-search__output">
<div class="md-search__scrollwrap" tabindex="0" data-md-scrollfix>
<div class="md-search-result" data-md-component="search-result">
<div class="md-search-result__meta">
Initializing search
</div>
<ol class="md-search-result__list" role="presentation"></ol>
</div>
</div>
</div>
</div>
</div>
<div class="md-header__source">
<a href="https://github.com/mikecarper/MeshCore/" title="Go to repository" class="md-source" data-md-component="source">
<div class="md-source__icon md-icon">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--! Font Awesome Free 7.1.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2025 Fonticons, Inc.--><path d="M439.6 236.1 244 40.5c-5.4-5.5-12.8-8.5-20.4-8.5s-15 3-20.4 8.4L162.5 81l51.5 51.5c27.1-9.1 52.7 16.8 43.4 43.7l49.7 49.7c34.2-11.8 61.2 31 35.5 56.7-26.5 26.5-70.2-2.9-56-37.3L240.3 199v121.9c25.3 12.5 22.3 41.8 9.1 55-6.4 6.4-15.2 10.1-24.3 10.1s-17.8-3.6-24.3-10.1c-17.6-17.6-11.1-46.9 11.2-56v-123c-20.8-8.5-24.6-30.7-18.6-45L142.6 101 8.5 235.1C3 240.6 0 247.9 0 255.5s3 15 8.5 20.4l195.6 195.7c5.4 5.4 12.7 8.4 20.4 8.4s15-3 20.4-8.4l194.7-194.7c5.4-5.4 8.4-12.8 8.4-20.4s-3-15-8.4-20.4"/></svg>
</div>
<div class="md-source__repository">
mikecarper/MeshCore
</div>
</a>
</div>
</nav>
</header>
<div class="md-container" data-md-component="container">
<main class="md-main" data-md-component="main">
<div class="md-main__inner md-grid">
<div class="md-sidebar md-sidebar--primary" data-md-component="sidebar" data-md-type="navigation" >
<div class="md-sidebar__scrollwrap">
<div class="md-sidebar__inner">
<nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0">
<label class="md-nav__title" for="__drawer">
<a href="../.." title="MeshCore Docs" class="md-nav__button md-logo" aria-label="MeshCore Docs" data-md-component="logo">
<img src="../../_assets/meshcore.svg" alt="logo">
</a>
MeshCore Docs
</label>
<div class="md-nav__source">
<a href="https://github.com/mikecarper/MeshCore/" title="Go to repository" class="md-source" data-md-component="source">
<div class="md-source__icon md-icon">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--! Font Awesome Free 7.1.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2025 Fonticons, Inc.--><path d="M439.6 236.1 244 40.5c-5.4-5.5-12.8-8.5-20.4-8.5s-15 3-20.4 8.4L162.5 81l51.5 51.5c27.1-9.1 52.7 16.8 43.4 43.7l49.7 49.7c34.2-11.8 61.2 31 35.5 56.7-26.5 26.5-70.2-2.9-56-37.3L240.3 199v121.9c25.3 12.5 22.3 41.8 9.1 55-6.4 6.4-15.2 10.1-24.3 10.1s-17.8-3.6-24.3-10.1c-17.6-17.6-11.1-46.9 11.2-56v-123c-20.8-8.5-24.6-30.7-18.6-45L142.6 101 8.5 235.1C3 240.6 0 247.9 0 255.5s3 15 8.5 20.4l195.6 195.7c5.4 5.4 12.7 8.4 20.4 8.4s15-3 20.4-8.4l194.7-194.7c5.4-5.4 8.4-12.8 8.4-20.4s-3-15-8.4-20.4"/></svg>
</div>
<div class="md-source__repository">
mikecarper/MeshCore
</div>
</a>
</div>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../.." class="md-nav__link">
<span class="md-ellipsis">
Home
</span>
</a>
</li>
<li class="md-nav__item md-nav__item--nested">
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_2" >
<label class="md-nav__link" for="__nav_2" id="__nav_2_label" tabindex="0">
<span class="md-ellipsis">
Firmware and tools
</span>
<span class="md-nav__icon md-icon"></span>
</label>
<nav class="md-nav" data-md-level="1" aria-labelledby="__nav_2_label" aria-expanded="false">
<label class="md-nav__title" for="__nav_2">
<span class="md-nav__icon md-icon"></span>
Firmware and tools
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../../firmware_picker/" class="md-nav__link">
<span class="md-ellipsis">
Firmware picker
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../notifications/" class="md-nav__link">
<span class="md-ellipsis">
Notifications
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../preset_test/" class="md-nav__link">
<span class="md-ellipsis">
Preset test
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../filter_tool/" class="md-nav__link">
<span class="md-ellipsis">
Filter tool
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../telemetry_decoder/" class="md-nav__link">
<span class="md-ellipsis">
Telemetry decoder
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../management_decoder/" class="md-nav__link">
<span class="md-ellipsis">
Management decoder
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item md-nav__item--nested">
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_3" >
<label class="md-nav__link" for="__nav_3" id="__nav_3_label" tabindex="0">
<span class="md-ellipsis">
Documentation
</span>
<span class="md-nav__icon md-icon"></span>
</label>
<nav class="md-nav" data-md-level="1" aria-labelledby="__nav_3_label" aria-expanded="false">
<label class="md-nav__title" for="__nav_3">
<span class="md-nav__icon md-icon"></span>
Documentation
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item md-nav__item--nested">
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_3_1" >
<label class="md-nav__link" for="__nav_3_1" id="__nav_3_1_label" tabindex="0">
<span class="md-ellipsis">
Getting started and features
</span>
<span class="md-nav__icon md-icon"></span>
</label>
<nav class="md-nav" data-md-level="2" aria-labelledby="__nav_3_1_label" aria-expanded="false">
<label class="md-nav__title" for="__nav_3_1">
<span class="md-nav__icon md-icon"></span>
Getting started and features
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../../faq/" class="md-nav__link">
<span class="md-ellipsis">
Faq
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../full_profiles/" class="md-nav__link">
<span class="md-ellipsis">
Full profiles
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../role_feature_switches/" class="md-nav__link">
<span class="md-ellipsis">
Role feature switches
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../full_companion_features/" class="md-nav__link">
<span class="md-ellipsis">
Full companion features
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../companion_radio_full/" class="md-nav__link">
<span class="md-ellipsis">
Companion radio full
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../full_companion_usb_switcher/" class="md-nav__link">
<span class="md-ellipsis">
Full companion usb switcher
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../companion_offline_queue/" class="md-nav__link">
<span class="md-ellipsis">
Companion offline queue
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../halo_keymind_settings/" class="md-nav__link">
<span class="md-ellipsis">
Halo keymind settings
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item md-nav__item--nested">
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_3_2" >
<label class="md-nav__link" for="__nav_3_2" id="__nav_3_2_label" tabindex="0">
<span class="md-ellipsis">
Firmware updates and partitions
</span>
<span class="md-nav__icon md-icon"></span>
</label>
<nav class="md-nav" data-md-level="2" aria-labelledby="__nav_3_2_label" aria-expanded="false">
<label class="md-nav__title" for="__nav_3_2">
<span class="md-nav__icon md-icon"></span>
Firmware updates and partitions
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../../upgrading_1.17.1.8_to_1.17.1.9/" class="md-nav__link">
<span class="md-ellipsis">
Upgrading 1.17.1.8 to 1.17.1.9
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../ota_user_guide/" class="md-nav__link">
<span class="md-ellipsis">
Ota user guide
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../ota_easy/" class="md-nav__link">
<span class="md-ellipsis">
Ota easy
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../lora_ota_automation/" class="md-nav__link">
<span class="md-ellipsis">
Lora ota automation
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../ota_nrf52_bootloader_update/" class="md-nav__link">
<span class="md-ellipsis">
Ota nrf52 bootloader update
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../ota_nrf52_qspi/" class="md-nav__link">
<span class="md-ellipsis">
Ota nrf52 qspi
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../ota_meshtower_v2_sdcard/" class="md-nav__link">
<span class="md-ellipsis">
Ota meshtower v2 sdcard
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../esp32_partition_catalog/" class="md-nav__link">
<span class="md-ellipsis">
Esp32 partition catalog
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../esp32_wifi_partition_migration/" class="md-nav__link">
<span class="md-ellipsis">
Esp32 wifi partition migration
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../heltec_v4_wifi_partition_migration/" class="md-nav__link">
<span class="md-ellipsis">
Heltec v4 wifi partition migration
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../host_cli_service/" class="md-nav__link">
<span class="md-ellipsis">
Host cli service
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item md-nav__item--nested">
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_3_3" >
<label class="md-nav__link" for="__nav_3_3" id="__nav_3_3_label" tabindex="0">
<span class="md-ellipsis">
Radio, networking, and power
</span>
<span class="md-nav__icon md-icon"></span>
</label>
<nav class="md-nav" data-md-level="2" aria-labelledby="__nav_3_3_label" aria-expanded="false">
<label class="md-nav__title" for="__nav_3_3">
<span class="md-nav__icon md-icon"></span>
Radio, networking, and power
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../../radio_profiles/" class="md-nav__link">
<span class="md-ellipsis">
Radio profiles
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../fleet_management/" class="md-nav__link">
<span class="md-ellipsis">
Private fleet management
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../room_services/" class="md-nav__link">
<span class="md-ellipsis">
Room services
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../carrier_wave/" class="md-nav__link">
<span class="md-ellipsis">
Carrier wave
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../espnow_bridge_setup/" class="md-nav__link">
<span class="md-ellipsis">
Espnow bridge setup
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../WiFi/" class="md-nav__link">
<span class="md-ellipsis">
WiFi
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../flood_filtering/" class="md-nav__link">
<span class="md-ellipsis">
Flood filtering
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../gps_tracking/" class="md-nav__link">
<span class="md-ellipsis">
Gps tracking
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../nrf52_power_management/" class="md-nav__link">
<span class="md-ellipsis">
Nrf52 power management
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item md-nav__item--nested">
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_3_4" >
<label class="md-nav__link" for="__nav_3_4" id="__nav_3_4_label" tabindex="0">
<span class="md-ellipsis">
CLI and protocol reference
</span>
<span class="md-nav__icon md-icon"></span>
</label>
<nav class="md-nav" data-md-level="2" aria-labelledby="__nav_3_4_label" aria-expanded="false">
<label class="md-nav__title" for="__nav_3_4">
<span class="md-nav__icon md-icon"></span>
CLI and protocol reference
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../../cli_commands/" class="md-nav__link">
<span class="md-ellipsis">
Cli commands
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../cli_build_matrix/" class="md-nav__link">
<span class="md-ellipsis">
Cli build matrix
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../cli_command_availability/" class="md-nav__link">
<span class="md-ellipsis">
Cli command availability
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../terminal_chat_cli/" class="md-nav__link">
<span class="md-ellipsis">
Terminal chat cli
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../companion_protocol/" class="md-nav__link">
<span class="md-ellipsis">
Companion protocol
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../kiss_modem_protocol/" class="md-nav__link">
<span class="md-ellipsis">
Kiss modem protocol
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../packet_format/" class="md-nav__link">
<span class="md-ellipsis">
Packet format
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../payloads/" class="md-nav__link">
<span class="md-ellipsis">
Payloads
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../ota_protocol/" class="md-nav__link">
<span class="md-ellipsis">
Ota protocol
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../management_reports/" class="md-nav__link">
<span class="md-ellipsis">
Management reports
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../stats_binary_frames/" class="md-nav__link">
<span class="md-ellipsis">
Stats binary frames
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../number_allocations/" class="md-nav__link">
<span class="md-ellipsis">
Number allocations
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../qr_codes/" class="md-nav__link">
<span class="md-ellipsis">
Qr codes
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="../../docs/" class="md-nav__link">
<span class="md-ellipsis">
Docs
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="../" class="md-nav__link">
<span class="md-ellipsis">
Research
</span>
</a>
</li>
<li class="md-nav__item md-nav__item--nested">
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_5" >
<label class="md-nav__link" for="__nav_5" id="__nav_5_label" tabindex="0">
<span class="md-ellipsis">
Releases
</span>
<span class="md-nav__icon md-icon"></span>
</label>
<nav class="md-nav" data-md-level="1" aria-labelledby="__nav_5_label" aria-expanded="false">
<label class="md-nav__title" for="__nav_5">
<span class="md-nav__icon md-icon"></span>
Releases
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item md-nav__item--nested">
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_5_1" >
<label class="md-nav__link" for="__nav_5_1" id="__nav_5_1_label" tabindex="0">
<span class="md-ellipsis">
Current release
</span>
<span class="md-nav__icon md-icon"></span>
</label>
<nav class="md-nav" data-md-level="2" aria-labelledby="__nav_5_1_label" aria-expanded="false">
<label class="md-nav__title" for="__nav_5_1">
<span class="md-nav__icon md-icon"></span>
Current release
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../../releases/1.17.1.9/" class="md-nav__link">
<span class="md-ellipsis">
1.17.1.9 USA Cascade
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../releases/1.17.1.8/" class="md-nav__link">
<span class="md-ellipsis">
1.17.1.8 USA Cascade
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../test-results/" class="md-nav__link">
<span class="md-ellipsis">
Test Results
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="../../old-releases/" class="md-nav__link">
<span class="md-ellipsis">
Old Releases
</span>
</a>
</li>
</ul>
</nav>
</li>
</ul>
</nav>
</div>
</div>
</div>
<div class="md-sidebar md-sidebar--secondary" data-md-component="sidebar" data-md-type="toc" >
<div class="md-sidebar__scrollwrap">
<div class="md-sidebar__inner">
<nav class="md-nav md-nav--secondary" aria-label="Table of contents">
<label class="md-nav__title" for="__toc">
<span class="md-nav__icon md-icon"></span>
Table of contents
</label>
<ul class="md-nav__list" data-md-component="toc" data-md-scrollfix>
<li class="md-nav__item">
<a href="#why-an-idle-port-looked-disconnected" class="md-nav__link">
<span class="md-ellipsis">
Why an idle port looked disconnected
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#controlled-g2-comparison" class="md-nav__link">
<span class="md-ellipsis">
Controlled G2 comparison
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#hardware-test-preflight" class="md-nav__link">
<span class="md-ellipsis">
Hardware-test preflight
</span>
</a>
</li>
</ul>
</nav>
</div>
</div>
</div>
<div class="md-content" data-md-component="content">
<article class="md-content__inner md-typeset">
<a href="https://github.com/mikecarper/MeshCore/edit/keymindCascade/docs/research/linux_chromium_web_serial_tty.md" title="Edit this page" class="md-content__button md-icon" rel="edit">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M10 20H6V4h7v5h5v3.1l2-2V8l-6-6H6c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h4zm10.2-7c.1 0 .3.1.4.2l1.3 1.3c.2.2.2.6 0 .8l-1 1-2.1-2.1 1-1c.1-.1.2-.2.4-.2m0 3.9L14.1 23H12v-2.1l6.1-6.1z"/></svg>
</a>
<!-- meshcore-hosted-doc-link:start -->
<p class="meshcore-hosted-doc-link"><a href="https://mikecarper.github.io/MeshCore/research/linux_chromium_web_serial_tty/">View this page on MeshCore Docs</a>.</p>
<!-- meshcore-hosted-doc-link:end -->
<h1 id="linux-chromium-web-serial-after-pyserial">Linux Chromium Web Serial after pyserial</h1>
<p>A Station G2 browser timeout on firmware source
<code>1e421ff4fc6a3b56d43db7a18aab94a72129b527</code> was traced to the Linux host's
inherited TTY read settings. Chromium <code>139.0.7258.127</code> closed its receive stream
with <code>NetworkError</code> / device lost before the first <code>ver</code> request. The radio was
still running and an exclusive pyserial query answered in 21.330 ms without a
reset or replug. This finding explains this controlled host failure; it does
not establish that every reported USB hang has the same cause.</p>
<h2 id="why-an-idle-port-looked-disconnected">Why an idle port looked disconnected</h2>
<p>pyserial normally sets <code>VMIN=0, VTIME=0</code> and performs its timeout handling with
<code>select</code>. These kernel TTY attributes survive closing the port. With those
settings, an idle nonblocking Linux <code>read()</code> can return zero bytes.
<a href="https://github.com/pyserial/pyserial/blob/v3.5/serial/serialposix.py">pyserial's POSIX implementation</a>
sets these values and closes without restoring the previous attributes.</p>
<p>In the exact
<a href="https://github.com/chromium/chromium/blob/139.0.7258.127/services/device/serial/serial_io_handler_posix.cc#L152">Chromium 139 serial implementation</a>,
port configuration preserves the prior <code>VMIN</code> and <code>VTIME</code>. Its
<a href="https://github.com/chromium/chromium/blob/139.0.7258.127/services/device/serial/serial_io_handler_posix.cc#L300">receive handler</a>
interprets a zero-byte read as device loss. Setting <code>VMIN=1, VTIME=0</code> makes an
idle nonblocking read return <code>EAGAIN</code>, so the browser waits for data instead.</p>
<p>Upstream Chromium fixed this in
<a href="https://github.com/chromium/chromium/commit/45ccdf6e7af9b56473ab9588c44d9048a8aaf7fb">commit 45ccdf6e</a>
on 2026-09-18, under bug 559872992. The change explicitly configures both read
settings and adds a real Linux pseudoterminal regression for inherited settings.
The presence of this fix upstream does not prove a particular installed browser
contains it; the Pi's tested Chromium 139 predates the fix.</p>
<h2 id="controlled-g2-comparison">Controlled G2 comparison</h2>
<p>The same firmware, native Pi Chromium, and unmodified official flasher console
were used for both attempts. Console source SHA-256 was
<code>107d3ad867915aea8b2454c324327397a0f9e2f0469656046054011bc64475f9</code>.
Instrumentation observed and forwarded existing native API calls.</p>
<table>
<thead>
<tr>
<th>Attempt</th>
<th>Host settings and observation</th>
<th>Result</th>
</tr>
</thead>
<tbody>
<tr>
<td>203</td>
<td><code>VMIN=0, VTIME=0</code>. The receive stream was already lost before Enter. The native five-byte <code>ver\r\n</code> write nevertheless completed in 28.1 ms.</td>
<td>FAIL. No displayed reply by the unchanged 5,000 ms deadline.</td>
</tr>
<tr>
<td>204</td>
<td>Only host <code>VMIN</code> changed to 1; <code>VTIME</code> stayed 0. The receive stream remained open.</td>
<td>PASS. First ordinary <code>ver</code> reply was displayed in 154.1 ms.</td>
</tr>
</tbody>
</table>
<p>No firmware or website patch, modem-signal change, reset, replug, added command
retry, keepalive, or longer deadline was used to obtain the passing comparison.
Before this comparison, <code>stats-core</code> reported uptime 1,728 seconds and error
bitmask 2; this is evidence of continued operation, not an error-free radio
qualification. The comparison does not qualify a fresh flash, a long idle
window, another host OS/browser, or every USB transport.</p>
<p>Safe receipt names and hashes are retained for the comparison:</p>
<table>
<thead>
<tr>
<th>Receipt</th>
<th>SHA-256</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>stock-browser-diagnostic-203-safe.json</code></td>
<td><code>e41b0f009b8dce42ad9ee23ad843032b97a47fc2cfc5385aefbf093ac46a9788</code></td>
</tr>
<tr>
<td><code>controlled-browser-host-setting-safe.json</code></td>
<td><code>88527690ca8d8740fd415831123c45ac3249134aec3929f7fd2b0224ddbe8fce</code></td>
</tr>
<tr>
<td><code>stock-browser-diagnostic-204-safe.json</code></td>
<td><code>6ba3249a23364a589653a0a1a4abb7e453a1cb2f095cec6138f3cebc171d5f39</code></td>
</tr>
</tbody>
</table>
<h2 id="hardware-test-preflight">Hardware-test preflight</h2>
<p>The tracked
<a href="https://github.com/mikecarper/MeshCore/blob/keymindCascade/tools/hil/linux_web_serial.py">Linux Web Serial helper</a>
changes and verifies only <code>VMIN=1, VTIME=0</code> immediately before a native browser
test. It requires an explicit absolute TTY path and restores the complete
original termios attributes after the browser closes, including on a Python
exception or interrupt. Failed preparation also restores the original state.
It sends no serial data and makes no DTR/RTS or USB-reset calls.</p>
<p>Pause other serial clients and finish all pyserial preflight queries before
entering the context. Another opener can overwrite the read settings, and a
second reader can consume the radio's reply. The helper closes its preparation
descriptor before the trial, so it does not keep the port open across the
stock browser's Disconnect action. Controllers must close their native reader,
writer and port in their own <code>finally</code> cleanup before the context exits, and
route termination into that cleanup. If the endpoint is replaced or disappears,
restoration fails explicitly rather than applying old attributes to a different
device.</p>
<p>Record browser version, TTY settings, native stream state/error, native write
completion, raw receive-byte count and rendered reply separately. A zero-byte
console display alone does not prove that the USB endpoint received no bytes.
For example, the stock console buffers input until a complete CRLF line arrives.
See the <a href="https://github.com/mikecarper/MeshCore/blob/keymindCascade/test/README.md#linux-native-web-serial-preflight">HIL instructions</a>
for the context-manager example and the hardware-free pseudoterminal test.</p>
</article>
</div>
<script>var target=document.getElementById(location.hash.slice(1));target&&target.name&&(target.checked=target.name.startsWith("__tabbed_"))</script>
</div>
</main>
<footer class="md-footer">
<div class="md-footer-meta md-typeset">
<div class="md-footer-meta__inner md-grid">
<div class="md-copyright">
Made with
<a href="https://squidfunk.github.io/mkdocs-material/" target="_blank" rel="noopener">
Material for MkDocs
</a>
</div>
</div>
</div>
</footer>
</div>
<div class="md-dialog" data-md-component="dialog">
<div class="md-dialog__inner md-typeset"></div>
</div>
<script id="__config" type="application/json">{"annotate": null, "base": "../..", "features": ["content.action.edit", "content.code.copy", "search.highlight", "search.suggest"], "search": "../../assets/javascripts/workers/search.2c215733.min.js", "tags": null, "translations": {"clipboard.copied": "Copied to clipboard", "clipboard.copy": "Copy to clipboard", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.placeholder": "Type to start searching", "search.result.term.missing": "Missing", "select.version": "Select version"}, "version": null}</script>
<script src="../../assets/javascripts/bundle.d7400e89.min.js"></script>
<script src="../../_javascript/hosted_doc_links.js?v=20261007-1"></script>
<script src="../../_javascript/notification_builder.js?v=20261006-channel9"></script>
<script src="https://unpkg.com/leaflet@1.9.4/dist/leaflet.js"></script>
<script src="../../_javascript/firmware_picker.js?v=20261008-rak-uart2-1"></script>
<script src="../../_javascript/telemetry_decoder.js?v=20261007-hosted-form"></script>
<script src="../../_javascript/management_decoder.js"></script>
<script src="../../_javascript/filter_tool.js?v=20261002-hashbytes-2plus"></script>
<script src="../../_javascript/preset_test.js?v=20260923-2"></script>
<script src="../../_javascript/esp32_partition_catalog.js?v=20261001-1"></script>
</body>
</html>