[{"data":1,"prerenderedAt":997},["ShallowReactive",2],{"navigation":3,"\u002Fmigration":116,"\u002Fmigration-surround":992},[4,27,53,74,108,112],{"title":5,"icon":6,"path":7,"stem":8,"children":9,"page":26},"Getting started","i-lucide-rocket","\u002Fgetting-started","1.getting-started",[10,14,18,22],{"title":11,"path":12,"stem":13},"Introduction","\u002Fgetting-started\u002Fintroduction","1.getting-started\u002F1.introduction",{"title":15,"path":16,"stem":17},"Installation","\u002Fgetting-started\u002Finstallation","1.getting-started\u002F2.installation",{"title":19,"path":20,"stem":21},"Quick start","\u002Fgetting-started\u002Fquick-start","1.getting-started\u002F3.quick-start",{"title":23,"path":24,"stem":25},"Example app and development","\u002Fgetting-started\u002Fdevelopment","1.getting-started\u002F4.development",false,{"title":28,"icon":29,"path":30,"stem":31,"children":32,"page":26},"Guides","i-lucide-book-open","\u002Fguides","2.guides",[33,37,41,45,49],{"title":34,"path":35,"stem":36},"JavaScript API","\u002Fguides\u002Fjavascript-api","2.guides\u002F1.javascript-api",{"title":38,"path":39,"stem":40},"AT commands, exchange and CMUX","\u002Fguides\u002Fat-commands","2.guides\u002F2.at-commands",{"title":42,"path":43,"stem":44},"Rust","\u002Fguides\u002Frust","2.guides\u002F3.rust",{"title":46,"path":47,"stem":48},"Permissions","\u002Fguides\u002Fpermissions","2.guides\u002F4.permissions",{"title":50,"path":51,"stem":52},"Parsers","\u002Fguides\u002Fparsers","2.guides\u002F5.parsers",{"title":54,"icon":55,"path":56,"stem":57,"children":58,"page":26},"API reference","i-lucide-file-code","\u002Freference","3.reference",[59,63,67,71],{"title":60,"path":61,"stem":62},"SerialPort","\u002Freference\u002Fserial-port","3.reference\u002F1.serial-port",{"title":64,"path":65,"stem":66},"Types","\u002Freference\u002Ftypes","3.reference\u002F2.types",{"title":68,"path":69,"stem":70},"Tauri commands","\u002Freference\u002Fcommands","3.reference\u002F3.commands",{"title":46,"path":72,"stem":73},"\u002Freference\u002Fpermissions","3.reference\u002F4.permissions",{"title":75,"icon":76,"path":77,"stem":78,"children":79,"page":26},"Platforms","i-lucide-monitor-smartphone","\u002Fplatforms","4.platforms",[80,84,88,92,96,100,104],{"title":81,"path":82,"stem":83},"Overview","\u002Fplatforms\u002Foverview","4.platforms\u002F1.overview",{"title":85,"path":86,"stem":87},"Desktop","\u002Fplatforms\u002Fdesktop","4.platforms\u002F2.desktop",{"title":89,"path":90,"stem":91},"Android (USB)","\u002Fplatforms\u002Fandroid","4.platforms\u002F3.android",{"title":93,"path":94,"stem":95},"iOS","\u002Fplatforms\u002Fios","4.platforms\u002F4.ios",{"title":97,"path":98,"stem":99},"Serial over TCP","\u002Fplatforms\u002Ftcp","4.platforms\u002F5.tcp",{"title":101,"path":102,"stem":103},"Bluetooth LE (BLE)","\u002Fplatforms\u002Fble","4.platforms\u002F6.ble",{"title":105,"path":106,"stem":107},"DTR \u002F RTS on open","\u002Fplatforms\u002Fdtr-rts","4.platforms\u002F7.dtr-rts",{"title":109,"path":110,"stem":111},"Migration guide","\u002Fmigration","5.migration",{"title":113,"path":114,"stem":115},"Changelog","\u002Fchangelog","9.changelog",{"id":117,"title":109,"body":118,"description":986,"extension":987,"generated":26,"links":988,"meta":989,"navigation":480,"path":110,"seo":990,"stem":111,"__hash__":991},"docs\u002F5.migration.md",{"type":119,"value":120,"toc":980},"minimark",[121,126,307,311,330,611,679,697,721,726,876,881,976],[122,123,125],"h2",{"id":124},"v3-v4","v3 → v4",[127,128,129,158,192,207,230,240,255,276,281],"ul",{},[130,131,132,136,137,141,142,145,146,149,150,153,154,157],"li",{},[133,134,135],"strong",{},"Rust:"," the port I\u002FO functions in ",[138,139,140],"code",{},"commands"," are now ",[138,143,144],{},"async"," (they run on Tauri's\nblocking pool instead of the main thread, so a ",[138,147,148],{},"read"," waiting for data no longer\nfreezes the UI). Add ",[138,151,152],{},".await",": ",[138,155,156],{},"commands::open(app, serial, …).await?",".\nMSRV is now 1.90.",[130,159,160,163,164,167,168,171,172,175,176,179,180,183,184,187,188,191],{},[133,161,162],{},"JS package:"," ",[138,165,166],{},"exports"," now has separate ",[138,169,170],{},"import","\u002F",[138,173,174],{},"require"," entries with their own\ntypes (",[138,177,178],{},"index.d.cts","); the ",[138,181,182],{},"development"," condition pointing at ",[138,185,186],{},"guest-js\u002F*.ts"," and\nthe ",[138,189,190],{},"guest-js"," sources in the npm tarball are gone.",[130,193,194,199,200,203,204,206],{},[133,195,196],{},[138,197,198],{},"read()"," now reads bytes and decodes them in JS with the port's ",[138,201,202],{},"encoding"," and a\nstreaming decoder (UTF-8 characters split across reads are kept). It no longer calls\nthe native ",[138,205,148],{}," command.",[130,208,209,214,215,218,219,221,222,225,226,229],{},[133,210,211],{},[138,212,213],{},"watch()"," no longer uses the port's read ",[138,216,217],{},"timeout"," (1 s by default) as its batch\nwindow. Without ",[138,220,217],{}," \u002F ",[138,223,224],{},"serialDataFlushIntervalMs"," data is delivered within\n~20 ms and as soon as ",[138,227,228],{},"size"," bytes are buffered.",[130,231,232,235,236,239],{},[133,233,234],{},"CMUX"," is now real 3GPP 27.010 basic mode (0xF9 framing, SABM\u002FUA, CLD); before,\nthe frames were not understood by modems. ",[138,237,238],{},"openMuxChannel(dlci)"," accepts 1–63.",[130,241,242,245,246,250,251,254],{},[133,243,244],{},"Android:"," the plugin no longer offers the app for ",[247,248,249],"em",{},"every"," USB device (the old\n",[138,252,253],{},"device_filter.xml"," had a catch-all entry); it matches the supported chips plus any\nCDC-ACM device.",[130,256,257,263,264,267,268,271,272,275],{},[133,258,259,260],{},"Rust ",[138,261,262],{},"commands::open"," takes two more optional arguments at the end: ",[138,265,266],{},"dtr",",\n",[138,269,270],{},"rts"," (pass ",[138,273,274],{},"None, None"," for the old behaviour).",[130,277,278,280],{},[133,279,244],{}," USB Ethernet \u002F RNDIS devices are no longer listed as serial ports;\nFTDI ports open with a 1 ms latency timer.",[130,282,283,163,286,289,290,293,294,297,298,221,300,302,303,306],{},[133,284,285],{},"New:",[138,287,288],{},"tcp:\u002F\u002Fhost:port"," paths on every platform, ",[138,291,292],{},"ble:\u002F\u002F"," (feature ",[138,295,296],{},"ble","),\n",[138,299,266],{},[138,301,270],{}," options on open, ",[138,304,305],{},"SerialPort.scanBlePorts()","; the plugin builds for\niOS.",[122,308,310],{"id":309},"v2-v3","v2 → v3",[312,313,314,315,221,318,221,321,324,325,329],"p",{},"In v2 you attached stream callbacks separately (",[138,316,317],{},"startListening",[138,319,320],{},"listen",[138,322,323],{},"disconnected",").\nIn v3 one call — ",[133,326,327],{},[138,328,213],{}," — registers all of them; stop with the returned handle.",[331,332,337],"pre",{"className":333,"code":334,"language":335,"meta":336,"style":336},"language-ts shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","\u002F\u002F v2\nawait port.startListening();\nawait port.listen((data) => console.log(data));\nawait port.disconnected((reason) => console.log(\"gone\", reason));\nawait port.cancelListen();\n\n\u002F\u002F v3 — same thing in one watch()\nconst handle = await port.watch({\n  onData: (data) => console.log(data),\n  onDisconnect: (reason) => console.log(\"gone\", reason), \u002F\u002F replaces disconnected(fn)\n});\nawait handle.unwatch();\n","ts","",[138,338,339,348,372,412,459,475,482,488,515,544,584,594],{"__ignoreMap":336},[340,341,344],"span",{"class":342,"line":343},"line",1,[340,345,347],{"class":346},"sHwdD","\u002F\u002F v2\n",[340,349,351,355,359,363,366,369],{"class":342,"line":350},2,[340,352,354],{"class":353},"s7zQu","await",[340,356,358],{"class":357},"sTEyZ"," port",[340,360,362],{"class":361},"sMK4o",".",[340,364,317],{"class":365},"s2Zo4",[340,367,368],{"class":357},"()",[340,370,371],{"class":361},";\n",[340,373,375,377,379,381,383,386,388,392,395,399,402,404,407,410],{"class":342,"line":374},3,[340,376,354],{"class":353},[340,378,358],{"class":357},[340,380,362],{"class":361},[340,382,320],{"class":365},[340,384,385],{"class":357},"(",[340,387,385],{"class":361},[340,389,391],{"class":390},"sHdIc","data",[340,393,394],{"class":361},")",[340,396,398],{"class":397},"spNyl"," =>",[340,400,401],{"class":357}," console",[340,403,362],{"class":361},[340,405,406],{"class":365},"log",[340,408,409],{"class":357},"(data))",[340,411,371],{"class":361},[340,413,415,417,419,421,423,425,427,430,432,434,436,438,440,442,445,449,451,454,457],{"class":342,"line":414},4,[340,416,354],{"class":353},[340,418,358],{"class":357},[340,420,362],{"class":361},[340,422,323],{"class":365},[340,424,385],{"class":357},[340,426,385],{"class":361},[340,428,429],{"class":390},"reason",[340,431,394],{"class":361},[340,433,398],{"class":397},[340,435,401],{"class":357},[340,437,362],{"class":361},[340,439,406],{"class":365},[340,441,385],{"class":357},[340,443,444],{"class":361},"\"",[340,446,448],{"class":447},"sfazB","gone",[340,450,444],{"class":361},[340,452,453],{"class":361},",",[340,455,456],{"class":357}," reason))",[340,458,371],{"class":361},[340,460,462,464,466,468,471,473],{"class":342,"line":461},5,[340,463,354],{"class":353},[340,465,358],{"class":357},[340,467,362],{"class":361},[340,469,470],{"class":365},"cancelListen",[340,472,368],{"class":357},[340,474,371],{"class":361},[340,476,478],{"class":342,"line":477},6,[340,479,481],{"emptyLinePlaceholder":480},true,"\n",[340,483,485],{"class":342,"line":484},7,[340,486,487],{"class":346},"\u002F\u002F v3 — same thing in one watch()\n",[340,489,491,494,497,500,503,505,507,510,512],{"class":342,"line":490},8,[340,492,493],{"class":397},"const",[340,495,496],{"class":357}," handle ",[340,498,499],{"class":361},"=",[340,501,502],{"class":353}," await",[340,504,358],{"class":357},[340,506,362],{"class":361},[340,508,509],{"class":365},"watch",[340,511,385],{"class":357},[340,513,514],{"class":361},"{\n",[340,516,518,521,524,527,529,531,533,535,537,539,542],{"class":342,"line":517},9,[340,519,520],{"class":365},"  onData",[340,522,523],{"class":361},":",[340,525,526],{"class":361}," (",[340,528,391],{"class":390},[340,530,394],{"class":361},[340,532,398],{"class":397},[340,534,401],{"class":357},[340,536,362],{"class":361},[340,538,406],{"class":365},[340,540,541],{"class":357},"(data)",[340,543,267],{"class":361},[340,545,547,550,552,554,556,558,560,562,564,566,568,570,572,574,576,579,581],{"class":342,"line":546},10,[340,548,549],{"class":365},"  onDisconnect",[340,551,523],{"class":361},[340,553,526],{"class":361},[340,555,429],{"class":390},[340,557,394],{"class":361},[340,559,398],{"class":397},[340,561,401],{"class":357},[340,563,362],{"class":361},[340,565,406],{"class":365},[340,567,385],{"class":357},[340,569,444],{"class":361},[340,571,448],{"class":447},[340,573,444],{"class":361},[340,575,453],{"class":361},[340,577,578],{"class":357}," reason)",[340,580,453],{"class":361},[340,582,583],{"class":346}," \u002F\u002F replaces disconnected(fn)\n",[340,585,587,590,592],{"class":342,"line":586},11,[340,588,589],{"class":361},"}",[340,591,394],{"class":357},[340,593,371],{"class":361},[340,595,597,599,602,604,607,609],{"class":342,"line":596},12,[340,598,354],{"class":353},[340,600,601],{"class":357}," handle",[340,603,362],{"class":361},[340,605,606],{"class":365},"unwatch",[340,608,368],{"class":357},[340,610,371],{"class":361},[612,613,614,627],"table",{},[615,616,617],"thead",{},[618,619,620,624],"tr",{},[621,622,623],"th",{},"v2",[621,625,626],{},"v3",[628,629,630,647,664],"tbody",{},[618,631,632,642],{},[633,634,635,638,639],"td",{},[138,636,637],{},"startListening()"," + ",[138,640,641],{},"listen(fn)",[633,643,644],{},[138,645,646],{},"const handle = await port.watch({ onData: fn })",[618,648,649,654],{},[633,650,651],{},[138,652,653],{},"disconnected(fn)",[633,655,656,657,660,661],{},"pass ",[138,658,659],{},"onDisconnect: fn"," into the same ",[138,662,663],{},"watch({ ... })",[618,665,666,674],{},[633,667,668,221,671],{},[138,669,670],{},"cancelListen()",[138,672,673],{},"stopListening()",[633,675,676],{},[138,677,678],{},"await handle.unwatch()",[312,680,681,682,685,686,689,690,693,694,362],{},"Legacy Tauri events (",[138,683,684],{},"plugin-serialplugin-read-*",") and Android plugin triggers (",[138,687,688],{},"serialData",", ",[138,691,692],{},"serialError",") are ",[133,695,696],{},"no longer part of the public API",[312,698,699,163,702,705,706,709,710,713,714,221,717,720],{},[133,700,701],{},"New in v3:",[138,703,704],{},"SerialPort.getCapabilities()"," — ",[138,707,708],{},"{ transport, platform, version }"," from Rust (",[138,711,712],{},"cfg!","), if the app needs to branch by platform (replaces ad-hoc ",[138,715,716],{},"window",[138,718,719],{},"@tauri-apps\u002Fplugin-os"," probing on the app side).",[312,722,723],{},[133,724,725],{},"Breaking API changes (v3):",[612,727,728,739],{},[615,729,730],{},[618,731,732,735,737],{},[621,733,734],{},"Field \u002F behavior",[621,736,623],{},[621,738,626],{},[628,740,741,761,780,803,826,852],{},[618,742,743,751,756],{},[633,744,745,221,748],{},[138,746,747],{},"AtCommandResult.raw",[138,749,750],{},"ExchangeResponse.raw",[633,752,753],{},[138,754,755],{},"number[]",[633,757,758],{},[138,759,760],{},"Uint8Array",[618,762,763,768,774],{},[633,764,765],{},[138,766,767],{},"AtCommandResult.timedOut",[633,769,770,771],{},"literal ",[138,772,773],{},"false",[633,775,776,779],{},[138,777,778],{},"boolean"," (timeouts surfaced by native layer)",[618,781,782,787,792],{},[633,783,784],{},[138,785,786],{},"open()",[633,788,789],{},[138,790,791],{},"void",[633,793,794,795,798,799,802],{},"returns ",[133,796,797],{},"canonical path"," (Android re-keys to ",[138,800,801],{},"UsbPath.sessionKey","; desktop echoes input)",[618,804,805,810,813],{},[633,806,807],{},[138,808,809],{},"cancel_read",[633,811,812],{},"also detached watch on some builds",[633,814,815,818,819,822,823],{},[133,816,817],{},"does not"," unwatch — use ",[138,820,821],{},"close()"," or ",[138,824,825],{},"handle.unwatch()",[618,827,828,831,834],{},[633,829,830],{},"TX queue after error",[633,832,833],{},"port could stay halted until reopen",[633,835,836,837,221,840,843,844,847,848,851],{},"next ",[138,838,839],{},"exchange",[138,841,842],{},"sendAt"," job runs normally (",[138,845,846],{},"stopOnError"," only stops remaining phases in one ",[138,849,850],{},"sendAtPhases"," batch)",[618,853,854,859,862],{},[633,855,856,857],{},"Early RX before ",[138,858,839],{},[633,860,861],{},"often lost or raced with wait",[633,863,864,865,868,869,871,872,875],{},"native hub keeps ",[133,866,867],{},"idle"," bytes; ",[138,870,839],{}," replays them via ",[138,873,874],{},"take_idle_bytes"," after write (no extra line response needed)",[877,878,880],"h3",{"id":879},"at-api-v3","AT API (v3)",[612,882,883,893],{},[615,884,885],{},[618,886,887,890],{},[621,888,889],{},"Was",[621,891,892],{},"Now",[628,894,895,907,919,931,943,962],{},[618,896,897,902],{},[633,898,899],{},[138,900,901],{},"port.at.enqueue('AT')",[633,903,904],{},[138,905,906],{},"port.sendAt('AT')",[618,908,909,914],{},[633,910,911],{},[138,912,913],{},"port.at.enqueuePhases(...)",[633,915,916],{},[138,917,918],{},"port.sendAtPhases(...)",[618,920,921,926],{},[633,922,923],{},[138,924,925],{},"port.at.sendSmsPdu(...)",[633,927,928],{},[138,929,930],{},"port.sendSmsPdu(...)",[618,932,933,938],{},[633,934,935],{},[138,936,937],{},"port.at.cancel()",[633,939,940],{},[138,941,942],{},"port.cancelAt()",[618,944,945,950],{},[633,946,947],{},[138,948,949],{},"new SerialPort({ atSession })",[633,951,952,955,956,958,959],{},[138,953,954],{},"atSession"," still applies on ",[138,957,786],{}," via ",[138,960,961],{},"configureAtSession",[618,963,964,971],{},[633,965,966,967,970],{},"Parallel ",[138,968,969],{},"exchange()"," throws",[633,972,973,975],{},[138,974,969],{}," awaits turn in native queue",[977,978,979],"style",{},"html pre.shiki code .sHwdD, html code.shiki .sHwdD{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic}html pre.shiki code .s7zQu, html code.shiki .s7zQu{--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic}html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}html pre.shiki code .sHdIc, html code.shiki .sHdIc{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#EEFFFF;--shiki-default-font-style:italic;--shiki-dark:#BABED8;--shiki-dark-font-style:italic}html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":336,"searchDepth":350,"depth":374,"links":981},[982,983],{"id":124,"depth":350,"text":125},{"id":309,"depth":350,"text":310,"children":984},[985],{"id":879,"depth":374,"text":880},"Upgrading from v3 to v4 and from v2 to v3.","md",null,{},{"title":109,"description":986},"c0gDKpRWuhe9GioFpnCEjxSIAsv0o1lXk3DV214IfOI",[993,995],{"title":105,"path":106,"stem":107,"description":994,"children":-1},"Choosing the modem line levels when a port opens.",{"title":113,"path":114,"stem":115,"description":996,"children":-1},"All notable changes to tauri-plugin-serialplugin and tauri-plugin-serialplugin-api.",1794158000994]