Is there a ChibiOS module (for shell access) available or planned?

I’ve been using the NSH module (load module nsh) for some time, however, my controllers are now running ChibiOS instead of NuttX.

Is there a module (or any other way) to access the ChibiOS command shell?
If not, is anything planned for this… and what would be the ETA?


Not there I know of. BTW do you know that we now have lua scripting support? You can extend the flight code functionality without recompiling.

Which NuttX shell functions would be useful to you in ArduPilot?

I use several basic Linux commands such as cd, ls, mkdir, pwd, rm, cp, dd and xd.
Those are the ones I can think of off the top of my head. I also use the mtd command to check status.

1 Like

At a higher level, are you only doing SD card file management using the nsh shell?
I don’t recall the “mtd” command; where is it documented?
Do you use “top”?

At a high level - yes, mostly file management. I’d say the most important commands for me are dd/cp and ls.

The “mtd” command is not a must have, but it is listed in the Builtin Apps section of my devices when I enter the “help” command. Not sure where it is documented though.

No - I don’t use top.

now I remember what “mtd” was for; also related to non-volatile storage.
With ArduPilot, I think non-volatile storage is currently used only for parameters and logs.
Since log manipulation is slow over USB anyway, I usually just pull the SD card if it’s accessible.

In your workflow for ArduPilot, what other needs do you have to manipulate files on the SD card?
I assume LUA scripts would reside on SD…

Not much else I can think of WRT file manipulation needs at the moment.

Hi Mark - based on the questions you asked me on this thread, I was assuming (or possibly hoping) that you may be in a position to help materialize the capability I was asking about - meaning to add some form of ChibiOS shell access.

Please let me know whether my assumption was correct, or if I was totally missing the mark on that… or anything in between :slight_smile:

Hello Ivan. I was just wondering whether there would be any advantage to having a shell for ChibiOS, but if its only use would be for SD card management I doubt whether it would be worth the coding effort or flash space. PX4 uses the shell to do system init under NuttX, and that does provide some extra flexibility for starting and stopping process manually, along with some tools like “top”, but I (personally) don’t see any significant need for such things when running ArduPilot.

I see. Just to clarify though, the needs/uses for shell access that I enumerated in this thread (being mainly disk mgmt) are what I was needing at the moment. That’s not to say I wouldn’t have need for any other shell-access capabilities in the near future that mirror what was available in NSH.

Are you aware of any other means available to access a ChibiOS shell on a Pixhawk controller? I’ve tried connecting serial cables to it using PuTTY and linux screen command (both of which worked with NSH per the instructions in this link) to no avail. Is the shell simply disabled and completely unreachable?

As far as I know, there is no shell in the current ChibiOS build for ArduPilot…

Is there any other way to put hands on files on SDCard if not with NSH Console? I’m trying to transfer some lua scripts functions from X-lite to Ardupilot - it should work mutch better, especialy GPS points tracking. But i don’t have access to SD (copter is fully boxed), so i need remote access to SDCard through USB. NSH Console is very needed if there is not anather way to get to SDCard files.

I can’t provide any help with this, as I’ve never used it, but MAVFTP may be what you need

@james_pattison @Kowal666 MavFTP works great!, latest mission planner and latest ArduPilot. ctrl and x on the mission planner home screen gets you to the top secret interface :wink:

works in mavproxy too, except for some apparently extraneous error messages after a file download completes:

QRTL>ftp list APM/LOGS
   00000001.BIN 1161238
Total size 1134.02 kByte
QRTL> ftp get APM/LOGS/00000001.bin
QRTL> Getting APM/LOGS/00000001.bin as 00000001.bin
ftp status
QRTL> Transfer at offset 213188 with 0 gaps
ftp status
QRTL> Transfer at offset 307832 with 0 gaps
Wrote 1161238 bytes to 00000001.bin (ecode 6)
FTP Unexpected burst read reply
OP seq:76 sess:0 opcode:128 req_opcode:15 size:239 bc:0 ofs:1159389 plen=239 [0]

Is MAVFtp in normal firmware compiled? In Mission planner i’ve got error

And in MAVProxy ‘unknow command’ - connection is working offcourse. When TAB hitting i can see shell commands, but ftp is not there.

Try “module load ftp” in mavproxy first.

Thanks a lot. Finaly it’s working, i’ve tried a lot of commands, but not that one. is empy on mavftp, and by the way on ‘mission planner ftp’ too, even ‘mission planner key shourtcuts’ doesn’t give Ctrl + x command at all.

looks like the source is the best documentation at the moment: