NSH prompt after re-flashing ArduCopter on Pixhawk

Hello,

How do I get to the NSH prompt after re-flashing a new ArduCopter image on Pixhawk? I’m guessing I need to turn off the ArduCopter prompt somehow; that’s what I get after rebooting. What’s the trick I’m missing?

Thanks,
Daryl.

I found one way to do it:

set deviceA /dev/ttyACM0

set deviceA /dev/null

in ardupilot/mk/PX4/ROMFS/init.d/rc.APM.

There’s probably a better way but that lets me test my custom app.

you can boot with the SD card removed to get the console on the USB
or
The system’s serial console runs on the port labeled SERIAL4/5. The pinout is standard serial pinout, to connect to a standard FTDI cable (3.3V, but its 5V tolerant).

Pixhawk FTDI
1 +5V (red) N/C
2 Tx 5 Rx (yellow)
3 Rx 4 Tx (orange)
4 Tx N/C
5 Rx N/C
6 GND 1 GND (black)

Darryl what kind of mapping do you do?

I would like to invite you to join us on the drones-discuss@googlegroups

We are always looking for new developers

Hi Craig. Thanks for the reply. I’ll try the FTDI cable. I have been booting without an SD card, but I get the ArduCopter console on the USB port. Is there a way to exit that to get to NSH?

Thanks for the invitation to the drones-discuss group. I’m on the learning curve at the moment but I’m happy to contribute what I can.

Daryl.

I have been booting without an SD card, but I get the ArduCopter console on the USB port. Is there a way to exit that to get to NSH?

you will get to the NSH

You can also go to the terminal window and at the prompt type “test” and then “shell”

Ah, “test”, then “shell”. That’s just what I was wanting - thanks for your help.

Sorry, one more: how do I configure NSH to expand a carriage return?

nsh> nsh> nsh> nsh> nsh> nsh> nsh>

Fixed it by setting some terminal options:
stty -f /dev/tty.usbmodem1 onlcr
stty -f /dev/tty.usbmodem1 onocr

prior to:
screen /dev/tty.usbmodem1 57600 8N1

Actually that solution only worked first time, and then the newlines were no longer expanded to newline;carriage return. I have reset the Pixhawk, reinserted the USB cable; the problem remains.

Any clues?

Is that with Mission Planner? and the main USB serial or is it serial 4 and the NSL console?

Looks like your terminal program needs to add a to the linefeed