oliverbru wrote: ↑Mon Oct 28, 2019 1:43 pm
Hello,
Does anybody know what is the configuration for TTGO TCALL to run pppos_client example ?
Currently I put :
CONFIG_MODEM_TX_PIN=26
CONFIG_MODEM_RX_PIN=27
But I do not find the values for these ones and the example does not work :
CONFIG_MODEM_RTS_PIN=
CONFIG_MODEM_CTS_PIN=
I took info from :
https://github.com/Xinyuan-LilyGO/TTGO- ... pinout.jpg
Regards,
Hi! You should configure as follow:
CONFIG_MODEM_TX_PIN=27
CONFIG_MODEM_RX_PIN=26
CONFIG_MODEM_RTS_PIN= doesn't matter
CONFIG_MODEM_CTS_PIN= doesn't matter
Don't forget that you should turn on the sim800 module before call sim800_init(dte) function.
somothing like this:
#define SIM800_PWKEY 4
#define set_sim800_pwkey() gpio_set_level(SIM800_PWKEY,1)
#define clear_sim800_pwkey() gpio_set_level(SIM800_PWKEY,0)
#define SIM800_RST 5
#define set_sim800_rst() gpio_set_level(SIM800_RST,1)
#define clear_sim800_rst() gpio_set_level(SIM800_RST,0)
#define SIM800_POWER 23
#define set_sim800_pwrsrc() gpio_set_level(SIM800_POWER,1)
#define clear_sim800_pwrsrc() gpio_set_level(SIM800_POWER,0)
void sim800_turnon(void)
{
gpio_config_t io_conf;
io_conf.mode = GPIO_MODE_OUTPUT;
io_conf.pin_bit_mask = (1<<SIM800_PWKEY)+(1<<SIM800_RST)+(1<<SIM800_POWER);
io_conf.pull_down_en = 0;
io_conf.pull_up_en = 0;
gpio_config(& io_conf);
ESP_LOGI(TAG, "Apagando...");
set_sim800_pwkey();
set_sim800_rst();
clear_sim800_pwrsrc();
vTaskDelay(1000/portTICK_PERIOD_MS);
set_sim800_pwrsrc();
ESP_LOGI(TAG, "Iniciando...");
vTaskDelay(1000/portTICK_PERIOD_MS);
clear_sim800_pwkey();
vTaskDelay(1000/portTICK_PERIOD_MS);
set_sim800_pwkey();
set_sim800_rst();
vTaskDelay(1000/portTICK_PERIOD_MS);
clear_sim800_rst();
vTaskDelay(1000/portTICK_PERIOD_MS);
set_sim800_rst();
vTaskDelay(3000/portTICK_PERIOD_MS);
}