Unable to communicate with esp32 module

Hello

Can Someone explain me, what I need to do, to get the ESP32 working? I don't understand what is meant by "sending a dummy message."
This is my log-File so far. Everything works fine, except the communication between the esp32 and the ardumower:
RESET cause: power-on
Ardumower Sunray,1.0.187
compiled for: Adafruit Grand Central M4
MOTOR_DRIVER_BRUSHLESS: yes
enableCharging 0
trying to detect Bluetooth 4.0/BLE module (make sure your phone is NOT connected)9600...
BLE: AT
trying to detect Bluetooth 4.0/BLE module (make sure your phone is NOT connected)115200...
BLE: AT
error: no BLE module found!
SERIAL_BUFFER_SIZE=1024 (increase if you experience GPS checksum errors)
-----------------------------------------------------
UBLOX::begin
trying to connect to ublox f9p...
NOTE: if GPS is not responding either set 'GPS_CONFIG=false' in config.h or perform GPS wire fix (see Wiki)
trying baud 115200
ERROR: GPS receiver is not responding
trying baud 38400
GPS receiver found!
ublox f9p: sending GPS rover configuration...
idx=0...OK
idx=1...OK
idx=2...OK
config sent successfully
sizeof Point=4
map load... no map file!
map dump - mapCRC=0
points:
perimeter pts: 0
exclusion pts: 0
exclusions: 0
dock pts: 0
mow pts: 0
free pts: 0
mowPointsIdx=0 dockPointsIdx=0 freePointsIdx=0 wayMode=3
WIFI (ESP8266) not found! If the problem persist, you may need to flash your ESP to firmware 2.2.1
MPU ID=0x68
MPU6050/9150 found
resuming is activated
state load... ok
dumpState: X=0.00 Y=0.00 delta=0.00 mapCRC=0 mowPointsIdx=0 dockPointsIdx=0 freePointsIdx=0 wayMode=3 op=0 sensor=0 sonar.enabled=1 fixTimeout=0 absolutePosSource=0 lon=0.00 lat=0.00
temp=998.0 humidity=998 CPU: PTAT=838 CTAT=874 deg=35.69 voltages: I/O=3.34 Core=1.22 VBAT=1.66
0:0:12 ctlDur=0.00 op=0 freem=241291 sp=1 volt=23.19 chg=0.00 tg=0.00,0.00 x=0.00 y=0.00 delta=0.00 tow=331992000 lon=0.00000000 lat=0.00000000 h=0.0 n=0.00 e=0.00 d=0.00 sol=0 age=12.37
ublox chka error, msgclass=1, msgid=3C, msglen=40: 0!=B8
IMU gyro calibration (robot must be static)... 1
IMU gyro calibration (robot must be static)... 2
IMU gyro calibration (robot must be static)... 3
IMU gyro calibration (robot must be static)... 4
0:0:17 ctlDur=0.02 op=0 freem=241291 sp=1 volt=23.19 chg=0.00 tg=0.00,0.00 x=0.00 y=0.00 delta=0.00 tow=331997000 lon=0.00000000 lat=0.00000000 h=0.0 n=0.00 e=0.00 d=0.00 sol=0 age=0.13
IMU gyro calibration (robot must be static)... 5
IMU gyro calibration (robot must be static)... 6
IMU gyro calibration (robot must be static)... 7
IMU gyro calibration (robot must be static)... 8
IMU gyro calibration (robot must be static)... 9

0:0:22 ctlDur=0.02 op=0 freem=241291 sp=20001464 volt=23.20 chg=0.00 tg=0.00,0.00 x=0.00 y=0.00 delta=0.76 tow=332002000 lon=0.00000000 lat=0.00000000 h=0.0 n=0.00 e=0.00 d=0.00 sol=0 age=5.14
0:0:27 ctlDur=0.02 op=0 freem=241291 sp=20001464 volt=23.20 chg=0.00 tg=0.00,0.00 x=0.00 y=0.00 delta=1.15 tow=332007000 lon=0.00000000 lat=0.00000000 h=0.0 n=0.00 e=0.00 d=0.00 sol=0 age=10.14

But sometime I get this message:
RESET cause: power-on
Ardumower Sunray,1.0.187
compiled for: Adafruit Grand Central M4
MOTOR_DRIVER_BRUSHLESS: yes
enableCharging 0
trying to detect Bluetooth 4.0/BLE module (make sure your phone is NOT connected)9600...
BLE: AT
trying to detect Bluetooth 4.0/BLE module (make sure your phone is NOT connected)115200...
BLE: AT
OK
Bluetooth 4.0/BLE module found!
BLE: AT+VERSION
+VERSION=ESP32 firmware V0.2.4,Bluetooth V4.0 LE
BLE: AT+NAMEArdumower
+NAME=Ardumower
BLE: AT+RESET
+RESET

I thought about a cold solder joint or a defect ESP32. But I purchased a second ESP32 and can not find any cold solder joint.
 
Zuletzt bearbeitet:
Hello Jochen.

The ESP is working perfectly fine. For some reason, the M4 (or Due?) is sending rubbish when beginning the UART communication. The ESP expects an "AT" to answer with "OK". But it receives something like "⸮ ⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮Ң⸮m⸮AT" which is not recognised as "AT"

The workaround is to "get the pipe free". You need to edit ble.cpp of the sunray sketch. At about line 76 you will find:
Code:
String res = exec("AT\r\n", false);
Split it in two lines:

Code:
      String res = exec("Something\r\n", false); //kk: get the pipe free
      res = exec("AT\r\n", false);

After sending "Something" the "AT" command will be sent without any rubbish in the beginning.

Best regards,
Juergen
 
Thank you for the explanation. I will try it.

Addendum:
Now I have an active communication between the mower and the ESP32. Thank you very much for this explanation:
RESET cause: power-on
Ardumower Sunray,1.0.187
compiled for: Adafruit Grand Central M4
MOTOR_DRIVER_BRUSHLESS: yes
enableCharging 0
trying to detect Bluetooth 4.0/BLE module (make sure your phone is NOT connected)9600...
BLE: Something
BLE: AT
trying to detect Bluetooth 4.0/BLE module (make sure your phone is NOT connected)115200...
BLE: Something
BLE: AT
OK
Bluetooth 4.0/BLE module found!
BLE: AT+VERSION
+VERSION=ESP32 firmware V0.2.4,Bluetooth V4.0 LE
BLE: AT+NAMEArdumower
+NAME=Ardumower
BLE: AT+RESET
+RESET
SERIAL_BUFFER_SIZE=1024 (increase if you experience GPS checksum errors)
-----------------------------------------------------
UBLOX::begin
trying to connect to ublox f9p...
NOTE: if GPS is not responding either set 'GPS_CONFIG=false' in config.h or perform GPS wire fix (see Wiki)
trying baud 115200
ERROR: GPS receiver is not responding
trying baud 38400
GPS receiver found!
ublox f9p: sending GPS rover configuration...
idx=0...OK
idx=1...OK
idx=2...OK
config sent successfully
sizeof Point=4
map load... no map file!
map dump - mapCRC=0
points:
perimeter pts: 0
exclusion pts: 0
exclusions: 0
dock pts: 0
mow pts: 0
free pts: 0
mowPointsIdx=0 dockPointsIdx=0 freePointsIdx=0 wayMode=3
WIFI (ESP8266) not found! If the problem persist, you may need to flash your ESP to firmware 2.2.1
MPU ID=0x68
MPU6050/9150 found
resuming is activated
state load... ok
dumpState: X=0.00 Y=0.00 delta=0.00 mapCRC=0 mowPointsIdx=0 dockPointsIdx=0 freePointsIdx=0 wayMode=3 op=0 sensor=0 sonar.enabled=1 fixTimeout=0 absolutePosSource=0 lon=0.00 lat=0.00
temp=24.5 humidity=69 CPU: PTAT=834 CTAT=878 deg=34.02 voltages: I/O=3.34 Core=1.22 VBAT=1.65
0:0:17 ctlDur=0.00 op=0 freem=240555 sp=1 volt=23.14 chg=0.00 tg=0.00,0.00 x=0.00 y=0.00 delta=0.00 tow=417271200 lon=0.00000000 lat=0.00000000 h=0.0 n=0.00 e=0.00 d=0.00 sol=0 age=0.03
ublox chka error, msgclass=1, msgid=3C, msglen=40: 12!=50
IMU gyro calibration (robot must be static)... 1
IMU gyro calibration (robot must be static)... 2
IMU gyro calibration (robot must be static)... 3
IMU gyro calibration (robot must be static)... 4
0:0:22 ctlDur=0.02 op=0 freem=240555 sp=20001464 volt=23.13 chg=0.00 tg=0.00,0.00 x=0.00 y=0.00 delta=0.00 tow=417276400 lon=0.00000000 lat=0.00000000 h=0.0 n=0.00 e=0.00 d=0.00 sol=0 age=5.03
IMU gyro calibration (robot must be static)... 5
IMU gyro calibration (robot must be static)... 6
IMU gyro calibration (robot must be static)... 7
IMU gyro calibration (robot must be static)... 8
IMU gyro calibration (robot must be static)... 9

0:0:27 ctlDur=0.02 op=0 freem=240555 sp=20001464 volt=23.14 chg=0.00 tg=0.00,0.00 x=0.00 y=0.00 delta=0.77 tow=417281400 lon=0.00000000 lat=0.00000000 h=0.0 n=0.00 e=0.00 d=0.00 sol=0 age=10.03
0:0:32 ctlDur=0.02 op=0 freem=240555 sp=20001464 volt=23.13 chg=0.00 tg=0.00,0.00 x=0.00 y=0.00 delta=1.15 tow=417286400 lon=0.00000000 lat=0.00000000 h=0.0 n=0.00 e=0.00 d=0.00 sol=0 age=15.03
0:0:37 ctlDur=0.02 op=0 freem=240555 sp=20001464 volt=23.13 chg=0.00 tg=0.00,0.00 x=0.00 y=0.00 delta=1.19 tow=417291400 lon=-17.25854159 lat=49.38925282 h=12280.4 n=0.00 e=0.00 d=0.00 sol=0 age=20.03

Unfortunatly I cannot connect my phone with the ardumower. When I try it, my phone says: "Communication with Ardumower not possible". See picture in the appendix. But neither the log File of the Ardumower, nor the output of the ESP32 gives me any hint, what went wrong. The ESP32 gives me only a ping output:
36722 ping
38723 ping
40724 ping
42725 ping
44726 ping
46727 ping
48728 ping
50729 ping
52730 ping
54731 ping

Can someone please explain me, what I need to do, to get the Bluetooth connection to my smartphone. I tried also connection with WLAN. I reach the IP Address with a ping, but when I try to open the IP-Address in my Browser, I see only a white page.
 

Anhänge

  • Screenshot_20210909-220239_Einstellungen.png
    Screenshot_20210909-220239_Einstellungen.png
    81,2 KB · Aufrufe: 4
Zuletzt bearbeitet:
Oben