WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: 11.0armv7beta1a building bluetooth - kernel 4.19.81v7 crypto module missing?  (Read 5702 times)

Offline piCoreUser1

  • Newbie
  • *
  • Posts: 14
Think this may be similar to your TimJ http://forum.tinycorelinux.net/index.php/topic,22987.msg143624.html#msg143624. If so, can you do same fix for 11.0 please? I have tried including all crypt modules in bluetooth-4.19.81-piCore-v7.tcz (copy of code can be uploaded as attachment). Here is my bluetooth-4.19.81-piCore-v7.tcz.list:
Code: [Select]
tc@box:~$ cat /mnt/mmcblk0p2/tce/optional/bluetooth-4.19.81-piCore-v7.tcz.list
/usr/local/lib/modules/4.19.81-piCore-v7/kernel/net/wireless/lib80211_crypt_wep.ko
/usr/local/lib/modules/4.19.81-piCore-v7/kernel/net/wireless/lib80211_crypt_tkip.ko
/usr/local/lib/modules/4.19.81-piCore-v7/kernel/net/wireless/lib80211_crypt_ccmp.ko
/usr/local/lib/modules/4.19.81-piCore-v7/kernel/net/bluetooth/bluetooth_6lowpan.ko
/usr/local/lib/modules/4.19.81-piCore-v7/kernel/net/bluetooth/bluetooth.ko
/usr/local/lib/modules/4.19.81-piCore-v7/kernel/net/bluetooth/rfcomm/rfcomm.ko
/usr/local/lib/modules/4.19.81-piCore-v7/kernel/net/bluetooth/hidp/hidp.ko
/usr/local/lib/modules/4.19.81-piCore-v7/kernel/net/bluetooth/bnep/bnep.ko
/usr/local/lib/modules/4.19.81-piCore-v7/kernel/fs/ecryptfs/ecryptfs.ko
/usr/local/lib/modules/4.19.81-piCore-v7/kernel/drivers/md/dm-crypt.ko
/usr/local/lib/modules/4.19.81-piCore-v7/kernel/drivers/bluetooth/hci_vhci.ko
/usr/local/lib/modules/4.19.81-piCore-v7/kernel/drivers/bluetooth/hci_uart.ko
/usr/local/lib/modules/4.19.81-piCore-v7/kernel/drivers/bluetooth/btwilink.ko
/usr/local/lib/modules/4.19.81-piCore-v7/kernel/drivers/bluetooth/btusb.ko
/usr/local/lib/modules/4.19.81-piCore-v7/kernel/drivers/bluetooth/btrtl.ko
/usr/local/lib/modules/4.19.81-piCore-v7/kernel/drivers/bluetooth/btmrvl_sdio.ko
/usr/local/lib/modules/4.19.81-piCore-v7/kernel/drivers/bluetooth/btmrvl.ko
/usr/local/lib/modules/4.19.81-piCore-v7/kernel/drivers/bluetooth/btintel.ko
/usr/local/lib/modules/4.19.81-piCore-v7/kernel/drivers/bluetooth/btbcm.ko
/usr/local/lib/modules/4.19.81-piCore-v7/kernel/drivers/bluetooth/bpa10x.ko
/usr/local/lib/modules/4.19.81-piCore-v7/kernel/drivers/bluetooth/bfusb.ko
/usr/local/lib/modules/4.19.81-piCore-v7/kernel/drivers/bluetooth/bcm203x.ko
/usr/local/lib/modules/4.19.81-piCore-v7/kernel/drivers/bluetooth/ath3k.ko
/usr/local/lib/modules/4.19.81-piCore-v7/kernel/drivers/block/cryptoloop.ko
/usr/local/lib/modules/4.19.81-piCore-v7/kernel/crypto/crypto_user.ko
/usr/local/lib/modules/4.19.81-piCore-v7/kernel/crypto/crypto_simd.ko
/usr/local/lib/modules/4.19.81-piCore-v7/kernel/crypto/cryptd.ko
Installed:
Code: [Select]
tc@box:~$ ls /usr/local/tce.installed
autoconf                     firmware-rpi-bt              icu-bin                      libnl                        perl5
automake                     firmware-rpi-wifi            icu-dev                      libssh2                      pkg-config
bash                         flex                         isl                          libxcb                       python2.7
binutils                     gamin                        libX11                       libxcb-dev                   python2.7-dev
bison                        gamin-dev                    libX11-dev                   linux-4.19.y_api_headers     readline
bluetooth-4.19.81-piCore-v7  gawk                         libXau                       m4                           readline-dev
bzip2                        gcc                          libXau-dev                   make                         rsync
bzip2-dev                    gcc_base-dev                 libXdmcp                     mc                           sed
bzip2-lib                    gcc_libs                     libXdmcp-dev                 mpc                          squashfs-tools
ca-certificates              gcc_libs-dev                 libacl                       mpfr                         util-linux_base-dev
compiletc                    git                          libattr                      nano                         util-macros
curl                         glib2                        libelf                       ncurses                      wifi
diffutils                    glibc_add_lib                libelf-dev                   ncurses-dev                  wireless-4.19.81-piCore-v7
e2fsprogs_base-dev           glibc_apps                   libffi_base-dev              ncurses-terminfo             wireless_tools
ell                          glibc_base-dev               libgcrypt                    openssh                      wpa_supplicant
expat2                       glibc_gconv                  libgpg-error                 openssl                      xcb-proto
expat2-dev                   gmp                          libgpg-error-dev             patch                        xorg-proto
file                         grep                         libiw                        pcre                         xtrans
findutils                    icu                          libmount-dev                 pcre-dev                     zlib_base-dev
t
dmesg:
Code: [Select]
[   13.739144] brcmfmac: brcmf_c_process_clm_blob: no clm_blob available (err=-2), device may have limited channels available
[   13.739703] brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM43430/1 wl0: Oct 23 2017 03:55:53 version 7.45.98.38 (r674442 CY) FWID 01-e58d219f
[   21.903721] i2c /dev entries driver
[   22.033190] smsc95xx 1-1.1:1.0 eth0: hardware isn't capable of remote wakeup
[   23.221889] brcmfmac: power management disabled
[  167.145874] bluetooth: Unknown symbol crypto_ecdh_key_len (err -2)
[  167.146736] bluetooth: Unknown symbol crypto_ecdh_encode_key (err -2)
[  167.199869] bluetooth: Unknown symbol crypto_ecdh_key_len (err -2)
[  167.201342] bluetooth: Unknown symbol crypto_ecdh_encode_key (err -2)
tc@box:~$

I have read tinycore book and all relevant bluetooth posts, learnt a lot about building extensions. Looking forward to helping with progress on piCore11.0 - I am impressed with piCore and think the tinycore concept for RPi has a great future.

    [EDIT]: Fixed link pointing to post by TimJ.  Rich
« Last Edit: December 31, 2019, 09:47:41 AM by Rich »

Offline piCoreUser1

  • Newbie
  • *
  • Posts: 14
Sorry, thanks Rich - new to this board.

I've been checking RPi site https://raw.githubusercontent.com/raspberrypi/firmware/master/extra/System7.map
and it looks like this could be the required kernel module: crypto/ecdh_generic.ko. Does it have to be exact 4.19.81v7 or would a 4.19.88v7 module be worth trying to insert using insmod (if I can locate one)?

Thanks, bob

Offline piCoreUser1

  • Newbie
  • *
  • Posts: 14
OK, looks like the answer is 'no':

Code: [Select]
tc@box:~/build/kernel-modules$ sudo insmod ecdh_generic.ko
insmod: can't insert 'ecdh_generic.ko': invalid module format

This module was copied from my current Raspbian kernel /lib/modules/4.19.75-v7+/kernel/crypto.

Online Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11311
Hi piCoreUser1
Sorry, thanks Rich - new to this board. ...
No problem. The link you posted pointed to a reply page with the TimJ post quoted in the editing box. If you want to include a link
to someone else's post, right click and copy the title directly above that post.

Quote
... Does it have to be exact 4.19.81v7 or would a 4.19.88v7 module be worth trying to insert ...
Modules tend to be kernel specific.

Go here:
http://tinycorelinux.net/11.x/armv7/releases/RPi/src/kernel/
If you download  modules.tar.gz, you'll find  crypto/ecdh_generic.ko  in there.

Offline piCoreUser1

  • Newbie
  • *
  • Posts: 14
Yes, helpful. I thought it would have 'crypt' in the module name, which is why I missed it originally.

Just to help others, I've listed other steps taken:

Code: [Select]
tc@box:~$ sudo modprobe hci_uart
modprobe: can't load module hci_uart (kernel.tclocal/drivers/bluetooth/hci_uart.ko): unknown symbol in module, or unknown parameter
dmesg:
Code: [Select]
[  493.958719] hci_uart: Unknown symbol serdev_device_set_baudrate (err -2)
[  493.958807] hci_uart: Unknown symbol serdev_device_set_flow_control (err -2)
[  493.958839] hci_uart: Unknown symbol serdev_device_open (err -2)
[  493.958925] hci_uart: Unknown symbol serdev_device_write_flush (err -2)
[  493.958980] hci_uart: Unknown symbol __serdev_device_driver_register (err -2)
[  493.959007] hci_uart: Unknown symbol serdev_device_set_tiocm (err -2)
[  493.959026] hci_uart: Unknown symbol serdev_device_write_buf (err -2)
[  493.959062] hci_uart: Unknown symbol serdev_device_close (err -2)
[  494.043687] hci_uart: Unknown symbol serdev_device_set_baudrate (err -2)
[  494.043840] hci_uart: Unknown symbol serdev_device_set_flow_control (err -2)
[  494.043899] hci_uart: Unknown symbol serdev_device_open (err -2)
[  494.044059] hci_uart: Unknown symbol serdev_device_write_flush (err -2)
[  494.044158] hci_uart: Unknown symbol __serdev_device_driver_register (err -2)
[  494.044209] hci_uart: Unknown symbol serdev_device_set_tiocm (err -2)
[  494.044247] hci_uart: Unknown symbol serdev_device_write_buf (err -2)
[  494.044317] hci_uart: Unknown symbol serdev_device_close (err -2)
Similar process to above, looked for 'serdev' in module.tar.gz added drivers/tty/serdev to bluetooth_modules.lst and rebuilt extension.

reboot

Code: [Select]
tc@box:~$ sudo modprobe hci_uart
tc@box:~$ lsmod
Module                  Size  Used by    Not tainted
hci_uart               40960  0
btbcm                  16384  1 hci_uart
bluetooth             397312  2 hci_uart,btbcm
ecdh_generic           28672  1 bluetooth
serdev                 20480  1 hci_uart
i2c_dev                20480  0
brcmfmac              286720  0
brcmutil               20480  1 brcmfmac
cfg80211              626688  1 brcmfmac
rfkill                 32768  3 bluetooth,cfg80211
evdev                  24576  0
squashfs               45056 95
spidev                 20480  0
i2c_bcm2835            16384  0
raspberrypi_hwmon      16384  0
hwmon                  16384  1 raspberrypi_hwmon
spi_bcm2835            20480  0
zram                   28672  1
zsmalloc               28672  1 zram
fixed                  16384  0
uio_pdrv_genirq        16384  0
uio                    20480  1 uio_pdrv_genirq
z3fold                 20480  1
lz4                    16384  4
lz4_compress           45056  1 lz4



Online Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11311
Hi piCoreUser1
If you run:
Code: [Select]
modinfo hci_uartIt will print out information about the module. One of the last lines printed is labeled  depends:.  That line lists the modules that
hci_uart  depends on. It will not load unless all those listed modules are present.

dmesg:
Code: [Select]
[  493.958719] hci_uart: Unknown symbol serdev_device_set_baudrate (err -2)
[  493.958807] hci_uart: Unknown symbol serdev_device_set_flow_control (err -2)
[  493.958839] hci_uart: Unknown symbol serdev_device_open (err -2)
 ---~ SNIP ~---
If you search this file:
http://tinycorelinux.net/11.x/armv7/releases/RPi/src/kernel/Module.symvers
for:
Code: [Select]
serdev_device_set_baudrateyou'll find:
Code: [Select]
0xf624df2f serdev_device_set_baudrate drivers/tty/serdev/serdev EXPORT_SYMBOL_GPLand that tells you which module exports that unknown symbol.

Offline piCoreUser1

  • Newbie
  • *
  • Posts: 14
Sort of what I did but 'modinfo' is useful to know - thanks Rich. hci_uart seems to be working as does dbus.

on to building latest bluez 5.9:

Code: [Select]
checking whether to build static libraries... no
checking for signalfd... yes
checking for clock_gettime in -lrt... yes
checking for pthread_create in -lpthread... yes
checking for dlopen in -ldl... yes
checking for GLIB... no
configure: error: GLib >= 2.28 is required

but

Code: [Select]
tc@box:/mnt/mmcblk0p2/tce/optional$ cat glib2.tcz.info
Title:          glib2.tcz
Description:    Glib C support library
Version:        2.56.1

So I need to investigate what ./configure is searching for.

Offline piCoreUser1

  • Newbie
  • *
  • Posts: 14
OK, I've got the gist from TimJ bluez.build file.

Offline Paul_123

  • Administrator
  • Hero Member
  • *****
  • Posts: 1146
glib2.tcz only includes the libraries.   You need glib2-dev.tcz for the development headers.

BTW, the latest Bluez is 5.52.  Bluez is a little tricky to build effectively for the RPI, it needs to be patched.




Offline piCoreUser1

  • Newbie
  • *
  • Posts: 14
Thanks Paul. Yes, I got 5.50 working using Tim's bluez.build (including patches) on 11.0armv7beta1a using a few 9.0 symlinks. I intend to try getting ffmpeg and eventually omxplayer running. There does not seem to be much posted on the forum regarding this - is it not possible or just rather difficult?

BTW when you say bluez 5.52 is the latest, do you mean the latest that can be built on piCore 11.0 as the latest source available, I think, is bluez 5.9?

...I'm still feeling my way around, as you can probably tell.

bob

Offline piCoreUser1

  • Newbie
  • *
  • Posts: 14
To keep all in one place, further steps outlined here for reference:

Terminal 1
Code: [Select]
tc@box:~$ sudo /usr/local/lib/bluetooth/bluetoothd -nd
bluetoothd[1501]: Bluetooth daemon 5.50
bluetoothd[1501]: src/main.c:parse_config() parsing /usr/local/etc/bluetooth/main.conf
bluetoothd[1501]: src/main.c:parse_config() Key file does not have key “DiscoverableTimeout” in group “General”
bluetoothd[1501]: src/main.c:parse_config() Key file does not have key “PairableTimeout” in group “General”
bluetoothd[1501]: src/main.c:parse_config() Key file does not have key “Privacy” in group “General”
bluetoothd[1501]: src/main.c:parse_config() name=pCP
bluetoothd[1501]: src/main.c:parse_config() Key file does not have key “Class” in group “General”
bluetoothd[1501]: src/main.c:parse_config() Key file does not have key “DeviceID” in group “General”
bluetoothd[1501]: src/main.c:parse_config() Key file does not have key “ReverseServiceDiscovery” in group “General”
bluetoothd[1501]: src/main.c:parse_config() Key file does not have key “MinEncKeySize” in group “GATT”
bluetoothd[1501]: src/adapter.c:adapter_init() sending read version command
bluetoothd[1501]: Starting SDP server
bluetoothd[1501]: src/sdpd-service.c:register_device_id() Adding device id record for 0002:1d6b:0246:0532
bluetoothd[1501]: src/plugin.c:plugin_init() Loading builtin plugins
bluetoothd[1501]: src/plugin.c:add_plugin() Loading hostname plugin
bluetoothd[1501]: src/plugin.c:add_plugin() Loading wiimote plugin
bluetoothd[1501]: src/plugin.c:add_plugin() Loading autopair plugin
bluetoothd[1501]: src/plugin.c:add_plugin() Loading policy plugin
bluetoothd[1501]: src/plugin.c:add_plugin() Loading a2dp plugin
bluetoothd[1501]: src/plugin.c:add_plugin() Loading avrcp plugin
bluetoothd[1501]: src/plugin.c:add_plugin() Loading network plugin
bluetoothd[1501]: src/plugin.c:add_plugin() Loading input plugin
bluetoothd[1501]: src/plugin.c:add_plugin() Loading hog plugin
bluetoothd[1501]: src/plugin.c:add_plugin() Loading gap plugin
bluetoothd[1501]: src/plugin.c:add_plugin() Loading scanparam plugin
bluetoothd[1501]: src/plugin.c:add_plugin() Loading deviceinfo plugin
bluetoothd[1501]: src/plugin.c:add_plugin() Loading battery plugin
bluetoothd[1501]: src/plugin.c:plugin_init() Loading plugins /usr/local/lib/bluetooth/plugins
bluetoothd[1501]: profiles/input/suspend-none.c:suspend_init()
bluetoothd[1501]: profiles/network/manager.c:read_config() /usr/local/etc/bluetooth/network.conf: Key file does not have key “DisableSecurity” in group “General”
bluetoothd[1501]: profiles/network/manager.c:read_config() Config options: Security=true
bluetoothd[1501]: src/main.c:main() Entering main loop
bluetoothd[1501]: src/rfkill.c:rfkill_event() RFKILL event idx 0 type 1 op 0 soft 0 hard 0
bluetoothd[1501]: Bluetooth management interface 1.14 initialized
bluetoothd[1501]: src/adapter.c:read_version_complete() sending read supported commands command
bluetoothd[1501]: src/adapter.c:read_version_complete() sending read index list command
bluetoothd[1501]: src/rfkill.c:rfkill_event() RFKILL event idx 1 type 2 op 0 soft 0 hard 0
bluetoothd[1501]: src/adapter.c:read_commands_complete() Number of commands: 65
bluetoothd[1501]: src/adapter.c:read_commands_complete() Number of events: 35
bluetoothd[1501]: src/adapter.c:read_commands_complete() enabling kernel-side connection control
bluetoothd[1501]: src/adapter.c:read_index_list_complete() Number of controllers: 1
bluetoothd[1501]: src/adapter.c:read_index_list_complete() Found index 0
bluetoothd[1501]: src/adapter.c:index_added() index 0
bluetoothd[1501]: src/adapter.c:btd_adapter_new() System name: pCP
bluetoothd[1501]: src/adapter.c:btd_adapter_new() Major class: 0
bluetoothd[1501]: src/adapter.c:btd_adapter_new() Minor class: 0
bluetoothd[1501]: src/adapter.c:btd_adapter_new() Modalias: usb:v1D6Bp0246d0532
bluetoothd[1501]: src/adapter.c:btd_adapter_new() Discoverable timeout: 180 seconds
bluetoothd[1501]: src/adapter.c:btd_adapter_new() Pairable timeout: 0 seconds
bluetoothd[1501]: src/adapter.c:index_added() sending read info command for index 0
bluetoothd[1501]: src/adapter.c:read_info_complete() index 0 status 0x00
bluetoothd[1501]: src/adapter.c:clear_uuids() sending clear uuids command for index 0
bluetoothd[1501]: src/adapter.c:clear_devices() sending clear devices command for index 0
bluetoothd[1501]: src/adapter.c:set_mode() sending set mode command for index 0
bluetoothd[1501]: src/adapter.c:set_mode() sending set mode command for index 0
bluetoothd[1501]: src/adapter.c:set_mode() sending set mode command for index 0
bluetoothd[1501]: src/adapter.c:set_privacy() sending set privacy command for index 0
bluetoothd[1501]: src/adapter.c:set_privacy() setting privacy mode 0x00 for index 0
bluetoothd[1501]: src/gatt-database.c:btd_gatt_database_new() GATT Manager registered for adapter: /org/bluez/hci0
bluetoothd[1501]: src/advertising.c:btd_adv_manager_new() LE Advertising Manager created for adapter: /org/bluez/hci0
bluetoothd[1501]: profiles/audio/a2dp.c:media_server_probe() path /org/bluez/hci0
bluetoothd[1501]: plugins/hostname.c:hostname_probe()
bluetoothd[1501]: profiles/network/manager.c:panu_server_probe() path /org/bluez/hci0
bluetoothd[1501]: profiles/network/server.c:server_register() Registered interface org.bluez.NetworkServer1 on path /org/bluez/hci0
bluetoothd[1501]: profiles/network/manager.c:gn_server_probe() path /org/bluez/hci0
bluetoothd[1501]: profiles/network/manager.c:nap_server_probe() path /org/bluez/hci0
bluetoothd[1501]: profiles/audio/avrcp.c:avrcp_controller_server_probe() path /org/bluez/hci0
bluetoothd[1501]: src/adapter.c:adapter_service_add() /org/bluez/hci0
bluetoothd[1501]: src/sdpd-service.c:add_record_to_server() Adding record with handle 0x10001
bluetoothd[1501]: src/sdpd-service.c:add_record_to_server() Record pattern UUID 00000017-0000-1000-8000-00805f9
bluetoothd[1501]: src/sdpd-service.c:add_record_to_server() Record pattern UUID 00000100-0000-1000-8000-00805f9
bluetoothd[1501]: src/sdpd-service.c:add_record_to_server() Record pattern UUID 00001002-0000-1000-8000-00805f9
bluetoothd[1501]: src/sdpd-service.c:add_record_to_server() Record pattern UUID 0000110e-0000-1000-8000-00805f9
bluetoothd[1501]: src/sdpd-service.c:add_record_to_server() Record pattern UUID 0000110f-0000-1000-8000-00805f9
bluetoothd[1501]: src/adapter.c:adapter_service_insert() /org/bluez/hci0
bluetoothd[1501]: src/adapter.c:add_uuid() sending add uuid command for index 0
bluetoothd[1501]: profiles/audio/avrcp.c:avrcp_target_server_probe() path /org/bluez/hci0
bluetoothd[1501]: src/adapter.c:adapter_service_add() /org/bluez/hci0
bluetoothd[1501]: src/sdpd-service.c:add_record_to_server() Adding record with handle 0x10002
bluetoothd[1501]: src/sdpd-service.c:add_record_to_server() Record pattern UUID 00000017-0000-1000-8000-00805f9
bluetoothd[1501]: src/sdpd-service.c:add_record_to_server() Record pattern UUID 00000100-0000-1000-8000-00805f9
bluetoothd[1501]: src/sdpd-service.c:add_record_to_server() Record pattern UUID 00001002-0000-1000-8000-00805f9
bluetoothd[1501]: src/sdpd-service.c:add_record_to_server() Record pattern UUID 0000110c-0000-1000-8000-00805f9
bluetoothd[1501]: src/sdpd-service.c:add_record_to_server() Record pattern UUID 0000110e-0000-1000-8000-00805f9
bluetoothd[1501]: src/adapter.c:adapter_service_insert() /org/bluez/hci0
bluetoothd[1501]: src/adapter.c:add_uuid() sending add uuid command for index 0
bluetoothd[1501]: profiles/audio/a2dp.c:a2dp_sink_server_probe() path /org/bluez/hci0
bluetoothd[1501]: profiles/audio/a2dp.c:a2dp_source_server_probe() path /org/bluez/hci0
bluetoothd[1501]: src/adapter.c:btd_adapter_unblock_address() hci0 00:00:00:00:00:00
bluetoothd[1501]: src/adapter.c:load_link_keys() hci0 keys 0 debug_keys 0
bluetoothd[1501]: src/adapter.c:load_ltks() hci0 keys 0
bluetoothd[1501]: src/adapter.c:load_irks() hci0 irks 0
bluetoothd[1501]: src/adapter.c:load_conn_params() hci0 conn params 0
bluetoothd[1501]: src/adapter.c:adapter_service_insert() /org/bluez/hci0
bluetoothd[1501]: src/adapter.c:add_uuid() sending add uuid command for index 0
bluetoothd[1501]: src/adapter.c:set_did() hci0 source 2 vendor 1d6b product 246 version 532
bluetoothd[1501]: src/adapter.c:adapter_register() Adapter /org/bluez/hci0 registered
bluetoothd[1501]: src/adapter.c:set_dev_class() sending set device class command for index 0
bluetoothd[1501]: src/adapter.c:set_name() sending set local name command for index 0
bluetoothd[1501]: src/adapter.c:set_mode() sending set mode command for index 0
bluetoothd[1501]: src/adapter.c:new_settings_callback() Settings: 0x000000c0
bluetoothd[1501]: src/adapter.c:settings_changed() Changed settings: 0x00000040
bluetoothd[1501]: src/adapter.c:new_settings_callback() Settings: 0x000002c0
bluetoothd[1501]: src/adapter.c:settings_changed() Changed settings: 0x00000200
bluetoothd[1501]: src/adapter.c:new_settings_callback() Settings: 0x00000ac0
bluetoothd[1501]: src/adapter.c:settings_changed() Changed settings: 0x00000800
bluetoothd[1501]: src/adapter.c:set_privacy_complete() Successfuly set privacy for index 0
bluetoothd[1501]: src/adapter.c:load_link_keys_complete() link keys loaded for hci0
bluetoothd[1501]: src/adapter.c:load_ltks_complete() LTKs loaded for hci0
bluetoothd[1501]: src/adapter.c:load_irks_complete() IRKs loaded for hci0
bluetoothd[1501]: src/adapter.c:load_conn_params_complete() Connection Parameters loaded for hci0
bluetoothd[1501]: src/adapter.c:local_name_changed_callback() Name: pCP
bluetoothd[1501]: src/adapter.c:local_name_changed_callback() Short name:
bluetoothd[1501]: src/adapter.c:local_name_changed_callback() Current alias: pCP
bluetoothd[1501]: src/adapter.c:new_settings_callback() Settings: 0x00000ad0
bluetoothd[1501]: src/adapter.c:settings_changed() Changed settings: 0x00000010
bluetoothd[1501]: src/agent.c:agent_ref() 0xfe5a70: ref=1
bluetoothd[1501]: src/agent.c:register_agent() agent :1.1
bluetoothd[1501]: src/adapter.c:property_set_mode() sending Set Powered command for index 0
bluetoothd[1501]: src/adapter.c:property_set_mode_complete() Success (0x00)
bluetoothd[1501]: src/adapter.c:new_settings_callback() Settings: 0x00000ad1
bluetoothd[1501]: src/adapter.c:settings_changed() Changed settings: 0x00000001
bluetoothd[1501]: src/adapter.c:adapter_start() adapter /org/bluez/hci0 has been enabled
bluetoothd[1501]: src/adapter.c:trigger_passive_scanning()
bluetoothd[1501]: src/agent.c:agent_disconnect() Agent :1.1 disconnected
bluetoothd[1501]: src/agent.c:agent_destroy() agent :1.1
bluetoothd[1501]: src/agent.c:agent_unref() 0xfe5a70: ref=0

If you get this dbus error or similar:
Code: [Select]
tc@box:~$ sudo /usr/local/lib/bluetooth/bluetoothd -nd
bluetoothd[1490]: Bluetooth daemon 5.50
bluetoothd[1490]: src/main.c:parse_config() parsing /usr/local/etc/bluetooth/main.conf
bluetoothd[1490]: src/main.c:parse_config() Key file does not have key “DiscoverableTimeout” in group “General”
bluetoothd[1490]: src/main.c:parse_config() Key file does not have key “PairableTimeout” in group “General”
bluetoothd[1490]: src/main.c:parse_config() Key file does not have key “Privacy” in group “General”
bluetoothd[1490]: src/main.c:parse_config() name=pCP
bluetoothd[1490]: src/main.c:parse_config() Key file does not have key “Class” in group “General”
bluetoothd[1490]: src/main.c:parse_config() Key file does not have key “DeviceID” in group “General”
bluetoothd[1490]: src/main.c:parse_config() Key file does not have key “ReverseServiceDiscovery” in group “General”
bluetoothd[1490]: src/main.c:parse_config() Key file does not have key “MinEncKeySize” in group “GATT”
D-Bus setup failed: Connection ":1.0" is not allowed to own the service "org.bluez" due to security policies in the configuration file
bluetoothd[1490]: Unable to get on D-Bus

Fix by creating conf file:
Code: [Select]
/etc/dbus-1/system.d/org.bluez.conf
Code: [Select]
<!DOCTYPE busconfig PUBLIC
 "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
  "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
  <busconfig>
  <policy user="root">
      <allow own="org.bluez"/>
  </policy>
</busconfig>

Need to restart dbus:
Code: [Select]
tc@box:~$ sudo /usr/local/etc/init.d/dbus restart
stopped /usr/local/bin/dbus-daemon (pid 1137)
tc@box:~$ sudo /usr/local/etc/init.d/dbus status

dbus is running.

Terminal 2 (thanks to Juanito)
Code: [Select]
tc@box:~$ ./hciattach.sh
bcm43xx_init
Flash firmware /usr/local/lib/firmware/brcm/BCM43430A1.hcd
Set BDADDR UART: b8:27:eb:ba:37:af
Set Controller UART speed to 921600 bit/s
Device setup complete
/usr/local/bin/hciattach /dev/ttyAMA0 bcm43xx 921600 noflow - b8:27:eb:ba:37:af

Code: [Select]
tc@box:~$ cat ./hciattach.sh
sudo modprobe hci_uart
HCIATTACH=/usr/local/bin/hciattach
SERIAL=`grep Serial /proc/cpuinfo | cut -c19-`
B1=`echo $SERIAL | cut -c3-4`
B2=`echo $SERIAL | cut -c5-6`
B3=`echo $SERIAL | cut -c7-8`
BDADDR=`printf b8:27:eb:%02x:%02x:%02x $((0x$B1 ^ 0xaa)) $((0x$B2 ^ 0xaa)) $((0x$B3 ^ 0xaa))`

# Rpi3 Serial port
SERIAL_DEV="/dev/ttyAMA0"

if [ "$(cat /proc/device-tree/aliases/uart0)" = "$(cat /proc/device-tree/aliases/serial1)" ] ; then
  if [ "$(wc -c /proc/device-tree/soc/gpio@7e200000/uart0_pins/brcm\,pins | cut -f 1 -d ' ')" = "16" ] ; then
    $HCIATTACH $SERIAL_DEV bcm43xx 3000000 flow - $BDADDR
    echo "$HCIATTACH $SERIAL_DEV bcm43xx 3000000 flow - $BDADDR"
  else
    $HCIATTACH $SERIAL_DEV bcm43xx 921600 noflow - $BDADDR
    echo "$HCIATTACH $SERIAL_DEV bcm43xx 921600 noflow - $BDADDR"
  fi
else
  $HCIATTACH $SERIAL_DEV bcm43xx 460800 noflow - $BDADDR
  echo "$HCIATTACH $SERIAL_DEV bcm43xx 460800 noflow - $BDADDR"
fi

Run
Code: [Select]
tc@box:~$ bluetoothctl
Agent registered
[bluetooth]# power on
Changing power on succeeded
[CHG] Controller B8:27:EB:BA:37:AF Powered: yes
[bluetooth]# exit

Code: [Select]
tc@box:~$ cat /mnt/mmcblk0p1/cmdline3.txt
zswap.compressor=lz4 zswap.zpool=z3fold dwc_otg.lpm_enable=0 console=tty1 root=/dev/ram0 elevator=deadline rootwait quiet nortc loglevel=3 noembed
Code: [Select]
tc@box:~$ cat /mnt/mmcblk0p1/config.txt
# For more options and information see
# http://www.raspberrypi.org/documentation/configuration/config-txt.md
# Some settings may impact device functionality. See link above for details

[PI0]
initramfs 11.0beta1a.gz followkernel
kernel kernel41981.img
cmdline cmdline.txt

[PI1]
initramfs 11.0beta1a.gz followkernel
kernel kernel41981.img
cmdline cmdline.txt

[PI2]
initramfs 11.0beta1av7.gz followkernel
kernel kernel41981v7.img
cmdline cmdline.txt

[PI3]
initramfs 11.0beta1av7.gz followkernel
kernel kernel41981v7.img
cmdline cmdline3.txt

[PI4]
initramfs 11.0beta1av7l.gz followkernel
kernel kernel41981v7l.img
cmdline cmdline3.txt

[ALL]

# uncomment if you get no picture on HDMI for a default "safe" mode
#hdmi_safe=1

# uncomment this if your display has a black border of unused pixels visible
# and your display can output without overscan
#disable_overscan=1

# uncomment the following to adjust overscan. Use positive numbers if console
# goes off screen, and negative if there is too much border
#overscan_left=16
#overscan_right=16
#overscan_top=16
#overscan_bottom=16

# uncomment to force a console size. By default it will be display's size minus
# overscan.
#framebuffer_width=1280
#framebuffer_height=720

# uncomment if hdmi display is not detected and composite is being output
#hdmi_force_hotplug=1

# uncomment to force a specific HDMI mode (this will force VGA)
#hdmi_group=1
#hdmi_mode=1

# uncomment to force a HDMI mode rather than DVI. This can make audio work in
# DMT (computer monitor) modes
#hdmi_drive=2

# uncomment to increase signal to HDMI, if you have interference, blanking, or
# no display
#config_hdmi_boost=4

# uncomment for composite PAL
#sdtv_mode=2

#uncomment to overclock the arm. 700 MHz is the default.
#arm_freq=800

#----------------------------------------------------
# Enable peripheral buses

dtparam=i2c=on,spi=on,i2s=on

# Enable onboard audio

dtparam=audio=on

# Enable serial console

enable_uart=1

[PI3]
#dtoverlay=pi3-disable-bt
#dtoverlay=pi3-miniuart-bt


Offline Paul_123

  • Administrator
  • Hero Member
  • *****
  • Posts: 1146
Those look like my scripts, that I gave to Tim. ;)  If that is what you used, There are newer patches available.  I'm using the same patch set that Raspbian is using in their package. 

Bluez 5.50 is okay, I've not noticed anything significant with Bluez 5.52.  www.bluez.org.

There is newer firmware available, but that's only needed if you are running a PI4.

Offline piCoreUser1

  • Newbie
  • *
  • Posts: 14
Right... I downloaded the scripts from Tim's website and made the assumption :) Thanks for info.

I'm aiming at Pi3B+ and PiZeroW at present. Any thoughts about building omxplayer, are there any scripts available?

Offline Paul_123

  • Administrator
  • Hero Member
  • *****
  • Posts: 1146
I never got into anything with graphics.

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
There were many tries in the past to get omxplayer running with no success. piCore primarily is targeting headless embedded systems- If you want a video player, omxplayer, etc. choose another distribution.
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."