Re: Using the network in the NuttX simulator

2020-02-13 Thread Xiang Xiao
On Fri, Feb 14, 2020 at 8:10 AM Adam Feuer wrote: > > Xiang, > > Thanks for the encouragement, I will submit my simulator route setup script > and docs in a PR soon. I too think it's best to keep the two scripts > separate right now. > Sure , it's fine in either form. > cheers > adam > > On Thu,

Re: Using the network in the NuttX simulator

2020-02-13 Thread Adam Feuer
Xiang, Thanks for the encouragement, I will submit my simulator route setup script and docs in a PR soon. I too think it's best to keep the two scripts separate right now. cheers adam On Thu, Feb 13, 2020 at 4:49 AM Xiang Xiao wrote: > On Thu, Feb 13, 2020 at 10:33 AM Adam Feuer wrote: > > >

Re: Using the network in the NuttX simulator

2020-02-13 Thread Xiang Xiao
On Thu, Feb 13, 2020 at 10:33 AM Adam Feuer wrote: > > Thanks to Xiang and Greg, I got Internet networking running in the > simulator. > > Xiang, your configuration as you sent it didn't work for me, but using it > as a base with some modifications, I got the simulator to compile. > Then with some

Re: Using the network in the NuttX simulator

2020-02-12 Thread Adam Feuer
Thanks to Xiang and Greg, I got Internet networking running in the simulator. Xiang, your configuration as you sent it didn't work for me, but using it as a base with some modifications, I got the simulator to compile. Then with some debugging and using your simbridge script, I was able to get the

Re: Using the network in the NuttX simulator

2020-02-10 Thread Adam Feuer
Xiang, Thank you! It's late here in Seattle WA USA; I'll try it tomorrow! cheers adam On Mon, Feb 10, 2020 at 10:40 PM Xiang Xiao wrote: > MAC is assigned through: > tapdev_init->set_macaddr->netdriver_setmacaddr > > netinit task is responsible for the networking initialization, so it > is a g

Re: Using the network in the NuttX simulator

2020-02-10 Thread Xiang Xiao
MAC is assigned through: tapdev_init->set_macaddr->netdriver_setmacaddr netinit task is responsible for the networking initialization, so it is a good indicator that the iniitaliation finish succesfully if ps doesn't list it any more. Here is my config: # # This file is autogenerated: PLEASE DO N

Re: Using the network in the NuttX simulator

2020-02-10 Thread Adam Feuer
Xiang, Looks like attachments aren't making it through for some reason. Would you be willing to just paste the config into an email message? BTW my ethernet interface isn't getting a MAC address... it's all 0's. Your virtual ethernet has one. So something is wrong with the netinit for my interfac

Re: Using the network in the NuttX simulator

2020-02-10 Thread Xiang Xiao
It's my full config, but to avoid the LittleVGL downloading, I remove some graphic related config. Here is my output with the latest mainline: xiaoxiang@xiaoxiang-VirtualBox:~/nuttx/nuttx$ sudo ./nuttx NuttShell (NSH) NuttX-8.2 nsh> ps PID GROUP PRI POLICY TYPENPX STATEEVENT SIGMAS

Re: Using the network in the NuttX simulator

2020-02-10 Thread Adam Feuer
Thank you Xiang. I tried your config options, but the simulator still crashes when I do a ping. You didn't attach a whole config file– would you be willing to send one? cheers adam On Mon, Feb 10, 2020 at 8:50 PM Xiang Xiao wrote: > Do you enable CONFIG_SIM_NET_BRIDGE? > To get the basic netw

Re: Using the network in the NuttX simulator

2020-02-10 Thread Xiang Xiao
Do you enable CONFIG_SIM_NET_BRIDGE? To get the basic network, the below options are required: CONFIG_NET=y CONFIG_NETINIT_DHCPC=y CONFIG_NETUTILS_DHCPC=y CONFIG_NET_ICMP=y CONFIG_NET_ICMP_SOCKET=y CONFIG_NET_UDP=y CONFIG_NET_UDP_BINDTODEVICE=y CONFIG_SIM_NET_BRIDGE=y CONFIG_SYSTEM_PING=y IPv

Re: Using the network in the NuttX simulator

2020-02-10 Thread Adam Feuer
Xiang, I changed my config so I now see an eth0 interface, but when I ifconfig it to have a static IP on my local net, I can't ping anything– I get this: > > nsh>ping 192.168.46.1 > ERROR: socket() failed: 106 > Here's my ifconfig output: > > nsh>ifconfig > lo Link encap:Local Loopback at UP >

Re: Using the network in the NuttX simulator

2020-02-10 Thread Adam Feuer
Xiang, Thanks for the tips! I tried to get this working, but I don't see any network interfaces on my nuttx system other than loopback. I ran the script on my Linux box, it created a nuttx0: interface with an IP address. But on the nuttx simulator all I see is this: nsh> ifconfig > lo Link enca

Re: Using the network in the NuttX simulator

2020-02-10 Thread Xiang Xiao
Adam, please follow this instruction if you want to connect the real network instead loopback: https://github.com/apache/incubator-nuttx/pull/249/commits/1b489449f790c2b4618df9133114bb05f0132e87 The setup is very simple, you don't need config any IP address manually. Thanks Xiang On Tue, Feb 11,

Re: Using the network in the NuttX simulator

2020-02-10 Thread Adam Feuer
Greg, Ok, I will see what I can do to improve the sim tcpblaster. -adam On Mon, Feb 10, 2020 at 1:06 PM Gregory Nutt wrote: > > > > >> The debugging output is great! Thanks. I'll try that on the SAMA5D36 > >> too. > >> With CONFIG_SIM_WALLTIME=y the loopback tcpblaster seems to chunk along > >

Re: Using the network in the NuttX simulator

2020-02-10 Thread Gregory Nutt
The debugging output is great! Thanks. I'll try that on the SAMA5D36 too. With CONFIG_SIM_WALLTIME=y the loopback tcpblaster seems to chunk along pretty quickly: Sent 50 buffers:    200.0 Kb (avg   4.0 Kb) in 7823.46 Sec ( 0.0 Kb/Sec) Received 50 buffers: 66.6 Kb (avg   1.3 Kb) in 2575.5

Re: Using the network in the NuttX simulator

2020-02-10 Thread Gregory Nutt
The debugging output is great! Thanks. I'll try that on the SAMA5D36 too. With CONFIG_SIM_WALLTIME=y the loopback tcpblaster seems to chunk along pretty quickly: Sent 50 buffers:200.0 Kb (avg 4.0 Kb) in 7823.46 Sec (0.0 Kb/Sec) Received 50 buffers: 66.6 Kb (avg 1.3 Kb) in 2575.5

Re: Using the network in the NuttX simulator

2020-02-10 Thread Adam Feuer
Greg, The debugging output is great! Thanks. I'll try that on the SAMA5D36 too. With CONFIG_SIM_WALLTIME=y the loopback tcpblaster seems to chunk along pretty quickly: Sent 50 buffers:200.0 Kb (avg 4.0 Kb) in 7823.46 Sec (0.0 Kb/Sec) Received 50 buffers: 66.6 Kb (avg 1.3 Kb) in 257

Re: Using the network in the NuttX simulator

2020-02-10 Thread Gregory Nutt
Received 50 buffers: 66.8 Kb (avg 1.3 Kb) in 101.00 Sec (    0.6 Kb/Sec) So maybe it's going very very slowly? Okay.  I just didn't way long enough.  Remove CONFIG_SIM_WALLTIME=y from your configuration and it should go a lot faster (maybe too fast). OR maybe there really is some ki

Re: Using the network in the NuttX simulator

2020-02-10 Thread Gregory Nutt
Oops, I spoke too soon. I did get an output line after a bunch of minutes: Received 50 buffers: 66.8 Kb (avg 1.3 Kb) in 101.00 Sec (0.6 Kb/Sec) So maybe it's going very very slowly? Okay.  I just didn't way long enough.  Remove CONFIG_SIM_WALLTIME=y from your configuration and

Re: Using the network in the NuttX simulator

2020-02-10 Thread Gregory Nutt
On 2/10/2020 2:19 PM, Adam Feuer wrote: Greg, I tried the IPv6 version you sent... It starts, but there's no further output: nsh> tcpclient Binding to IPv6 Address: ::::::: server: Accepting connections on port 5471 Connecting to IPv6 Address: :::000

Re: Using the network in the NuttX simulator

2020-02-10 Thread Adam Feuer
Yeah it's going but very slowly: > Received 50 buffers: 66.8 Kb (avg 1.3 Kb) in 101.00 Sec (0.6 > Kb/Sec) > Received 50 buffers: 66.6 Kb (avg 1.3 Kb) in 101.00 Sec (0.6 > Kb/Sec) > Sent 50 buffers:200.0 Kb (avg 4.0 Kb) in 292.90 Sec (0.6 Kb/Sec) > Received 50 buffers:

Re: Using the network in the NuttX simulator

2020-02-10 Thread Gregory Nutt
Well, it does look like it is sending TCP packets.  I switched to IPv4 and enabled debug output.  In the debug output I can see that it is sending and receiving TCP packets and that the TCP packets are being ACKed.  But, for some reason, there is no printf output.  I think TCP is working in thi

Re: Using the network in the NuttX simulator

2020-02-10 Thread Adam Feuer
Oops, I spoke too soon. I did get an output line after a bunch of minutes: Received 50 buffers: 66.8 Kb (avg 1.3 Kb) in 101.00 Sec (0.6 > Kb/Sec) > So maybe it's going very very slowly? -adam On Mon, Feb 10, 2020 at 12:19 PM Adam Feuer wrote: > Greg, > > I tried the IPv6 version you

Re: Using the network in the NuttX simulator

2020-02-10 Thread Adam Feuer
Greg, I tried the IPv6 version you sent... It starts, but there's no further output: > > nsh> tcpclient > Binding to IPv6 Address: ::::::: > server: Accepting connections on port 5471 > Connecting to IPv6 Address: :::::::0100 > client: C

Re: Using the network in the NuttX simulator

2020-02-10 Thread Gregory Nutt
nsh> tcpclient Binding to IPv6 Address: ::::::: server: Accepting connections on port 5471 Connecting to IPv6 Address: :::::::0100 client: Connected server: Connection accepted -- receiving Then nothing more. I

Re: Using the network in the NuttX simulator

2020-02-10 Thread Gregory Nutt
I am creating a simulator example that runs the TCP blaster example using the loopback 127.0.0.1 device. I will give that to you once I verify it. Thanks Greg. That is exactly what I am trying to create, so I can get some insight into what's wrong with my SAMA5D36 configuration. I submitted

Re: Using the network in the NuttX simulator

2020-02-10 Thread Adam Feuer
> I am creating a simulator example that runs the TCP blaster example > using the loopback 127.0.0.1 device. I will give that to you once I > verify it. > Thanks Greg. That is exactly what I am trying to create, so I can get some insight into what's wrong with my SAMA5D36 configuration. cheers a

Re: Using the network in the NuttX simulator

2020-02-10 Thread Gregory Nutt
I'm trying to get the NuttX simulator working with TCP/IP networking. I used the sim:nsh defconfig as a base, then used "make menuconfig" to select TCP/IP, ICMP, and ping commands. My host is Ubuntu 19.10 Eoan. I installed bridge-utils and configured a bridge device nuttx0 and gave it an IP ad