Using the GPIO pins instead of USB to TTL converter for Nextion screen rpi3


John K1IF
 
Edited

When using a usb stick to help encoding DSTAR audio the usb gets confused sometimes when the ttl converter is also used. I also wanted to get rid of external wires sticking out from ttl converter to usb. 
here is the process I used to make it work. 

ADD THE FOLLOWING LINE IN MMDVM_Bridge.ini in the [General] stanza as shown:
Display=Nextion
 
[General]
Callsign=K1IF
Id=310012810
Timeout=180
Duplex=0
Display=Nextion
 
 
Create this stanza at end of MMDVM_Bridge.ini file
[Nextion]
Port=/dev/ttyAMA0
Brightness=50
DisplayClock=1
UTC=0
#Screen Layout: 0=G4KLX 2=ON7LDS
ScreenLayout=3
IdleBrightness=20
 
Add the following line to bottom of /boot/config.txt using nano:
$ sudo nano /boot/config.txt
enable_uart=1
 
Reboot for the changes to take effect
 
note: remove the space after each @ in the following 4 
$ sudo systemctl stop serial-getty@ ttyAMA0.service
$ sudo systemctl disable serial-getty@ ttyAMA0.service 
$ sudo systemctl stop serial-getty@ ttyS0.service  
$ sudo systemctl disable serial-getty@ ttyS0.service

 
You also need to remove the console from the cmdline.txt. If you edit this with:
$ sudo nano /boot/cmdline.txt
you will see something like:
dwc_otg.lpm_enable=0 console=serial0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline fsck.repair=yes root wait
remove the line: console=serial0,115200 and save and reboot for changes to take effect.
 
Swapping the Serial Ports on Raspberry Pi 3 / 4
What if you don’t want to use the Bluetooth and you want that high performance /dev/ttyAMA0 back on the GPIO? Well you can do this and the way you do this is via a device overlay called “pi3-miniuart-bt” i.e. use the mini-uart (/dev/ttyS0) for Bluetooth (you may get some loss of performance on your Bluetooth though).
 
To use add the following line to the /boot/config.txt
$ sudo nano /boot/config.txt
and add:
 
dtoverlay=pi3-miniuart-bt
 
You can also just disable the Bluetooth all together by using another overlay “pi3-disable-bt”. 
dtoverlay=pi3-disable-bt
 
 
Save and reboot for changes to take effect.
 
there is also a great article that i followed and wrote these instructions from: 
https://spellfoundry.com/2016/05/29/configuring-gpio-serial-port-raspbian-jessie-including-pi-3-4/ 

I just setup the new dvswitch server software and it was so easy!!! 

Join Server@DVSwitch.groups.io to automatically receive all group messages.