Closed RJakub closed 6 years ago
I could solve the problem. I didn't use the hardware serial port (D0, D1) but a sercom uart port (e.g. D10, D12). To configure the sercom port for uart, I used the following code:
#define PIN_SERIAL2_RX (34ul) // Pin description number for PIO_SERCOM on D12
#define PIN_SERIAL2_TX (36ul) // Pin description number for PIO_SERCOM on D10
#define PAD_SERIAL2_TX (UART_TX_PAD_2) // SERCOM pad 2
#define PAD_SERIAL2_RX (SERCOM_RX_PAD_3) // SERCOM pad 3
Uart Serial2(&sercom1, PIN_SERIAL2_RX, PIN_SERIAL2_TX, PAD_SERIAL2_RX, PAD_SERIAL2_TX);
I do not know why the hardware port is not working correctly, but with a sercom port everything is working perfectly.
Thanks for the report!
I am having the same problem using a different board. I use the Moteino M0 form LowPowerLabs. It is based on the Zero I think. Unfortunately the code above does nor work for me, or maybe I'm not using the correct pins? Not sure how the pin mapping differs from the Zero. Also not sure what the (34ul) mean. I hope someone can give me some idea on how to get sercom working on my board.
Hi
I am using a Feather M0 Basic Board (SAMD21) with the sim808 module. Sim808 is connected via UART with the Serial1 port of the Feather Board.
Problem: I get no data or bad data when I try to use the WebClient sketch from the examples.
I tried the same sketch with an Arduino Mega (ATMega 2560) without any problems. I also tried different versions of the TinyGSM library. But it didn't help. Currently using the latest one.
Code:
Serial monitor output:
Output when "TINY_GSM_DEBUG Serial" is uncommented in TinyGSMClientSIM800.h