using PPP on sparc / erc32 simulator

Thomas Dörfler Thomas.Doerfler at imd-systems.de
Wed Mar 31 10:20:35 UTC 2010


Tiemen,

I havn't worked with PPP for ages, but one thing comes to my mind: How
do you deal with the PPP connection outside the simulator?

In real life, you would connect your serial interface to a serial
interface of a server (possibly with a modem line in between). Then the
PPP server would try to communication with your target and they would
negotiate communication parameters AND the server would pass in IP and
routing information.

So as long as the PPP link is down, you will not be able to establish IP
communication.

wkr,
Thomas.


On 31.03.2010 12:04, Tiemen Schut wrote:
> Dear list,
> 
> I'm trying to use the erc32 simulator provided in gdb to simulate my images. This is all going very well, setting up and using the simulator was surprisingly easy.
> 
> However, on my real target I also use an ethernet interface, which the simulator does not have. At first I though about implementing my own simulated ethernet device, but that looks like it's going to be a *lot* of work.
> 
> Fortunately, the simulator does support up to two uarts. So, I though to use PPP on one of the simulated uarts and then somehow make this uart connect to a tty device on my Linux pc. Please note that all this PPP stuff is very new for me, so it's quite possible that I'm doing some or more things fundamentally wrong. If so, please correct me :)
> 
> I was thinking that it would be possible to use the rtems PPP driver as if it were an ethernet driver. So, when building for the real target I have something like:
> 
> static struct rtems_bsdnet_ifconfig gNetdriverConfig = { 
>     (char *)"gr_eth1",              // name 
>     RTEMS_BSP_NETWORK_DRIVER_ATTACH,// attach 
>     NULL,
>     (char *)DEFAULT_IP_ADDR,        // ip_address 
>     (char *)DEFAULT_IP_NETMASK,     // ip_netmask 
> };
> 
> And when building for the simulator I have (based on the pppd example, don't know if it's even close to correct):
> 
> extern "C" int rtems_ppp_driver_attach(struct rtems_bsdnet_ifconfig *config, int attaching);
> static struct rtems_bsdnet_ifconfig gNetdriverConfig = { 
>     (char *)"ppp0",                 /* name */
>     rtems_ppp_driver_attach,        /* attach function */
>     NULL,                           /* link to next interface */
>     NULL,                           /* ip_address */
>     NULL,                           /* ip_netmask */
>     NULL,
>     0
> };
> 
> This seems to do *something*. However, as the interface doesn't have an IP address whatsoever I don't seem to be able to bind a socket to it, so I don't get how that would be supposed to work. If I do provide an IP address in the above struct, rtems will tell me:
> 
> Can't set default route: Network is unreachable
> 
> as soon as I call rtems_bsdnet_initialize_network().
> 
> I'm kinda lost here, any help or hints would be appreciated.
> 
> Thanks,
> 
> Tiemen
> 
> 
> _______________________________________________
> rtems-users mailing list
> rtems-users at rtems.org
> http://www.rtems.org/mailman/listinfo/rtems-users


-- 
--------------------------------------------
IMD Ingenieurbuero fuer Microcomputertechnik
Thomas Doerfler           Herbststrasse 8
D-82178 Puchheim          Germany
email:    Thomas.Doerfler at imd-systems.de
PGP public key available at:
     http://www.imd-systems.de/pgpkey_en.html



More information about the users mailing list