Does your command line editing work on your BP v3?

Hacking multi-tool. Get one for $30, including worldwide shipping.

Does your command line editing work on your BP v3?

Postby toddcrom3 » Mon May 15, 2017 12:39 am

I have found that command line editing does not work reliably on my recently purchased Bus Pirate v3. I tried first with the 5.10 software, then with 6.2 and then 6.3, and all of them show the same behavior, and the same behavior shows up with either tera term or with putty (I have tried it only on windows, not linux, as yet). (I have not tried it with 7.0 software, because I get an update error trying to flash that and there are a bunch of forbidding-looking posts about that involving unprotecting the bootloader, and exporting stuff, and I am lost there without delving into that much more deeply (and I would like to know what to do about it but that is another topic).)

Question: Does your command line editing work reliably?

Make your terminal wider than 80, maybe 110, so you don't insert characters and have your command hit the right edge of the terminal with your upcoming manipulations (which is at least confusing, and I think works improperly too).

Try entering a fairly long command, of maybe 60-70 characters, then go up with ^P or the arrow keys, then either go back about 30 characters and insert a bunch of spaces then delete them repeatedly, or go back to the beginning of line with ^A then insert and delete spaces repeatedly (without hitting the right edge with the command). About half the time, characters after my insertion point get corrupted, and then my command sends the wrong impulses to whatever hardware I have hooked up. I have tried this with SPI mode only, so far, but I am guessing it is not specific to mode. It works some of the time, and then I can edit happily, but it messes up the editing often enough that the editing is useless, and this harms my workflow massively, because I can not fashion lines of, say 60 characters or more and edit them successively to make them more involved. If on short lines, of 40 characters or less, I don't think I can reproduce the bad behavior. But with a test command line line like "[ 0x30 0x20 0x0 0 r] [ 0x30 0x20 0x0 0 r] [ 0x30 0x20 0x0 0 r]", I can. I have 115200, 8, n, 1, and no flow control, and my putty and tera term settings are nearly default (local echo off, local editing off, vt100).

Todd, Seattle
toddcrom3
Newbie
Newbie
 
Posts: 5
Joined: Mon May 15, 2017 12:17 am

Re: Does your command line editing work on your BP v3?

Postby toddcrom3 » Mon May 15, 2017 11:06 am

Code: Select all
I can reproduce it reliably (every time) if I power the BP on, then do

<ret> (to get HiZ prompt), m <ret> 5 <ret> <6 rets> to get into SPI mode, then W <ret> [0 0 0] <ret> [0 0 0] <ret>, then [0x30 0x20 0x0 0 r] [0x30 0x20 0x0 0 r] [0x30 0x20 0x0 0 r] <ret> ^p ^a <4 spaces> (adding 4 spaces to begin of line) <ret> ^p ^a <del the 4 spaces with ^d> <ret> ^p ^a <add 4 spaces> (messes up massively here, on the 2nd space and subsequent spaces I add corrupting my line). This with either teraterm or putty.

Firmware for this test as shown here:
SPI>i
Bus Pirate v3.5
Firmware v6.2-beta1 r1981  Bootloader v4.4
DEVID:0x0447 REVID:0x3046 (24FJ64GA002 B8)
http://dangerousprototypes.com
CFG1:0xFFDF CFG2:0xFF7F
*----------*
Pinstates:
1.(BR)  2.(RD)  3.(OR)  4.(YW)  5.(GN)  6.(BL)  7.(PU)  8.(GR)  9.(WT)  0.(Blk)
GND     3.3V    5.0V    ADC     VPU     AUX     CLK     MOSI    CS      MISO
P       P       P       I       I       I       O       O       O       I
GND     3.29V   4.96V   0.00V   0.00V   L       L       H       H       L
POWER SUPPLIES ON, Pull-up resistors OFF, Open drain outputs (H=Hi-Z, L=GND)
MSB set: MOST sig bit first, Number of bits read/write: 8
a/A/@ controls AUX pin
SPI (spd ckp ske smp csl hiz)=( 1 0 1 0 1 1 )
*----------*
toddcrom3
Newbie
Newbie
 
Posts: 5
Joined: Mon May 15, 2017 12:17 am

Re: Does your command line editing work on your BP v3?

Postby USBEprom » Mon May 15, 2017 1:22 pm

Hi toddcrom3.
I confirm it myself by using Putty.
BuccaneersDen works fine with no problem, try it.
My Bus Pirate is a revision 3 with the very last firmware v7.1.
I know nothing.
However I do not even understand what your test does mean, what does it do?

The errors shown while upgrade attempt those are just warnings, nothing to worry about.
It is a pirate-loader / ds30 Loader GUI issue, do not a bootloader fault.
Take a look at these:

viewtopic.php?f=28&t=8498&start=45#p66033
viewtopic.php?f=28&t=8498&start=60#p66038

Read them very carefully!

Be seeing you.

U.Sb
USBEprom
Full Member
Full Member
 
Posts: 121
Joined: Wed Mar 14, 2012 4:09 pm

Re: Does your command line editing work on your BP v3?

Postby toddcrom3 » Tue May 16, 2017 1:18 am

Thank you for the reply, USB.

I tried the SAFE_13042017_1.hex file you posted in one of those links, and I ignored the error on upgrade. It would be ideal if members of the community would post clear directions for upgrading the firmware, rather than having to spelunk through confusing threads with lots of instructions this way and that. Still, beggars can't be choosers.

Command 'i' confirms the new 7.1 firmware is loaded:

HiZ>i
Bus Pirate v3.5
Community Firmware v7.1 - goo.gl/gCzQnW [HiZ 1-WIRE UART I2C SPI 2WIRE 3WIRE KEYB LCD PIC DIO] Bootloader v4.4
DEVID:0x0447 REVID:0x3046 (24FJ64GA00 2 B8)
http://dangerousprototypes.com

However, the problematic command line editing behavior is just as it was before, either testing with new commands or using almost exactly the commands posted above.

It sounds like for you, you were able to reproduce the bad behavior with previous firmware versions, but you were not able to reproduce the bad behavior with 7.1? Is that correct? If so, that's a bummer, because the new firmware doesn't fix the command line editing problems for me.

Regarding my test, it doesn't do anything useful. I pared down the commands to a fairly minimal set that I could post here so others could try my exact test. Before paring it down, I was playing with an FTDI FT813 "EVE" chip, and those commands are appropriate for that chip.
toddcrom3
Newbie
Newbie
 
Posts: 5
Joined: Mon May 15, 2017 12:17 am

Re: Does your command line editing work on your BP v3?

Postby USBEprom » Tue May 16, 2017 12:53 pm

Hi toddcrom3.
I did test only with the new firmware v7.1 because I use it.
Firmware v7.1 allows up 256 characters into the command line just like the previous factory firmwares for the Bus Pirate.
I have already suggested you try Buccaneer's Den, it has no any issue, it works fine with no weird behaviours, try it.
Also PirateShip for me it works with no issue, try it if you prefer.
Due the fact either Buccaneer's Den and PirateShip do not show any weird behaviour I think it could be a terminal problem, may be.
For the upgrade there is not any need to follow documents spread all over the whole world, just visit http://dangerousprototypes.com/docs/Bus_Pirate

Be seeing you.

U.Sb
USBEprom
Full Member
Full Member
 
Posts: 121
Joined: Wed Mar 14, 2012 4:09 pm

Re: Does your command line editing work on your BP v3?

Postby toddcrom3 » Tue May 16, 2017 9:44 pm

Ah. Now I see what you did. You did not use what I consider to be a "normal" serial program, you used a GUI front-end.

As I mentioned I used putty and tera term. As I understand it, these are very standard serial communication programs for windows. I can try with linux as well, and I will (like, minicom). I bet that will show the same behavior, since both putty and tera term do, and those are totally different programs from each other.

I am guessing that if the ones you mentioned do not show the bad behavior, they likely do line discipline (aka, local editing) on their own then send the finished result all at once to bus pirate for each line. If that is what they do, then of course that would not show a problem with the command line editing built in to bp.

My guess is that there are long-standing problems in the command line editing built in to the bus pirate, that somehow no one has either noticed or bothered to fix. I can look at the source by inspection easily, but I am more of an AVR dude; I don't have experience with PIC or tools installed for it.

I'd love to know if you or anyone else can reproduce the problem I saw using straight serial communication, without line preassembly, with bus pirate 3 and whatever version of firmware.
toddcrom3
Newbie
Newbie
 
Posts: 5
Joined: Mon May 15, 2017 12:17 am

Re: Does your command line editing work on your BP v3?

Postby toddcrom3 » Tue May 16, 2017 10:09 pm

Yep, minicom running under linux shows exactly the same bad behavior (again testing with 7.1, though I have tested with 5.10, 6.2. 6.3 as well). So that is three different serial programs, two on windows and one on UNIX, and all of which are quite standard general-purpose serial programs, in fact, among the most popular programs for that purpose, that all show the same bad behavior.
toddcrom3
Newbie
Newbie
 
Posts: 5
Joined: Mon May 15, 2017 12:17 am

Re: Does your command line editing work on your BP v3?

Postby USBEprom » Tue May 30, 2017 1:05 pm

Hi toddcrom3.
OK, I know nothing but you that know it, if you want you can explain the thing here:

https://github.com/BusPirate/Bus_Pirate/issues

It could be possible that someone fix the matter.

Be seeing you.

U.Sb
USBEprom
Full Member
Full Member
 
Posts: 121
Joined: Wed Mar 14, 2012 4:09 pm


Return to Bus Pirate Support