Skip to content

Garbage on serial #1

@toomasz

Description

@toomasz

This issue is not specific to this library but hopefully somebody here can help me.

My setup is:
GSM tx <-> ESP32 16 pin
GSM rx <-> ESP32 17 pin

Serial2.begin(baudRate, SERIAL_8N1, 16, 17, false);

GSM is powered from Li-Ion battery so it should have sufficient power, it's stable. Only serial connection is unstable.
I tried many different baud rates.

The problem is garbage characters received on serial when GSM module is performing any activity that involves GSM communication packets. So im getting those when: receiving call, making call, regisering to network, establishing tcp connecting etc.

Normally i can send/received AT commands just find:

[GSM] => AT
[GSM]  <= OK
[GSM] --- 
[GSM] => AT+CSQ
[GSM]  <= +CSQ: 11,0
[GSM]  <= OK
[GSM] --- 
[GSM] => AT+CBC
[GSM]  <= +CBC: 0,92,4141
[GSM]  <= OK
[GSM] --- 
[GSM] => AT+CPIN?
[GSM]  <= +CPIN: READY
[GSM]  <= OK
[GSM] --- 
[GSM] => AT+CREG?
[GSM]  <= +CREG: 0,5
[GSM]  <= OK
[GSM] --- 
battery: 92%, voltage = 4.14 V
Signal quality: 11, operator = 

Hovever dirty garbage starts to show up as soon as I call GSM modem:

[GSM] => AT+CSQ
[GSM]  <= +CSQ: 11,0
[GSM]  <= OK
[GSM] --- 
[GSM] => AT+CBC
[GSM]  <= +CBC: 0,91,4132
[GSM]  <= OK
[GSM] --- 
[GSM] => AT+CPIN?
[GSM]  <= +CPIN: READY
[GSM]  <= OK
[GSM]  <= ����������������n��������W�����������������o{_��o���������s���o����������V��߿{����������������~������w��������������������߿w�o���������o��������~~����7�
[GSM]  <= RING
[GSM]  <= +CLIP: "+48XXXXXXXXX",145,"",0,"",0
[GSM] --- 
[GSM] => AT+CREG?
[GSM]  <= +CREG: 0,5
[GSM]  <= OK
[GSM] --- 
battery: 91%, voltage = 4.13 V
Signal quality: 11, operator = 
[GSM] => AT
[GSM]  <= }�����������?���������������}�������������~��������������_������������������������-���v��l��{��w?���׾���������;�����w������O_���=���������w���j��u����?������
[GSM]  <= OK
[GSM] --- 

My guesses are:

  1. Interference but how to avoid that? RXD/TXD are quite close to antenna on sim900l board.
  2. Something specific to ESP32. Maybe need pullup/pulldown for RX pin on esp32? I already tried gpio_pullup_en gpio_pulldown_en. didn't help?

Any ideas? Help appreciated!

Issue on ESP32-Arduino: espressif/arduino-esp32#2198

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions