This is the mail archive of the ecos-discuss@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

How to connect RedBoot via Telnet running application


Hello,

I'd like to connect to RedBoot via Telnet during target's running net application.
I tried to run nc_test_slave program as application and connect to RedBoot via Telnet from host's cygwin.
The result is below.


$ telnet 172.16.1.200 9000
Trying 172.16.1.200...
telnet: Unable to connect to remote host: Connection refused

I append application running serial consol log below.

I am certain that the next excerpt from Anthony J. Massa's book is related to the cause.

--from Anthony J. Massa's book
NOTE:When using the Ethernet port for RedBoot communication
and in your application, it is important to set up the IP
addresses properly. The system distinguishes the destination of
a packet using the IP address. If the IP address for RedBoot and
the application are the same, RedBoot will receive all incoming
Ethernet packets, not passing them on to the application for processing.
To avoid this situation, it is best to use a static IP
address in one image and a separate static or dynamic image in
the other image.

I only set one IP address in CYGHWR_NET_DRIVER_ETH0_ADDRS_IP option like below.
cdl_option CYGHWR_NET_DRIVER_ETH0_ADDRS_IP {
default_value { "172.16.1.200" }
}


But I do not know how to set IP addresses separately.
Right now I disables BOOTP by option mainly because I do not know how to use it.
I would rather prefer the two static IPs without using BOOTP or DHCP.
How should I set static IP addresses between RedBoot and application without using BOOTP ?
I presumed that RedBoot's IP is setted by fconfig,but I could not rewrite Local IP address.
Whenever I tried to rewrite Local IP address,or Gateway IP address,it happened 'command abort' message like below.
I do not know what is wrong.Please help me.
Am I correct thinking if I rewite Local IP address by fconfig,I could set RedBoot IP address differently with application address ?


RedBoot> fconfig
scan_opts: first=1, argc=1
Run script at boot: true
Boot script:
Enter script, terminate with empty line

Boot script timeout (1000ms resolution): 3
Use BOOTP for network configuration: false
Gateway IP address: 172.16.1.1
Local IP address: 172.16.1.100
** command abort - illegal memory access?
RedBoot>

-- serial consol log begin
My Flash ID is 4:22f9:0:19
eth_drv_init:enaddr=0x8c000600
Ethernet eth0: MAC address 00:40:31:08:01:00
IP: 172.16.1.200/255.255.255.0, Gateway: 172.16.1.1
Default server: 172.16.1.1

RedBoot(tm) bootstrap and debug environment [ROM]
Non-certified release, version UNKNOWN - built 11:52:21, May 15 2008

Platform: inserter (SH 7709S)
Copyright (C) 2000, 2001, 2002, 2003, 2004 Red Hat, Inc.
Copyright (C) 2003, 2004, 2005, 2006 eCosCentric Limited

RAM: 0x8c000000-0x90000000, [0x8c00aa48-0x8ffed000] available
FLASH: 0xa0000000 - 0xa0400000, 64 blocks of 0x00010000 bytes each.
== Executing boot script in 3.000 seconds - enter ^C to abort
RedBoot>
RedBoot> load -v -m xmodem -b 0x8c410000 -c 0
CAddress offset = 0x00400000
Entry point: 0x8c410000, address range: 0x8c410000-0x8c45b180
xyzModem - CRC mode, 7060(SOH)/0(STX)/0(CAN) packets, 6 retries
RedBoot> fis create nc_slave -r 0x8c010000 -f 0xa0080000 -b 0x8c410000 -l 0x4b180
1 flash_addr=a0080000
An image named 'nc_slave' exists - continue (y/n)? y
... Erase from 0xa0080000-0xa00d0000: .....
... Program from 0x8c410000-0x8c45b180 at 0xa0080000: .....
... Erase from 0xa03f0000-0xa0400000: .
... Program from 0x8fff0000-0x90000000 at 0xa03f0000: .
RedBoot> My Flash ID is 4:22f9:0:19
eth_drv_init:enaddr=0x8c000600
Ethernet eth0: MAC address 00:40:31:08:01:00
IP: 172.16.1.200/255.255.255.0, Gateway: 172.16.1.1
Default server: 172.16.1.1


RedBoot(tm) bootstrap and debug environment [ROM]
Non-certified release, version UNKNOWN - built 11:52:21, May 15 2008

Platform: inserter (SH 7709S)
Copyright (C) 2000, 2001, 2002, 2003, 2004 Red Hat, Inc.
Copyright (C) 2003, 2004, 2005, 2006 eCosCentric Limited

RAM: 0x8c000000-0x90000000, [0x8c00aa48-0x8ffed000] available
FLASH: 0xa0000000 - 0xa0400000, 64 blocks of 0x00010000 bytes each.
== Executing boot script in 3.000 seconds - enter ^C to abort
RedBoot> fis load -b 0x8c010000 nc_slave
RedBoot> channel 0
RedBoot> go 0x8c010000
Network stack using 69632 bytes for misc space
                   69632 bytes for mbufs
                   139264 bytes for mbuf clusters
[cyg_net_init] Init: mbinit(0x00000000)
[cyg_net_init] Init: cyg_net_init_devs(0x00000000)
Init device 'lan91cxx_eth0'
[cyg_net_init] Init: loopattach(0x00000000)
[cyg_net_init] Init: ifinit(0x00000000)
[cyg_net_init] Init: domaininit(0x00000000)
[cyg_net_init] Init: cyg_net_add_domain(0x8c05ab18)
New domain internet at 0x00000000
[cyg_net_init] Init: cyg_net_add_domain(0x8c05a510)
New domain route at 0x00000000
[cyg_net_init] Init: call_route_init(0x00000000)
[cyg_net_init] Done
Start Network Characterization - SLAVE
BOOTP[eth0] op: REPLY
      htype: Ethernet
       hlen: 6
       hops: 0
        xid: 0x0
       secs: 0
      flags: 0x0
      hw_addr: 00:40:31:08:01:00
    client IP: 172.16.1.200
        my IP: 172.16.1.200
    server IP: 172.16.1.1
   gateway IP: 172.16.1.1
 options:
       subnet mask: 255.255.255.0
      IP broadcast: 172.16.1.255
           gateway: 172.16.1.1
[eth_drv_ioctl] Warning: Driver can't set multi-cast mode
[eth_drv_ioctl] Warning: Driver can't set multi-cast mode
[eth_drv_ioctl] Warning: Driver can't set multi-cast mode
No load = 58674
Set background load = 20%
Set background load = 0%
High Load[20] = 37130 => 37%
Set background load = 20%
Set background load = 0%
Load[10] = 47733 => 19%
Set background load = 20%
Set background load = 0%
Final load[10] = 47813 => 19%
Start test for eth0
-- serial consol log end

m mariga


-- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]