Unable to start Bluetooth in le only mode (Linux poky) - bluetooth

I am trying to start Bluetooth in LE only mode when the system boots. I changed the "ControllerMode" to "le" in the main.conf file, I had to create the main.conf file because it wasn't there but that still did not work. Is there any other way that I can get bluetooth to start in LE only mode? Is there a way to force the configuration of bluetooth to not be reset upon reboot?
Note that in my distro I don't have bluez, I only have hci and btmgmt that I can work with
Thank you in advance. Any help is much appreciated.

Related

Keyboard problem on Lichee Pi Zero with kernel 5.2+

My question is about Lichee Pi Zero board (based on Allwinner/Sunxi V3s SoC).
Initially I used pre-built Linux image (kernel 4.10.02), it has no built-in Wi-Fi support (for Realtek 8327BS chip), so I downloaded the latest kernel version from here and built it with the default settings.
LCD is ok, Wi-fi looks good too (LED is blinkikng), but I cannot use keyboard anymore - there is no reaction from OS, when I connect something to USB (no message and no input from keyboard).
Hardware is OK and works good with the old Linux image.
I have also tried the latest kernel from kernel.org with the same bad result.
Please help to understand the reason. I suppose bad settings, but HID supoort is enabled.
Update 1.
I establish connection through UART. As I see, some USB features are detected during boot:
I'm able to load some drivers using insmod also:
Unfortunately, Linux still does not recognize any USB Device. I have connected mouse, keyboard, hub, mass storage and got no reaction from OS. It looks like devices do not get power (there is no light from mouse).
Update 2.
The best way I have found at the moment is to use buildroot-licheepi-zero.
It's very easy to use:
make licheepi_zero_defconfig
make menuconfig (optional)
make
After many-hour wainting I got the sdcard.img. It includes all neccessary files (zImage, RootFS, u-boot.bin, etc) and could be placed to SD with linux dd or etcher.
Linux boots successfully, but you can use terminal only through UART, as there is no LCD output.
You can put LCD itself to work:
make uboot-menuconfig
make
BUT there is still no user login prompt on the LCD after boot. So I need to log in and put command through UART.
Please share suggestion if any.
Update 3.
The change below enables login prompt on LCD (and disables it through UART):
make menuconfig
Now we are able to use Wi-Fi:
insmod /lib/modules/4.14.14-licheepi-zero/kernel/drivers/staging/rtl8723bs/r8723bs.ko
ifconfig wlan0 up
edit file /etc/wpa_supplicant.conf to add your Wi-Fi SSID and PSK
wpa_supplicant -B -d -i wlan0 -c /etc/wpa_supplicant.conf
udhcpc -i wlan0
Connection is established now, we can ping and so on.
There is still the question - how to enable full-functional terminal both on LCD and UART.
Many thanks!
With regards,
Maksim
The best solution is to use Buildroot.
Please check updates at topic start for details.

Can not connect to BLE device on raspberry pi (gatttool/bluetoothctl)

like the title says, i am not able to connect to a le device on my raspberry pi 3.
I tried:
- via bluetoothctl i get an AutenthicationFailure
- via gatttool i get connection refused (111)
I searched a lot for a solution and already tried (made sure that):
- btmgmt le up
- reinstalling bluez/bluez to the newest version
- use of "-t random" when using gatttool
And know i really have no idea what to do next.
What might be important:
uname -r = 4.19.58-v7+
bluetoothctl -v = 5.50
Using the Android App nRF Connect the connection to the le device works fine.
Can somebody help me please?
Thanks in advance,
Magda
It looks like your device needs to be bonded and Bluez fails to successfully bond...
I have the same issue with several devices that need bonding. Bluez can apparently only deal with some variants of bonding but certainly not all. On iOS and Android I have no issues at all with those devices...
Unless you fancy digging into Bluez source code and fixing the issue yourself, I think you can only wait for some Bluez update to fix the issue...

OpenSUSE 15.0 LEAP pulseaudio unable to detect bluetooth speaker

I would like to stream my music through my Bluetooth speaker but PulseAudio can't see the speaker. When I open the sound settings (pavucontrol) I can't change the output device to my speaker since it's not displayed.
What I already checked
The speaker is paired and connected through the Bluetooth interface in GNOME. I verified the connection using the bluetoothctl tool and made sure that the device is connected and trusted by OpenSUSE.
I checked if PulseAudio can see the device through the command line using pactl list sources short and pactl list sinks short and it's not there either.
I verified if PulseAudio has the right Bluetooth addon installed and it has.
Removing the configuration in ~/.config/pulse doesn't help
This question: Pulseaudio not detecting bluetooth headset couldn't help me either.
It worked a couple months ago without any issue but now it doesn't. Any advice to force PulseAudio to recognize my Bluetooth speaker?
Setup:
UE Boom Bluetooth speaker
GNOME OpenSUSE Leap 15.0
Pulseaudio 11.1
BlueZ 5.48
Try these steps to resolve the bluetooth audio issue on Opensuse Linux- These would work in ubuntu and other linux too. I am running on Opensuse linux 15.
First comment out the line
load-module module-bluetooth-discover
by editing the
sudo vim /etc/pulse/default.pa
Now you would need to reboot after this change is done. After rebooting,
we configure the bluetoothctl by running the following sequence of commands in a terminal:
> pactl load-module module-bluetooth-discover
> bluetoothctl
>> power on
>> agent on
>> default-agent
>> discoverable on
>> scan on
scanon will return with the name of the bluetooth speaker along with a code in the format '11:11:11:11:11:11' - thats ur bluetoooth speakers id. Note that down and use it in the next command trust and connect.
>> trust 11:11:11:11:11:11
>> connect 11:11:11:11:11:11
>> scan off
Do not close this terminal.
And these are all thats required to connect to a bluetooth speaker/headphone.
YOu can put the above in a script say - connectbluettooth.sh and run it everytime you login.
Last step change the speakers settings, your applications uses by running the below command:-
pavucontrol - Change the default audio device to the bluetooth speaker.
You can see my bluetooth speaker - 'Juarez' set in the pavucontrol tool in the screenshot.

Bluetooth on Raspberry Pi Zero W, using buildroot

I'm trying to get the onboard Broadcom bluetooth working in a Buildroot 2017.08 built linux on the Raspberry Pi Zero W. It's not showing me the adapter. Bluetooth USB dongles do work.
Things I've already done:
Added rpi-bt-firmware
Added Bluez-tools and Bluez5-utils
Kernel compiled with all sorts of Bluetooth support
Loaded bluetooth modules: bluetooth, bnep, btbcm, hci_uart
rfkill list (shows no bluetooth devices)
rfkill unblock bluetooth (just in case)
After boot I'm manually starting bluetoothd followed by bluetoothctl.
when I type "power on", "list" or "show" it does not give me any bluetooth controllers.
The hardware is working, on the same system I have Debian Jessie working fine with the bluetooth.
Also, given that USB bluetooth dongles work, I think the kernel is OK too.
What could possibly be the problem here??
Anything I could try to troubleshoot??
Anything I could install or add to make it work??
Anything is welcome at this point! :)
UPDATE
I have it working by running hciattach /dev/ttyAMA0 bcm43xx 921600 flow - at start-up. However, I have barely a clue what's going on here. Proper explanation will count as an answer.
I have also removed console=/dev/ttyAMA0 from the cmdline.txt, not sure though if that was necessary.
hciattach attaches serial HCI devices via UART to Bluez stack https://www.systutorials.com/docs/linux/man/8-hciattach/.
In your case the serial Broadcom HCI adapter is at /dev/ttyAMA0, so the command your run attaches it to Bluez as a bcm43xx HCI adapter.
Its probably done the same in your Debian Jessie setup.

Raspberry PI - RT2870 (kernel module mt7601Usta) WiFi SUB dongle - Act as WiFi access point

I have a problem with USB WiFi dongle RT2870 on Raspberry Pi. This is KOM0640 (Quer) model, successfully detected by Linux Kernel mt7601Usta.ko module.
Specification of my Raspberry:
Latest Linux Raspbian distro with kernel 3.12.35+
WiFi dongle 148f:7601 Ralink Technology, Corp.
WiFi dongle is successfuly detected and can be used as client (connect with available access points).
My problem is to switch this USB WiFi dongle to AP (access-point) mode and enable HotSpot mode on Raspberry Pi. Here is result of iwconfig - I've tried to set access point mode by hand from command line:
root#raspberrypi:~/# iwconfig wlan0 mode master
Error for wireless request "Set Mode" (8B06) :
SET failed on device wlan0 ; Invalid argument.
I have read a lot of web pages with a lots of hints, but without success.
If you have any positive results on this issue, please let me know.
Thanks in advance!
Mediatek drivers dont support nl80211 and cant be used with hostapd.
Original drivers from mediatek.com site doesnt contain AP function. You have to compile driver from eywalink github repo.
After compiling/installing driver you can insert mt7601uap module and configure AP settings in /etc/Wireless/RT2870AP/RT2870AP.dat
You need a driver that supports master mode. You can get one from https://github.com/muratdemirtas/MT7601u. Good luck

Resources