I recently bought two “WiFi Serial Tranceiver Moudules” model 68Y0156. I have been trying to get one to work with a simple Arduino program that does nothing but send the module an AT command to it, and read the message returned from the module. According to the manual, if I send “AT” I should receive “OK” in return. But I actually get -1.
I used the diagram from here https://wiki.seeedstudio.com/WiFi_Serial_Transceiver_Module/ which shows how to connect the module to an Arduino. I’ve checked my wiring a dozen times, so I’m pretty sure it’s right. I’m using a Mega2560, and have connected the module to tx1/rx1 of the Mega so I am using hardware serial rather than the software serial option shown in the example on that page, but I think that should make no difference. Just in case it does I tried softserial as well, but got the same result.
I found another post that recommended using Serial.write (rather than Serial.println) but I couldn’t get it to work with a variable name, i.e.
Serial.write(mystring); failed to compile, but
Serial.write("AT+RST"); compiled okay, but still gave me the -1 return code.
What does return code -1 mean? What do I need to do to get this module to work?
All advice gratefully received.