I have a Raspberry Pi 4 with Buster and on top of it a 4G HAT.
This HAT allows communicating via RX and TX pins.
I want to communicate with this HAT via RX and TX pins but with an Arduino Nano. It works when Arduino and the 4G HAT are connected without the Raspi4.
The problem is that when I connect everything (Raspi4, 4G HAT on top of it and Arduino), the communication between Arduino and the 4G HAT is lost because both (from Raspi and Arduino) serial ports “collide”.
How do I permanently deactivate RX and TX serial communication from Raspberry? I tried to disable Serial with raspi-config
but it does not work (e.g. GPIO15 is still high)
-
(1) A quick and dirty work around is using a HAT pin adapter and cut/divert/rewire the TxD and RxD pins away from Rpi and instead to Arudino: raspberrypi.stackexchange.com/questions/104705/…. (2) If you collide/short/crash/connect 4G HAT’s 3V3 TxD and RxD pins to Arduino’s 5V TxD and RxD pins, your Rpi TxD and RxD pins might latch up sooner or later melt down or blow up. – tlfong01 23 hours ago
-
And if you are using the SixFab 4G HAT, you can choose the “no header” option and DIY your own customized stackable 40 pin header. I am using the WaveShare SIM7600 4G HAT without the “no header” option and need to use other workarounds. – tlfong01 23 hours ago
-
1Ok, thanks. Yes, it’s the SixFab. I think I’ll cut. It’s the simplest solution. I also have WaveShare SIM7600. The problem with it is that I want to use the sleep function. When I send the AT command to sleep (AT+QSCLK=1) SIM7600 does sleep (right after the command). But when I poweroff Raspi4, it leaves sleep state… – Miguel 18 hours ago
-
I don’t know “AT+QSCLK=1”. Which AT command manual are you using? Mine is “SIM7500_SIM7600 Series_AT Command Manual _V1.07” – tlfong01 14 hours ago
-
1This one. – Miguel 4 hours ago
-
Thank you very much. So it is this manual: “QuecTel EC25/EC21 LET Module AT Commands Manual V1.2 2017nov14 – SixFab”: sixfab.com/wp-content/uploads/2018/09/…. Let me see check out why “AT+QSCLK+1” does not work. Cheers. – tlfong01 3 mins ago Edit
The 4G HAT presumably uses the serial port for a reason.
Serial is point to point protocol, so only 2 devices can be used.
If you want to use Arduino don’t use the Pi or vice versa.
Your question is somewhat unclear, but the Pi4 has 4 additional UART which can be used. See https://raspberrypi.stackexchange.com/a/107780/8697
It is simple to disable the Pi serial – Pins 14/15 will then be configured as inputs, so should have no impact.
NOTE most Arduino have 5V I/O so need level converters to connect to the Pi.
-
The 4G HAT I’m using (SixFab) does not use TX and RX pins to communicate with the Raspberry. And I want to use these pints to communicate with the 4G HAT using and Arduino. – Miguel 18 hours ago
Your Answer
Categories: Uncategorized