Xojo Shell Raspberry Pi

Trying to use Xojo Shell command to access bluetoothctl on Raspberry Pi 3.
When I send the bluetoothctl command using Xojo shell I get results that are different when using the Raspberry Pi terminal. Specifically the “Waiting to connect to bluetoothd…” and there is also a random “quit”. Anyone know what’s going on?

Also, I would attach a screenshot but I can’t figure out how to do that. The Result that Xojo Shell puts in my textArea1 is kinda weird. Some of the text is actually a little box with 1’s and 0’s inside. That may be a separate issue, I suppose.

In Raspberry Pi Terminal I send …
pi@raspberrypi:~ $ bluetoothctl

… and I get
[NEW] Controller B8:27:EB:EA:E6:C9 raspberrypi [default]
[NEW] Device 00:06:66:D8:A1:7D RNBT-A17D
[NEW] Device 00:06:66:8C:B1:DD RNBT-B1DD
[NEW] Device 00:06:66:8C:B1:80 RNBT-B180

When I send the same command through an Xojo Shell …

Shell1.Execute("bluetoothctl") textArea1.text = Shell1.Result

… I get different results.

Waiting to connect to bluetoothd…

[e[0;92mNEWe[0m] Controller B8:27:EB:EA:E6:C9 raspberrypi [default]

[e[0;92mNEWe[0m] Device 00:06:66:D8:A1:7D RNBT-A17D

[e[0;92mNEWe[0m] Device 00:06:66:8C:B1:DD RNBT-B1DD

[e[0;92mNEWe[0m] Device 00:06:66:8C:B1:80 RNBT-B180
e[0;94m[bluetooth]e[0m# quit

[e[0;91mDELe[0m] Controller B8:27:EB:EA:E6:C9 raspberrypi [default]

Waiting to connect to bluetoothd…

Not specifically, but remember this:

Upload your picture somewhere (Imgr, Dropbox) and post the link here using the Image button: Post Formatting Tips.

You probably need to set the encoding.

This also could be ANSI / DEC terminal control codes for positioning and color.

As Paul said that are ANSI escape codes for coloring [NEW] [CHG] and that.

Linux terminal understands that and color the “labels”, Xojo shell catches the raw data sent by bluetoothctl.

Perhaps you can do something with this (or not, because it’s interactive), but may help you to begin filtering it.


Yes, it does appear those are ANSI escape codes. I can live with the extra characters since they won’t be visible to the user.