[{"data":1,"prerenderedAt":2236},["ShallowReactive",2],{"navigation":3,"\u002Fguides\u002Fjavascript-api":116,"\u002Fguides\u002Fjavascript-api-surround":2231},[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":34,"body":118,"description":2225,"extension":2226,"generated":26,"links":2227,"meta":2228,"navigation":1160,"path":35,"seo":2229,"stem":36,"__hash__":2230},"docs\u002F2.guides\u002F1.javascript-api.md",{"type":119,"value":120,"toc":2211},"minimark",[121,130,217,226,236,241,314,564,568,675,705,910,914,969,975,980,1178,1266,1372,1381,1385,1439,1456,1467,1471,1491,1509,1513,1596,1600,1762,1787,1791,1868,1888,1892,2011,2058,2061,2204,2207],[122,123,124,125,129],"p",{},"Everything is exported from ",[126,127,128],"code",{},"tauri-plugin-serialplugin-api",":",[131,132,137],"pre",{"className":133,"code":134,"language":135,"meta":136,"style":136},"language-ts shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","import {\n  SerialPort,\n  DataBits, FlowControl, Parity, StopBits, ClearBuffer, LogLevel,\n} from \"tauri-plugin-serialplugin-api\";\n","ts","",[126,138,139,152,162,196],{"__ignoreMap":136},[140,141,144,148],"span",{"class":142,"line":143},"line",1,[140,145,147],{"class":146},"s7zQu","import",[140,149,151],{"class":150},"sMK4o"," {\n",[140,153,155,159],{"class":142,"line":154},2,[140,156,158],{"class":157},"sTEyZ","  SerialPort",[140,160,161],{"class":150},",\n",[140,163,165,168,171,174,176,179,181,184,186,189,191,194],{"class":142,"line":164},3,[140,166,167],{"class":157},"  DataBits",[140,169,170],{"class":150},",",[140,172,173],{"class":157}," FlowControl",[140,175,170],{"class":150},[140,177,178],{"class":157}," Parity",[140,180,170],{"class":150},[140,182,183],{"class":157}," StopBits",[140,185,170],{"class":150},[140,187,188],{"class":157}," ClearBuffer",[140,190,170],{"class":150},[140,192,193],{"class":157}," LogLevel",[140,195,161],{"class":150},[140,197,199,202,205,208,211,214],{"class":142,"line":198},4,[140,200,201],{"class":150},"}",[140,203,204],{"class":146}," from",[140,206,207],{"class":150}," \"",[140,209,128],{"class":210},"sfazB",[140,212,213],{"class":150},"\"",[140,215,216],{"class":150},";\n",[122,218,219,220,225],{},"All methods return promises that reject with a string message on failure\n(see ",[221,222,224],"a",{"href":223},"#errors","Errors",").",[122,227,228,229,232,233,235],{},"AT commands, ",[126,230,231],{},"exchange()",", SMS and CMUX have their own page:\n",[221,234,38],{"href":39},".",[237,238,240],"h2",{"id":239},"creating-a-port","Creating a port",[131,242,244],{"className":133,"code":243,"language":135,"meta":136,"style":136},"const port = new SerialPort({\n  path: \"\u002Fdev\u002FttyUSB0\",   \u002F\u002F COM3, \u002Fdev\u002Fcu.usbserial-…, tcp:\u002F\u002Fhost:port, ble:\u002F\u002F\u003Cid>\n  baudRate: 115200,\n});\n",[126,245,246,271,292,305],{"__ignoreMap":136},[140,247,248,252,255,258,261,265,268],{"class":142,"line":143},[140,249,251],{"class":250},"spNyl","const",[140,253,254],{"class":157}," port ",[140,256,257],{"class":150},"=",[140,259,260],{"class":150}," new",[140,262,264],{"class":263},"s2Zo4"," SerialPort",[140,266,267],{"class":157},"(",[140,269,270],{"class":150},"{\n",[140,272,273,277,279,281,284,286,288],{"class":142,"line":154},[140,274,276],{"class":275},"swJcz","  path",[140,278,129],{"class":150},[140,280,207],{"class":150},[140,282,283],{"class":210},"\u002Fdev\u002FttyUSB0",[140,285,213],{"class":150},[140,287,170],{"class":150},[140,289,291],{"class":290},"sHwdD","   \u002F\u002F COM3, \u002Fdev\u002Fcu.usbserial-…, tcp:\u002F\u002Fhost:port, ble:\u002F\u002F\u003Cid>\n",[140,293,294,297,299,303],{"class":142,"line":164},[140,295,296],{"class":275},"  baudRate",[140,298,129],{"class":150},[140,300,302],{"class":301},"sbssI"," 115200",[140,304,161],{"class":150},[140,306,307,309,312],{"class":142,"line":198},[140,308,201],{"class":150},[140,310,311],{"class":157},")",[140,313,216],{"class":150},[315,316,317,333],"table",{},[318,319,320],"thead",{},[321,322,323,327,330],"tr",{},[324,325,326],"th",{},"Option",[324,328,329],{},"Default",[324,331,332],{},"Meaning",[334,335,336,361,373,388,402,416,438,460,482,506,530,545],"tbody",{},[321,337,338,344,347],{},[339,340,341],"td",{},[126,342,343],{},"path",[339,345,346],{},"—",[339,348,349,350,353,354,357,358,311],{},"Device path, ",[126,351,352],{},"tcp:\u002F\u002Fhost:port"," or ",[126,355,356],{},"ble:\u002F\u002F\u003Cid>"," (",[221,359,360],{"href":82},"transports",[321,362,363,368,370],{},[339,364,365],{},[126,366,367],{},"baudRate",[339,369,346],{},[339,371,372],{},"Bits per second",[321,374,375,380,385],{},[339,376,377],{},[126,378,379],{},"dataBits",[339,381,382],{},[126,383,384],{},"DataBits.Eight",[339,386,387],{},"5–8",[321,389,390,395,400],{},[339,391,392],{},[126,393,394],{},"parity",[339,396,397],{},[126,398,399],{},"Parity.None",[339,401],{},[321,403,404,409,414],{},[339,405,406],{},[126,407,408],{},"stopBits",[339,410,411],{},[126,412,413],{},"StopBits.One",[339,415],{},[321,417,418,423,428],{},[339,419,420],{},[126,421,422],{},"flowControl",[339,424,425],{},[126,426,427],{},"FlowControl.None",[339,429,430,433,434,437],{},[126,431,432],{},"Software"," (XON\u002FXOFF) or ",[126,435,436],{},"Hardware"," (RTS\u002FCTS)",[321,439,440,445,450],{},[339,441,442],{},[126,443,444],{},"timeout",[339,446,447],{},[126,448,449],{},"1000",[339,451,452,453,456,457],{},"Read timeout (ms) for ",[126,454,455],{},"read()"," \u002F ",[126,458,459],{},"readBinary()",[321,461,462,467,472],{},[339,463,464],{},[126,465,466],{},"size",[339,468,469],{},[126,470,471],{},"1024",[339,473,474,475,477,478,481],{},"Max bytes per ",[126,476,455],{}," and per ",[126,479,480],{},"watch()"," chunk",[321,483,484,489,494],{},[339,485,486],{},[126,487,488],{},"encoding",[339,490,491],{},[126,492,493],{},"\"utf-8\"",[339,495,496,499,500,502,503,505],{},[126,497,498],{},"TextDecoder"," encoding for ",[126,501,455],{}," and ",[126,504,480],{}," text",[321,507,508,517,520],{},[339,509,510,513,514],{},[126,511,512],{},"dtr",", ",[126,515,516],{},"rts",[339,518,519],{},"platform default",[339,521,522,523,526,527,311],{},"Line levels on open; ",[126,524,525],{},"dtr: false"," stops Arduino-style boards resetting (",[221,528,529],{"href":106},"details",[321,531,532,537,540],{},[339,533,534],{},[126,535,536],{},"serialDataFlushIntervalMs",[339,538,539],{},"~20 ms",[339,541,542,543],{},"Default batch window for ",[126,544,480],{},[321,546,547,552,554],{},[339,548,549],{},[126,550,551],{},"atSession",[339,553,346],{},[339,555,556,557,357,560,311],{},"AT defaults applied on ",[126,558,559],{},"open()",[221,561,563],{"href":562},"\u002Fguides\u002Fat-commands#session-defaults","AT",[237,565,567],{"id":566},"discovery-static","Discovery (static)",[315,569,570,580],{},[318,571,572],{},[321,573,574,577],{},[324,575,576],{},"Method",[324,578,579],{},"Returns",[334,581,582,594,617,633,643,655,665],{},[321,583,584,589],{},[339,585,586],{},[126,587,588],{},"SerialPort.available_ports({ singlePortPerDevice? })",[339,590,591],{},[126,592,593],{},"Record\u003Cpath, PortInfo>",[321,595,596,601],{},[339,597,598],{},[126,599,600],{},"SerialPort.watchAvailablePorts(handlers, { singlePortPerDevice?, pollIntervalMs? })",[339,602,603,606,607,610,611,456,614],{},[126,604,605],{},"WatchHandle","; calls ",[126,608,609],{},"onSnapshot(ports)"," once, then ",[126,612,613],{},"onAdded(path, info)",[126,615,616],{},"onRemoved(path)",[321,618,619,624],{},[339,620,621],{},[126,622,623],{},"SerialPort.scanBlePorts({ timeoutMs? })",[339,625,626,627,629,630,311],{},"BLE UART devices as ",[126,628,356],{}," paths (",[221,631,632],{"href":102},"BLE",[321,634,635,640],{},[339,636,637],{},[126,638,639],{},"SerialPort.managed_ports()",[339,641,642],{},"Paths the plugin currently has open",[321,644,645,650],{},[339,646,647],{},[126,648,649],{},"SerialPort.getCapabilities()",[339,651,652],{},[126,653,654],{},"{ transport: \"desktop\" | \"mobile\", platform, version }",[321,656,657,662],{},[339,658,659],{},[126,660,661],{},"SerialPort.closeAll()",[339,663,664],{},"Closes every open port",[321,666,667,672],{},[339,668,669],{},[126,670,671],{},"SerialPort.forceClose(path)",[339,673,674],{},"Closes a port you no longer hold an object for",[122,676,677,680,681,684,685,688,689,692,693,696,697,700,701,704],{},[126,678,679],{},"PortInfo"," is ",[126,682,683],{},"{ type, vid, pid, manufacturer, product, serial_number }","; unknown\nfields are ",[126,686,687],{},"\"Unknown\"",". On macOS every device appears twice (",[126,690,691],{},"\u002Fdev\u002Fcu.*"," and\n",[126,694,695],{},"\u002Fdev\u002Ftty.*","); ",[126,698,699],{},"singlePortPerDevice: true"," keeps the ",[126,702,703],{},"cu.*"," one.",[131,706,708],{"className":133,"code":707,"language":135,"meta":136,"style":136},"const stop = await SerialPort.watchAvailablePorts({\n  onSnapshot: (ports) => console.log(Object.keys(ports)),\n  onAdded: (path, info) => console.log(\"plugged\", path, info.product),\n  onRemoved: (path) => console.log(\"unplugged\", path),\n}, { singlePortPerDevice: true });\n\u002F\u002F later\nawait stop.unwatch();\n",[126,709,710,733,772,823,860,885,891],{"__ignoreMap":136},[140,711,712,714,717,719,722,724,726,729,731],{"class":142,"line":143},[140,713,251],{"class":250},[140,715,716],{"class":157}," stop ",[140,718,257],{"class":150},[140,720,721],{"class":146}," await",[140,723,264],{"class":157},[140,725,235],{"class":150},[140,727,728],{"class":263},"watchAvailablePorts",[140,730,267],{"class":157},[140,732,270],{"class":150},[140,734,735,738,740,742,746,748,751,754,756,759,762,764,767,770],{"class":142,"line":154},[140,736,737],{"class":263},"  onSnapshot",[140,739,129],{"class":150},[140,741,357],{"class":150},[140,743,745],{"class":744},"sHdIc","ports",[140,747,311],{"class":150},[140,749,750],{"class":250}," =>",[140,752,753],{"class":157}," console",[140,755,235],{"class":150},[140,757,758],{"class":263},"log",[140,760,761],{"class":157},"(Object",[140,763,235],{"class":150},[140,765,766],{"class":263},"keys",[140,768,769],{"class":157},"(ports))",[140,771,161],{"class":150},[140,773,774,777,779,781,783,785,788,790,792,794,796,798,800,802,805,807,809,812,814,816,818,821],{"class":142,"line":164},[140,775,776],{"class":263},"  onAdded",[140,778,129],{"class":150},[140,780,357],{"class":150},[140,782,343],{"class":744},[140,784,170],{"class":150},[140,786,787],{"class":744}," info",[140,789,311],{"class":150},[140,791,750],{"class":250},[140,793,753],{"class":157},[140,795,235],{"class":150},[140,797,758],{"class":263},[140,799,267],{"class":157},[140,801,213],{"class":150},[140,803,804],{"class":210},"plugged",[140,806,213],{"class":150},[140,808,170],{"class":150},[140,810,811],{"class":157}," path",[140,813,170],{"class":150},[140,815,787],{"class":157},[140,817,235],{"class":150},[140,819,820],{"class":157},"product)",[140,822,161],{"class":150},[140,824,825,828,830,832,834,836,838,840,842,844,846,848,851,853,855,858],{"class":142,"line":198},[140,826,827],{"class":263},"  onRemoved",[140,829,129],{"class":150},[140,831,357],{"class":150},[140,833,343],{"class":744},[140,835,311],{"class":150},[140,837,750],{"class":250},[140,839,753],{"class":157},[140,841,235],{"class":150},[140,843,758],{"class":263},[140,845,267],{"class":157},[140,847,213],{"class":150},[140,849,850],{"class":210},"unplugged",[140,852,213],{"class":150},[140,854,170],{"class":150},[140,856,857],{"class":157}," path)",[140,859,161],{"class":150},[140,861,863,866,869,872,874,878,881,883],{"class":142,"line":862},5,[140,864,865],{"class":150},"},",[140,867,868],{"class":150}," {",[140,870,871],{"class":275}," singlePortPerDevice",[140,873,129],{"class":150},[140,875,877],{"class":876},"sfNiH"," true",[140,879,880],{"class":150}," }",[140,882,311],{"class":157},[140,884,216],{"class":150},[140,886,888],{"class":142,"line":887},6,[140,889,890],{"class":290},"\u002F\u002F later\n",[140,892,894,897,900,902,905,908],{"class":142,"line":893},7,[140,895,896],{"class":146},"await",[140,898,899],{"class":157}," stop",[140,901,235],{"class":150},[140,903,904],{"class":263},"unwatch",[140,906,907],{"class":157},"()",[140,909,216],{"class":150},[237,911,913],{"id":912},"open-and-close","Open and close",[315,915,916,925],{},[318,917,918],{},[321,919,920,922],{},[324,921,576],{},[324,923,924],{},"Notes",[334,926,927,936,946,956],{},[321,928,929,933],{},[339,930,931],{},[126,932,559],{},[339,934,935],{},"Resolves with the canonical path (on Android a USB path is re-keyed to a session path). Already open: resolves with the current path.",[321,937,938,943],{},[339,939,940],{},[126,941,942],{},"close()",[339,944,945],{},"Safe when not open; also stops a pending auto-reconnect and releases the native port after a disconnect.",[321,947,948,953],{},[339,949,950],{},[126,951,952],{},"change({ path?, baudRate? })",[339,954,955],{},"Close, apply, reopen; an active watch is re-established.",[321,957,958,963],{},[339,959,960],{},[126,961,962],{},"isOpen",[339,964,965,968],{},[126,966,967],{},"boolean"," property.",[237,970,972,973],{"id":971},"streaming-with-watch","Streaming with ",[126,974,480],{},[122,976,977,979],{},[126,978,480],{}," delivers incoming data, unsolicited AT lines, errors and disconnects\nthrough one Tauri channel. One watch per port at a time.",[131,981,983],{"className":133,"code":982,"language":135,"meta":136,"style":136},"const handle = await port.watch({\n  onData: (data) => console.log(data),          \u002F\u002F string (decoded) or Uint8Array\n  onUrc: (line) => console.log(\"URC\", line),    \u002F\u002F optional, AT modems\n  onError: (message) => console.warn(message),  \u002F\u002F non-fatal\n  onDisconnect: (reason) => console.log(reason) \u002F\u002F port is gone\n}, { decode: true });\n\nawait handle.unwatch();\n",[126,984,985,1008,1038,1078,1109,1137,1156,1162],{"__ignoreMap":136},[140,986,987,989,992,994,996,999,1001,1004,1006],{"class":142,"line":143},[140,988,251],{"class":250},[140,990,991],{"class":157}," handle ",[140,993,257],{"class":150},[140,995,721],{"class":146},[140,997,998],{"class":157}," port",[140,1000,235],{"class":150},[140,1002,1003],{"class":263},"watch",[140,1005,267],{"class":157},[140,1007,270],{"class":150},[140,1009,1010,1013,1015,1017,1020,1022,1024,1026,1028,1030,1033,1035],{"class":142,"line":154},[140,1011,1012],{"class":263},"  onData",[140,1014,129],{"class":150},[140,1016,357],{"class":150},[140,1018,1019],{"class":744},"data",[140,1021,311],{"class":150},[140,1023,750],{"class":250},[140,1025,753],{"class":157},[140,1027,235],{"class":150},[140,1029,758],{"class":263},[140,1031,1032],{"class":157},"(data)",[140,1034,170],{"class":150},[140,1036,1037],{"class":290},"          \u002F\u002F string (decoded) or Uint8Array\n",[140,1039,1040,1043,1045,1047,1049,1051,1053,1055,1057,1059,1061,1063,1066,1068,1070,1073,1075],{"class":142,"line":164},[140,1041,1042],{"class":263},"  onUrc",[140,1044,129],{"class":150},[140,1046,357],{"class":150},[140,1048,142],{"class":744},[140,1050,311],{"class":150},[140,1052,750],{"class":250},[140,1054,753],{"class":157},[140,1056,235],{"class":150},[140,1058,758],{"class":263},[140,1060,267],{"class":157},[140,1062,213],{"class":150},[140,1064,1065],{"class":210},"URC",[140,1067,213],{"class":150},[140,1069,170],{"class":150},[140,1071,1072],{"class":157}," line)",[140,1074,170],{"class":150},[140,1076,1077],{"class":290},"    \u002F\u002F optional, AT modems\n",[140,1079,1080,1083,1085,1087,1090,1092,1094,1096,1098,1101,1104,1106],{"class":142,"line":198},[140,1081,1082],{"class":263},"  onError",[140,1084,129],{"class":150},[140,1086,357],{"class":150},[140,1088,1089],{"class":744},"message",[140,1091,311],{"class":150},[140,1093,750],{"class":250},[140,1095,753],{"class":157},[140,1097,235],{"class":150},[140,1099,1100],{"class":263},"warn",[140,1102,1103],{"class":157},"(message)",[140,1105,170],{"class":150},[140,1107,1108],{"class":290},"  \u002F\u002F non-fatal\n",[140,1110,1111,1114,1116,1118,1121,1123,1125,1127,1129,1131,1134],{"class":142,"line":862},[140,1112,1113],{"class":263},"  onDisconnect",[140,1115,129],{"class":150},[140,1117,357],{"class":150},[140,1119,1120],{"class":744},"reason",[140,1122,311],{"class":150},[140,1124,750],{"class":250},[140,1126,753],{"class":157},[140,1128,235],{"class":150},[140,1130,758],{"class":263},[140,1132,1133],{"class":157},"(reason) ",[140,1135,1136],{"class":290},"\u002F\u002F port is gone\n",[140,1138,1139,1141,1143,1146,1148,1150,1152,1154],{"class":142,"line":887},[140,1140,865],{"class":150},[140,1142,868],{"class":150},[140,1144,1145],{"class":275}," decode",[140,1147,129],{"class":150},[140,1149,877],{"class":876},[140,1151,880],{"class":150},[140,1153,311],{"class":157},[140,1155,216],{"class":150},[140,1157,1158],{"class":142,"line":893},[140,1159,1161],{"emptyLinePlaceholder":1160},true,"\n",[140,1163,1165,1167,1170,1172,1174,1176],{"class":142,"line":1164},8,[140,1166,896],{"class":146},[140,1168,1169],{"class":157}," handle",[140,1171,235],{"class":150},[140,1173,904],{"class":263},[140,1175,907],{"class":157},[140,1177,216],{"class":150},[315,1179,1180,1193],{},[318,1181,1182],{},[321,1183,1184,1187,1190],{},[324,1185,1186],{},"Event",[324,1188,1189],{},"When",[324,1191,1192],{},"Port still open?",[334,1194,1195,1211,1234,1246],{},[321,1196,1197,1202,1208],{},[339,1198,1199],{},[126,1200,1201],{},"onData",[339,1203,1204,1205],{},"Bytes arrived (batched), or one complete frame with ",[126,1206,1207],{},"parser",[339,1209,1210],{},"yes",[321,1212,1213,1218,1232],{},[339,1214,1215],{},[126,1216,1217],{},"onUrc",[339,1219,1220,1221,513,1224,1227,1228,1231],{},"A URC line (",[126,1222,1223],{},"+CREG: …",[126,1225,1226],{},"RING",") when ",[126,1229,1230],{},"routeUrc"," is on",[339,1233,1210],{},[321,1235,1236,1241,1244],{},[339,1237,1238],{},[126,1239,1240],{},"onError",[339,1242,1243],{},"Non-fatal read error; the watch continues",[339,1245,1210],{},[321,1247,1248,1253,1256],{},[339,1249,1250],{},[126,1251,1252],{},"onDisconnect",[339,1254,1255],{},"Unplug, bridge closed, BLE link lost",[339,1257,1258,1259,1261,1262,1265],{},"no — ",[126,1260,962],{}," becomes ",[126,1263,1264],{},"false",", auto-reconnect starts if enabled",[315,1267,1268,1279],{},[318,1269,1270],{},[321,1271,1272,1275,1277],{},[324,1273,1274],{},"Watch option",[324,1276,329],{},[324,1278,332],{},[334,1280,1281,1305,1321,1335,1355],{},[321,1282,1283,1288,1293],{},[339,1284,1285],{},[126,1286,1287],{},"decode",[339,1289,1290],{},[126,1291,1292],{},"true",[339,1294,1295,1296,1298,1299,1301,1302,235],{},"Decode to text with the port ",[126,1297,488],{}," (multi-byte characters split across chunks are kept). ",[126,1300,1264],{}," gives ",[126,1303,1304],{},"Uint8Array",[321,1306,1307,1313,1315],{},[339,1308,1309,456,1311],{},[126,1310,444],{},[126,1312,536],{},[339,1314,539],{},[339,1316,1317,1318,1320],{},"Batch window. Data is also flushed as soon as ",[126,1319,466],{}," bytes are buffered.",[321,1322,1323,1327,1332],{},[339,1324,1325],{},[126,1326,466],{},[339,1328,1329,1330],{},"port ",[126,1331,466],{},[339,1333,1334],{},"Max bytes per chunk",[321,1336,1337,1341,1349],{},[339,1338,1339],{},[126,1340,1230],{},[339,1342,1343,1345,1346,1348],{},[126,1344,1292],{}," if ",[126,1347,1217],{}," is given",[339,1350,1351,1352,1354],{},"Split AT URC lines out of ",[126,1353,1201],{},". Keep off for binary or NMEA streams.",[321,1356,1357,1361,1364],{},[339,1358,1359],{},[126,1360,1207],{},[339,1362,1363],{},"none",[339,1365,1366,1367,1369,1370,235],{},"Native framing: one ",[126,1368,1201],{}," call per line \u002F packet, no batching. See ",[221,1371,50],{"href":51},[122,1373,1374,1377,1378,225],{},[126,1375,1376],{},"activeWatch"," returns the current handle (or ",[126,1379,1380],{},"null",[237,1382,1384],{"id":1383},"reading-and-writing","Reading and writing",[315,1386,1387,1395],{},[318,1388,1389],{},[321,1390,1391,1393],{},[324,1392,576],{},[324,1394,579],{},[334,1396,1397,1407,1416,1428],{},[321,1398,1399,1404],{},[339,1400,1401],{},[126,1402,1403],{},"write(text)",[339,1405,1406],{},"bytes written",[321,1408,1409,1414],{},[339,1410,1411],{},[126,1412,1413],{},"writeBinary(Uint8Array | number[])",[339,1415,1406],{},[321,1417,1418,1423],{},[339,1419,1420],{},[126,1421,1422],{},"read({ timeout?, size? })",[339,1424,1425,1426],{},"text decoded with the port ",[126,1427,488],{},[321,1429,1430,1435],{},[339,1431,1432],{},[126,1433,1434],{},"readBinary({ timeout?, size? })",[339,1436,1437],{},[126,1438,1304],{},[122,1440,1441,456,1443,1445,1446,1448,1449,1452,1453,1455],{},[126,1442,455],{},[126,1444,459],{}," wait up to ",[126,1447,444],{}," for data and reject with\n",[126,1450,1451],{},"no data received within … ms"," if nothing arrives. They cannot run while a\n",[126,1454,480],{}," is active — use one model per port: polling reads or a watch.",[122,1457,1458,1459,1466],{},"For request\u002Fresponse protocols use ",[221,1460,1461,456,1463],{"href":39},[126,1462,231],{},[126,1464,1465],{},"sendAt()",":\nthey write, wait for the reply and keep concurrent calls in order.",[237,1468,1470],{"id":1469},"line-settings","Line settings",[122,1472,1473,513,1476,513,1479,161,1482,513,1485,513,1488,235],{},[126,1474,1475],{},"setBaudRate(n)",[126,1477,1478],{},"setDataBits(DataBits)",[126,1480,1481],{},"setParity(Parity)",[126,1483,1484],{},"setStopBits(StopBits)",[126,1486,1487],{},"setFlowControl(FlowControl)",[126,1489,1490],{},"setTimeout(ms)",[122,1492,1493,1494,1497,1498,1501,1502,502,1505,1508],{},"The new value is also kept in ",[126,1495,1496],{},"port.options",", so a reconnect or ",[126,1499,1500],{},"change()"," reopens\nwith it. Over ",[126,1503,1504],{},"tcp:\u002F\u002F",[126,1506,1507],{},"ble:\u002F\u002F"," these are stored only (the bridge or radio owns\nthe real line settings).",[237,1510,1512],{"id":1511},"modem-lines-and-buffers","Modem lines and buffers",[315,1514,1515,1523],{},[318,1516,1517],{},[321,1518,1519,1521],{},[324,1520,576],{},[324,1522],{},[334,1524,1525,1538,1557,1573,1583],{},[321,1526,1527,1535],{},[339,1528,1529,513,1532],{},[126,1530,1531],{},"writeDataTerminalReady(bool)",[126,1533,1534],{},"writeRequestToSend(bool)",[339,1536,1537],{},"Set DTR \u002F RTS",[321,1539,1540,1554],{},[339,1541,1542,513,1545,513,1548,513,1551],{},[126,1543,1544],{},"readClearToSend()",[126,1546,1547],{},"readDataSetReady()",[126,1549,1550],{},"readRingIndicator()",[126,1552,1553],{},"readCarrierDetect()",[339,1555,1556],{},"Read CTS \u002F DSR \u002F RI \u002F CD",[321,1558,1559,1567],{},[339,1560,1561,513,1564],{},[126,1562,1563],{},"bytesToRead()",[126,1565,1566],{},"bytesToWrite()",[339,1568,1569,1570,1572],{},"Queue sizes (",[126,1571,1566],{}," is always 0 on Android)",[321,1574,1575,1580],{},[339,1576,1577],{},[126,1578,1579],{},"clearBuffer(ClearBuffer.Input | Output | All)",[339,1581,1582],{},"Drop queued data",[321,1584,1585,1593],{},[339,1586,1587,513,1590],{},[126,1588,1589],{},"setBreak()",[126,1591,1592],{},"clearBreak()",[339,1594,1595],{},"Break condition",[237,1597,1599],{"id":1598},"auto-reconnect","Auto-reconnect",[131,1601,1603],{"className":133,"code":1602,"language":135,"meta":136,"style":136},"port.enableAutoReconnect({\n  interval: 3000,        \u002F\u002F ms between attempts (fixed, no backoff)\n  maxAttempts: 10,       \u002F\u002F null = forever\n  onReconnect: (ok, attempt) => console.log(ok ? `back after ${attempt}` : `attempt ${attempt} failed`),\n});\nawait port.watch({ onData: console.log });\n",[126,1604,1605,1619,1634,1649,1721,1729],{"__ignoreMap":136},[140,1606,1607,1610,1612,1615,1617],{"class":142,"line":143},[140,1608,1609],{"class":157},"port",[140,1611,235],{"class":150},[140,1613,1614],{"class":263},"enableAutoReconnect",[140,1616,267],{"class":157},[140,1618,270],{"class":150},[140,1620,1621,1624,1626,1629,1631],{"class":142,"line":154},[140,1622,1623],{"class":275},"  interval",[140,1625,129],{"class":150},[140,1627,1628],{"class":301}," 3000",[140,1630,170],{"class":150},[140,1632,1633],{"class":290},"        \u002F\u002F ms between attempts (fixed, no backoff)\n",[140,1635,1636,1639,1641,1644,1646],{"class":142,"line":164},[140,1637,1638],{"class":275},"  maxAttempts",[140,1640,129],{"class":150},[140,1642,1643],{"class":301}," 10",[140,1645,170],{"class":150},[140,1647,1648],{"class":290},"       \u002F\u002F null = forever\n",[140,1650,1651,1654,1656,1658,1661,1663,1666,1668,1670,1672,1674,1676,1679,1682,1685,1688,1691,1694,1697,1700,1702,1705,1707,1709,1711,1714,1717,1719],{"class":142,"line":198},[140,1652,1653],{"class":263},"  onReconnect",[140,1655,129],{"class":150},[140,1657,357],{"class":150},[140,1659,1660],{"class":744},"ok",[140,1662,170],{"class":150},[140,1664,1665],{"class":744}," attempt",[140,1667,311],{"class":150},[140,1669,750],{"class":250},[140,1671,753],{"class":157},[140,1673,235],{"class":150},[140,1675,758],{"class":263},[140,1677,1678],{"class":157},"(ok ",[140,1680,1681],{"class":150},"?",[140,1683,1684],{"class":150}," `",[140,1686,1687],{"class":210},"back after ",[140,1689,1690],{"class":150},"${",[140,1692,1693],{"class":157},"attempt",[140,1695,1696],{"class":150},"}`",[140,1698,1699],{"class":150}," :",[140,1701,1684],{"class":150},[140,1703,1704],{"class":210},"attempt ",[140,1706,1690],{"class":150},[140,1708,1693],{"class":157},[140,1710,201],{"class":150},[140,1712,1713],{"class":210}," failed",[140,1715,1716],{"class":150},"`",[140,1718,311],{"class":157},[140,1720,161],{"class":150},[140,1722,1723,1725,1727],{"class":142,"line":862},[140,1724,201],{"class":150},[140,1726,311],{"class":157},[140,1728,216],{"class":150},[140,1730,1731,1733,1735,1737,1739,1741,1744,1747,1749,1751,1753,1756,1758,1760],{"class":142,"line":887},[140,1732,896],{"class":146},[140,1734,998],{"class":157},[140,1736,235],{"class":150},[140,1738,1003],{"class":263},[140,1740,267],{"class":157},[140,1742,1743],{"class":150},"{",[140,1745,1746],{"class":275}," onData",[140,1748,129],{"class":150},[140,1750,753],{"class":157},[140,1752,235],{"class":150},[140,1754,1755],{"class":157},"log ",[140,1757,201],{"class":150},[140,1759,311],{"class":157},[140,1761,216],{"class":150},[122,1763,1764,1765,1767,1768,1771,1772,1775,1776,1779,1780,1783,1784,1786],{},"After ",[126,1766,1252],{}," the port is reopened and the last watch is re-established\nwith the same handlers. ",[126,1769,1770],{},"disableAutoReconnect()"," stops it,\n",[126,1773,1774],{},"getAutoReconnectInfo()"," reports ",[126,1777,1778],{},"{ enabled, interval, maxAttempts, currentAttempts, hasCallback }",", and ",[126,1781,1782],{},"manualReconnect()"," tries once now.\n",[126,1785,942],{}," also cancels a pending reconnect.",[237,1788,1790],{"id":1789},"logging","Logging",[131,1792,1794],{"className":133,"code":1793,"language":135,"meta":136,"style":136},"await SerialPort.setLogLevel(import.meta.env.DEV ? LogLevel.Debug : LogLevel.Error);\nconst level = await SerialPort.getLogLevel();\n",[126,1795,1796,1846],{"__ignoreMap":136},[140,1797,1798,1800,1802,1804,1807,1809,1811,1813,1816,1818,1821,1823,1826,1828,1830,1832,1835,1837,1839,1841,1844],{"class":142,"line":143},[140,1799,896],{"class":146},[140,1801,264],{"class":157},[140,1803,235],{"class":150},[140,1805,1806],{"class":263},"setLogLevel",[140,1808,267],{"class":157},[140,1810,147],{"class":146},[140,1812,235],{"class":150},[140,1814,1815],{"class":157},"meta",[140,1817,235],{"class":150},[140,1819,1820],{"class":157},"env",[140,1822,235],{"class":150},[140,1824,1825],{"class":157},"DEV ",[140,1827,1681],{"class":150},[140,1829,193],{"class":157},[140,1831,235],{"class":150},[140,1833,1834],{"class":157},"Debug ",[140,1836,129],{"class":150},[140,1838,193],{"class":157},[140,1840,235],{"class":150},[140,1842,1843],{"class":157},"Error)",[140,1845,216],{"class":150},[140,1847,1848,1850,1853,1855,1857,1859,1861,1864,1866],{"class":142,"line":154},[140,1849,251],{"class":250},[140,1851,1852],{"class":157}," level ",[140,1854,257],{"class":150},[140,1856,721],{"class":146},[140,1858,264],{"class":157},[140,1860,235],{"class":150},[140,1862,1863],{"class":263},"getLogLevel",[140,1865,907],{"class":157},[140,1867,216],{"class":150},[122,1869,1870,1871,513,1874,513,1877,513,1880,1883,1884,1887],{},"Levels: ",[126,1872,1873],{},"None",[126,1875,1876],{},"Error",[126,1878,1879],{},"Warn",[126,1881,1882],{},"Info"," (default), ",[126,1885,1886],{},"Debug",". The level applies to the\nnative side and to the JS wrapper.",[237,1889,1891],{"id":1890},"enums","Enums",[315,1893,1894,1904],{},[318,1895,1896],{},[321,1897,1898,1901],{},[324,1899,1900],{},"Enum",[324,1902,1903],{},"Values",[334,1905,1906,1927,1944,1959,1974,1992],{},[321,1907,1908,1913],{},[339,1909,1910],{},[126,1911,1912],{},"DataBits",[339,1914,1915,513,1918,513,1921,513,1924],{},[126,1916,1917],{},"Five",[126,1919,1920],{},"Six",[126,1922,1923],{},"Seven",[126,1925,1926],{},"Eight",[321,1928,1929,1934],{},[339,1930,1931],{},[126,1932,1933],{},"Parity",[339,1935,1936,513,1938,513,1941],{},[126,1937,1873],{},[126,1939,1940],{},"Odd",[126,1942,1943],{},"Even",[321,1945,1946,1951],{},[339,1947,1948],{},[126,1949,1950],{},"StopBits",[339,1952,1953,513,1956],{},[126,1954,1955],{},"One",[126,1957,1958],{},"Two",[321,1960,1961,1966],{},[339,1962,1963],{},[126,1964,1965],{},"FlowControl",[339,1967,1968,513,1970,513,1972],{},[126,1969,1873],{},[126,1971,432],{},[126,1973,436],{},[321,1975,1976,1981],{},[339,1977,1978],{},[126,1979,1980],{},"ClearBuffer",[339,1982,1983,513,1986,513,1989],{},[126,1984,1985],{},"Input",[126,1987,1988],{},"Output",[126,1990,1991],{},"All",[321,1993,1994,1999],{},[339,1995,1996],{},[126,1997,1998],{},"LogLevel",[339,2000,2001,513,2003,513,2005,513,2007,513,2009],{},[126,2002,1873],{},[126,2004,1876],{},[126,2006,1879],{},[126,2008,1882],{},[126,2010,1886],{},[122,2012,2013,2014,513,2017,513,2020,161,2023,513,2025,513,2027,513,2030,161,2033,513,2036,513,2039,513,2042,2045,2046,2049,2050,235],{},"Option and result types (",[126,2015,2016],{},"SerialportOptions",[126,2018,2019],{},"WatchOptions",[126,2021,2022],{},"WatchHandlers",[126,2024,605],{},[126,2026,679],{},[126,2028,2029],{},"ExchangeOptions",[126,2031,2032],{},"ExchangeResponse",[126,2034,2035],{},"AtCommandOptions",[126,2037,2038],{},"AtCommandResult",[126,2040,2041],{},"AtSessionOptions",[126,2043,2044],{},"Capabilities",", …) are\nexported too; see the ",[221,2047,2048],{"href":65},"types reference",", generated from\n",[221,2051,2055],{"href":2052,"rel":2053},"https:\u002F\u002Fgithub.com\u002Fs00d\u002Ftauri-plugin-serialplugin\u002Fblob\u002Fmain\u002Fguest-js\u002Ftypes.ts",[2054],"nofollow",[126,2056,2057],{},"guest-js\u002Ftypes.ts",[237,2059,224],{"id":2060},"errors",[315,2062,2063,2072],{},[318,2064,2065],{},[321,2066,2067,2070],{},[324,2068,2069],{},"Message",[324,2071,1189],{},[334,2073,2074,2087,2101,2111,2124,2138,2152,2165,2175,2191],{},[321,2075,2076,2081],{},[339,2077,2078],{},[126,2079,2080],{},"Port is not open",[339,2082,2083,2084,2086],{},"Method called before ",[126,2085,559],{}," (JS-side check)",[321,2088,2089,2094],{},[339,2090,2091],{},[126,2092,2093],{},"Serial port {path} is not open!",[339,2095,2096,2097,2100],{},"Native ",[126,2098,2099],{},"close"," of a port that is not open",[321,2102,2103,2108],{},[339,2104,2105],{},[126,2106,2107],{},"Port '{path}' not found",[339,2109,2110],{},"Command on a path that was never opened",[321,2112,2113,2121],{},[339,2114,2115,456,2118],{},[126,2116,2117],{},"Failed to open serial port: …",[126,2119,2120],{},"Failed to open tcp:\u002F\u002F…: …",[339,2122,2123],{},"Device or bridge cannot be opened (OS text follows)",[321,2125,2126,2131],{},[339,2127,2128],{},[126,2129,2130],{},"no data received within {ms} ms",[339,2132,2133,456,2135,2137],{},[126,2134,455],{},[126,2136,459],{}," timed out",[321,2139,2140,2145],{},[339,2141,2142],{},[126,2143,2144],{},"Cannot read while watch is active; use watch or exchange",[339,2146,2147,2149,2150],{},[126,2148,455],{}," during a ",[126,2151,480],{},[321,2153,2154,2159],{},[339,2155,2156],{},[126,2157,2158],{},"A watch is already active …",[339,2160,2161,2162,2164],{},"Second ",[126,2163,480],{}," on one port",[321,2166,2167,2172],{},[339,2168,2169],{},[126,2170,2171],{},"exchange timed out after {ms} ms",[339,2173,2174],{},"No final result code",[321,2176,2177,2185],{},[339,2178,2179,456,2182],{},[126,2180,2181],{},"exchange cancelled",[126,2183,2184],{},"transaction queue cancelled",[339,2186,2187,2190],{},[126,2188,2189],{},"cancelExchange()"," hit the running \u002F a queued job",[321,2192,2193,2198],{},[339,2194,2195],{},[126,2196,2197],{},"invalid CMUX DLCI {n}: data channels are 1..=63",[339,2199,2200,2203],{},[126,2201,2202],{},"openMuxChannel()"," out of range",[122,2205,2206],{},"Other failures carry the OS \u002F driver text unchanged.",[2208,2209,2210],"style",{},"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 .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}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);}html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}html pre.shiki code .swJcz, html code.shiki .swJcz{--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178}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 .sbssI, html code.shiki .sbssI{--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C}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 .sfNiH, html code.shiki .sfNiH{--shiki-light:#FF5370;--shiki-default:#FF9CAC;--shiki-dark:#FF9CAC}",{"title":136,"searchDepth":154,"depth":164,"links":2212},[2213,2214,2215,2216,2218,2219,2220,2221,2222,2223,2224],{"id":239,"depth":154,"text":240},{"id":566,"depth":154,"text":567},{"id":912,"depth":154,"text":913},{"id":971,"depth":154,"text":2217},"Streaming with watch()",{"id":1383,"depth":154,"text":1384},{"id":1469,"depth":154,"text":1470},{"id":1511,"depth":154,"text":1512},{"id":1598,"depth":154,"text":1599},{"id":1789,"depth":154,"text":1790},{"id":1890,"depth":154,"text":1891},{"id":2060,"depth":154,"text":224},"Every method, option, event and error of tauri-plugin-serialplugin-api.","md",null,{},{"title":34,"description":2225},"oqDOrAXvZY4oUgTnAMDejANXMQaR1mmlFe6JSgabp7g",[2232,2234],{"title":23,"path":24,"stem":25,"description":2233,"children":-1},"The example terminal app, running the tests, security and license.",{"title":38,"path":39,"stem":40,"description":2235,"children":-1},"Modem queue, SMS, URCs and multiplexing.",1794158000993]