Uart bridge

Totally agree.

I tried to compile for esp8266 and got a bunch of library warnings. I didn’t have any more time to work through them.

I’ll come back to that at some point.

For now, I’m going ahead with building up my 2nd CYD pendant. I’ll build up one as wired, and one as a wireless prototype.

Sorting through ESP-32s now to see which ones I want to use for testing.

:thinking:

I don’t know what I’ve done but now the Jackpot wont boot with the esp32 board connected - if I connect it after the jackpot has booted it works fine.

There’s a pullup or pulldown that is impacting the ESP-32 boot pins. Did it have this issue earlier in your tests or did it just start?

1 Like

I’ve had a few minutes to make a bit of progress here.

I grabbed a few more genuine Espressif ESP-32s. (or, at least they’re good fakes if not)

I’ve got the code up in the thread above building in PlatformIO , but need to figure out the MAC addresses of my two test boards, and I’m pretty much out of time for now.

I also made a comment over on the FluidNC Discord about this.

If I get a successful test with an ESP-32, then I’ll try my hand at an ESP-01S as well.

Not sure I’m up to the task of trying to build the CYD source with the ESP-NOW libraries but as I study this it really is very straightforward to do. You add the ESP-NOW library and then make the appropriate calls to use it.

The hard part is probably swapping the plumbing around so the CYD app uses ESP-NOW’s virtual serial interface rather than an onboard UART. As I said above, probably a task best left to a pro software engineer and not a hack like me. I wonder how much bounty it would take to have someone try it.

1 Like

I found a simple sketch for getting the MAC

/*
  Rui Santos & Sara Santos - Random Nerd Tutorials
  Complete project details at https://RandomNerdTutorials.com/get-change-esp32-esp8266-mac-address-arduino/
  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files.  
  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
*/
#include <WiFi.h>
#include <esp_wifi.h>

void readMacAddress(){
  uint8_t baseMac[6];
  esp_err_t ret = esp_wifi_get_mac(WIFI_IF_STA, baseMac);
  if (ret == ESP_OK) {
    Serial.printf("%02x:%02x:%02x:%02x:%02x:%02x\n",
                  baseMac[0], baseMac[1], baseMac[2],
                  baseMac[3], baseMac[4], baseMac[5]);
  } else {
    Serial.println("Failed to read MAC address");
  }
}

void setup(){
  Serial.begin(115200);

  WiFi.mode(WIFI_STA);
  WiFi.begin();

  Serial.print("[DEFAULT] ESP32 Board MAC Address: ");
  readMacAddress();
}
 
void loop(){

}

Here’s where I’m at:
I got some definitely not genuine boards. For one thing the silk screen had a pin labelled GND that was in fact CMD on the pinout. That was a head scratcher for a while.


I had previously make a custom shell that is thinner than the original - A deeper back box is on the 3D printer and that’ll fit the esp32.

I’ve also been checking different baud rates - it does work down at 115200, no noticible lagging. What I have seen is if you turn the pendant on during a job it doesn’t connect - I wonder is that down to that lock UI setting.

I also got a couple of esp32c3 breakout boards to make testing a bit easier:

Using them remains my preference, just down to size.

Since the uart pins aren’t shared with the usb port in order to see activity on the uart pins I’ve bought a cheap and nasty oscilloscope

No idea how to use it but there’s a few YouTube videos on this model so hopefully it can do enough to see if there’s data moving.

Might be useful for troubleshooting the jackpot end not booting with the bridge board connected!

That’s my thread you replied to on discord.

1 Like

Which variant of board is that?

Love it. I just picked up similar for my growing collection of WROOMs

I’m still holding out some hope that I can make it work with an ESP8266, and also a bit of hope that the ESP-NOW pendant side could live in the CYD itself.

Nothing wrong with adding to your test capabilities! Plenty of uses for a scope around a V1 machine.

It’s great to be able to get test equipment affordably. You can even get not totally ridiculous DMM scopes these days, here’s the one on my home office test bench

Awesome! Closing the loop so to speak.

1 Like

Esp32-c3 supermini


I have to work this weekend which is a bit of a bummer but I’m enjoying tinkering at this so I’ll try and do a little more.

Can I ask your advice on how to approach the 2 issues, now I have an oscilloscope and DMM available:

  • FluidNC not booting with the bridge board attached
  • Checking data flow on pins 20 & 21 uart

For the booting freeze you mentioned checking if pins were high/low during boot. What’s the diagnostic process for that?

For the data flow do I just put a Probe on one of the lines, set the voltage to 5 and look for 3.3 signal bursts or something more?

1 Like

I’ll do some more writeup of this shortly, as I’m also having a few more cycles this evening to work on some things.

We want to see a scope shot of the TX and RX signals, at the jackpot, during boot. One scope shot with the pendant attached (presumably not booting) and one with the pendant not attached (presumably with fluidNC booting). I’ll see if I can get a picture of this with a Jackpot V1 and an M5 Dial sometime this evening.

Same setup, but after the boards have booted and the pendants are trying to communicate.

You put the scope on both TX / RX signals, boot up, and we look at the scope shots. We can be interactive with this.

1 Like