Connection via bluetooth dropping in grbl

I’m trying to use the HC-05 module on my CNC to control my machine remotely. Some problems have come up like sudden disconnections, code instructions stopping being received by the software (UGS and GRBL Controller apk), and lastly, whenever I start GRBL, the parameters show up incomplete.

A common “error” that pops up is: At first, I thought this was a code problem, but I have codes that show this error and many others that don’t. The weirdest part is that with all the G codes I send and use the USB connection between the Arduino and the computer, the machine works fine.

I noticed a pattern that the connection always fails around 16-20 minutes.

In the HC-05 module, I’ve already made changes in AT mode for the connection, like changing the rate to 115200 and setting AT+ROLE=0. I also tested with two different Shields: Shield V3 and V4. Oh, and before I forget, I’m using a voltage divider connection as recommended by GRBLDDroidBT.

You’re using an inherently unreliable RF link.

What gcode sender are you using?

GRBL has a Character-Counting Streaming Protocol to try and address this, but most senders cannot use it.

In general, the recommendation instead is to use a reliable physical link instead of an unreliable one.

I don’t understand this “character-couting streaming…” I’m using the Android app GRBL Controller v3.6.1 and Universal Gcode Sender 2.1.7

(Reliable physical link) What does that mean?

Can you use a USB-OTG to connect between android and grbl? Or do you have a computer you can connect USB and use universal gcode sender instead?

Bluetooth can lose some gcode and the remaining text is incomprehensible.

Yes, I currently use it with an OTG cable. However, sometimes I use my phone for other things and I don’t have access to computer some days.

My insistence on using Bluetooth is in relation to distance from both: computer and phone.

If these losses are unavoidable, unfortunately I will have to connect to OTG.

IMHO, bluetooth just isn’t reliable enough for gcode. Some communication protocols (like wifi) have failsafes for lost characters. But they have other issues (like lost packets can mean latency).

Bluetooth just isn’t terribly reliable.

Jim was talking about a way to add line numbers and checksums to the gcode lines. If you can enable those, you might get better results. I believe grbl will ask for a repeat if it gets a missing line or the wrong checksum. But if that response is broken to the android, then it will pause. And the sender needs to support it.

2 Likes