Rpi 3, Build Kodi 16.1-RC3
I have a bespoke hardware controller that uses tty0, however on this build tty0 has been assigned
to bluetooth serial (as best I can figure).
Hence my controller will not work with this software build as I do not have access to tty0.
I am looking for a workaround in the short term. Does anyone have an idea on where this tty0 bluetooth serial service can be disabled? In the longer term, could the use of tty0 be configurable?
Hope someone can help.
tty0 is not a serial port - it is the local console.
If you mean ttyS0 - that should be allocated to the UART on the GPIO header, not bluetooth. What leads you to think it is being used by bluetooth ?
Some logs showing this would be helpful.
Add dtoverlay=pi3-disable-bt to /boot/config.txt. You need to be on the latest OSMC version for this to work.
sudo systemctl disable brcm43xx.service
Thanks for the reply.
The only info I have is this:
ps -ef | grep tty
root 413 1 0 14:52 00:00:00 /usr/bin/hciattach /dev/ttyAMA0 bcm43xx 921600 noflow -
root 592 566 0 15:07 00:00:00 grep tty
Hope this of use.
Did you try my solution above?
You need to reboot after making the changes
Your suggestion worked, the service is no longer showing in the process list.
Will give my controller another test to see if I can get it working.
Thanks for your suggestion.
Have been looking for some instructions on how to re-enable the use of ttyAMA0 as a serial port after disabling the Bluetooth service as outlined in previous post. The closest instructions that seem to make sense I have found at:
This gives a quite detailed list of instructions to resolve the problem. However, on OSMC, I have not been able to find the hciuart.service. Is this service missing or just hiding somewhere. Any help on this would be appreciated.
If all else fails, I might have to go down the route of creating a software serial tx/rx on different gpio pins.
it is called bcm43xx.service in OSMC and you already disabled it earlier
Did you also set the dtoverlay as recommened above? This works for me.
I have disabled the bcm43xx.service and added the dtoverlay=pi3-disable-bt to /boot/config.txt. I understand that is the procedure to remove the bluetooth service that was on ttyAMA0.
My config.txt looks like this:
#NOOBS Auto-generated Settings:^M
It appears that non of the above changes have made any difference.
So far no changes made to cmdline.txt in /boot.
The serial connection is being made within a python file and is:
serialPort = Serial("/dev/ttyAMA0", 9600, timeout=1)
This serial connection does open without any error being raised, but no data is received when the following commands happen in the python file:
inbuff = serialPort.inWaiting()
if inbuff > 0:
inStr = serialPort.read(inbuff)
Now this code works perfectly under OSMC running on a RPi2 B. So far no luck on the RPi3 with the latest release.
Just to follow up,
Found a library called pigpio (search google) which provides serial access over any GPIO. I had to modify my hardware away from the RX/TX pins of the Rpi and use different gpio’s. The library works very well so far. Hope this might help anyone else stuck with this issue.