problems with pcb 1.3 sunray

Skjalg

New member
Hi.

I am building a ardumower with rtk-gps and the sunray firmware. Unfortunately I cant get the app to work. I have replaced the esp8266 and the bluetooth module with the esp32 but at startup I get a message in the log saying that no ble device is found. I can connect my phone through the app and can se in the log that it is sending a msg every time I press a button in the app but the next lines says "
0: 21: 13.630 -> BLE: AT + C, -1.0, -1, -1, -1, -1, -1, -1.0x25
20: 21: 13.630 -> decrypt: {/ e} fgkfjfgkfgkfgkfgkfgkfgkfjSlo
20: 21: 13.630 -> CRC ERROR "
How can I resolve this?

Regards
Skjalg
 
Hello, it seems the App is not encrypting (and so the decrypting fails).
1. Verify the connection password in the App ('...->Connect->Password') and in the Sunray firmware config.h file (#define PASS 123456...) is the same (default is '123456') and that encrypted connections are enabled (#define ENABLE_PASS 1)
2. Verify the mower is already running before the App is connecting (so the mower properly tells the App that it uses encrypted connections).

Please let us know if that doesn't help. :)
 
Zuletzt bearbeitet:
Thanks for your quick reply. Ihad actually changed the password in the config.h but have now found the original config.h and sent it to the arduino due. this is what I get in the log now: While connecting "
21: 19: 11.501 -> BLE: AT + V, 0x16
21: 19: 11.501 -> sending encryptMode = 1 encryptChallenge = 185"
While pressing a button in the app I get this:
"
21: 19: 15.289 -> BLE: AT + C, -1.0, -1, -1, -1, -1, -1, -1.0x25
21: 19: 15.289 -> decrypt: cvMeNOSNRNOSNOSNOSNOSNOSNOSNR; TW "

Does any of this make any sense?

regards
skjalg
 
In the App log (button '=' at the main screen), there should be something like below after connecting:
encryptMode=1 encryptChallenge=185
This means the App understood that it should send commands encrypted.
 
Zuletzt bearbeitet:
If you still have issues, try to turn off encrypted communication by commenting this line in the config.h like so:
Code:
// #define ENABLE_PASS   1        // comment out to disable password authentication
The robot firmware will then accept unencrypted commands.
Please let us know if that doesn't help :)
 
That did help a bit. I can now see in the due serial monitor that when I click start it tries to start but still nothing gets updated in the app and I cant use the app to steer the robot. looks like it is one way communication at the moment. in the app log it says request at+c, -1,0,-1,-1-,1,1,1,1 and then the next line says resending but it looks like it wont get any answer. will continue tomorrow. thank again for at the help so far.
 
I can now start the mower with the app after I followed your advice on disable encryption but I can't receive any data to the app so it looks like it is only sending a command but not able to receive. Could that be that the there is a problem with my wiring so that the esp32 only can send data but not receive. If that is the case, how will I proceed to find the cause. I gave tried to measure the resistance from the tx/rx pin on the esp32 to the due but couldn't find any connection there so if you have any suggestion on how to verify the rx/tx path I'll be very happy.
 
Do you use the ESP32 as shown below from Marotronics? Or another ESP (which type exactly?) It would be helpful if you could make a photo of your wiring.

1632064777271.png
 
I used the one from marotronics but something happened to it so I couldn't flash it anymore so bought another one from a local supplier but that was an nodemcu ESP 32s dev board. I have wired it like the picture you sent and conected tx2(yellow) to pin p17 on the esp32 and rx2(black) to p16. With this wiring I am able to send commands but not receive it seems like.
 
Could you post a photo of the ESP board? That would help a lot .... (there are plenty of variants on the market)
 
hello. I still cant get this to work unfortunately. I can send messages with pin 17 connected but doesnt matter if I have pin 16 connected or not. I can not steer the mower or get any data for the mower to the app. I have now tried to change the dev board with an new esp32 wroom 32u but no change. I have measured the cables from the esp32 to the arduino due and there is a connection there. I have tried to resolder the board but nothing helps. Now I am wondering if I can change from using serial 2 to use the wifi wiring insted and try serial 1 instead. Will that be possible?

if this is not posible I thought of connecting a rpi and use the control center but I saw on github that last change to the control center was a few years back. Does the control center still work or is it replace by the app.

Kind regards
Skjalg
 
finally got it to work. :) I soldered the tx (tx2) on the arduino directly to the esp32 pin 16 (rx) and it worked. I could then control the robot with my phone and got all the info in the app. Now I can continue on building the rest of the robot. THanks for all the help I got so far. I might have to ask you guys again. :)
 
Oben