XM125 recv Timout

I picked up a new XM125 board, installed via “python -m pip install --upgrade acconeer-exptool[app]”, ran it using “python -m acconeer.exptool.app”.

In the explorer I chose A121, Setup an account with Acconner and flashed the latest binary (XM125):

acconeer_xc120_exploration_server_a121-v1_6_0

No issues at this point. It claims the flashing was successful.

Once I try to use stream and connect it gives the following error (Note I also manually set the baud to 115200):

Traceback (most recent call last):
  File "C:\Users\Me\AppData\Local\Programs\Python\Python312\Lib\site-packages\acconeer\exptool\app\new\backend\_model.py", line 75, in connect_client
    self.client = client_factory()
                  ^^^^^^^^^^^^^^^^
  File "C:\Users\Me\AppData\Local\Programs\Python\Python312\Lib\site-packages\acconeer\exptool\a121\_core\communication\client.py", line 50, in open
    return super().open(
           ^^^^^^^^^^^^^
  File "C:\Users\Me\AppData\Local\Programs\Python\Python312\Lib\site-packages\acconeer\exptool\_core\communication\client.py", line 87, in open
    return subclass.open(  # type: ignore[no-any-return, attr-defined]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Me\AppData\Local\Programs\Python\Python312\Lib\site-packages\acconeer\exptool\a121\_core\communication\exploration_client.py", line 91, in open
    return cls(client_info=client_info)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Me\AppData\Local\Programs\Python\Python312\Lib\site-packages\acconeer\exptool\a121\_core\communication\exploration_client.py", line 115, in __init__
    self._server_info = self._retrieve_server_info()
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Me\AppData\Local\Programs\Python\Python312\Lib\site-packages\acconeer\exptool\a121\_core\communication\exploration_client.py", line 139, in _retrieve_server_info
    system_info_response = self._server_stream.wait_for_message(messages.SystemInfoResponse)
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Me\AppData\Local\Programs\Python\Python312\Lib\site-packages\acconeer\exptool\_core\communication\message_stream.py", line 64, in wait_for_message
    for message in self._stream:
  File "C:\Users\Me\AppData\Local\Programs\Python\Python312\Lib\site-packages\acconeer\exptool\_core\communication\message_stream.py", line 83, in _get_stream
    self._error_callback(e)
  File "C:\Users\Me\AppData\Local\Programs\Python\Python312\Lib\site-packages\acconeer\exptool\a121\_core\communication\exploration_client.py", line 135, in _close_before_reraise
    raise exception
  File "C:\Users\Me\AppData\Local\Programs\Python\Python312\Lib\site-packages\acconeer\exptool\_core\communication\message_stream.py", line 81, in _get_stream
    header_in_bytes = self._link.recv_until(self.protocol.end_sequence)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Me\AppData\Local\Programs\Python\Python312\Lib\site-packages\acconeer\exptool\_core\communication\links\serial_link.py", line 155, in recv_until
    raise LinkError("recv timeout")
acconeer.exptool._core.communication.links.buffered_link.LinkError: recv timeout

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\Me\AppData\Local\Programs\Python\Python312\Lib\site-packages\acconeer\exptool\app\new\backend\_backend.py", line 161, in process_program
    model.execute_task(task)
  File "C:\Users\Me\AppData\Local\Programs\Python\Python312\Lib\site-packages\acconeer\exptool\app\new\backend\_model.py", line 51, in execute_task
    builtin_task(**kwargs)
  File "C:\Users\Me\AppData\Local\Programs\Python\Python312\Lib\site-packages\acconeer\exptool\app\new\backend\_model.py", line 87, in connect_client
    raise HandledException(msg)
acconeer.exptool.app.new._exceptions.HandledException: Failed to connect:
recv timeout

Looking into your instructions I noticed your suggestion to configure the board so I also tested by going into device manager and manually setting the serial link to the following settings:

115200 baud

even parity

8 data bits

1 stop bit

no flow control

With those changes there was no change. I looked into the python code and what it appears to be doing is attempting to open the stream and is waiting the end sequence character (a newline character) which it never receives and then times out after 2 seconds. I tried editing the default timeout to 20 seconds and aside from hanging longer there was no change.

Does anyone have any suggestions that I may have missed? I went over the SparkFun instructions and the acconeer trouble shooting guides for this module with no luck.

Other things I have tried are different bauds, purging the config, using the prebuilt portable app, installing it through pip, different USB cables, different USB ports, and testing on a totally different computer (Exactly the same error on both PC’s).

Note that locally I am using Python 3.12.1 on Windows 11. Note one of the PC’s was a completely clean build of python as I had not bothered to install that on it on that machine until testing this now.

correct driver for the serial-to-USB converter on the XM125 board should be installed. Sometimes, Windows may not install the correct driver automatically.

I tried that and no luck I downloaded the latest driver from https://www.wch-ic.com/downloads/

02/11/2023, 3.8.2023.02

Completely uninstalled my old driver, and reinstalled the new one.

To be clear it shows up in device manager as USB-Serial CH340 (COM8). Driver provider wch.cn, driver date: 2/11/2023, Driver Version 3.8.2023.2

Same response as before.

I also updated to the latest version of the FW:

acconeer_xc120_exploration_server_a121-v1_7_0

With no change in success.

Any other suggestions?

I got the exact same response as sphere from Acconeer Exploration Tool when I clicked Connect. (device manager shows “USB-SERIAL CH340 (COM8)”. Also, in the Acconeer Exploration Tool shows “COM8 ()”. The other serial port on my machine shows as COM5 without the parentheses. I’ve tried reloading the driver but nothing works. I notice the schematic shows RTS and CTS going to the XM125 so I selected flow control in port settings but that didn’t work either. What could the problem be?

What are the steps and selections made by users who have gotten this to work?

So, when I first hooked up the XM125 and ran Presence Detection Arduino examples, it worked when I moved my hand in front of the sensor. I tried all of the Presence examples with success. Then, I downloaded the STM32 Cube programmer to program the I2C Distance bin file into it and also so that I could use the Acconeer Exploration tool later. I was able to program the XM125 with STMCube. I tried connecting to the Exploration Tool but it timed out (as previously reported). I went back to the Arduino examples for Distance. However, none of the example Arduino programs seemed to work correctly. I’m not getting distances that make any sense, just random distances with nothing in front of it. My hand waves don’t seem to make any difference. So, I programmed the original Presence I2C bin back into it. Now, the Presence examples don’t work. It seems like everything went south after programming the XM125 from the STMCube programmer.