• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Bluetooth
#8
Well Patrick,

after watching the source code again after 6 month I am pretty sure that I know what the problem comes from.

When raspberry circuitry is powered then of course the main CPU starts operating and is booting from SD card. But what you must know is that there is a second chip responsible for bluetooth called BCM43xx processor. This chip does not have any firmware after a power on.

If now the container is started the first time when netPI is fresh then the containers task is to load the bluetooth firmware into the chip using the command "hciattach /dev/ttyAMA0 bcm43xx 921600 noflow" located in the entrypoint.sh file.

My interpretation is that the hciattach command returns after having loaded the bluetooth firmware and the script continues to run ... and failes because there is no script code waiting for the bluetooth chip to start the firmware.

And later if you start the container a second time then the bluetooth chip is already loaded and needs no firmware and everything works fine.

So the task is now to find a parameter in the hciattach command to wait for chip initialization or to use any other command to make sure the bluetooth chip is ready.

Armin


You never fail until you stop trying.“, Albert Einstein (1879 - 1955)

  Reply


Messages In This Thread
Bluetooth - by Jonas.Sellmann@outlook.de - April-19th-2018, 11:01 AM
Answer - by PBulach - April-19th-2018, 04:17 PM
Answer - by Armin@netPI - April-19th-2018, 05:00 PM
Answer - by PBulach - April-19th-2018, 05:22 PM
Answer - by Armin@netPI - April-19th-2018, 05:40 PM
Answer - by Armin@netPI - April-19th-2018, 05:43 PM
Answer - by PBulach - April-19th-2018, 06:17 PM
Answer - by Armin@netPI - April-19th-2018, 07:02 PM
Answer - by Armin@netPI - April-20th-2018, 06:23 AM
Answer - by PBulach - April-20th-2018, 02:55 PM
Answer - by Jonas.Sellmann@outlook.de - April-23rd-2018, 01:39 PM
Answer - by Jonas.Sellmann@outlook.de - April-25th-2018, 06:44 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Bluetooth testing DSongra 6 3,763 April-29th-2021, 06:08 AM
Last Post: DSongra
  HilscherAutomation / netPI-bluetooth entrypoint.sh error bbaskii 6 4,427 September-14th-2020, 04:42 PM
Last Post: bbaskii
  Bluetooth Access MGharat 10 8,949 February-25th-2020, 12:58 PM
Last Post: DSongra
  [SOLVED] Bluetooth Functions Jonas.Sellmann@outlook.de 4 3,808 September-21st-2018, 11:16 AM
Last Post: Armin@netPI

Forum Jump:


Users browsing this thread: 1 Guest(s)