Rather than starting a new thread, I'll tack on to the bottom of this one.
I have a RN 171 connected to a 18F2550. I can receive commands via usb and serout them to the RN 171 but I'm not getting a response. I can see data to and from the RN 171 but I cant get it to load in to a variable using serin. I've seen a few examples of this issue on the forum but no one documented how they fixed it.
Code:
serout PORTC.6,2,[text, text1, text2]
serin PORTC.7,6,2000, main1, [wifi]
WRITE 50, wifi.0
write 51, wifi.1
write 52, wifi.2
write 53, wifi.3
write 54, wifi.4
write 55, wifi.5
write 56, wifi.6
write 57, wifi.7
ARRAYWRITE USBTXBuffer, [wifi]
GOSUB WaitToSend
Note that I used mode 2 for serout and mode 6 for serin. If I use mode 2 for serin, it times out and jumps to my "didnt get any data" routine at main1. Currently, using mode 6, wifi is full of 0's and it repeats the loop sending text1, text2, text3 again.
Bookmarks