[{"data":1,"prerenderedAt":244},["ShallowReactive",2],{"navigation":3,"\u002Fplatforms\u002Fandroid":116,"\u002Fplatforms\u002Fandroid-surround":239},[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":89,"body":118,"description":232,"extension":233,"generated":26,"links":234,"meta":235,"navigation":236,"path":90,"seo":237,"stem":91,"__hash__":238},"docs\u002F4.platforms\u002F3.android.md",{"type":119,"value":120,"toc":227},"minimark",[121,140,148,151,199,217],[122,123,124,125,135,136,139],"p",{},"USB-serial runs in Rust: the\n",[126,127,131],"a",{"href":128,"rel":129},"https:\u002F\u002Fcrates.io\u002Fcrates\u002Fandroid-usb-serial",[130],"nofollow",[132,133,134],"code",{},"android-usb-serial"," crate (a port of\nusb-serial-for-android on top of ",[132,137,138],{},"nusb","). Kotlin only asks for USB permission and\nhands over the device file descriptor.",[122,141,142,143,147],{},"Supported chips: FTDI (FT232R, FT2232, FT4232, FT232H, FT-X), Silicon Labs CP210x\n(CP2102\u002F2104\u002F2105\u002F2108), Prolific PL2303 (all types incl. HXN\u002FGC\u002FGS\u002FGT), WCH\nCH340\u002FCH341, Chrome OS CCD, Unisoc GSM modems, and any ",[144,145,146],"strong",{},"CDC-ACM"," device\n(Arduino, RP2040, STM32 VCP, ESP32-S2\u002FS3 native USB, CH9102, CH343, modems).",[122,149,150],{},"Nothing to configure in the app:",[152,153,154,162,168,186,192],"ul",{},[155,156,157,158,161],"li",{},"The plugin adds a ",[132,159,160],{},"USB_DEVICE_ATTACHED"," intent filter for those devices to your\nactivity, so Android offers to open the app when one is plugged in.",[155,163,164,167],{},[132,165,166],{},"open()"," asks the user for USB permission the first time.",[155,169,170,173,174,177,178,181,182,185],{},[132,171,172],{},"available_ports()"," lists attached devices. Paths are the USB device name\n(",[132,175,176],{},"\u002Fdev\u002Fbus\u002Fusb\u002F001\u002F002","); multi-port chips get one path per port\n(",[132,179,180],{},"\u002Fdev\u002Fbus\u002Fusb\u002F001\u002F002#0",", ",[132,183,184],{},"…#1",").",[155,187,188,191],{},[132,189,190],{},"bytesToWrite()"," is always 0 (writes complete synchronously).",[155,193,194,195,198],{},"A chip that answers a control request with a short packet gives an error on that\ncall (e.g. ",[132,196,197],{},"readClearToSend()","), not a crash.",[122,200,201,202,205,206,209,210,214,215,185],{},"Bluetooth LE serial (",[132,203,204],{},"ble:\u002F\u002F",", feature ",[132,207,208],{},"ble",") works on Android too, see\n",[126,211,213],{"href":212},"\u002Fplatforms\u002Fble#android","Bluetooth LE"," for its permissions (added to the app manifest only with ",[132,216,208],{},[122,218,219,220,223,224,185],{},"The Android emulator has no USB passthrough; test with a phone, or use ",[132,221,222],{},"tcp:\u002F\u002F","\nto a bridge on the host (the emulator reaches the host as ",[132,225,226],{},"10.0.2.2",{"title":228,"searchDepth":229,"depth":230,"links":231},"",2,3,[],"USB-serial adapters through USB host, with the drivers in Rust.","md",null,{},true,{"title":89,"description":232},"O3JjRuwGsyRbjs1H-_2Xtx3zERpeXP8sj1wwU-JR6qw",[240,242],{"title":85,"path":86,"stem":87,"description":241,"children":-1},"Windows, macOS and Linux through the serialport crate.",{"title":93,"path":94,"stem":95,"description":243,"children":-1},"What works on iOS and why there are no local ports.",1794158000995]