Opened 2 years ago

Last modified 22 months ago

#20993 new defect

Installing kmod-bluetooth fails in postinst script

Reported by: davidacampbell Owned by: developers
Priority: normal Milestone: Designated Driver (Trunk)
Component: kernel Version: Trunk
Keywords: Cc:


DESIGNATED DRIVER (Bleeding Edge, r47548)

Installing kmod-bluetooth fails in postinst script. No bluetooth device is plugged in.

root@OpenWrt:/etc/init.d# opkg install kmod-bluetooth
Installing kmod-bluetooth (3.18.23-1) to root...
Installing kmod-crypto-ecb (3.18.23-1) to root...
Installing kmod-crypto-manager (3.18.23-1) to root...
Installing kmod-crypto-aead (3.18.23-1) to root...
Installing kmod-crypto-pcompress (3.18.23-1) to root...
Installing kmod-hid (3.18.23-1) to root...
Installing kmod-input-evdev (3.18.23-1) to root...
Configuring kmod-crypto-aead.
Configuring kmod-crypto-pcompress.
Configuring kmod-crypto-manager.
Configuring kmod-input-evdev.
Configuring kmod-crypto-ecb.
Configuring kmod-hid.
Configuring kmod-bluetooth.
rfcomm is already loaded
bnep is already loaded
hidp is already loaded
hci_uart is already loaded
btusb is already loaded
Collected errors:

  • pkg_run_script: package "kmod-bluetooth" postinst script returned status 255.
  • opkg_configure: kmod-bluetooth.postinst returned 255.

dmesg reports:

[11740.860000] Bluetooth: Core ver 2.19
[11740.870000] NET: Registered protocol family 31
[11740.870000] Bluetooth: HCI device and connection manager initialized
[11740.880000] Bluetooth: HCI socket layer initialized
[11740.880000] Bluetooth: L2CAP socket layer initialized
[11740.890000] Bluetooth: SCO socket layer initialized
[11740.910000] Bluetooth: RFCOMM TTY layer initialized
[11740.910000] Bluetooth: RFCOMM socket layer initialized
[11740.920000] Bluetooth: RFCOMM ver 1.11
[11740.930000] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[11740.930000] Bluetooth: BNEP filters: protocol multicast
[11740.940000] Bluetooth: BNEP socket layer initialized
[11740.950000] Bluetooth: HIDP (Human Interface Emulation) ver 1.2
[11740.960000] Bluetooth: HIDP socket layer initialized
[11740.970000] Bluetooth: HCI UART driver ver 2.2
[11740.980000] Bluetooth: HCI H4 protocol initialized
[11740.980000] Bluetooth: HCI BCSP protocol initialized
[11740.990000] Bluetooth: HCIATH3K protocol initialized
[11741.000000] usbcore: registered new interface driver btusb

Attachments (0)

Change History (2)

comment:1 Changed 22 months ago by jim@…

This error seems to occur because /usr/lib/opkg/info/kmod-bluetooth.postinst-pkg contains:

insert_modules bluetooth rfcomm bnep hidp hci_uart btusb

However, /etc/modules.d/bluetooth already lists all of them, so they get installed when insert-modules sees the first entry. When insert-modules calls modprobe for the other 5, they all return an error. Thus the postinst-pkg script returns the same error and opkg bails out.


cd /usr/lib/opkg/info
sed 's/rfcomm/#rfcomm/g' < kmod-bluetooth.postinst-pkg > /tmp/foo
mv /tmp/foo kmod-bluetooth.postinst-pkg
opkg configure kmod-bluetooth

comment:2 Changed 22 months ago by jim@…

BTW the proper fix might be to have modprobe not treat an already-installed module as an error.

Add Comment

Modify Ticket

as new .

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.