[Raspberry 4B] Connexion bluetooth DÈS LE DÉMARAGE (RÉSOLU)

Architecture ARM, archlinuxarm, raspberrypi ...
Répondre
Avatar de l’utilisateur
L_Indien
Chu Ko Nu
Messages : 389
Inscription : dim. 14 nov. 2010, 09:47
Localisation : En mouvement perpétuel...

[Raspberry 4B] Connexion bluetooth DÈS LE DÉMARAGE (RÉSOLU)

Message par L_Indien »

Bonjour à toutes et à tous,

Ayant cherché pendant pas mal de temps, je fait tourner l'info : comment faire en sorte que le clavier soit reconnu - en utilisable accessoirement... - dès le démarrage et qu'il puisse fonctionner en ligne de commande.

Je fais suite à au post [Raspberry 4B] Connexion bluetooth (RÉSOLU).

Une fois yaourt -S pi-bluetooth exécuté, j'ai effectué les manips suivantes :

Code : Tout sélectionner

# systemctl start bluetooth.service
# systemctl enable bluetooth.service
# systemctl start brcm43438.service
# systemctl enable brcm43438.service
# bluetoothctl
[bluetoothctl]# agent on
[bluetoothctl]# power on
[bluetoothctl]# pair ADRESSE_MAX
Modifié le fichier /boot/config.txt et rajouter à la fin : dtoverlay=pi3-miniuart-bt
et ajouté dans le fichier /etc/conf.d/bluetooth les infos suivantes :

Code : Tout sélectionner

HIDD_ENABLE="true"
HIDD_OPTIONS="--connect ADRESSE_MAX"
un petit # reboot et clac... Clavier BT fonctionnel en ligne de commande. C'est mieux pour se connecter.

Bonne journée.

PS : Je pense qu'il y a peut-être une ou deux actions qui ne sont pas forcement utiles, mais je ne pense pas que ça pollue particulièrement le système.
Dernière modification par L_Indien le dim. 01 mars 2020, 11:08, modifié 3 fois.
Différence entre windows et linux
Linux est multi-tâches, windows est multi-taches.
L'Indien de la Douche - Soutient L'April
Avatar de l’utilisateur
L_Indien
Chu Ko Nu
Messages : 389
Inscription : dim. 14 nov. 2010, 09:47
Localisation : En mouvement perpétuel...

Re: [Raspberry 4B] Connexion bluetooth DÈS LE DÉMARAGE (EN COURS...)

Message par L_Indien »

Bonjour à toutes et à tous,

Je reviens vers vous concernant le post.

En fait nan... Ça a fonctionné pendant quelques heures, et nan...

Je travaille dessus, mais si vous avez un tuyau ou deux, je suis preneur.

Bonne fin de journée.
Différence entre windows et linux
Linux est multi-tâches, windows est multi-taches.
L'Indien de la Douche - Soutient L'April
Avatar de l’utilisateur
L_Indien
Chu Ko Nu
Messages : 389
Inscription : dim. 14 nov. 2010, 09:47
Localisation : En mouvement perpétuel...

Re: [Raspberry 4B] Connexion bluetooth DÈS LE DÉMARAGE (EN COURS...)

Message par L_Indien »

Je reviens pour filer un peu plus d'infos.

le service brcm43438.service ne lance pas au démarrage.
Un # systemctl start brcm43438.service l'active bien, mais # systemctl enable brcm43438.service ne le met pas en fonctionne dès le démarrage. C'est ballot.

Pourtant, c'est stipulé lors de l'installation $ yaourt -S pi-bluetooth, à la fin : pour activer au démarrage, effectuez un # systemctl enable brcm43438.service

On le voit également avec $ systemctl -t service -a --full

Code : Tout sélectionner

  UNIT                                       LOAD      ACTIVE   SUB     DESCRIPTION                                                                  
  alsa-restore.service                       loaded    inactive dead    Save/Restore Sound Card State                                                
  alsa-state.service                         loaded    inactive dead    Manage Sound Card State (restore and store)                                  
  auditd.service                             loaded    inactive dead    Security Auditing Service                                                    
  bluetooth.service                          loaded    active   running Bluetooth service                                                            
● brcm43438.service                          loaded    failed   failed  Broadcom BCM43438 bluetooth HCI
Savez-vous pourquoi, le service peut être activation pour la session, mais qu'il ne soit pas possible de l'activer dès le démarrage ?

Je vous remercie pour les réponses.

Bon week-end.
Différence entre windows et linux
Linux est multi-tâches, windows est multi-taches.
L'Indien de la Douche - Soutient L'April
laurent85
Elfe
Messages : 951
Inscription : mar. 16 oct. 2018, 21:05

Re: [Raspberry 4B] Connexion bluetooth DÈS LE DÉMARAGE (EN COURS...)

Message par laurent85 »

Bonjour,
Tu as regardé les logs du service ?
Avatar de l’utilisateur
L_Indien
Chu Ko Nu
Messages : 389
Inscription : dim. 14 nov. 2010, 09:47
Localisation : En mouvement perpétuel...

Re: [Raspberry 4B] Connexion bluetooth DÈS LE DÉMARAGE (EN COURS...)

Message par L_Indien »

Bonjour Laurent,

Merci pour ton retour.

J'ai regardé, mais rien de bien méchant dans le Xorg.0.log

Code : Tout sélectionner

[  2322.345] (WW) Failed to open protocol names file lib/xorg/protocol.txt
[  2322.360] 
X.Org X Server 1.20.7
X Protocol Version 11, Revision 0
[  2322.405] Build Operating System: Linux Arch Linux
[  2322.420] Current Operating System: Linux minix 4.19.102-2-ARCH #1 SMP PREEMPT Sun Feb 9 22:52:12 UTC 2020 armv7l
[  2322.420] Kernel command line: coherent_pool=1M 8250.nr_uarts=0 cma=64M bcm2708_fb.fbwidth=1440 bcm2708_fb.fbheight=900 bcm2708_fb.fbswap=1 smsc95xx.macaddr=AA:BB:CC:DD:EE:FF vc_mem.mem_base=0x3ec00000 vc_mem.mem_size=0x40000000  root=/dev/mmcblk0p2 rw rootwait console=ttyS0,115200 console=tty1 selinux=0 plymouth.enable=0 smsc95xx.turbo_mode=N dwc_otg.lpm_enable=0 kgdboc=ttyS0,115200 elevator=noop
[  2322.482] Build Date: 16 January 2020  05:49:11PM
[  2322.497]  
[  2322.512] Current version of pixman: 0.38.4
[  2322.541] 	Before reporting problems, check http://wiki.x.org
	to make sure that you have the latest version.
[  2322.541] Markers: (--) probed, (**) from config file, (==) default setting,
	(++) from command line, (!!) notice, (II) informational,
	(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[  2322.595] (==) Log file: "/var/log/Xorg.0.log", Time: Sat Feb 22 10:06:12 2020
[  2322.615] (==) Using config directory: "/etc/X11/xorg.conf.d"
[  2322.628] (==) Using system config directory "/usr/share/X11/xorg.conf.d"
[  2322.630] (==) No Layout section.  Using the first Screen section.
[  2322.630] (==) No screen section available. Using defaults.
[  2322.630] (**) |-->Screen "Default Screen Section" (0)
[  2322.630] (**) |   |-->Monitor "<default monitor>"
[  2322.630] (==) No monitor specified for screen "Default Screen Section".
	Using a default monitor configuration.
[  2322.630] (==) Automatically adding devices
[  2322.630] (==) Automatically enabling devices
[  2322.630] (==) Automatically adding GPU devices
[  2322.630] (==) Automatically binding GPU devices
[  2322.630] (==) Max clients allowed: 256, resource mask: 0x1fffff
[  2322.630] (WW) `fonts.dir' not found (or not valid) in "/usr/share/fonts/misc".
[  2322.630] 	Entry deleted from font path.
[  2322.630] 	(Run 'mkfontdir' on "/usr/share/fonts/misc").
[  2322.630] (WW) The directory "/usr/share/fonts/OTF" does not exist.
[  2322.630] 	Entry deleted from font path.
[  2322.630] (==) FontPath set to:
	/usr/share/fonts/TTF,
	/usr/share/fonts/Type1,
	/usr/share/fonts/100dpi,
	/usr/share/fonts/75dpi
[  2322.631] (==) ModulePath set to "/usr/lib/xorg/modules"
[  2322.631] (II) The server relies on udev to provide the list of input devices.
	If no devices become available, reconfigure udev or disable AutoAddDevices.
[  2322.634] (II) Module ABI versions:
[  2322.634] 	X.Org ANSI C Emulation: 0.4
[  2322.634] 	X.Org Video Driver: 24.1
[  2322.634] 	X.Org XInput driver : 24.1
[  2322.634] 	X.Org Server Extension : 10.0
[  2322.635] (++) using VT number 1

[  2322.637] (II) systemd-logind: took control of session /org/freedesktop/login1/session/_31
[  2322.637] (II) no primary bus or device found
[  2322.638] (II) LoadModule: "glx"
[  2322.644] (II) Loading /usr/lib/xorg/modules/extensions/libglx.so
[  2322.680] (II) Module glx: vendor="X.Org Foundation"
[  2322.680] 	compiled for 1.20.7, module version = 1.0.0
[  2322.680] 	ABI class: X.Org Server Extension, version 10.0
[  2322.680] (==) Matched modesetting as autoconfigured driver 0
[  2322.680] (==) Matched fbdev as autoconfigured driver 1
[  2322.680] (==) Assigned the driver to the xf86ConfigLayout
[  2322.680] (II) LoadModule: "modesetting"
[  2322.681] (II) Loading /usr/lib/xorg/modules/drivers/modesetting_drv.so
[  2322.690] (II) Module modesetting: vendor="X.Org Foundation"
[  2322.690] 	compiled for 1.20.7, module version = 1.20.7
[  2322.690] 	Module class: X.Org Video Driver
[  2322.690] 	ABI class: X.Org Video Driver, version 24.1
[  2322.690] (II) LoadModule: "fbdev"
[  2322.690] (II) Loading /usr/lib/xorg/modules/drivers/fbdev_drv.so
[  2322.692] (II) Module fbdev: vendor="X.Org Foundation"
[  2322.692] 	compiled for 1.20.0, module version = 0.5.0
[  2322.692] 	Module class: X.Org Video Driver
[  2322.692] 	ABI class: X.Org Video Driver, version 24.0
[  2322.692] (II) modesetting: Driver for Modesetting Kernel Drivers: kms
[  2322.692] (II) FBDEV: driver for framebuffer: fbdev
[  2322.692] (WW) Falling back to old probe method for modesetting
[  2322.692] (EE) open /dev/dri/card0: No such file or directory
[  2322.692] (WW) Falling back to old probe method for fbdev
[  2322.692] (II) Loading sub module "fbdevhw"
[  2322.692] (II) LoadModule: "fbdevhw"
[  2322.692] (II) Loading /usr/lib/xorg/modules/libfbdevhw.so
[  2322.694] (II) Module fbdevhw: vendor="X.Org Foundation"
[  2322.694] 	compiled for 1.20.7, module version = 0.0.2
[  2322.694] 	ABI class: X.Org Video Driver, version 24.1
[  2322.694] (II) FBDEV(0): using default device
[  2322.695] (II) FBDEV(0): Creating default Display subsection in Screen section
	"Default Screen Section" for depth/fbbpp 24/32
[  2322.695] (==) FBDEV(0): Depth 24, (==) framebuffer bpp 32
[  2322.695] (==) FBDEV(0): RGB weight 888
[  2322.695] (==) FBDEV(0): Default visual is TrueColor
[  2322.695] (==) FBDEV(0): Using gamma correction (1.0, 1.0, 1.0)
[  2322.695] (II) FBDEV(0): hardware: BCM2708 FB (video memory: 5062kB)
[  2322.695] (DB) xf86MergeOutputClassOptions unsupported bus type 0
[  2322.695] (II) FBDEV(0): checking modes against framebuffer device...
[  2322.695] (II) FBDEV(0): checking modes against monitor...
[  2322.695] (II) FBDEV(0): Virtual size is 1440x900 (pitch 1440)
[  2322.695] (**) FBDEV(0):  Built-in mode "current"
[  2322.695] (==) FBDEV(0): DPI set to (96, 96)
[  2322.695] (II) Loading sub module "fb"
[  2322.695] (II) LoadModule: "fb"
[  2322.695] (II) Loading /usr/lib/xorg/modules/libfb.so
[  2322.698] (II) Module fb: vendor="X.Org Foundation"
[  2322.698] 	compiled for 1.20.7, module version = 1.0.0
[  2322.698] 	ABI class: X.Org ANSI C Emulation, version 0.4
[  2322.698] (**) FBDEV(0): using shadow framebuffer
[  2322.698] (II) Loading sub module "shadow"
[  2322.698] (II) LoadModule: "shadow"
[  2322.699] (II) Loading /usr/lib/xorg/modules/libshadow.so
[  2322.701] (II) Module shadow: vendor="X.Org Foundation"
[  2322.701] 	compiled for 1.20.7, module version = 1.1.0
[  2322.701] 	ABI class: X.Org ANSI C Emulation, version 0.4
[  2322.701] (II) UnloadModule: "modesetting"
[  2322.701] (II) Unloading modesetting
[  2322.709] (==) FBDEV(0): Backing store enabled
[  2322.709] (==) FBDEV(0): DPMS enabled
[  2322.711] (II) Initializing extension Generic Event Extension
[  2322.711] (II) Initializing extension SHAPE
[  2322.711] (II) Initializing extension MIT-SHM
[  2322.711] (II) Initializing extension XInputExtension
[  2322.715] (II) Initializing extension XTEST
[  2322.715] (II) Initializing extension BIG-REQUESTS
[  2322.715] (II) Initializing extension SYNC
[  2322.715] (II) Initializing extension XKEYBOARD
[  2322.715] (II) Initializing extension XC-MISC
[  2322.715] (II) Initializing extension SECURITY
[  2322.718] (II) Initializing extension XFIXES
[  2322.718] (II) Initializing extension RENDER
[  2322.718] (II) Initializing extension RANDR
[  2322.718] (II) Initializing extension COMPOSITE
[  2322.718] (II) Initializing extension DAMAGE
[  2322.718] (II) Initializing extension MIT-SCREEN-SAVER
[  2322.718] (II) Initializing extension DOUBLE-BUFFER
[  2322.718] (II) Initializing extension RECORD
[  2322.718] (II) Initializing extension DPMS
[  2322.718] (II) Initializing extension Present
[  2322.718] (II) Initializing extension DRI3
[  2322.718] (II) Initializing extension X-Resource
[  2322.718] (II) Initializing extension XVideo
[  2322.718] (II) Initializing extension XVideo-MotionCompensation
[  2322.718] (II) Initializing extension GLX
[  2322.718] (II) AIGLX: Screen 0 is not DRI2 capable
[  2322.978] (II) IGLX: Loaded and initialized swrast
[  2322.978] (II) GLX: Initialized DRISWRAST GL provider for screen 0
[  2322.978] (II) Initializing extension XFree86-VidModeExtension
[  2322.978] (II) Initializing extension XFree86-DGA
[  2322.978] (II) Initializing extension XFree86-DRI
[  2322.978] (II) Initializing extension DRI2
[  2323.200] (II) config/udev: Adding input device Microsoft Microsoft® 2.4GHz Transceiver v9.0 (/dev/input/event0)
[  2323.200] (**) Microsoft Microsoft® 2.4GHz Transceiver v9.0: Applying InputClass "libinput keyboard catchall"
[  2323.200] (**) Microsoft Microsoft® 2.4GHz Transceiver v9.0: Applying InputClass "Keyboard Layout"
[  2323.200] (**) Microsoft Microsoft® 2.4GHz Transceiver v9.0: Applying InputClass "Keyboard Terminate"
[  2323.200] (II) LoadModule: "libinput"
[  2323.200] (II) Loading /usr/lib/xorg/modules/input/libinput_drv.so
[  2323.217] (II) Module libinput: vendor="X.Org Foundation"
[  2323.217] 	compiled for 1.20.5, module version = 0.29.0
[  2323.217] 	Module class: X.Org XInput Driver
[  2323.217] 	ABI class: X.Org XInput driver, version 24.1
[  2323.217] (II) Using input driver 'libinput' for 'Microsoft Microsoft® 2.4GHz Transceiver v9.0'
[  2323.218] (II) systemd-logind: got fd for /dev/input/event0 13:64 fd 13 paused 0
[  2323.218] (**) Microsoft Microsoft® 2.4GHz Transceiver v9.0: always reports core events
[  2323.219] (**) Option "Device" "/dev/input/event0"
[  2323.219] (**) Option "_source" "server/udev"
[  2323.235] (II) event0  - Microsoft Microsoft® 2.4GHz Transceiver v9.0: is tagged by udev as: Keyboard
[  2323.235] (II) event0  - Microsoft Microsoft® 2.4GHz Transceiver v9.0: device is a keyboard
[  2323.236] (II) event0  - Microsoft Microsoft® 2.4GHz Transceiver v9.0: device removed
[  2323.236] (**) Option "config_info" "udev:/sys/devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.1/1-1.1.3/1-1.1.3.4/1-1.1.3.4.1/1-1.1.3.4.1:1.0/0007:078A:01D6.0007/input/input5/event0"
[  2323.236] (II) XINPUT: Adding extended input device "Microsoft Microsoft® 2.4GHz Transceiver v9.0" (type: KEYBOARD, id 6)
[  2323.236] (**) Option "xkb_layout" "fr"
[  2323.236] (**) Option "xkb_variant" "latin9"
[  2323.236] (**) Option "xkb_options" "terminate:ctrl_alt_bksp"
[  2323.283] (II) event0  - Microsoft Microsoft® 2.4GHz Transceiver v9.0: is tagged by udev as: Keyboard
[  2323.283] (II) event0  - Microsoft Microsoft® 2.4GHz Transceiver v9.0: device is a keyboard
[  2323.286] (II) config/udev: Adding input device Microsoft Microsoft® 2.4GHz Transceiver v9.0 Mouse (/dev/input/event1)
[  2323.286] (**) Microsoft Microsoft® 2.4GHz Transceiver v9.0 Mouse: Applying InputClass "libinput pointer catchall"
[  2323.286] (II) Using input driver 'libinput' for 'Microsoft Microsoft® 2.4GHz Transceiver v9.0 Mouse'
[  2323.360] (II) systemd-logind: got fd for /dev/input/event1 13:65 fd 16 paused 0
[  2323.360] (**) Microsoft Microsoft® 2.4GHz Transceiver v9.0 Mouse: always reports core events
[  2323.360] (**) Option "Device" "/dev/input/event1"
[  2323.360] (**) Option "_source" "server/udev"
[  2323.370] (II) event1  - Microsoft Microsoft® 2.4GHz Transceiver v9.0 Mouse: is tagged by udev as: Mouse
[  2323.371] (II) event1  - Microsoft Microsoft® 2.4GHz Transceiver v9.0 Mouse: device is a pointer
[  2323.372] (II) event1  - Microsoft Microsoft® 2.4GHz Transceiver v9.0 Mouse: device removed
[  2323.372] (**) Option "config_info" "udev:/sys/devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.1/1-1.1.3/1-1.1.3.4/1-1.1.3.4.1/1-1.1.3.4.1:1.1/0007:078A:01D6.0008/input/input6/event1"
[  2323.372] (II) XINPUT: Adding extended input device "Microsoft Microsoft® 2.4GHz Transceiver v9.0 Mouse" (type: MOUSE, id 7)
[  2323.372] (**) Option "AccelerationScheme" "none"
[  2323.372] (**) Microsoft Microsoft® 2.4GHz Transceiver v9.0 Mouse: (accel) selected scheme none/0
[  2323.372] (**) Microsoft Microsoft® 2.4GHz Transceiver v9.0 Mouse: (accel) acceleration factor: 2.000
[  2323.372] (**) Microsoft Microsoft® 2.4GHz Transceiver v9.0 Mouse: (accel) acceleration threshold: 4
[  2323.383] (II) event1  - Microsoft Microsoft® 2.4GHz Transceiver v9.0 Mouse: is tagged by udev as: Mouse
[  2323.383] (II) event1  - Microsoft Microsoft® 2.4GHz Transceiver v9.0 Mouse: device is a pointer
[  2323.386] (II) config/udev: Adding input device Microsoft Microsoft® 2.4GHz Transceiver v9.0 Mouse (/dev/input/mouse0)
[  2323.386] (II) No input driver specified, ignoring this device.
[  2323.386] (II) This device may have been added with another device file.
[  2323.388] (II) config/udev: Adding input device Microsoft Microsoft® 2.4GHz Transceiver v9.0 Consumer Control (/dev/input/event2)
[  2323.388] (**) Microsoft Microsoft® 2.4GHz Transceiver v9.0 Consumer Control: Applying InputClass "libinput keyboard catchall"
[  2323.388] (**) Microsoft Microsoft® 2.4GHz Transceiver v9.0 Consumer Control: Applying InputClass "Keyboard Layout"
[  2323.388] (**) Microsoft Microsoft® 2.4GHz Transceiver v9.0 Consumer Control: Applying InputClass "Keyboard Terminate"
[  2323.388] (II) Using input driver 'libinput' for 'Microsoft Microsoft® 2.4GHz Transceiver v9.0 Consumer Control'
[  2323.390] (II) systemd-logind: got fd for /dev/input/event2 13:66 fd 17 paused 0
[  2323.390] (**) Microsoft Microsoft® 2.4GHz Transceiver v9.0 Consumer Control: always reports core events
[  2323.390] (**) Option "Device" "/dev/input/event2"
[  2323.390] (**) Option "_source" "server/udev"
[  2323.396] (II) event2  - Microsoft Microsoft® 2.4GHz Transceiver v9.0 Consumer Control: is tagged by udev as: Keyboard
[  2323.396] (II) event2  - Microsoft Microsoft® 2.4GHz Transceiver v9.0 Consumer Control: device is a keyboard
[  2323.396] (II) event2  - Microsoft Microsoft® 2.4GHz Transceiver v9.0 Consumer Control: device removed
[  2323.396] (II) libinput: Microsoft Microsoft® 2.4GHz Transceiver v9.0 Consumer Control: needs a virtual subdevice
[  2323.396] (**) Option "config_info" "udev:/sys/devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.1/1-1.1.3/1-1.1.3.4/1-1.1.3.4.1/1-1.1.3.4.1:1.1/0007:078A:01D6.0008/input/input7/event2"
[  2323.396] (II) XINPUT: Adding extended input device "Microsoft Microsoft® 2.4GHz Transceiver v9.0 Consumer Control" (type: MOUSE, id 8)
[  2323.396] (**) Option "AccelerationScheme" "none"
[  2323.396] (**) Microsoft Microsoft® 2.4GHz Transceiver v9.0 Consumer Control: (accel) selected scheme none/0
[  2323.396] (**) Microsoft Microsoft® 2.4GHz Transceiver v9.0 Consumer Control: (accel) acceleration factor: 2.000
[  2323.396] (**) Microsoft Microsoft® 2.4GHz Transceiver v9.0 Consumer Control: (accel) acceleration threshold: 4
[  2323.402] (II) event2  - Microsoft Microsoft® 2.4GHz Transceiver v9.0 Consumer Control: is tagged by udev as: Keyboard
[  2323.402] (II) event2  - Microsoft Microsoft® 2.4GHz Transceiver v9.0 Consumer Control: device is a keyboard
[  2323.405] (II) config/udev: Adding input device Microsoft Microsoft® 2.4GHz Transceiver v9.0 Consumer Control (/dev/input/event3)
[  2323.405] (**) Microsoft Microsoft® 2.4GHz Transceiver v9.0 Consumer Control: Applying InputClass "libinput keyboard catchall"
[  2323.405] (**) Microsoft Microsoft® 2.4GHz Transceiver v9.0 Consumer Control: Applying InputClass "Keyboard Layout"
[  2323.405] (**) Microsoft Microsoft® 2.4GHz Transceiver v9.0 Consumer Control: Applying InputClass "Keyboard Terminate"
[  2323.405] (II) Using input driver 'libinput' for 'Microsoft Microsoft® 2.4GHz Transceiver v9.0 Consumer Control'
[  2323.407] (II) systemd-logind: got fd for /dev/input/event3 13:67 fd 18 paused 0
[  2323.407] (**) Microsoft Microsoft® 2.4GHz Transceiver v9.0 Consumer Control: always reports core events
[  2323.407] (**) Option "Device" "/dev/input/event3"
[  2323.407] (**) Option "_source" "server/udev"
[  2323.412] (II) event3  - Microsoft Microsoft® 2.4GHz Transceiver v9.0 Consumer Control: is tagged by udev as: Keyboard
[  2323.413] (II) event3  - Microsoft Microsoft® 2.4GHz Transceiver v9.0 Consumer Control: device is a keyboard
[  2323.413] (II) event3  - Microsoft Microsoft® 2.4GHz Transceiver v9.0 Consumer Control: device removed
[  2323.413] (II) libinput: Microsoft Microsoft® 2.4GHz Transceiver v9.0 Consumer Control: needs a virtual subdevice
[  2323.413] (**) Option "config_info" "udev:/sys/devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.1/1-1.1.3/1-1.1.3.4/1-1.1.3.4.1/1-1.1.3.4.1:1.2/0007:078A:01D6.0009/input/input8/event3"
[  2323.413] (II) XINPUT: Adding extended input device "Microsoft Microsoft® 2.4GHz Transceiver v9.0 Consumer Control" (type: MOUSE, id 9)
[  2323.413] (**) Option "AccelerationScheme" "none"
[  2323.413] (**) Microsoft Microsoft® 2.4GHz Transceiver v9.0 Consumer Control: (accel) selected scheme none/0
[  2323.413] (**) Microsoft Microsoft® 2.4GHz Transceiver v9.0 Consumer Control: (accel) acceleration factor: 2.000
[  2323.413] (**) Microsoft Microsoft® 2.4GHz Transceiver v9.0 Consumer Control: (accel) acceleration threshold: 4
[  2323.419] (II) event3  - Microsoft Microsoft® 2.4GHz Transceiver v9.0 Consumer Control: is tagged by udev as: Keyboard
[  2323.419] (II) event3  - Microsoft Microsoft® 2.4GHz Transceiver v9.0 Consumer Control: device is a keyboard
[  2323.422] (II) config/udev: Adding input device Microsoft Microsoft® 2.4GHz Transceiver v9.0 System Control (/dev/input/event4)
[  2323.422] (**) Microsoft Microsoft® 2.4GHz Transceiver v9.0 System Control: Applying InputClass "libinput keyboard catchall"
[  2323.422] (**) Microsoft Microsoft® 2.4GHz Transceiver v9.0 System Control: Applying InputClass "Keyboard Layout"
[  2323.422] (**) Microsoft Microsoft® 2.4GHz Transceiver v9.0 System Control: Applying InputClass "Keyboard Terminate"
[  2323.422] (II) Using input driver 'libinput' for 'Microsoft Microsoft® 2.4GHz Transceiver v9.0 System Control'
[  2323.424] (II) systemd-logind: got fd for /dev/input/event4 13:68 fd 19 paused 0
[  2323.424] (**) Microsoft Microsoft® 2.4GHz Transceiver v9.0 System Control: always reports core events
[  2323.424] (**) Option "Device" "/dev/input/event4"
[  2323.424] (**) Option "_source" "server/udev"
[  2323.429] (II) event4  - Microsoft Microsoft® 2.4GHz Transceiver v9.0 System Control: is tagged by udev as: Keyboard
[  2323.429] (II) event4  - Microsoft Microsoft® 2.4GHz Transceiver v9.0 System Control: device is a keyboard
[  2323.430] (II) event4  - Microsoft Microsoft® 2.4GHz Transceiver v9.0 System Control: device removed
[  2323.430] (**) Option "config_info" "udev:/sys/devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.1/1-1.1.3/1-1.1.3.4/1-1.1.3.4.1/1-1.1.3.4.1:1.2/0007:078A:01D6.0009/input/input9/event4"
[  2323.430] (II) XINPUT: Adding extended input device "Microsoft Microsoft® 2.4GHz Transceiver v9.0 System Control" (type: KEYBOARD, id 10)
[  2323.430] (**) Option "xkb_layout" "fr"
[  2323.430] (**) Option "xkb_variant" "latin9"
[  2323.430] (**) Option "xkb_options" "terminate:ctrl_alt_bksp"
[  2323.436] (II) event4  - Microsoft Microsoft® 2.4GHz Transceiver v9.0 System Control: is tagged by udev as: Keyboard
[  2323.436] (II) event4  - Microsoft Microsoft® 2.4GHz Transceiver v9.0 System Control: device is a keyboard
[  2323.440] (II) config/udev: Adding input device Logitech MX Ergo (/dev/input/event5)
[  2323.440] (**) Logitech MX Ergo: Applying InputClass "libinput pointer catchall"
[  2323.440] (**) Logitech MX Ergo: Applying InputClass "libinput keyboard catchall"
[  2323.440] (**) Logitech MX Ergo: Applying InputClass "Keyboard Layout"
[  2323.440] (**) Logitech MX Ergo: Applying InputClass "Keyboard Terminate"
[  2323.440] (II) Using input driver 'libinput' for 'Logitech MX Ergo'
[  2323.441] (II) systemd-logind: got fd for /dev/input/event5 13:69 fd 20 paused 0
[  2323.441] (**) Logitech MX Ergo: always reports core events
[  2323.441] (**) Option "Device" "/dev/input/event5"
[  2323.441] (**) Option "_source" "server/udev"
[  2323.447] (II) event5  - Logitech MX Ergo: is tagged by udev as: Keyboard Mouse
[  2323.447] (II) event5  - Logitech MX Ergo: device is a pointer
[  2323.447] (II) event5  - Logitech MX Ergo: device is a keyboard
[  2323.447] (II) event5  - Logitech MX Ergo: device removed
[  2323.448] (II) libinput: Logitech MX Ergo: needs a virtual subdevice
[  2323.448] (**) Option "config_info" "udev:/sys/devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.1/1-1.1.3/1-1.1.3.4/1-1.1.3.4.3/1-1.1.3.4.3:1.2/0002:023F:54C7.000C/0002:023F:40B6.000D/input/input17/event5"
[  2323.448] (II) XINPUT: Adding extended input device "Logitech MX Ergo" (type: MOUSE, id 11)
[  2323.448] (**) Option "AccelerationScheme" "none"
[  2323.448] (**) Logitech MX Ergo: (accel) selected scheme none/0
[  2323.448] (**) Logitech MX Ergo: (accel) acceleration factor: 2.000
[  2323.448] (**) Logitech MX Ergo: (accel) acceleration threshold: 4
[  2323.453] (II) event5  - Logitech MX Ergo: is tagged by udev as: Keyboard Mouse
[  2323.454] (II) event5  - Logitech MX Ergo: device is a pointer
[  2323.454] (II) event5  - Logitech MX Ergo: device is a keyboard
[  2323.457] (II) config/udev: Adding input device Logitech MX Ergo (/dev/input/mouse1)
[  2323.457] (II) No input driver specified, ignoring this device.
[  2323.457] (II) This device may have been added with another device file.
[  2323.465] (**) Microsoft Microsoft® 2.4GHz Transceiver v9.0 Consumer Control: Applying InputClass "libinput keyboard catchall"
[  2323.465] (**) Microsoft Microsoft® 2.4GHz Transceiver v9.0 Consumer Control: Applying InputClass "Keyboard Layout"
[  2323.465] (**) Microsoft Microsoft® 2.4GHz Transceiver v9.0 Consumer Control: Applying InputClass "Keyboard Terminate"
[  2323.465] (II) Using input driver 'libinput' for 'Microsoft Microsoft® 2.4GHz Transceiver v9.0 Consumer Control'
[  2323.465] (II) systemd-logind: returning pre-existing fd for /dev/input/event2 13:66
[  2323.465] (**) Microsoft Microsoft® 2.4GHz Transceiver v9.0 Consumer Control: always reports core events
[  2323.465] (**) Option "Device" "/dev/input/event2"
[  2323.465] (**) Option "_source" "_driver/libinput"
[  2323.465] (II) libinput: Microsoft Microsoft® 2.4GHz Transceiver v9.0 Consumer Control: is a virtual subdevice
[  2323.465] (**) Option "config_info" "udev:/sys/devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.1/1-1.1.3/1-1.1.3.4/1-1.1.3.4.1/1-1.1.3.4.1:1.1/0007:078A:01D6.0008/input/input7/event2"
[  2323.465] (II) XINPUT: Adding extended input device "Microsoft Microsoft® 2.4GHz Transceiver v9.0 Consumer Control" (type: KEYBOARD, id 12)
[  2323.465] (**) Option "xkb_layout" "fr"
[  2323.465] (**) Option "xkb_variant" "latin9"
[  2323.465] (**) Option "xkb_options" "terminate:ctrl_alt_bksp"
[  2323.465] (**) Microsoft Microsoft® 2.4GHz Transceiver v9.0 Consumer Control: Applying InputClass "libinput keyboard catchall"
[  2323.465] (**) Microsoft Microsoft® 2.4GHz Transceiver v9.0 Consumer Control: Applying InputClass "Keyboard Layout"
[  2323.465] (**) Microsoft Microsoft® 2.4GHz Transceiver v9.0 Consumer Control: Applying InputClass "Keyboard Terminate"
[  2323.465] (II) Using input driver 'libinput' for 'Microsoft Microsoft® 2.4GHz Transceiver v9.0 Consumer Control'
[  2323.465] (II) systemd-logind: returning pre-existing fd for /dev/input/event3 13:67
[  2323.465] (**) Microsoft Microsoft® 2.4GHz Transceiver v9.0 Consumer Control: always reports core events
[  2323.465] (**) Option "Device" "/dev/input/event3"
[  2323.465] (**) Option "_source" "_driver/libinput"
[  2323.466] (II) libinput: Microsoft Microsoft® 2.4GHz Transceiver v9.0 Consumer Control: is a virtual subdevice
[  2323.466] (**) Option "config_info" "udev:/sys/devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.1/1-1.1.3/1-1.1.3.4/1-1.1.3.4.1/1-1.1.3.4.1:1.2/0007:078A:01D6.0009/input/input8/event3"
[  2323.466] (II) XINPUT: Adding extended input device "Microsoft Microsoft® 2.4GHz Transceiver v9.0 Consumer Control" (type: KEYBOARD, id 13)
[  2323.466] (**) Option "xkb_layout" "fr"
[  2323.466] (**) Option "xkb_variant" "latin9"
[  2323.466] (**) Option "xkb_options" "terminate:ctrl_alt_bksp"
[  2323.466] (**) Logitech MX Ergo: Applying InputClass "libinput pointer catchall"
[  2323.466] (**) Logitech MX Ergo: Applying InputClass "libinput keyboard catchall"
[  2323.466] (**) Logitech MX Ergo: Applying InputClass "Keyboard Layout"
[  2323.466] (**) Logitech MX Ergo: Applying InputClass "Keyboard Terminate"
[  2323.466] (II) Using input driver 'libinput' for 'Logitech MX Ergo'
[  2323.466] (II) systemd-logind: returning pre-existing fd for /dev/input/event5 13:69
[  2323.466] (**) Logitech MX Ergo: always reports core events
[  2323.466] (**) Option "Device" "/dev/input/event5"
[  2323.466] (**) Option "_source" "_driver/libinput"
[  2323.466] (II) libinput: Logitech MX Ergo: is a virtual subdevice
[  2323.466] (**) Option "config_info" "udev:/sys/devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.1/1-1.1.3/1-1.1.3.4/1-1.1.3.4.3/1-1.1.3.4.3:1.2/0002:023F:54C7.000C/0002:023F:40B6.000D/input/input17/event5"
[  2323.466] (II) XINPUT: Adding extended input device "Logitech MX Ergo" (type: KEYBOARD, id 14)
[  2323.466] (**) Option "xkb_layout" "fr"
[  2323.466] (**) Option "xkb_variant" "latin9"
[  2323.466] (**) Option "xkb_options" "terminate:ctrl_alt_bksp"
[  2338.608] (II) event5  - Logitech MX Ergo: SYN_DROPPED event - some input events have been lost.
[  2727.257] (II) Server zapped. Shutting down.
[  2727.268] (**) Option "fd" "13"
[  2727.274] (II) event0  - Microsoft Microsoft® 2.4GHz Transceiver v9.0: device removed
[  2727.274] (**) Option "fd" "16"
[  2727.274] (II) event1  - Microsoft Microsoft® 2.4GHz Transceiver v9.0 Mouse: device removed
[  2727.275] (**) Option "fd" "17"
[  2727.275] (**) Option "fd" "18"
[  2727.275] (**) Option "fd" "19"
[  2727.275] (II) event4  - Microsoft Microsoft® 2.4GHz Transceiver v9.0 System Control: device removed
[  2727.276] (**) Option "fd" "20"
[  2727.276] (**) Option "fd" "17"
[  2727.276] (II) event2  - Microsoft Microsoft® 2.4GHz Transceiver v9.0 Consumer Control: device removed
[  2727.276] (**) Option "fd" "18"
[  2727.276] (II) event3  - Microsoft Microsoft® 2.4GHz Transceiver v9.0 Consumer Control: device removed
[  2727.277] (**) Option "fd" "20"
[  2727.277] (II) event5  - Logitech MX Ergo: device removed
[  2727.279] (II) UnloadModule: "libinput"
[  2727.279] (II) systemd-logind: not releasing fd for 13:69, still in use
[  2727.279] (II) UnloadModule: "libinput"
[  2727.279] (II) systemd-logind: not releasing fd for 13:67, still in use
[  2727.279] (II) UnloadModule: "libinput"
[  2727.279] (II) systemd-logind: not releasing fd for 13:66, still in use
[  2727.279] (II) UnloadModule: "libinput"
[  2727.279] (II) systemd-logind: releasing fd for 13:69
[  2727.330] (II) UnloadModule: "libinput"
[  2727.330] (II) systemd-logind: releasing fd for 13:68
[  2727.390] (II) UnloadModule: "libinput"
[  2727.390] (II) systemd-logind: releasing fd for 13:67
[  2727.430] (II) UnloadModule: "libinput"
[  2727.430] (II) systemd-logind: releasing fd for 13:66
[  2727.560] (II) UnloadModule: "libinput"
[  2727.560] (II) systemd-logind: releasing fd for 13:65
[  2727.651] (II) UnloadModule: "libinput"
[  2727.651] (II) systemd-logind: releasing fd for 13:64
[  2727.717] (II) Server terminated successfully (0). Closing log file.
Une idée ?
Différence entre windows et linux
Linux est multi-tâches, windows est multi-taches.
L'Indien de la Douche - Soutient L'April
laurent85
Elfe
Messages : 951
Inscription : mar. 16 oct. 2018, 21:05

Re: [Raspberry 4B] Connexion bluetooth DÈS LE DÉMARAGE (EN COURS...)

Message par laurent85 »

Je parlais des logs du service brcm43438.service :

Code : Tout sélectionner

systemctl status brcm43438.service
journalctl -b -u brcm43438.service
Avatar de l’utilisateur
L_Indien
Chu Ko Nu
Messages : 389
Inscription : dim. 14 nov. 2010, 09:47
Localisation : En mouvement perpétuel...

Re: [Raspberry 4B] Connexion bluetooth DÈS LE DÉMARAGE (EN COURS...)

Message par L_Indien »

OK, désolé.

Je ne comprends pas trop ce qui se passe dans l'espace : le service brcm43438 fonctionne au démarrage...
un # systemctl status brcm43438.service le confirme :

Code : Tout sélectionner

● brcm43438.service - Broadcom BCM43438 bluetooth HCI
     Loaded: loaded (/usr/lib/systemd/system/brcm43438.service; enabled; vendor preset: disabled)
     Active: active (running) since Sat 2020-02-22 16:54:42 CET; 46s ago
   Main PID: 302 (hciattach)
      Tasks: 1 (limit: 4915)
     Memory: 264.0K
     CGroup: /system.slice/brcm43438.service
             └─302 /usr/bin/hciattach -n /dev/ttyAMA0 bcm43xx 921600 noflow -

févr. 22 16:54:42 minix systemd[1]: Started Broadcom BCM43438 bluetooth HCI.
févr. 22 16:54:42 minix hciattach[302]: Cannot open directory '/etc/firmware': No such file or directory
févr. 22 16:54:42 minix hciattach[302]: Patch not found, continue anyway
Mais il y a quand même une erreur, le journal m'informe aussi :

Code : Tout sélectionner

-- Logs begin at Thu 2020-02-06 14:18:14 CET, end at Sat 2020-02-22 16:55:23 CET. --
févr. 22 16:54:42 minix systemd[1]: Started Broadcom BCM43438 bluetooth HCI.
févr. 22 16:54:42 minix hciattach[302]: Cannot open directory '/etc/firmware': No such file or directory
févr. 22 16:54:42 minix hciattach[302]: Patch not found, continue anyway
Et le répertoire est nullement mentionné dans le service pourtant
brcm43438.service a écrit :[Unit]
Description=Broadcom BCM43438 bluetooth HCI
ConditionPathIsDirectory=/proc/device-tree/soc/gpio@7e200000/bt_pins
Before=bluetooth.service
After=dev-ttyAMA0.device

[Service]
Type=simple
ExecStart=/usr/bin/hciattach -n /dev/ttyAMA0 bcm43xx 921600 noflow -

[Install]
WantedBy=multi-user.target
Pourquoi aller chercher quelque chose dans /etc/firmware ?

[EDIT]Ne serait-ce pas /lib/firmware plutôt. La seule « réponse » vient de bugzilla concernant la redhat, mais ça date de 2006... ??
Je vais essayer un lien depuis fstab... Qui verre a verra..
Différence entre windows et linux
Linux est multi-tâches, windows est multi-taches.
L'Indien de la Douche - Soutient L'April
Avatar de l’utilisateur
L_Indien
Chu Ko Nu
Messages : 389
Inscription : dim. 14 nov. 2010, 09:47
Localisation : En mouvement perpétuel...

Re: [Raspberry 4B] Connexion bluetooth DÈS LE DÉMARAGE (EN COURS...)

Message par L_Indien »

Je viens de modifier le /etc/fstab rajouter la ligne /lib/firmware /etc/firmware none bind 0 0 et créé /etc/firmware pour éviter une erreur au démarrage...
Donc, je redémarre le pi, et ça ne fonctionne pas. Avec les beaux messages d'erreur cette fois :

Code : Tout sélectionner

● brcm43438.service - Broadcom BCM43438 bluetooth HCI
     Loaded: loaded (/usr/lib/systemd/system/brcm43438.service; enabled; vendor preset: disabled)
     Active: failed (Result: exit-code) since Sat 2020-02-22 17:13:49 CET; 15s ago
    Process: 317 ExecStart=/usr/bin/hciattach -n /dev/ttyAMA0 bcm43xx 921600 noflow - (code=exited, status=1/FAILURE)
   Main PID: 317 (code=exited, status=1/FAILURE)

févr. 22 17:13:12 minix systemd[1]: Started Broadcom BCM43438 bluetooth HCI.
févr. 22 17:13:49 minix hciattach[317]: Initialization timed out.
févr. 22 17:13:49 minix hciattach[317]: bcm43xx_init
févr. 22 17:13:49 minix systemd[1]: brcm43438.service: Main process exited, code=exited, status=1/FAILURE
févr. 22 17:13:49 minix systemd[1]: brcm43438.service: Failed with result 'exit-code'.
et le journal :

Code : Tout sélectionner

-- Logs begin at Thu 2020-02-06 14:18:14 CET, end at Sat 2020-02-22 17:14:13 CET. --
févr. 22 17:13:12 minix systemd[1]: Started Broadcom BCM43438 bluetooth HCI.
févr. 22 17:13:49 minix hciattach[317]: Initialization timed out.
févr. 22 17:13:49 minix hciattach[317]: bcm43xx_init
févr. 22 17:13:49 minix systemd[1]: brcm43438.service: Main process exited, code=exited, status=1/FAILURE
févr. 22 17:13:49 minix systemd[1]: brcm43438.service: Failed with result 'exit-code'.
Ça me fait penser à une tempo trop courte lors de l'appel, nan ?

[EDIT] Question : ça n'a peut-être rien à voir, ou ça ne sert probablement à rien, mais n'ais-je pas intérêt d'utiliser RFCOMM ?
Merci pour les réponses.
Différence entre windows et linux
Linux est multi-tâches, windows est multi-taches.
L'Indien de la Douche - Soutient L'April
laurent85
Elfe
Messages : 951
Inscription : mar. 16 oct. 2018, 21:05

Re: [Raspberry 4B] Connexion bluetooth DÈS LE DÉMARAGE (EN COURS...)

Message par laurent85 »

L_Indien a écrit : sam. 22 févr. 2020, 17:03 Pourquoi aller chercher quelque chose dans /etc/firmware ?
A mon avis c'est un warning pour info pas un message d'erreur.
Ça me fait penser à une tempo trop courte lors de l'appel, nan ?
Possible. Avec un unit timer de systemd ça peut résoudre le problème de tempo. Le service brcm43438.service sera lancé par le timer brcm43438.timer au boot après le délai indiqué.

Désactive le service brcm43438.service et crée un timer pour lancer le service un certain délai après le boot. Un timer correspondant au besoin est donné en exemple dans le wiki fr ou en
https://wiki.archlinux.fr/Systemd/cron# ... .C3.A9part
https://wiki.archlinux.org/index.php/Sy ... onic_timer
Avatar de l’utilisateur
L_Indien
Chu Ko Nu
Messages : 389
Inscription : dim. 14 nov. 2010, 09:47
Localisation : En mouvement perpétuel...

Re: [Raspberry 4B] Connexion bluetooth DÈS LE DÉMARAGE (EN COURS...)

Message par L_Indien »

Bonjour Laurent,

Je te remercie pour l'info.

Histoire de ne pas modifier la config, j'ai directement créé un nouveau service.
brcm43438.service a écrit :[Unit]
Description=Broadcom BCM43438 bluetooth HCI
ConditionPathIsDirectory=/proc/device-tree/soc/gpio@7e200000/bt_pins
Before=bluetooth.service
After=dev-ttyAMA0.device

[Service]
Type=simple
ExecStart=/usr/bin/hciattach -n /dev/ttyAMA0 bcm43xx 921600 noflow -

[Install]
WantedBy=multi-user.target
le service modifié, avec le timer :
brcm43438_bis.service a écrit :[Unit]
Description=Broadcom BCM43438 bluetooth HCI
ConditionPathIsDirectory=/proc/device-tree/soc/gpio@7e200000/bt_pins
Before=bluetooth.service
After=dev-ttyAMA0.device

[Service]
Nice=19
IOSchedulingClass=2
IOSchedulingPriority=7
ExecStart=/usr/bin/hciattach -n /dev/ttyAMA0 bcm43xx 921600 noflow -

[Install]
WantedBy=multi-user.target
brcm43438_bis.timer a écrit :[Unit]
Description=Mise en tempo de brcm43438.service

[Timer]
# le service démarrera 20 secondes après le démarrage de la machine
OnBootSec=20s

[Install]
WantedBy=timers.target
Sans oublier de faire un # systemct start et # systemct enable pour le service et le timer.
Je vois pour créer un service afin de connecter le clavier en BT. C'est juste un appel de la fonction bluetoothctl...

Merci pour les infos en tout cas.

Bon dimanche.
Différence entre windows et linux
Linux est multi-tâches, windows est multi-taches.
L'Indien de la Douche - Soutient L'April
laurent85
Elfe
Messages : 951
Inscription : mar. 16 oct. 2018, 21:05

Re: [Raspberry 4B] Connexion bluetooth DÈS LE DÉMARAGE (EN COURS...)

Message par laurent85 »

L_Indien a écrit : dim. 23 févr. 2020, 10:36 Histoire de ne pas modifier la config, j'ai directement créé un nouveau service.
C'est compliquer pour rien et pas la bonne méthode, copie le fichier /usr/lib/systemd/system/brcm43438.service dans /etc/systemd/system et modifie ce fichier, systemd utilisera celui d'etc. Mets le timer au même endroit.
Sans oublier de faire un # systemct start et # systemct enable pour le service et le timer.
Je crois pas qu'il faut activer le .service, uniquement le timer. J'aurais mis plus de 20" pour tester au début, bien après la fin du boot.
Avatar de l’utilisateur
L_Indien
Chu Ko Nu
Messages : 389
Inscription : dim. 14 nov. 2010, 09:47
Localisation : En mouvement perpétuel...

Re: [Raspberry 4B] Connexion bluetooth DÈS LE DÉMARAGE (EN COURS...)

Message par L_Indien »

Merci Laurent pour l'info.

Je viens justement de désactiver complètement le service sans timer.

Par contre, je n'arrive pas à connecter le clavier le clavier en BT.
la commande (en root ou en normal) /usr/bin/bluetoothctl agent on && /usr/bin/bluetoothctl power on fonctionne, mais pas dans le service en question :

Code : Tout sélectionner

[Unit]
Description=Appareillage automatique du clavier Bluetooth
Before=bluetooth.service
After=brcm43438_bis.service

[Service]
Type=simple
ExecStart=/usr/bin/bluetoothctl agent on && /usr/bin/bluetoothctl power on 

[Install]
WantedBy=multi-user.target
WantedBy=emergency.target
J'ai essayé de passer par 2 services, ça ne change rien...
Différence entre windows et linux
Linux est multi-tâches, windows est multi-taches.
L'Indien de la Douche - Soutient L'April
Avatar de l’utilisateur
benjarobin
Maître du Kyudo
Messages : 17187
Inscription : sam. 30 mai 2009, 15:48
Localisation : Lyon

Re: [Raspberry 4B] Connexion bluetooth DÈS LE DÉMARAGE (EN COURS...)

Message par benjarobin »

Tu ne peux pas mettre du Bash dans un . service. Cela n'a aucune chance de fonctionner. Je te recommande vivement de lire la documentation de systemd
Zsh | KDE | PC fixe : core i7, carte nvidia
Titre d'un sujet : [Thème] Sujet (état) / Règles du forum
laurent85
Elfe
Messages : 951
Inscription : mar. 16 oct. 2018, 21:05

Re: [Raspberry 4B] Connexion bluetooth DÈS LE DÉMARAGE (EN COURS...)

Message par laurent85 »

man systemd.service

Je mettrais :

Code : Tout sélectionner

[Service]
Type=oneshot
ExecStart=/usr/bin/bluetoothctl agent on ; /usr/bin/bluetoothctl power on 
ou

Code : Tout sélectionner

[Service]
Type=oneshot
ExecStart=/usr/bin/bluetoothctl agent on
ExecStart=/usr/bin/bluetoothctl power on
Avatar de l’utilisateur
L_Indien
Chu Ko Nu
Messages : 389
Inscription : dim. 14 nov. 2010, 09:47
Localisation : En mouvement perpétuel...

Re: [Raspberry 4B] Connexion bluetooth DÈS LE DÉMARAGE (EN COURS...)

Message par L_Indien »

Merci pour les réponses
benjarobin a écrit : dim. 23 févr. 2020, 16:11Tu ne peux pas mettre du Bash dans un . service. Cela n'a aucune chance de fonctionner. Je te recommande vivement de lire la documentation de systemd
OK, merci pour le tuyau.
laurent85 a écrit : dim. 23 févr. 2020, 16:14man systemd.service

Je mettrais :

Code : Tout sélectionner

[Service]
Type=oneshot
ExecStart=/usr/bin/bluetoothctl agent on ; /usr/bin/bluetoothctl power on 
ou

Code : Tout sélectionner

[Service]
Type=oneshot
ExecStart=/usr/bin/bluetoothctl agent on
ExecStart=/usr/bin/bluetoothctl power on
Je viens de tester avec « oneshot », et ça ne fonctionne pas... Le service est en attente, et le clavier non-opérationnel...
systemctl status btclavier.service a écrit :● btclavier.service - Appareillage automatique du clavier Bluetooth
Loaded: loaded (/usr/lib/systemd/system/btclavier.service; enabled; vendor preset: disabled)
Active: activating (start) since Sun 2020-02-23 17:13:39 CET; 1min 33s ago
Main PID: 305 (bluetoothctl)
Tasks: 1 (limit: 4915)
Memory: 1.3M
CGroup: /system.slice/btclavier.service
└─305 /usr/bin/bluetoothctl agent on
journalctl -b -u btclavier.service a écrit :Journal file /var/log/journal/87257639c6a04231b6f956efef428aae/system@00059e7aa20b1829-8f9a3ebaecbc364f.journal~ is truncated, ignoring file.
-- Logs begin at Thu 2020-02-06 14:18:14 CET, end at Sun 2020-02-23 17:15:28 CET. --
févr. 23 17:13:39 minix systemd[1]: Starting Appareillage automatique du clavier Bluetooth...
J'ai remplacé par un type « simple », mais cette fois-ci, voici les messages d'erreurs :
systemctl status btclavier.service a écrit :● btclavier.service - Appareillage automatique du clavier Bluetooth
Loaded: bad-setting (Reason: Unit btclavier.service has a bad unit file setting.)
Active: inactive (dead)
journalctl -b -u btclavier.service a écrit :Journal file /var/log/journal/87257639c6a04231b6f956efef428aae/system@00059e7aa20b1829-8f9a3ebaecbc364f.journal~ is truncated, ignoring file.
-- Logs begin at Thu 2020-02-06 14:18:14 CET, end at Sun 2020-02-23 17:06:55 CET. --
-- No entries --
Le pire, c'est quand je désactive le service btclavier.service au démarage, et que j'exécute la commande (toutes les commandes sont faites en ssh) /usr/bin/bluetoothctl agent on && /usr/bin/bluetoothctl power on, le clavier est opérationnel.
Différence entre windows et linux
Linux est multi-tâches, windows est multi-taches.
L'Indien de la Douche - Soutient L'April
Avatar de l’utilisateur
L_Indien
Chu Ko Nu
Messages : 389
Inscription : dim. 14 nov. 2010, 09:47
Localisation : En mouvement perpétuel...

Re: [Raspberry 4B] Connexion bluetooth DÈS LE DÉMARAGE (EN COURS...)

Message par L_Indien »

Bonjour,

Je reviens juste pour filer une info.

Ne réussant pas à réaliser l’activation au démarage du raspberry, j’ai testé depuis un autre poste.

Voici les commandes réalisées (je pense que sur un raspberry, ça fonctionne aussi. Se sont les mêmes applications) :

Code : Tout sélectionner

# systemctl start bluetooth.service
# systemctl enable bluetooth.service
# bluetoothctl
[bluetoothctl]# agent on
[bluetoothctl]# power on
[bluetoothctl]# pair ADRESSE_MAX
Ajouté dans le fichier /etc/conf.d/bluetooth les infos suivantes :

Code : Tout sélectionner

HIDD_ENABLE="true"
HIDD_OPTIONS="--connect ADRESSE_MAX"
Crée le service btclavier.service

Code : Tout sélectionner

[Unit]
Description=Appareillage automatique du clavier Bluetooth
After=bluetooth.service

[Service]
Type=simple
ExecStart=/emplacememt_script/btclavier.sh

[Install]
WantedBy=multi-user.target
WantedBy=emergency.target
Et vu que le service fait appel à un script, le script contient les éléments suivants :

Code : Tout sélectionner

#!/bin/sh
/usr/bin/bluetoothctl agent on
/usr/bin/bluetoothctl power on
Rendre le script exécutable :

Code : Tout sélectionner

# chmod ugo+x /home/minix/btclavier.sh
# chmod 775 /home/minix/btclavier.sh
$ chmod ugo+x /home/minix/btclavier.sh
$ chmod 775 /home/minix/btclavier.sh
Puis ne pas oublier de l’activer

Code : Tout sélectionner

# systemctl start btclavier.service
# systemctl enable btclavier.service
Et clac, le clavier bluetooth est utilisable avant de se connecter (en ligne de commande ou avec une application type slim).

Bon dimanche
Différence entre windows et linux
Linux est multi-tâches, windows est multi-taches.
L'Indien de la Douche - Soutient L'April
Répondre