jeffeb3 / v1pi

Preconfigured PI useful for users of the V1Engineering machines.
GNU General Public License v3.0
99 stars 18 forks source link

Enable Hardware Serial #20

Closed neilferreri closed 4 years ago

neilferreri commented 4 years ago

How would I enable access to the hardware serial? I have a CNC hat from Protoneer, and it uses the RX & TX on the GPIO pins. https://wiki.protoneer.co.nz/Raspberry_Pi_CNC

jeffeb3 commented 4 years ago

The serial port console needs to be turned off, and the serial port needs to be enabled. These can both be done in raspi-config. This article makes it pretty clear: https://www.abelectronics.co.uk/kb/article/1035/raspberry-pi-3-serial-port-usage

But it also warns about the clock skewing. I have no idea if that is a problem or not. I used to use that same shield, but with an older pi.

If you want to use octoprint, you also need to remove /dev/ttyS0 from the blacklist.

jeffeb3 commented 4 years ago

I didn't mean to close this, but I think this answered your question. If not, feel free to keep asking and we will get to the bottom of it.

neilferreri commented 4 years ago

Thanks for the quick response. I've done all of that through the cli. The raspi-config probably makes it easier, though. I'm wondering if I messed up my grbl installation. I'll report back. Thanks again.

neilferreri commented 4 years ago

Just wanted to clear this up. The issue ended up being my CNC hat. I ended up having to reflash a bootloader and then grbl. Once that was working, I used the following commands to enable the serial port (maybe to help the next person):

sudo sh -c "echo 'dtoverlay=pi3-miniuart-bt' >> /boot/config.txt" sudo sh -c "echo 'enable_uart=1' >> /boot/config.txt" sudo systemctl stop serial-getty@ttys0.service sudo systemctl diable serial-getty@ttys0.service

After a reboot, it worked.