Unable to drive with bluetooth

I’ve followed the instructions here for connecting to bluetooth and using Pestol.ink but cannot get the robot to drive. My apologies for the length of this post but I keep thinking that I’m missing a step somewhere. So I tried to document everything I tried.

Here’s the info on the configuration I’m using.

  • Windows 11
  • Chrome
  • MicroPython v1.25.0-preview.beta06 on 2025-02-17; SparkFun XRP Controller (Beta) with RP2040
  • I have the folder called \lib\ble
  • I have pestolink.py in the \lib folder
  • I have pestolink_example.py in the root folder
  • The name of the XRP is shown under the run button as XRP-02d2c. This is what I set the robot_name to in the pestolink_example.py file

Here’s what I tried.

  • while the XRP USB cable is still connected, click RUN on the pestolink_example.py file.
  • The RUN button changes to the red STOP button but nothing happens.
  • Click STOP.
  • Disconnect the USB cable from the robot
  • Click Connect XRP and choose to connect via Bluetooth
  • the pairing window appears and the XRP is listed there. I click on it and select Pair.
  • Wait 30 seconds or so
  • Still says Waiting for Connection…
  • Press RESET on XRP
  • Again, Click Connect XRP and choose to connect via Bluetooth
  • the pairing window appears and the XRP is listed there. Click on it and select Pair.
  • Wait a bit.
  • Connection seems to work (I can see the file system on the XRP).
  • Pestolink_example.py is still open in the code window
  • Click RUN
  • RUN button changes to STOP button
  • Shell window no longer says “waiting for connection”

At this point, if I attempt to connect to the XRP from the pestol.ink site in a brower window on either my PC or the phone, I can’t because the XRP code window is already connected to it. The XRP never appears in the pairing window. So…

  • Close the tab in the browser running the XRP Code window
  • Click the connect button in the https://pestol.ink/ window on the PC
  • After several tries (and after pressing reset on the robot), it connects (i.e. says “connected to XRP-02d2”)
  • I have an XBOX controller plugged into the PC. If I move the joysticks I can see the values change in the Axis widgets. But the robot doesn’t move.
  • Click “override axes/buttons with keyboard”. Press WASD. Nothing happens
  • Disconnect from XRP
  • Using my phone. Open Chrome (I’m using a Pixel 7Pro Android)
  • Open pestol.ink site and connect to the XRP. This works!
  • Move the virtual joystick and press all the buttons. Nothing happens

What am I doing wrong? I did this quite a few months ago and it worked. Were there breaking changes to the libraries (which of course were updated to the latest). Or am I missing something?

Note: I have repeated variations of this process multiple times. Occasionally I have gotten the servo to move which I think it’s supposed to do when executing the example code. But not consistently and even when it does I still can’t drive.

And yes, the robot is fully functional. I’ve run the installation verification example code with the USB cable connected and everything works fine.

@Fgrossman @jrw4561 Any ideas?

Hi Debbie,

Sorry you are having trouble, and thanks for the detailed debug steps. First thing I would try is to make sure your robot is not low on batteries.

Second thing is, try these steps again but do not use code upload over Bluetooth. That feature was developed independently from pestolink, I’ve gotten both connections working at the same time before, but it is not reliable. A unified solution is in the works.

If those steps don’t work let me know.

-Jacob

No luck. I put fresh batteries in.

  • Used the USB cable and the XRP Code window (connect via USB) to load the code into the robot.
  • Closed the XRP Code window
  • Disconnected the USB

Then I repeated the following steps multiple times:

  • Turned the robot off and then back on again
  • Open pestol.ink on my phone
  • It sees the XRP and connects successfully.
  • But it ignores all the inputs. Moving the virtual joystick around does nothing. Pressing the virtual buttons does nothing.

Repeated the entire process with a different XRP.
Same results.

Repeated the same scenario except using a window in Chrome on Win 11 to run pestolink.
And plugging in an xbox controller
Connection to the XRP is successful
Pestolink window shows the axes moving when moving the joysticks on the controller

But again, no movement of the robot.

Switched to using a Windows 10 computer. Still using Chrome.
Still doesn’t work.

Note: When connecting to the robot, either with the phone or a window in the browser, there is a brief movement of the servo.

I should mention that I’m using the beta version of the XRPs - not the new ones.

Hi Debbie, I loved the formatting of your issue - easy to follow.
I have had last program running issues, so I recreated yours, I think, and found this fix.
I hope my response is helpful and also easy to follow. Good luck, Harry

01: turn on xrp
02: open two tabs on browser - xrp code editor and PestoLink-Online
03: connect your xrp to xrp code editor via usb.
04:
05: click to get pestolink_example in code editor
06:
07: delete untitled-0.py (that pesky thing)
08:
09: only code should be pestolink_example.py
10:
11: pestolink_example.py, shell, and filesystem areas all showing
12:
13: click run and note red stop button
14: remove cable from xrp if attached
15:
16: This clears the screen - notice files not viewable
17:
18: only pestolink_example.py code showing
19: Waiting for connection… in filesystem area
20: In shell: waiting for connection…(click ‘Connect XRP’)
21:
22:
23: DO NOT click anything on this code editor(but, if you do - start all over)
24:
25: go to pestolink tab and click connect
27: play
28:
29: disconnect from pestolink page and then try phone
30: play

Thanks for responding. I’d pretty much given up trying. Following your suggestions…

Step 7 - I’m not getting the untitled file at this point. But I have seen it in the past. Not sure when it shows up.
Step 13-23 - the only differences here from what I tried is you did not click STOP and I did. So I didn’t click stop this time.
Step 27 - I can connect. However it still won’t drive. :frowning:
Step 29 - again, I was able to connect to the XRP but it still won’t drive.

I’ve gotten this working in the past - about 6 months ago. There have been a number of changes to the libraries since then (which I installed when prompted) but I haven’t made any modifications to the robot itself. So this is really puzzling.

If it helps, the version.py fie under XRPLib says: __version__ = '2.0.1'
And the micropython version in the shell says:
MicroPython v1.25.0-preview.beta06 on 2025-02-17; SparkFun XRP Controller (Beta) with RP2040

Still hoping someone has a clue why this is happening.

Thanks for trying!

Debbie,

I realized I had updated my firmware - you can check yours and see if that does the trick.If not I would recommend the webserver_example in XRP examples as a decent alternative, good starting point anyway.

Firmware
Releases
v1.25.0 (2025-04-15) .uf2 / [Release notes] (latest)

.

Thanks for the response.
FYI - I tried the version you mentioned from MicroPython but the XRP Code window complained that I needed to update to the Beta 06 version. I opted not to update it and then the pestolink_example.py file would no longer compile stating that I needed to update micropython. It gave me a github link. I used that link to update to the latest micropython.

And then magically everything started working.

But…I was still really puzzled because the version I just installed (that works) is the exact same version I was previously running that didn’t work. I.e. this one:
MicroPython v1.25.0-preview.beta06 on 2025-02-17; SparkFun XRP Controller (Beta) with RP2040

So…just for fun, I installed the micropython version that I knew was incompatible - which resulted in the same expected error but this time I click OK on the prompt to update micropython:


The updated version of micropython was installed. And no surprise it was exactly the same as the one I had installed previously.

But now the bluetooth connection works!

So at this point, I have the exact same software for both micropython and pestolink that I had before. And the same computers and the same XRP robot. But now it’s working.

And I have no explanation as to why.

Debbie, congratulations on your success!

I had fun looking into your issue, thanks for letting me play along, Harry

As to what happened a possible explanation:

It looks like you found the correct firmware update based on the github link.

“The UF2 for the XRP Beta Control Board is attached to this release for immediate use.”

After installing updated firmware it called for install latest version python

(which you had already had on “old UF2 firmware”)

So you ended up with the exact same python version.

But, it was installed on top of a new and improved updated UF2.

Or maybe it was magic, at this point who cares!