How To Connect To Bluetooth Device from Linux Terminal | Cerca per titolo, autore, parola chiave | ||||||||
How To Connect To Bluetooth Device from Linux Terminal In questo articolo, vedremo come controllare una periferica Bluetooth da un terminale Linux, focalizzato sulle distribuzioni Ubuntu, Debian, Fedora, Arch. In questa guida, useremo BlueZ, che offre supporto per i protocolli ed i layer core di questa tecnologia. Bluetooth è una tecnologia wireless che viaggia su onde radio ed offre una connessione tra mobile computer, mobile phone, un sacco di altri apparecchi portatili, oltre ad offrire la connettività a internet. I package di BlueZ sono: sudo apt-get install bluez sudo apt-get install bluetooth sudo apt-get install bluez-tools sudo apt-get install rfkill Con il package bluez-tools viene installata l'utility: bluetoothctl Controllate che il vostro account sia stato inserito nel gruppo lp.
Nota del 2020 di Canonical Ltd: di default non c'è alcun modo di ricevere dei file utilizzando Bluetooth in Ubuntu Core, a meno che l'applicazione snap implementi la parte ricevente (il computer, di solito). Questo perchè il trasferimento in arrivo deve essere permesso e il tool obexctl non offre un agente che svolga questo compito (Using Bluetooth to Send Files on Ubuntu Core). In questo caso, torna utile una delle utility del package: bluez-tools bt-adapter ========== - List available adapters - Show information about adapter (incl properties) - Discover remote devices (with remote device name resolving) - Change adapter properties (eg. Name, Discoverable, Pairable, etc) bt-agent ======== - Manage incoming Bluetooth requests (eg. request of pincode, request of authorize a connection/service request, etc) bt-device ========= - List added devices - Connect to the remote device by his MAC, retrieve all SDP records and then initiate the pairing - Disconnect the remote device - Remove device (and also the pairing information) - Show information about device (incl properties) - Service discovery - Change device properties (eg. Name, Trusted, Blocked, etc) bt-network ========== - Connect to the network device - Register network server for the provided UUID (gn/panu/nap) bt-obex ======= - Agent (to accept/reject incoming bluetooth object push requests) for OBEXD (OPP/FTP profile) - Send local file to the specified remote device using object push profile - Start FTP session with remote device Conoscendo il MAC dell'apparecchio dal quale si desidera ricevere un file, è possibile connettersi ad esso, con il comnando: bt-obex -s -f 9E:62:46:00:00:93 dove la s registra un agente (Agent) al server OBEX. Agent viene usato per accettare o respingere le richieste push di bluetooth.
|
|||||||||
How To Connect To Bluetooth Device from Linux Terminal | Disclaimer: questo è un link a contenuti ospitati su server esterni. |