index.rst 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. .. todo::
  2. Create new subsections as needed.
  3. ===
  4. FAQ
  5. ===
  6. NSH Tricks
  7. ==========
  8. How to increase the command line length?
  9. ----------------------------------------
  10. You can increase the Max command line length from 64 to other value,
  11. this way:
  12. Application Configuration --->
  13. NSH Library --->
  14. Command Line Configuration --->
  15. (64) Max command line length
  16. How do I enable editing support on the command line?
  17. ----------------------------------------------------
  18. You need to change Command Line Editor from "Minimal readline" to
  19. "Command Line Editor", this way:
  20. Application Configuration --->
  21. NSH Library --->
  22. Command Line Configuration --->
  23. Command Line Editor (Command Line Editor) --->
  24. How to enable command line history?
  25. -----------------------------------
  26. You need to enable these options in the menuconfig:
  27. Application Configuration --->
  28. System Libraries and NSH Add-Ons --->
  29. -*- readline() Support --->
  30. [*] Command line history
  31. (80) Command line history length
  32. (16) Command line history records
  33. Note: If you are using the "Command Line Editor" instead of the "readline"
  34. then you need to use this other option:
  35. Application Configuration --->
  36. System Libraries and NSH Add-Ons --->
  37. -*- EMACS-like Command Line Editor --->
  38. [*] Command line history
  39. (80) Command line history length
  40. (16) Command line history records
  41. How to enable autocomplete on the command line?
  42. -----------------------------------------------
  43. You need to enable these options in the menuconfig:
  44. Application Configuration --->
  45. System Libraries and NSH Add-Ons --->
  46. -*- readline() Support --->
  47. [*] Tab completion
  48. (64) Maximum built-in matches
  49. (64) Maximum external command matches
  50. Note: autocomplete is not enabled when "Command Line Editor" instead of the
  51. "readline".
  52. How to interrupt an NSH Application using Ctrl^C ?
  53. --------------------------------------------------
  54. You need to enable these options in the menuconfig:
  55. RTOS Features --->
  56. Signal Configuration --->
  57. [*] Default signal actions --->
  58. [*] SIGINT and SIGKILL
  59. Device Drivers --->
  60. Serial Driver Support --->
  61. [*] Serial TERMIOS support
  62. [*] Support SIGINT
  63. (0x03) Serial parse SIGINT characters
  64. Network
  65. =======
  66. How to detect Ethernet cable connection/disconnection?
  67. ------------------------------------------------------
  68. NuttX supports Ethernet connection/disconnection events from Ethernet PHY
  69. using signals (see ``nuttx/drivers/net/phy_notify.c``).
  70. The network monitor thread at apps/netutils/netinit (see
  71. ``CONFIG_NETINIT_MONITOR``) will handle taking the network down if the cable
  72. is unplugged and bringing it back up when the cable is restored.
  73. It is important to note that your Ethernet controller driver of your
  74. MCU needs to support CONFIG_ARCH_PHY_INTERRUPT (and implement
  75. ``arch_phy_irq()``).