Setting up Telnetd?

Ian Caddy ianc at microsol.iinet.net.au
Mon Nov 15 00:22:50 UTC 2004


Hi Alan,

I just checked in our system and dname provides no devices either.

If you have the monitor running you can try the following command:

ls /dev

It should show the list of devices that have been installed on your 
system.  In our system, we have pty0 through to pty9 for the telnet drivers.

When you said you checkd errno, is that the actual variable errno, or 
was it the value returned by the fopen call.  If it was the value 
returned by the fopen call, there is another global variable called 
"errno" which should have a proper error number in it.

I think you are going to have to debug through the fopen call to get 
more information.

Sorry I can't be more help.

regards,

Ian Caddy



Alan Cudmore wrote:
> Hi Ian,
> I tried to check errno. It is -1 after the open call fails.
> I setup the rtems monitor and I was able to verify that the PTY device 
> is in my device table. The monitor also has a 'dname' command that is 
> supposed to list named devices ( I would think /dev/ptyX would show up 
> here ) but it reports nothing.
> I'm stumped for now.
> 
> Thanks,
> Alan
> 
> On Nov 9, 2004, at 8:50 PM, Ian Caddy wrote:
> 
>> Hi Alan,
>>
>> We use telnet and shell with RTEMS4.5.0 on a Coldfire 5307 device, so 
>> I am not sure if this is appropriate to you if you are using the 
>> latest RTEMS.
>>
>> When we configure our device table, we also setup an entry for the 
>> size of the table:
>>
>> #define NUMBER_DEVICE_DRIVERS ( (sizeof(Device_drivers) / 
>> sizeof(rtems_driver_address_table) ) - 1 )
>>
>> You didn't show it but I assume you have provided this entry (and that 
>> it is still required for later RTEMS versions).
>>
>> It sounds like your pty interface is being initialised otherwise the 
>> telnetd will not call the shell_init with a valid device number.
>>
>> What was the errno returned at the end of the error message, as that 
>> will indicate the reason why you couldn't open stdin?
>>
>> Do you have a debugger that you can step through the code, starting 
>> from shell_shell (shell.c) and following through the fopen call?
>>
>> I hope this has provided some help.
>>
>> regards,
>>
>> Ian Caddy
>>
>>
>> Alan Cudmore wrote:
>>
>>> I'm trying to set up the telnetd on a coldfire target. It has a 
>>> working network driver and FTPD.
>>> I created a device table entry for the PTY device:
>>> #define CONFIGURE_HAS_OWN_DEVICE_DRIVER_TABLE
>>> rtems_driver_address_table Device_drivers[] = {
>>> CONSOLE_DRIVER_TABLE_ENTRY,
>>> CLOCK_DRIVER_TABLE_ENTRY,
>>> PTY_DRIVER_TABLE_ENTRY,
>>> };
>>> I call rtems_initialize_telnetd() in my init program.
>>> When I bring the board up and telnet to it, I get a printf on the 
>>> console that tells me that the shell cannot open stdin./dev/pty0
>>> Is there anything else I left out?
>>> Thanks,
>>> Alan
>>
>>
> 
> 



More information about the users mailing list