WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: How to set up Bluetooth with tinyCore 10?  (Read 6769 times)

Offline galinski

  • Newbie
  • *
  • Posts: 9
How to set up Bluetooth with tinyCore 10?
« on: June 26, 2019, 07:53:52 AM »
Hello folks, can someone help me to set up the bluetooth tools on a RaspBerry Pi 3b+ with tinyCore10 (the unofficial release).
my actual progress is that i tried to load the module hci_uart with modprobe and I receive the following output line:
Code: (bash) [Select]
modprobe: can't load module bluetooth (tclocal.kernel/net/bluetooth/bluetooth.ko): unknown symbol in module, or unknown parameterand the firmware-rpi-bt is installed
and if i use dmesg right after i receive the following lines:
Code: (bash) [Select]
bluetooth: Unknown symbol crypto_ecdh_key_len (err -2)
bluetooth: Unknown symbol crypto_ecdh_encode_key (err -2)
with best regards
galinski
« Last Edit: June 26, 2019, 08:11:49 AM by galinski »

Offline TimJ

  • Jr. Member
  • **
  • Posts: 57
Re: How to set up Bluetooth with tinyCore 10?
« Reply #1 on: June 26, 2019, 08:16:42 AM »
It looks as if I have messed up building the  bluetooth modules, or possibly there is a crypto module missing.

If I get a chance I will take a look this evening, but it might well be the weekend.

I have to say that I have never used bluetooth on the Pi, but I will see how far I get.

Tim.

Offline galinski

  • Newbie
  • *
  • Posts: 9
Re: How to set up Bluetooth with tinyCore 10?
« Reply #2 on: June 26, 2019, 08:22:04 AM »
Tim take your time and thank you for your fast answer.
[EDIT]
The kernels are in
bluetooth-4.19.46-piCore-v7.tcz  (described problem)
bluetooth-4.19.13-piCore-v7.tcz  (hci_uart is described in the list files but not added in modules.dep and can not loaded)

With best regards
Galinski
« Last Edit: June 26, 2019, 08:55:09 AM by galinski »

Offline TimJ

  • Jr. Member
  • **
  • Posts: 57
Re: How to set up Bluetooth with tinyCore 10?
« Reply #3 on: June 26, 2019, 06:43:18 PM »
You need to use the modules corresponding to the kernel, in your case 4.19.46.

There is a cryptographic module missing from the base image, I will include tt in the next release.

As a workaround please load

Code: [Select]
tce-load -wi missed_crypto-4.19.46-piCore-v7.tcz
I have not gone on to get Bluetooth working, just get hci_uart loaded, so you may have further problems.

This extension is also needed for crda.tcz extension.

Tim

Offline Paul_123

  • Administrator
  • Hero Member
  • *****
  • Posts: 1243
Re: How to set up Bluetooth with tinyCore 10?
« Reply #4 on: June 26, 2019, 08:00:54 PM »
You will need bluez as well, not sure what copy is floating around on the repos.   I have bluez 5.50 running fine, and updated dbus and others needed stuff.

What are you trying to do with Bluetooth?

Offline Pats

  • Sr. Member
  • ****
  • Posts: 322
Re: How to set up Bluetooth with tinyCore 10?
« Reply #5 on: June 26, 2019, 11:59:28 PM »
Bluetooth setup is somewhat tricky, if done on barebone distros like TC. .. Pl check following links for any basic Bluetooth setup : Rasp Pi specific :
1) *https://www.cnet.com/how-to/how-to-setup-bluetooth-on-a-raspberry-pi-3/

General Bluetooth setup in Linux distros :
2) *https://www.pcsuggest.com/linux-bluetooth-setup-hcitool-bluez/
3)  *https://www.pcsuggest.com/bluetooth-linux-part-2/

Offline galinski

  • Newbie
  • *
  • Posts: 9
Re: How to set up Bluetooth with tinyCore 10?
« Reply #6 on: June 27, 2019, 02:05:25 AM »
@TimJ
thank you for your fast workaround

@Paul_123
i want to connect a Bluetooth gps-module (QStarz BT-Q818 1Hz/10Hz) to track down the raspberry pi in a moving car

@Pats
thank you for your links i will look into them and try to build up my system

With best regards
Galinski

Offline galinski

  • Newbie
  • *
  • Posts: 9
Re: How to set up Bluetooth with tinyCore 10?
« Reply #7 on: June 27, 2019, 08:53:46 AM »
Well now my Raspberry can not find the onboard Bluetooth device.

Therefore before someone asks me:
Im using Bluez from tce-ab9
I Changed ncurse because bluttothtools would not work
(the default ncurse is the version 6 and bluetoothtools requires 5)
Modules are all loaded with the commands
Code: (bash) [Select]
sudo /usr/local/etc/init.d/dbus start
sudo /usr/local/etc/init.d/bluez start

And the command "hcitool dev" returns en empty set
Code: (bash) [Select]
hcitool dev
devices:
And my config.txt (in mmcblk0p1)
Code: (bash) [Select]
enable_uart=1
[PI3]
#dtoverlay=pi3-miniuart-bt

Offline Paul_123

  • Administrator
  • Hero Member
  • *****
  • Posts: 1243
Re: How to set up Bluetooth with tinyCore 10?
« Reply #8 on: June 27, 2019, 09:30:45 AM »
You need the rpi bluetooth firmware too.   But yes, bluez from the 9.x repo wont work.

I'll see if I can get Tim a new copy for his repo.......but mostly we are working on the new RPI4 support first.

Offline galinski

  • Newbie
  • *
  • Posts: 9
Re: How to set up Bluetooth with tinyCore 10?
« Reply #9 on: June 27, 2019, 11:14:59 AM »
@Paul
Well i did not made it clear enough but the Bluetooth firmware (firmware-rpi-bt.tcz) is installed
and i tried to compile bluez myself (with compiletc.tcz), but it did not worked well

And it is understandable that you and Tim are working on he RPI4, ideally i want a RPI4 too.

Offline TimJ

  • Jr. Member
  • **
  • Posts: 57
Re: How to set up Bluetooth with tinyCore 10?
« Reply #10 on: June 28, 2019, 07:17:30 PM »
You need the rpi bluetooth firmware too.   But yes, bluez from the 9.x repo wont work.

I'll see if I can get Tim a new copy for his repo.......but mostly we are working on the new RPI4 support first.

I have now uploaded Paul's extensions, I had to rebuild them to make them compatible with piCore's current libraries, but he has done all the hard work.

  • bluez.tcz
  • bluez-dev.tcz
  • bluez-doc.tcz
  • dbus.tcz
  • dbus-dev.tcz
  • dbus-doc.tcz
  • dbus-x11.tcz
  • dbus-glibc.tcz
  • dbus-glibc-dev.tcz
  • dbus-glibc-doc.tcz

Offline galinski

  • Newbie
  • *
  • Posts: 9
Re: How to set up Bluetooth with tinyCore 10?
« Reply #11 on: July 01, 2019, 04:56:10 AM »
Tim thank you for setting up the files but the problem still persist.
If im using the hcitool and bluetoothhctl I still receive the blank line for no devices, tested it on a clean install with the listed packages (and the bluetooth dependencies)
If i need to change the config.txt/cmdline3.txt please tell me what and where i should change these files, the line which disables bluetooth is already outlined with '#'

And yes i loaded all listed packages at least I tried and at error I loaded from tce-ab9 the dependencies packages

packages from tce-ab9 (without their dependencies)
  • libX11
  • libX11-dev
  • libSM
  • libSM-dev

At start of bluez
Code: (bash) [Select]
sudo /usr/local/etc/init.d/dbus start
sudo /usr/local/etc/init.d/bluez start
stoppped /usr/local/bin/dbus-daemon
and at starting the dbus-daemon i receive the following
Code: (bash) [Select]
/usr/local/bin/dbus-daemon --system
dbus-daemon[1088]: Failed to start message bus: The pid file "/var/run/dbus/pid" exists, if the message bus is not running, remove this file

The values in the files (only lines which are read from the system, without '#')
config.txt
Code: (bash) [Select]
[PI3]
initramfs 10.1beta6av7.gz followkernel
kernel kernel41946v7.img
cmdline cmdline3.txt

[ALL]
dtparam=i2c=on,spi=on,i2s=on
dtparam=audio=off

enable_uart=1

[PI3]
dtoverlay=pi3-miniuart-bt

cmdline3.txt
Code: (bash) [Select]
zswap-compressor=lz4 zswap.zpool=z3fold dwc_otg.lpm_enable=0 console=tty1 root=/dev/ram0 elevator=deadline rootwait quiet nortc loglevel=3 noembed

I hope these informations are helpfull to find a solution (and the Bluetooth devices does functionate on a normal raspbian)

Offline galinski

  • Newbie
  • *
  • Posts: 9
Re: How to set up Bluetooth with tinyCore 10?
« Reply #12 on: July 01, 2019, 10:42:01 AM »
I solved the problem while i followed the commands at http://forum.tinycorelinux.net/index.php?topic=20854.0.
I did not thought that i had to attach (and flash) the device manually.

Thank you for your help and hard work.
« Last Edit: July 01, 2019, 10:46:18 AM by galinski »

Offline Paul_123

  • Administrator
  • Hero Member
  • *****
  • Posts: 1243
Re: How to set up Bluetooth with tinyCore 10?
« Reply #13 on: July 01, 2019, 12:15:30 PM »
Yes, doing things in tiny/picore you find out all the things that a full distribution does in the background.   That script that sets the serial device and runs hciattach is only needed for the raspberry pi internal bluetooth.    If you use a USB bluetooth, then its handled automatically.