2

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 Mar 27 at 4:58
  • 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 Mar 27 at 5:10
  • 1
    Ok, 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 Mar 27 at 9:59
  • 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 Mar 27 at 13:34
  • 1
    This one. – Miguel Mar 28 at 0:20
3

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.

| improve this answer | |
  • 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 Mar 27 at 10:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.