Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Sample code for SIM800L and schematics
#3
Okay, thank you for the response. I have tried changing the "HardwareSerial.cpp" to RX2 13 and TX2 34 like you suggested. I couldn't get a communication going with your debug code. Also I looked at your pinout definition in LINK_ KC838-A2_pinout and it showed the following:

Quote:Relay1:15
Relay2:2

DS18B20/DHT11/DHT21/LED strip -1: 33
DS18B20/DHT11/DHT21/LED strip -2: 14

Ethernet (LAN8720) I/O define:

#define ETH_ADDR        0
#define ETH_POWER_PIN  -1
#define ETH_MDC_PIN    23
#define ETH_MDIO_PIN  18
#define ETH_TYPE      ETH_PHY_LAN8720
#define ETH_CLK_MODE  ETH_CLOCK_GPIO17_OUT

RS485:
RXD:35
TXD:32

GSM:
RXD:34
TXD:13


DI1:36
DI2:39

IIC BUS:
SDA:4
SCL:16

Looking at the schematics LINK_KC868_A2_schematic the GSM_RX is connected to I34 and the GSM_TX is connected to IO13. I think here lies the problem: I34 is an input only, and the GSM_RX is an input as well.
What I did to make the communication work:

In "HardwareSerial.cpp" : RX2 34 and TX2 13

I had to rewire the gsm module physically. In Header 5 (P4) I switched GSM_RX and GSM_TX


Code:
AT
OK
ATI
SIM800 R14.18

OK

Then it worked. With your configuration it did not work for me. I think it is because pin 34 can't work as a TX pin, as it is an input pin only.

That took a while... Tell me what you think Smile
Reply


Messages In This Thread
RE: Sample code for SIM800L and schematics - by ebelingtec - 05-11-2023, 07:05 PM

Forum Jump:


Users browsing this thread:
1 Guest(s)