public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] Some simple questitions
@ 2006-09-04  7:05 Dmitry Varakin
  2006-09-04 11:37 ` Jürgen Lambrecht
  2006-09-04 18:47 ` [ECOS] " Grant Edwards
  0 siblings, 2 replies; 7+ messages in thread
From: Dmitry Varakin @ 2006-09-04  7:05 UTC (permalink / raw)
  To: ecos-discuss

Hello!

I have questitions about eCos:
1. Is it possible to change MAC and IP addresses "on the fly". For
example, function like "set_mac_addr (eth0, my_mac)".
2. Can I have direct access to processor's registers from my user
application? Linux has "mmap()" function for that purpose.
3. Is it possible to unload RedBoot from RAM when my user application
is starting (to increase amount of free RAM)?
4. Where can I download the toolchain to compile eCos with cygwin?

Thanks for all answers!

--
Dmitry.

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [ECOS] Some simple questitions
  2006-09-04  7:05 [ECOS] Some simple questitions Dmitry Varakin
@ 2006-09-04 11:37 ` Jürgen Lambrecht
  2006-09-04 18:47 ` [ECOS] " Grant Edwards
  1 sibling, 0 replies; 7+ messages in thread
From: Jürgen Lambrecht @ 2006-09-04 11:37 UTC (permalink / raw)
  To: Dmitry Varakin; +Cc: ecos-discuss

[-- Attachment #1: Type: text/plain, Size: 1250 bytes --]

Dmitry Varakin wrote:
> Hello!
> 
> I have questitions about eCos:
> 1. Is it possible to change MAC and IP addresses "on the fly". For
> example, function like "set_mac_addr (eth0, my_mac)".
yes, I do it.
Please search through the mailing list. It was not that easy to find, but 
I did find it: see attach ims_eth.c; and in the comments you can find a 
link to the original contribution from Sébastien Couret


> 2. Can I have direct access to processor's registers from my user
> application? Linux has "mmap()" function for that purpose.
> 3. Is it possible to unload RedBoot from RAM when my user application
> is starting (to increase amount of free RAM)?
yes, I do.
As Bob K also says, I use romram mode because my resources are indeed that 
scarce.
for safety, I always start up with redboot, and then jump to the 
application that is compiled in romram mode; I only needed to do some 
changes in hal_platform_setup not to initialize the hardware again (define 
out that assembly code for that specific startup)

> 4. Where can I download the toolchain to compile eCos with cygwin?
> 
> Thanks for all answers!
> 
> -- 
> Dmitry.
> 

-- 
Jürgen Lambrecht
Diksmuidse Heerweg 338
8200 Sint-Andries
Tel: +32 (0)50 842901
GSM: +32 (0)476 313389

[-- Attachment #2: ims_eth.c --]
[-- Type: text/plain, Size: 12870 bytes --]

/* #include <pkgconf/system.h> */
/* #ifdef CYGBLD_DEVS_ETH_DEVICE_H    // Get the device config if it exists */
/* #include CYGBLD_DEVS_ETH_DEVICE_H */
/* #endif */


#include <errno.h>
#include <network.h>
#include <netinet/if_ether.h>
#include <arpa/inet.h> //inet_addr
#include <sys/param.h>
#include <cyg/infra/diag.h>			// diag_snprintf

/* #include <cyg/hal/hal_arch.h> */
/* #include <cyg/io/eth/eth_drv.h> //eth defines */
#include "../inc/ims_logging.h" //debug_printf
#include "../inc/ims_global.h" //debug defines, tlv types, ..

#define MACSTRING 18


//struct	ifreq {
//#define IFHWADDRLEN  6
//	char	ifr_name[IFNAMSIZ];		/* if name, e.g. "en0" */
//	union {
//		struct	sockaddr ifru_addr;
//		struct	sockaddr ifru_dstaddr;
//		struct	sockaddr ifru_broadaddr;
//		struct	sockaddr ifru_hwaddr;
//		short	ifru_flags[2];
//		int	ifru_metric;
//		int	ifru_mtu;
//		int	ifru_phys;
//		int	ifru_media;
//		caddr_t	ifru_data;
//	} ifr_ifru;
//#define	ifr_addr	ifr_ifru.ifru_addr	/* address */
//#define	ifr_hwaddr	ifr_ifru.ifru_hwaddr	/* MAC address */
//#define	ifr_dstaddr	ifr_ifru.ifru_dstaddr	/* other end of p-to-p link */
//#define	ifr_broadaddr	ifr_ifru.ifru_broadaddr	/* broadcast address */
//#define	ifr_flags	ifr_ifru.ifru_flags[0]	/* flags */
//#define	ifr_prevflags	ifr_ifru.ifru_flags[1]	/* flags */
//#define	ifr_metric	ifr_ifru.ifru_metric	/* metric */
//#define	ifr_mtu		ifr_ifru.ifru_mtu	/* mtu */
//#define ifr_phys	ifr_ifru.ifru_phys	/* physical wire */
//#define ifr_media	ifr_ifru.ifru_media	/* physical media */
//#define	ifr_data	ifr_ifru.ifru_data	/* for use by interface */
//};

/* extern struct bootp eth0_bootp_data; */
/* extern cyg_bool_t   eth0_up; */
/* extern const char  *eth0_name; */

/* extern unsigned char __local_enet_addr[]; */
/* extern struct eth_drv_sc *__local_enet_sc; */
/* struct eth_drv_sc { */
/*     struct eth_hwr_funs *funs; */
/*     void                *driver_private; */
/*     const char          *dev_name; */
/*     int                  state; */
/*     struct arpcom        sc_arpcom; * ethernet common * */
/* }; */
/* struct eth_hwr_funs { */
/*     // Initialize hardware (including startup) */
/*     void (*start)(struct eth_drv_sc *sc, */
/*                   unsigned char *enaddr, */
/*                   int flags); */
/*     // Shut down hardware */
/*     void (*stop)(struct eth_drv_sc *sc); */
/*     // Device control (ioctl pass-thru) */
/*     int  (*control)(struct eth_drv_sc *sc, */
/*                     unsigned long key, */
/*                     void *data, */
/*                     int   data_length); */
/*     // Query - can a packet be sent? */
/*     int  (*can_send)(struct eth_drv_sc *sc); */
/*     // Send a packet of data */
/*     void (*send)(struct eth_drv_sc *sc, */
/*                  struct eth_drv_sg *sg_list, */
/*                  int sg_len, */
/*                  int total_len, */
/*                  unsigned long key); */
/*     // Receive [unload] a packet of data */
/*     void (*recv)(struct eth_drv_sc *sc, */
/*                  struct eth_drv_sg *sg_list, */
/*                  int sg_len); */
/*     // Deliver data to/from device from/to stack memory space */
/*     // (moves lots of memcpy()s out of DSRs into thread) */
/*     void (*deliver)(struct eth_drv_sc *sc); */
/*     // Poll for interrupts/device service */
/*     void (*poll)(struct eth_drv_sc *sc); */
/*     // Get interrupt information from hardware driver */
/*     int (*int_vector)(struct eth_drv_sc *sc); */
/*     // Logical driver interface */
/*     struct eth_drv_funs *eth_drv, *eth_drv_old; */
/* }; */
/* struct bootp { */
/*     unsigned char    bp_op;			* packet opcode type * */
/*     unsigned char    bp_htype;			* hardware addr type * */
/*     unsigned char    bp_hlen;			* hardware addr length * */
/*     unsigned char    bp_hops;			* gateway hops * */
/* #ifdef __ECOS */
/*     u_int32_t        bp_xid;			* transaction ID * */
/* #else */
/*     unsigned int     bp_xid;			* transaction ID * */
/* #endif */
/*     unsigned short   bp_secs;			* seconds since boot began * */
/*     unsigned short   bp_flags;			* RFC1532 broadcast, etc. * */
/*     struct in_addr   bp_ciaddr;			* client IP address * */
/*     struct in_addr   bp_yiaddr;			* 'your' IP address * */
/*     struct in_addr   bp_siaddr;			* server IP address * */
/*     struct in_addr   bp_giaddr;			* gateway IP address * */
/*     unsigned char    bp_chaddr[BP_CHADDR_LEN];	* client hardware address * */
/*     char	     bp_sname[BP_SNAME_LEN];	* server host name * */
/*     char	     bp_file[BP_FILE_LEN];	* boot file name * */
/*     unsigned char    bp_vend[BP_VEND_LEN];	* vendor-specific area * */
/*     // note that bp_vend can be longer, extending to end of packet. */
/* }; */
/* struct bootp eth0_bootp_data; filled in by init_all_network_interfaces*/
/*     diag_printf("BOOTP[%s] op: %s\n", intf, _bootp_op[bp->bp_op]); */
/*     diag_printf("       htype: %s\n", _bootp_hw_type[bp->bp_htype]); */
/*     diag_printf("        hlen: %d\n", bp->bp_hlen ); */
/*     diag_printf("        hops: %d\n", bp->bp_hops ); */
/*     diag_printf("         xid: 0x%x\n", bp->bp_xid ); */
/*     diag_printf("        secs: %d\n", bp->bp_secs ); */
/*     diag_printf("       flags: 0x%x\n", bp->bp_flags ); */
/*     diag_printf("       hw_addr: "); */
/*     for (i = 0;  i < bp->bp_hlen;  i++) { */
/*         diag_printf("%02x", bp->bp_chaddr[i]); */
/*         if (i != (bp->bp_hlen-1)) diag_printf(":"); */
/*     } */
/*     diag_printf("\n"); */
/*     diag_printf("     client IP: %s\n", inet_ntoa(bp->bp_ciaddr)); */
/*     diag_printf("         my IP: %s\n", inet_ntoa(bp->bp_yiaddr)); */
/*     diag_printf("     server IP: %s\n", inet_ntoa(bp->bp_siaddr)); */
/*     diag_printf("    gateway IP: %s\n", inet_ntoa(bp->bp_giaddr)); */

/*     optover = 0; // See whether sname and file are overridden for options */
/*     length = sizeof(optover); */
/*     (void)get_bootp_option( bp, TAG_DHCP_OPTOVER, &optover, &length ); */
/*     if ( !(1 & optover) && bp->bp_sname[0] ) */
/*         diag_printf("        server: %s\n", bp->bp_sname); */
/*     if ( ! (2 & optover) && bp->bp_file[0] ) */
/*         diag_printf("          file: %s\n", bp->bp_file); */
/*     if (bp->bp_vend[0]) { */
/*         diag_printf("  options:\n"); */
/*         op = &bp->bp_vend[4]; */
/*         while (*op != TAG_END) { */
/*             switch (*op) { */
/*             case TAG_PAD: */
/*                 op++; */
/*                 continue; */
/*             case TAG_SUBNET_MASK: */
/*             case TAG_GATEWAY: */
/*             case TAG_IP_BROADCAST: */
/*             case TAG_DOMAIN_SERVER: */
/*                 ap = (char *)&addr[0]; */
/*                 len = *(op+1); */
/*                 for (i = 0;  i < len;  i++) { */
/*                     *ap++ = *(op+i+2); */
/*                 } */
/*                 if (*op == TAG_SUBNET_MASK)   ap =  "  subnet mask"; */
/*                 if (*op == TAG_GATEWAY)       ap =  "      gateway"; */
/*                 if (*op == TAG_IP_BROADCAST)  ap =  " IP broadcast"; */
/*                 if (*op == TAG_DOMAIN_SERVER) ap =  "domain server"; */
/* BOOTP[eth0] op: REPLY */
/*        htype: Ethernet */
/*         hlen: 6 */
/*         hops: 0 */
/*          xid: 0x0 */
/*         secs: 0 */
/*        flags: 0x0 */
/*        hw_addr: 00:0e:3d:02:00:00 */
/*      client IP: 10.0.56.252 */
/*          my IP: 10.0.56.252 */
/*      server IP: 10.0.60.1 */
/*     gateway IP: 0.0.0.0 */
/*   options: */
/*         subnet mask: 255.255.0.0 */
/*        IP broadcast: 10.0.255.255 */
/*             gateway: 0.0.0.0 */

char* ether_print(const char cp[ETHER_ADDR_LEN], char *etheraddr,const unsigned int len)
{
 diag_snprintf(etheraddr,len,"%02x:%02x:%02x:%02x:%02x:%02x",cp[0],cp[1],cp[2],cp[3],cp[4],cp[5]);
 return(etheraddr);
}


#define FPGA_MAC_REG 0x08000050
void std_ims_read_mac(char *esa)
{
  int i;
  cyg_uint16 status;
  //todo: read it from fis
  for (i=0; i<6; i+=2) {
    HAL_READ_UINT16((FPGA_MAC_REG+i), status);
    esa[4-i] = (char)(status>>8);
    esa[5-i] = (char)(status);
  }
#if  NETW_DEBUG
  debug_printf("FPGA Mac addr %02x:%02x:%02x:%02x:%02x:%02x\n",
               esa[0], esa[1], esa[2], esa[3], esa[4], esa[5]);
#endif
}
///net/common/current/tests/set_mac_address.c: not usable for me
//http://sourceware.org/ml/ecos-discuss/2005-08/msg00015.html
//JL: OK, this also changes the fpga mac address register (via ecos eth driver
//ioctl calls)
TLV_BOOL set_mac_address(const char *interface, char *mac_address)
{
  int test_sock=0, i=0;			// Socket PF_INET/SOCK_DGRAM
  struct ifreq ifr;
#if  NETW_DEBUG
  unsigned char display[MACSTRING];
#endif
  test_sock = socket( PF_INET, SOCK_DGRAM, 0 );
  if( test_sock == -1 )
  {
    debug_printf("Cannot obtain socket\n");
    return TLV_FALSE;
  }
  
  memset(&ifr,0,sizeof( struct ifreq ) );
  strncpy(ifr.ifr_name,interface,IFNAMSIZ);
  for (i=0;i<ETHER_ADDR_LEN;i++)
    ifr.ifr_hwaddr.sa_data[i]=mac_address[i];
#if  NETW_DEBUG
  ether_print(mac_address,display,MACSTRING);
#endif
  if( ioctl( test_sock, SIOCSIFHWADDR, &ifr ) == -1 )
  {
    debug_printf("Cannot set MAC adress for %s: %s\n",interface,strerror(errno));
    close(test_sock);
    return TLV_FALSE;
  }
  else 
  {
#if  NETW_DEBUG
    debug_printf("MAC Adress for %s set to %s\n",interface,display);
#endif
    close(test_sock);
    return TLV_TRUE;
  }

/* #if  NETW_DEBUG */
/*   debug_printf( "Mac addr %02x:%02x:%02x:%02x:%02x:%02x\n", */
/*                 ifr.ifr_hwaddr.sa_data[0], */
/*                 ifr.ifr_hwaddr.sa_data[1], */
/*                 ifr.ifr_hwaddr.sa_data[2], */
/*                 ifr.ifr_hwaddr.sa_data[3], */
/*                 ifr.ifr_hwaddr.sa_data[4], */
/*                 ifr.ifr_hwaddr.sa_data[5] ); */
/* #endif */
}

/*   __local_enet_sc->funs->control(__local_enet_sc, */
/*   ETH_DRV_SET_MAC_ADDRESS,new_eth0_addr, 0); */
/*     for (i = 0;  i < bp->bp_hlen;  i++) { */
/*         diag_printf("%02x", bp->bp_chaddr[i]); */
/*         if (i != (bp->bp_hlen-1)) diag_printf(":"); */
/*        hw_addr: 00:0e:3d:02:00:00 */
/* control(struct eth_drv_sc* sc, unsigned long key, void* data, int
   data_length) Only the last 2 bytes are written. */


//http://sourceware.org/ml/ecos-discuss/2005-08/msg00015.html
TLV_BOOL set_ip_address(const char *interface, const char *ip_address)
{
  int test_sock;
  struct sockaddr_in* addr=NULL;
  struct ifreq ifr;

  test_sock = socket( PF_INET, SOCK_DGRAM, 0 );
  if( test_sock == -1 )
  {
    debug_printf("Cannot obtain IP sock\n");
    return TLV_FALSE;
  }

  memset(&ifr,0,sizeof( struct ifreq ) );
  strncpy(ifr.ifr_name,interface,IFNAMSIZ);
  //JL: Delete old IP address, else there will be 2 IP addresses!
  if( ioctl( test_sock, SIOCGIFADDR, &ifr ) == -1 )
  {
    debug_printf("Cannot obtain IP address of %s: %s\n",interface,strerror(errno));
  }
  else
  {
    if( ioctl( test_sock, SIOCDIFADDR, &ifr ) != 0 )
    {
      debug_printf("Cannot suppress old IP for %s: %s\n",interface,strerror(errno));
    }
  }

  memset( &ifr, 0, sizeof( struct ifreq ) );
  addr= (struct sockaddr_in *)&(ifr.ifr_addr);
  memset(addr, 0, sizeof( struct sockaddr_in) );
  addr->sin_len=sizeof(struct sockaddr_in);
  addr->sin_family=AF_INET;
  addr->sin_addr.s_addr=inet_addr(ip_address);
  strncpy(ifr.ifr_name,interface,IFNAMSIZ);

  if( ioctl( test_sock, SIOCSIFADDR, &ifr ) != 0 )
  {
    debug_printf("Cannot set IP address of %s to %s: %s\n",interface,ip_address,strerror(errno));
    close(test_sock);
    return TLV_FALSE;;
  }
  else 
  {
#if  NETW_DEBUG
    debug_printf("IP address for %s set to %s\n",interface,inet_ntoa(addr->sin_addr));
#endif
    close(test_sock);
    return TLV_TRUE;
  }
}

TLV_BOOL read_ip_address(const char *interface, char *ip_address)
{
  int s;
  struct ifreq ifr;
  struct sockaddr_in* addr=NULL;
  
  s = socket(AF_INET, SOCK_DGRAM, 0);
  if (s < 0) 
  {
    debug_printf("Cannot obtain IP socket\n");
    return TLV_FALSE;
  }

  strcpy(ifr.ifr_name, interface);

  if( ioctl( s, SIOCGIFADDR, &ifr ) == -1 )
  {
    debug_printf("Cannot obtain IP address\n");
    return TLV_FALSE;
  }
  else
  {
    addr= (struct sockaddr_in *)&(ifr.ifr_addr);
    strcpy(ip_address,inet_ntoa(addr->sin_addr));
#if  NETW_DEBUG
    debug_printf("IP address for '%s' is '%s'\n",interface,inet_ntoa(addr->sin_addr));
    show_bootp(eth0_name, &eth0_bootp_data);
/*     show_network_tables(); */
#endif
    return TLV_TRUE;
  }
}

[-- Attachment #3: Type: text/plain, Size: 148 bytes --]

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [ECOS]  Re: Some simple questitions
  2006-09-04  7:05 [ECOS] Some simple questitions Dmitry Varakin
  2006-09-04 11:37 ` Jürgen Lambrecht
@ 2006-09-04 18:47 ` Grant Edwards
  2006-09-05  0:17   ` Grant Edwards
  1 sibling, 1 reply; 7+ messages in thread
From: Grant Edwards @ 2006-09-04 18:47 UTC (permalink / raw)
  To: ecos-discuss

On 2006-09-04, Dmitry Varakin <dvarakin@gmail.com> wrote:

> I have questitions about eCos:

> 1. Is it possible to change MAC and IP addresses "on the fly". For
> example, function like "set_mac_addr (eth0, my_mac)".

Sure. Most Ethernet drivers support that, and changing the IP
address is done using the normal BSD sycsctrl calls.

> 2. Can I have direct access to processor's registers from my user
> application?

Yes.  Gcc allows inline assembly language that allows access to
processor registers.

> Linux has "mmap()" function for that purpose.

No, it doesn't.  That's not what mmap() does.

> 3. Is it possible to unload RedBoot from RAM when my user application
> is starting (to increase amount of free RAM)?

I'm not sure what you mean by "unload".  Applications are free
to overwrite any RAM that RedBoot uses as long as they don't
try to return to RedBoot afterwards

> 4. Where can I download the toolchain to compile eCos with cygwin?

Try eCosCentric.com.  Better yet, try Linux. ;)

-- 
Grant Edwards
grante@visi.com


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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [ECOS]  Re: Some simple questitions
  2006-09-04 18:47 ` [ECOS] " Grant Edwards
@ 2006-09-05  0:17   ` Grant Edwards
  2006-09-05  9:10     ` Dmitry Varakin
  0 siblings, 1 reply; 7+ messages in thread
From: Grant Edwards @ 2006-09-05  0:17 UTC (permalink / raw)
  To: ecos-discuss

On 2006-09-04, Grant Edwards <grante@visi.com> wrote:

> Yes.  Gcc allows inline assembly language that allows access
> to processor registers.
>
>> Linux has "mmap()" function for that purpose.
>
> No, it doesn't.  That's not what mmap() does.

Are you asking about registers in memory-mapped peripherals?

Anything that's memory-mapped is just "there".  eCos only has a
single address space.

-- 
Grant Edwards
grante@visi.com



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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [ECOS] Re: Some simple questitions
  2006-09-05  0:17   ` Grant Edwards
@ 2006-09-05  9:10     ` Dmitry Varakin
  2006-09-05  9:41       ` Andrew Lunn
  0 siblings, 1 reply; 7+ messages in thread
From: Dmitry Varakin @ 2006-09-05  9:10 UTC (permalink / raw)
  To: ecos-discuss

> Are you asking about registers in memory-mapped peripherals?
> Anything that's memory-mapped is just "there".  eCos only has a
> single address space.

Thanks, it's ok.

I've got a problem with changing MAC:
When I change MAC, my debug via GDB goes down, I think it's ok, it
should be so. But after changing MAC, my board becomes unreachable for
all network connections, even for pings. ARP table is clear, but
nothing works. The example
ecos/packages/net/common/current/tests/set_mac_address.c has the same
problem.
The last string I see in GDB:
"MAC Adress for 'eth0' set to 08:88:12:34:56:77'in server test/nstream ok"
or
"Setting MAC of eth0 to 00:90:27:8c:57:dd
eth0 socket is 3:
Mac addr 00:90:27:8c:57:dd
eth0 ioctl(SIOCSIFHWADDR) succeeded"
in case of using an example

When I try to set the same MAC as current, my program doesn't "fails".
So the procedure of changing MAC is OK. Have you any ideas?
Thanks!

--
Dmitry

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [ECOS] Re: Some simple questitions
  2006-09-05  9:10     ` Dmitry Varakin
@ 2006-09-05  9:41       ` Andrew Lunn
  2006-09-06 16:42         ` Dmitry Varakin
  0 siblings, 1 reply; 7+ messages in thread
From: Andrew Lunn @ 2006-09-05  9:41 UTC (permalink / raw)
  To: Dmitry Varakin; +Cc: ecos-discuss

On Tue, Sep 05, 2006 at 01:10:16PM +0400, Dmitry Varakin wrote:
> >Are you asking about registers in memory-mapped peripherals?
> >Anything that's memory-mapped is just "there".  eCos only has a
> >single address space.
> 
> Thanks, it's ok.
> 
> I've got a problem with changing MAC:
> When I change MAC, my debug via GDB goes down, I think it's ok, it
> should be so. But after changing MAC, my board becomes unreachable for
> all network connections, even for pings. ARP table is clear, but
> nothing works. The example
> ecos/packages/net/common/current/tests/set_mac_address.c has the same
> problem.
> The last string I see in GDB:
> "MAC Adress for 'eth0' set to 08:88:12:34:56:77'in server test/nstream ok"
> or
> "Setting MAC of eth0 to 00:90:27:8c:57:dd
> eth0 socket is 3:
> Mac addr 00:90:27:8c:57:dd
> eth0 ioctl(SIOCSIFHWADDR) succeeded"
> in case of using an example
> 
> When I try to set the same MAC as current, my program doesn't "fails".
> So the procedure of changing MAC is OK. Have you any ideas?

You need to flush the arp entry in your host. It has no idea the MAC
address has changed and it will continue to use the old one. use 

arp -d my_ecos_devices_ip_address

The host will then do the arp process again and get the new MAC
address.

        Andrew

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [ECOS] Re: Some simple questitions
  2006-09-05  9:41       ` Andrew Lunn
@ 2006-09-06 16:42         ` Dmitry Varakin
  0 siblings, 0 replies; 7+ messages in thread
From: Dmitry Varakin @ 2006-09-06 16:42 UTC (permalink / raw)
  To: ecos-discuss

> > ARP table is clear, but nothing works. The example

> You need to flush the arp entry in your host. It has no idea the MAC
> address has changed and it will continue to use the old one. use
>
> arp -d my_ecos_devices_ip_address
>
> The host will then do the arp process again and get the new MAC
> address.
>

As I wrote, my ARP table is clear. Adding new MAC to ARP table
manually doesn't help also.

-- 
Dmitry

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2006-09-06 16:42 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-09-04  7:05 [ECOS] Some simple questitions Dmitry Varakin
2006-09-04 11:37 ` Jürgen Lambrecht
2006-09-04 18:47 ` [ECOS] " Grant Edwards
2006-09-05  0:17   ` Grant Edwards
2006-09-05  9:10     ` Dmitry Varakin
2006-09-05  9:41       ` Andrew Lunn
2006-09-06 16:42         ` Dmitry Varakin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).