Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Garbage on serial #1

Open
toomasz opened this issue Dec 15, 2018 · 2 comments
Open

Garbage on serial #1

toomasz opened this issue Dec 15, 2018 · 2 comments

Comments

@toomasz
Copy link
Owner

toomasz commented Dec 15, 2018

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

@lpbas
Copy link

lpbas commented Jan 31, 2019

Hello, and thank you for this library. Are you still having this issue, or did you solve it by using double ferrite choke on RX line, as you mentioned on the ESP32 Arduino issue?

@toomasz
Copy link
Owner Author

toomasz commented Jan 31, 2019

@L4grange Not having problem anymore, I'm using double ferrite choke on Sim800 TX -> ESP32 RX.
I also have level converter but it's probably not needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants