ஊடலை

From Gentoo Wiki
Jump to:navigation Jump to:search
This page is a translated version of the page Bluetooth and the translation is 60% complete.
Outdated translations are marked like this.
Resources

இந்த கட்டுரை ஊடலை கட்டுப்படுத்திகள் மற்றும் சாதனங்களின் உள்ளமைவு மற்றும் பயன்பாட்டை விவரிக்கிறது.

இந்த கட்டுரையானது udev மற்றும் USB முன்னதாக உள்ளமைக்கப்பட்டுவிட்டது என்னும் ஊகத்தில் முன்னோக்கி நகர்கிறது.

நிறுவல்

கருநிரல்

பெரும்பாலான வழக்கில் RFCOMM (CONFIG_RFCOMM), HIDP (CONFIG_BT_HIDP), HCI USB (CONFIG_BT_HCIBTUSB) மற்றும்/அல்லது HCI UART (CONFIG_BT_HCIUART) களை செயல்படுத்துவது போதுமானதாக இருக்கும். ஊடலை விசைப்பலகை மற்றும் கணினிச்சுட்டிகளுக்கு, HID உள்ளீடு சாதனங்களுக்கான பயனர்-இடைவெளி I/O இயக்கியை (CONFIG_UHID) செயல்படுத்த வேண்டும்.

கருநிரல் ஊடலை ஆதரவை செயல்படுத்துதல்
[*] Networking support --->
      <M>   Bluetooth subsystem support --->
              [*]   Bluetooth Classic (BR/EDR) features
              <*>     RFCOMM protocol support
              [ ]       RFCOMM TTY support
              < >     BNEP protocol support
              [ ]       Multicast filter support
              [ ]       Protocol filter support
              <*>     HIDP protocol support
              [*]     Bluetooth High Speed (HS) features
              [*]   Bluetooth Low Energy (LE) features
                    Bluetooth device drivers --->
                      <M> HCI USB driver
                      <M> HCI UART driver
      <*>   RF switch subsystem support --->
    Device Drivers --->
          HID support --->
            <*>   User-space I/O driver support for HID subsystem
முக்கியமானது
Kernel may fail to initialize RFCOMM/BNEP being compiled as built-in. System log for bluetooth service in this case will mention the lack of RFCOMM/BNEP support. And this in turn for example may break HSP/HFP headset profile initialization. So if dmesg says nothing about RFCOMM, better recompile as a module.

திடப்பொருள்

பெரும்பாலான ஊடலை கட்டுப்படுத்திகள் இயங்க திடப்பொருள் தேவைப்படுகிறது. கட்டுப்படுத்தி லினக்ஸ் ஆல் ஆதரவு அளிக்கப்பட்டிருந்தால், திடப்பொருள் தேவையா இல்லையா என்பதை வழக்கமாக dmesg கட்டளை காண்பிக்கும். தேவைப்படும் திடப்பொருளை sys-kernel/linux-firmware தொகுப்பு அளிக்கும். இருப்பினும் சில சாதனங்களுக்கு உற்பத்தியாளர் இடமிருந்து மட்டுமே கிடைக்கும் திடப்பொருள் தேவைப்படலாம்.

root #emerge --ask --noreplace sys-kernel/linux-firmware

USE கொடிகள்

BlueZ என்பது லினக்ஸிற்கான ஊடலை நெறிமுறை அடுக்கின் செயலாக்கமாகும். இது net-wireless/bluez தொகுப்பால் அளிக்கப்படுகிறது.

USE flags for net-wireless/bluez Bluetooth Tools and System Daemons for Linux

btpclient Enable BTP client
cups Add support for CUPS (Common Unix Printing System)
debug Enable extra debug codepaths, like asserts and extra output. If you want to get meaningful backtraces see https://wiki.gentoo.org/wiki/Project:Quality_Assurance/Backtraces
deprecated Build deprecated plugins
doc Add extra documentation (API, Javadoc, etc). It is recommended to enable per package instead of globally
experimental Build experimental plugins
extra-tools Install tools that upstream doesn't install on purpose by default. All this tools shouldn't be used. Then, please notify upstream about you still need them to let them know the situation.
mesh Add support for Bluetooth Mesh control application and advertising bearer.
midi Enable MIDI support
obex Enable OBEX transfer support
readline Enable support for libreadline, a GNU line-editing library that almost everyone wants
selinux !!internal use only!! Security Enhanced Linux support, this must be set by the selinux profile or breakage will occur
systemd Enable use of systemd-specific libraries and features like socket activation or session tracking
test Enable dependencies and/or preparations necessary to run tests (usually controlled by FEATURES=test but can be toggled independently)
test-programs Install tools for testing of various Bluetooth functions
udev Enable virtual/udev integration (device discovery, power and storage device support, etc)

USE மாறியில் bluetooth ஐ அமைப்பதன் மூலம் ஊடலைக்கான ஆதரவை முறைமை முழுமைக்கும் செயல்படுத்தலாம்:

கோப்பு /etc/portage/make.conf
USE="bluetooth"

இ-ஒன்றாக்குதல் (Emerge)

USE மாறியானது bluetooth ற்கு அமைக்கப்பட்டிருந்தால் முறைமை இற்றைப்படுத்தப்பட வேண்டும்:

root #emerge --ask --changed-use --deep @world

BlueZ ஐ நிறுவவும்:

root #emerge --ask --noreplace net-wireless/bluez

உள்ளமைவு

அனுமதிகள்

ஊடலை சாதனங்களுக்கான அனுமதிகள் தானியக்கமாக D-Bus ஆல் கையாளப்படுகிறது. அணுகல் அனுமதி முன்னிருப்பாக எல்லா பயனர்களுக்கும் வழங்கப்பட்டுள்ளது.

சேவைகள்

OpenRC

ஊடலையை தொடங்குவதற்கு:

root #rc-service bluetooth start

ஊடலையை துவக்கத்தில் தொடங்குவதற்கு:

root #rc-update add bluetooth default

systemd

ஊடலையை தொடங்குவதற்கு:

root #systemctl start bluetooth

ஊடலையை துவக்கத்தில் தொடங்குவதற்கு:

root #systemctl enable bluetooth

Enabling battery reporting

குறிப்பு
The experimental USE flag needs to be enabled in net-wireless/bluez.
எச்சரிக்கை
Using bluezs experimental mode may prevent some bluetooth microphones from connecting automatically.[1]

Bluez has a feature to report a devices battery level to upower. This feature is currently experimental and not stable. Enable experimental mode:

கோப்பு /etc/bluetooth/main.conf
[General]
</div>

<div lang="en" dir="ltr" class="mw-content-ltr">
Experimental=true

Restart bluetooth to apply the configuration changes:

root #rc-service bluetooth restart

Now upower should know the battery level of every device which supports sending its own battery level.

பயன்பாடு

கட்டுப்படுத்தியை நிறுவல்

கட்டுப்படுத்தி தகவலைத் திரையில் காண்பதற்கு:

குறிப்பு
hciconfig மற்றும் இதர பயன்கூறு நிரல்களானது deprecated USE கொடி செயல்படுத்தப்பட்டு net-wireless/bluez நிறுவப்பட்டிருந்தால் மட்டுமே கிடைக்கும்.
root #hciconfig -a
hci0:   Type: BR/EDR  Bus: USB
        BD Address: 00:02:72:2F:A9:33  ACL MTU: 1021:8  SCO MTU: 64:1
        UP RUNNING PSCAN 
        RX bytes:1166 acl:0 sco:0 events:43 errors:0
        TX bytes:960 acl:0 sco:0 commands:43 errors:0
        Features: 0xbf 0xfe 0xcf 0xfe 0xdb 0xff 0x7b 0x87
        Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3 
        Link policy: RSWITCH SNIFF 
        Link mode: SLAVE ACCEPT 
        Name: 'BlueZ 5.21'
        Class: 0x000104
        Service Classes: Unspecified
        Device Class: Computer, Desktop workstation
        HCI Version: 4.0 (0x6)  Revision: 0x1000
        LMP Version: 4.0 (0x6)  Subversion: 0x220e
        Manufacturer: Broadcom Corporation (15)

இதில் hci0 என்பது கட்டுப்படுத்தியின் பெயரையும், UP என்பது கட்டுப்படுத்தி செயல்படுத்தப்பட்டு இருப்பதையும் குறிக்கிறது.

hciconfig ஆனது கட்டுப்படுத்தி முடக்கப்பட்டுள்ளது என்பதைக் காண்பித்தால் (3 ஆவது வரியில் DOWN உடன்), கட்டுப்படுத்தியை செயல்படுத்தவும்:

root #hciconfig hci0 up
முக்கியமானது
கட்டுப்படுத்தியை செயல்படுத்த முயலும்போது, பின்வரும் செய்தியைத் திரையில் தோன்ற வாய்ப்புள்ளது: hci0 சாதனத்தைத் தொடங்க முடியவில்லை: RF-kill இன் காரணமாகச் செயலை செய்ய வாய்ப்பில்லை

இந்த வழக்கில், rfkill மூலம் ஊடலை வானொலி அலையனுப்பியின் நிலையை வினவவும்:

root #rfkill list bluetooth
0: hci0: Bluetooth
        Soft blocked: no
        Hard blocked: no

rfkill ஆனது sys-apps/util-linux-2.31 தொகுப்பால் அளிக்கப்படுகிறது. இதைப் பராமரிக்கப்படாத net-wireless/rfkill தொகுப்பின் மூலமும் நிறுவலாம்.

குறிப்பு
BIOS/UEFI இல் ஊடலைத் தடுக்கப்பட்டு அல்லது மறைக்கப்பட்டு இருந்தால், rfkill ஆனது கட்டுப்படுத்தியை Hard blocked: no எனத் தவறாகப் பட்டியலிட வாய்ப்புள்ளது.

rfkill ஆனது கட்டுப்படுத்தி தடுக்கப்பட்டுள்ளது என்பதைக் காண்பித்தால் (Soft blocked: yes உடன்), கட்டுப்படுத்தியின் தடையழிக்கவும்:

root #rfkill unblock bluetooth

rfkill ஆனது கட்டுப்படுத்தி தடுக்கப்பட்டுள்ளது என்பதைக் காண்பித்தால் (Hard blocked: yes உடன்), இயற்பியல் நிலைமாற்றி அல்லது விசைப்பலகையில் உள்ள செயலாற்றி விசையை பயன்படுத்தி கட்டுப்படுத்தியின் தடையழிக்கவும்:

/etc/bluetooth/main.conf கோப்பில் AutoEnable=true என அமைப்பதன் மூலம் ஊடலை கட்டுப்படுத்திகளை தானியக்கமாகச் செயல்படுத்த முடியும்:

கோப்பு /etc/bluetooth/main.conf
[Policy]
AutoEnable=true

சில சூழல்களில், ஊடலை கட்டுப்படுத்திகளானது udev இன் திறன் மேலாண்மை கருவிகளால் மென்-தடுத்தல் செய்யப்பட்டிருக்கலாம். இதற்குத் தொடர்புடைய விதி கோப்பில் உள்ள state மாறி 1 ற்கு அமைக்கப்பட்டிருப்பதை உறுதிசெய்து கொள்ளவும் அல்லது பின்வரும் வரியை முழுவதுமாக நீக்கவும்:

கோப்பு /etc/udev/rules.d/10-local-powersave.rules
SUBSYSTEM=="rfkill", ATTR{type}=="bluetooth", ATTR{state}="1"

சாதனத்தை இணைத்தல்

ஊடலை சாதனங்கள் பயன்படுத்துவதற்கு முன் ஊடலை கட்டுப்படுத்தியோடு இணைக்கப்பட்டிருக்க வேண்டும். இதை ஒரு ஊடாடல் முகவர் மூலம் ஒரு PIN (அல்லது மற்ற குறி) ஐ இரு சாதனங்களிலும் இடுவதன்மூலம் செய்து முடிக்கலாம். தலையணி ஒலிவாங்கி போன்ற சில குறிப்பிட்ட சாதனங்கள் ஒரு விதிக்கட்டிலா PIN ஐ இடுவதை அனுமதிப்பதில்லை. இவ்வகை சாதனங்கள் நிலையான PIN ஐ பயன்படுத்துகின்றன. இவை பெரும்பாலும் 0000, 1111, 1234 அல்லது 9999 ஆக இருக்கும். இது தவிர Sony BD Remote Control போன்ற மற்ற சாதனங்களும் உள்ளன. இவற்றிற்கு PIN ஐ இட வேண்டிய தேவையில்லை, மேலும் இது கேட்கும்போது PIN இட்டால் தோல்வியடையும். எனவே இவ்வகை சாதனங்களில் இணைத்தல் செயலை தவிர்த்துக் கொள்ளலாம்.

இந்த கட்டுரை net-wireless/bluez தொகுப்பால் அளிக்கப்படும் கட்டளை-வரி ஊடாடல் முகவரான bluetoothctl ஐ பயன்படுத்தி சாதனத்தை இணைப்பதைப் பற்றி மட்டும் எடுத்துரைக்கிறது. வரைகலை பணிச்சூழல் பயன்படுத்தப்பட்டால், அதில் உள்ள வரைகலை ஊடாடல் முகவரை கொண்டு சாதனத்தை இணைக்கலாம். எடுத்துக்காட்டாக, KDE க்கு kde-plasma/bluedevil, GNOME ற்கு net-wireless/gnome-bluetooth, GTK விற்கு net-wireless/blueman அல்லது net-wireless/blueberry ஆகியவற்றைப் பயன்படுத்தலாம்.

குறிப்பு
BlueZ 4 இருந்து இற்றைப்படுத்தும்போது முன்னதாக இணைக்கப்பட்ட சாதனங்கள் மீண்டும் இணைக்கப்பட வேண்டும்.

bluetoothctl ஐ தொடங்கவும்:

user $bluetoothctl

கிடைக்கும் கட்டுப்படுத்திகளை பட்டியலிடவும்:

[bluetooth]#list

கட்டுப்படுத்தியை பற்றிய தகவலைத் திரையில் காண:

[bluetooth]#show கட்டுப்படுத்தியின்_mac_முகவரி

முன்னிருப்பு கட்டுப்படுத்தியை அமைக்கவும்:

[bluetooth]#select கட்டுப்படுத்தியின்_mac_முகவரி

கட்டுப்படுத்தியை திறன் இணைப்பு செய்யவும்:

[bluetooth]#power on

முகவரை செயல்படுத்தி அதை முன்னிருப்பாக அமைக்கவும்:

[bluetooth]#agent on
[bluetooth]#default-agent

கட்டுப்படுத்தியை கண்டறியக்கூடியதாக (3 நிமிடங்களுக்குத் தற்காலிகமாக) மற்றும் இணைக்கக்கூடியதாக அமைக்கவும்:

[bluetooth]#discoverable on
[bluetooth]#pairable on

சாதனங்களுக்காக வருடல் செய்யவும்:

[bluetooth]#scan on

சாதனத்தை இணைத்தல் பயன்முறைக்கு மாற்றவும். பொதுவாக இதைச் செய்ய ஒரு பொத்தான் அல்லது பொத்தான்களின் கூட்டை குறிப்பிட்ட சில வினாடிகளுக்கு அழுத்திப் பிடித்திருக்க வேண்டும்.

சாதன MAC முகவரியைக் கண்டறியவும்:

[bluetooth]#devices

சாதனத்தோடு இணைக்கவும்:

[bluetooth]#pair சாதனத்தின்_mac_முகவரி

கேட்கப்பட்டால், PIN ஐ இடவும்:

[agent]PIN code: ####

In case the pin is not prompted but needed, this command may need to be added before pairing with the device (see this post):

[bluetooth]#agent NoInputNoOutput

கோரப்பட்டால், சேவை நல்குரிமையை அனுமதிக்கவும்:

[agent]Authorize service சேவை_uuid (yes/no): yes

சாதனத்தை நம்பவும்:

[bluetooth]#trust சாதனத்தின்_mac_முகவரி

சாதனத்தோடு இணைக்கவும்:

[bluetooth]#connect சாதனத்தின்_mac_முகவரி

சாதனத்தைப் பற்றிய தகவலைத் திரையில் காண:

[bluetooth]#info சாதனத்தின்_mac_முகவரி

இப்போது சாதனம் இணைக்கப்பட்டது:

[bluetooth]#quit

hciconfig

Open and initialize HCI device:
root #hciconfig -a <hci0> up
Close HCI device:
root #hciconfig -a <hci0> down
Reset HCI device:
root #hciconfig -a <hci0> reset
Reset statistic counters:
root #hciconfig -a <hci0> rstat
Enable Authentication:
root #hciconfig -a <hci0> auth
Disable Authentication:
root #hciconfig -a <hci0> noauth
Enable Encryption:
root #hciconfig -a <hci0> encrypt
Disable Encryption:
root #hciconfig -a <hci0> noencrypt
Enable Page and Inquiry scan:
root #hciconfig -a <hci0> piscan
Disable scan:
root #hciconfig -a <hci0> noscan
Enable Inquiry scan:
root #hciconfig -a <hci0> iscan
Enable Page scan:
root #hciconfig -a <hci0> pscan
Get/Set default packet type:
root #hciconfig -a <hci0> ptype [type]
Get/Set default link mode:
root #hciconfig -a <hci0> lm [mode]
Get/Set default link policy:
root #hciconfig -a <hci0> lp [policy]
Get/Set local name:
root #hciconfig -a <hci0> name [name]
Get/Set class of device:
root #hciconfig -a <hci0> class [class]
Get/Set voice setting:
root #hciconfig -a <hci0> voice [voice]
Get/Set inquiry access code:
root #hciconfig -a <hci0> iac [iac]
Get/Set inquiry transmit power level:
root #hciconfig -a <hci0> nqtpl [level]
Get/Set inquiry mode:
root #hciconfig -a <hci0> inqmode [mode]
Get/Set inquiry data:
root #hciconfig -a <hci0> inqdata [data]
Get/Set inquiry scan type:
root #hciconfig -a <hci0> inqtype [type]
Get/Set inquiry scan window and interval:
root #hciconfig -a <hci0> inqparms [win:int]
Get/Set page scan window and interval:
root #hciconfig -a <hci0> pageparms [win:int]
Get/Set page timeout:
root #hciconfig -a <hci0> ageto [to]
Get/Set AFH mode:
root #hciconfig -a <hci0> afhmode [mode]
Get/Set Simple Pairing Mode:
root #hciconfig -a <hci0> sspmode [mode]
Set ACL MTU and number of packets:
root #hciconfig -a <hci0> clmtu <mtu:pkt>
Set SCO MTU and number of packets:
root #hciconfig -a <hci0> scomtu <mtu:pkt>
Delete link key from the device:
root #hciconfig -a <hci0> delkey <bdaddr>
Get local OOB data:
root #hciconfig -a <hci0> oobdata
Display supported commands:
root #hciconfig -a <hci0> commands
Display device features:
root #hciconfig -a <hci0> features
Display version information:
root #hciconfig -a <hci0> version
Display revision information:
root #hciconfig -a <hci0> revision
Add a device to the blacklist:
root #hciconfig -a <hci0> block <bdaddr>
Remove a device from the blacklist:
root #hciconfig -a <hci0> unblock <bdaddr>
Set LE Random Address:
root #hciconfig -a <hci0> lerandaddr <bdaddr>
Enable LE advertising:
root #hciconfig -a <hci0> leadv [type]
Show all commands device has support for:
root #hciconfig get commands

ஊடலையை முடக்க

ஓடும்போது ஊடலையை முடக்க, பின்வரும் கட்டளையை இயக்கவும்:

root #rfkill block bluetooth

ஒவ்வொரு முறை துவக்கும் போதும் தானியக்கமாக புளூடூத் ஐ முடக்க, பின்வரும் விருப்பத்தேர்வுகளில் ஒன்றைத் தேர்வு செய்யவும்:

ஊடலையை முடக்க udev ஐ பயன்படுத்துதல்

UDEV ஐ பயன்படுத்தும்போது, ஊடலையை முடக்கும் பின்வரும் விதிகளை நிறுவவும்:

கோப்பு /etc/udev/rules.d/80-disable-bluetooth.rules
SUBSYSTEM=="rfkill", ATTR{type}=="bluetooth", ATTR{state}="0"

ஊடலையை முடக்க OpenRC ஐ பயன்படுத்துதல்

sys-apps/openrc ஐ பயன்படுத்தும்போது, உள்ளூர் சேவைக்கான பின்வரும் குறுநிரலை நிறுவி அது செயல்படுத்தக்கூடியதா என்பதை உறுதிசெய்து கொள்ளவும்:

கோப்பு /etc/local.d/disable-bluetooth.start
#!/bin/sh
rfkill block bluetooth
root #chmod o+x /etc/local.d/disable-bluetooth.start

கருநிரல் நிலையில் ஊடலையை முடக்குதல்

கர்னலானது ஊடலை ஆதரவுக்கான கூறுகளைக் கொண்டிருந்தால், அந்த ஊடலைக் கூறுகள் ஏற்றுவதை முடக்கவும்:

கோப்பு /etc/modprobe.d/blacklist-bluetooth.conf
blacklist bnep
blacklist bluetooth
blacklist btusb

பிழை நீக்குதல்

TLP மற்றும் மடிக்கணினி பயன்முறை

TLP and laptop_mode

மடிக்கணினி பயன்முறை கருவிகள் அல்லது TLP நிறுவப்பட்டிருந்தால், அவை திறனைச் சேமிக்க ஊடலையை முடக்காமல் இருப்பதை உறுதிசெய்து கொள்ளவும்.

XBOX ONE controller pairing

It's a known issue that XBOX ONE wireless controllers will refuse to pair out of the box on most linux systems. To solve this issue ERTM needs to be disabled.

To disable it manually:

root #echo 'Y' > /sys/module/bluetooth/parameters/disable_ertm

This will disable ERTM only until the system is rebooted. To disable it permanently, install the xpadneo kernel module.

root #emerge --ask games-util/xpadneo

In most cases, this will automatically solve the issue. If it doesn't, add this line into xpadneo config manually:

கோப்பு /etc/modprobe.d/xpadneo.conf
options bluetooth disable\_ertm=Y

Notebook has a Synopsys DesignWare Controller

Bluetooth support for this controller needs also these options in kernel config[2]:

கருநிரல்
Device Drivers  --->
    Character devices  --->
        Serial drivers  --->
            [*] 8250/16550 and compatible serial support
            [*] Support for Synopsys DesignWare 8250 quirks

Resolving firmware problems

It happens that the firmware of bluetooth adapters enters a state where it is unable to pair with a certain (or all) bluetooth devices. Resetting the adapter might solve such problems.

In the case of a laptop with a built-in bluetooth adapter this might be achieved by:

  • Enter the laptop's firmware settings (BIOS) and disable the built-in adapter
  • Save settings and restart the laptop
  • Enter the firmware settings a second time and enable the bluetooth adapter again
  • Save and restart
  • Now try to pair the device again

இதையும் காண்க

References