Just submitted a pull request <https://github.com/apache/incubator-nuttx-apps/pull/443> for issue # 1883. Though it builds fine, I couldn't test it on real hardware as Beaglebone Black doesn't currently have necessary networking support built in. I'd really appreciate it if someone could test it on a platform that supports netnsh configuration? I have attached the patch to this email.
Thank you so much for your help! Sincerely, Subhra Sankha Sarkar P.S. I ordered a Nucleo-144 STM32F767ZIT6 board few days back and expect it to be delivered by sometime next week. Hopefully, that'll take care of my future needs in this regard. On Mon, Oct 26, 2020 at 10:36 PM Subhra Sankha Sarkar < rurtle.co...@gmail.com> wrote: > Excellent! Thank you Brennan. Though this is not exactly what I was > looking for, this will help test build issues, if any. Tomorrow once the > patch is ready for 1883, I may have to bug you again on how to test it by > mounting/unmounting procfs. > > Sincerely, > Subhra Sankha Sarkar > > > On Mon, Oct 26, 2020 at 10:24 PM Brennan Ashton <bash...@brennanashton.com> > wrote: > >> You should be able to use the simulator for testing that if you are using >> Linux. There is Windows and macOS support as well but I am not familiar >> with using it. >> >> >> http://nuttx.apache.org/docs/latest/guides/simulator.html#accessing-the-network >> >> Even without setting up the host network side you should be able to verify >> your fix. >> >> --Brennan >> >> On Mon, Oct 26, 2020, 9:48 AM Subhra Sankha Sarkar < >> rurtle.co...@gmail.com> >> wrote: >> >> > Thank you Alan and Brennan for welcoming me to the community and for >> your >> > prompt response. Sure, I shall get in touch with Petro to understand the >> > current state of development of the Ethernet driver on BBB and if I can >> > help in any way. >> > >> > I specifically asked for ifconfig because I wanted to test my changes >> for >> > https://github.com/apache/incubator-nuttx/issues/1883. Is there any >> other >> > way to build and/or test my changes for the issue # 1883 as I don't have >> > necessary hardware platform(s)? >> > >> > Sincerely, >> > Subhra Sankha Sarkar >> > >> > >> > On Mon, Oct 26, 2020 at 9:38 PM Alan Carvalho de Assis < >> acas...@gmail.com> >> > wrote: >> > >> > > Hi Subhra, >> > > >> > > Welcome to the NuttX community! >> > > >> > > Unfortunately we selected a board that doesn't have Ethernet driver, >> > > see inside this directory: nuttx/arch/arm/src/am335x/ and you will >> > > realize which peripherals are supported to this board. >> > > >> > > I'm CC Mr. Petro, he is the guy who ported NuttX to BBB, maybe he say >> > > if there are plans to add Ethernet. >> > > >> > > If you want a board with Ethernet support, you can figure out it >> > > searching for "netnsh" configuration files inside nuttx/boards/ >> > > directory. >> > > >> > > BR, >> > > >> > > Alan >> > > >> > > On 10/26/20, Subhra Sankha Sarkar <rurtle.co...@gmail.com> wrote: >> > > > Hello all, >> > > > >> > > > I just got started with NuttX and was able to build (using the >> default >> > > > beaglebone-black:nsh configuration) & run the OS on my Beaglebone >> Black >> > > > (BBB). However, when I checked for the list of commands available on >> > it, >> > > I >> > > > am only seeing a limited subset of what NuttX offers. >> > > > >> > > > >> > > >> > >> -------------------------------------------------------------------------------- >> > > > NuttShell (NSH) NuttX-9.1.0 >> > > > nsh> ? >> > > > help usage: help [-v] [<cmd>] >> > > > >> > > > . cat echo hexdump mkfatfs mw source >> > > > umount >> > > > [ cp exec kill mkrd rm test >> > > > unset >> > > > ? cmp exit ls mh rmdir time >> > > > usleep >> > > > basename dirname false mb mount set true >> > > xd >> > > > >> > > > break dd help mkdir mv sleep uname >> > > > >> > > > Builtin Apps: >> > > > sh nsh >> > > > nsh> >> > > > >> > > >> > >> -------------------------------------------------------------------------------- >> > > > >> > > > In particular, I am interested in the ifconfig command. However, >> just >> > > > setting CONFIG_NET=y and CONFIG_FS_PROCFS=y (per nshlib README) >> results >> > > in >> > > > build failure. Obviously, I'll have to enable a few other CONFIG >> > options >> > > > through Kconfig. The board specific README file didn't provide much >> > > detail >> > > > on this matter. >> > > > >> > > > Could someone please provide me with some pointers or a list of >> configs >> > > to >> > > > enable so I can run the ifconfig (or other networking commands) on >> my >> > > BBB? >> > > > >> > > > Thank you in advance. >> > > > >> > > > Sincerely, >> > > > Subhra Sankha Sarkar >> > > > >> > > >> > >> >
diff --git a/nshlib/nsh_netcmds.c b/nshlib/nsh_netcmds.c index b158ed39..09d8e2dc 100644 --- a/nshlib/nsh_netcmds.c +++ b/nshlib/nsh_netcmds.c @@ -391,7 +391,16 @@ static int nsh_foreach_netdev(nsh_netdev_callback_t callback, dir = opendir(CONFIG_NSH_PROC_MOUNTPOINT "/net"); if (dir == NULL) { - nsh_error(vtbl, g_fmtcmdfailed, cmd, "opendir", NSH_ERRNO); + if (strncmp(cmd, "ifconfig", strlen("ifconfig")) == 0) + { + nsh_error(vtbl, "nsh: %s: %s: %d\n", cmd, + "procfs is not mounted", NSH_ERRNO); + } + else + { + nsh_error(vtbl, g_fmtcmdfailed, cmd, "opendir", NSH_ERRNO); + } + return ERROR; }