2

I need to run this command line at startup:

echo 1 > /sys/module/bluetooth/parameters/disable_ertm 

When I go to terminal type SU enter my password type that command it works perfectly, yet when I add that line to /etc/rc.local before the exit 0 it does nothing at all.

I am running Raspian on a Raspberry pi.

3

That's a kernel module parameter, so the best way to set that is by creating a file in /etc/modprobe.d. E.g., create /etc/modprobe.d/bluetooth.conf with the contents:

options bluetooth disable_ertm=1

Reboot your system, and check that /sys/module/bluetooth/parameters/disable_ertm looks as you expect.

0

Can you create a systemd service to run a bash script containing the command:

[Unit]
Description=disable_ertm
After=network.target
StartLimitIntervalSec=0

[Service]
Type=simple
Restart=always
RestartSec=1
User=root
ExecStart=/path/to/bash/script

[Install]
WantedBy=multi-user.target

Actual Script:

#!/bin/bash
echo 1 > /sys/module/bluetooth/parameters/disable_ertm

Or add to rc.local like:

sudo update-rc.d /path/to/bash/script defaults

Make sure it is chmod +x.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.