I'm using the Nordic Thingy:91 and my goal is to send AT commands via UART from ESP32 with Micropython to the thingy:91, in order to send data to PHP file located on a server.
I have the Thingy:91 programed with basic thingy91_fw_2023-03-02_8f26142b\img_fota_dfu_hex\thingy91_serial_lte_modem_2023-03-02_8f26142b.hex and using the SLM AT commands.
I send the AT commands via UART but I dont recieve response, and it doesn't work.
My setup is the following:
import machine, time
import thingy
uart=machine.UART(2,115200)
at=thingy.THINGY_91(uart)
at.config_Internet()
URL_TO_PHP="my php address"
data="55"
at.send_data_server(URL_TO_PHP,DATA)
from machine import UART import time class THINGY_91(): def __init__(self,uart): self.UART = uart print("INICIALIZADO") def send_command(self,command): time.sleep_ms(1) self.UART.write(str(command)) time.sleep(1) print(self.UART.read()) def config_Internet(self): self.send_command("AT+CFUN=1") time.sleep(1) self.send_command("AT+CFUN?") time.sleep(1) self.send_command("AT+COPS=?") time.sleep(300) def send_data_server(self,url,data): datos='AT#XHTTPCREQ="GET",'+str(url)+str(data) time.sleep_ms(1) self.send_command('AT#XHTTPCCON=1,SERVER_IP_ADDRESS,80"') time.sleep(1) self.send_command(str(datos)) time.sleep(30)