I have used both the RAK Serial port software which sends commands fine as well as another com port program which sends commands ok as well because at the end its sending a LF and CR but I get nothing from Arduino or Micropython?
PS. just commented out the delay, wanted to try to keep sending it and then will just do a random generator thing to TTN so I can use this for testing.
Not sure what I am doing wrong, I also supplied a external power supply with common ground on the board and the power supply but still nothing?
Depends on where you have wired the serial port monitor - if it’s between the ESP32 and RAK4200, I’d say yes, depending on which way round you have the Tx/Rx leads - are you looking at the RAK4200 or the ESP32 - because you can’t have it both ways.
Generally I put the RAK module on to a software serial port so I have full access to the main serial port for debug and then I can put in code that shows what I’ve sent to a module and what response I got back.
Also, it may be that the ESP32 board can’t supply enough power to the module.
Yes I realised I am making a mistake, so now I am trying Port 2 on the RAK4200 and Port 2 on the ESP32 as port 1 is used for the REPL and gives and error. I have a DEVKIT V1 ESP board and have tested the com port with another USB->Serial port and it seems to be sending the string fine.
So this is the code I am trying:
from machine import UART
uart=UART(2,115200)
uart.init(115200,bits=8,parity=None,stop=1,rx=16,tx=17)
uart.write(‘at+version’ + ‘\r\n’)
print(uart.read())
What it returns is None meaning nothing is coming back from the RAK4200? Any ideas why?
What about Arduino do you guys have any sample code so I can reverse engineer it to check as I tried sending strings between the pc and the ESP32 and it arrived there ok?