using PPP on sparc / erc32 simulator
Joel Sherrill
joel.sherrill at OARcorp.com
Wed Mar 31 11:57:27 UTC 2010
I'm not much use on ppp having never even used it
as a home connection. But when you get it working,
I would really appreciate you putting together
a howto and submitting a demo application.
--joel
On 03/31/2010 05:20 AM, Thomas Dörfler wrote:
> 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
>>
>
>
More information about the users
mailing list