Backspace, Control-H, and Delete on Linux

Normally under my terminal session in Linux, BACKSPACE (0x7F) deletes the last character, and DELETE (0x1b5b337e or ESC[3~) deletes the character to the right of the cursor.
However, in the BusPirate,) Control-H deletes the last character, and BACKSPACE deletes the character to the right of the cursor. It would be nice if this was consistent between my terminal and the BP. Perhaps a configuration option? I’m connecting to the BusPirate via “screen”, btw.

p.s. while trying to correct my typing. I confused the BP:

HiZ> [0x80 0x84 0xb8] D:23100
Syntax exceeds available space (512 slots)
Syntax compile error

I will check this out. Except for a few new (insert, delete) fancy commands, the parser is from the old bus pirate. I will see if we did anything there to handle this.

In my experience, this has always been the behavior of the Bus Pirate on Linux. I actually just tried with my BP 3.6, and it behaves exactly as OP describes.

For the BP5, I’ve been using the tio serial terminal, which offers per-device character mapping to address these kind of discrepancies. Fun fact: according to this GitHub issue, this mode was added in 2017 specifically because somebody was having trouble with their Bus Pirate:

1 Like

The \r\n thing… It’s typical to use just \n in microcontrollers. The reason we use both is because there are places that redraw the screen. For example voltage or frequency measurement (and now the toolbar). \n is new line, but we use \r to return and draw. At least that’s how I recall it working. I would much rather use \n, it would be shorter and easier.

I have the same problem on Mac, I managed to fix the BackSpace issue by changing the key translation to ^H in terminal setting, not ideal, and support for the special VT100 escape sequence for delete is decently needed.

I will post a merge request in the future, tackling this issue

I had the problem as well until I also switched to the tio program, which has a few advantages. The config I have (file “.config/tio/conf” ) is

#defaults
baudrate = 115200

# I say "tio bp" to get this: You can make it default
[bp]
device = /dev/buspirate-text
#device=/dev/ttyACM0
baudrate = 115200
databits = 7
parity = none
stopbits = 1
color = 10
map = INLCRNL,ODELBS
# Do you want the program to reconnect automatically? I said no
no-autoconnect