CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

RTL8019AS problem

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
silelis



Joined: 12 Jun 2007
Posts: 68
Location: Poland, podlaskie district

View user's profile Send private message

RTL8019AS problem
PostPosted: Wed Aug 08, 2007 3:29 am     Reply with quote

Hello all,

I wrote simple program to test my MMLan2 Ethernet interface based of RTL8019as chip.

Source code is:

Quote:

#include "D:\tempomat_projekt\sieciowka\sieciowka.h"
#include <stdio.h>
#include <stdlib.h>
#include <RTL8019.C>

void main()
{

byte buffor[500];

//ARP frame

buffor[0]=0xff; //broadcast FF FF FF FF FF FF
buffor[1]=0xff;
buffor[2]=0xff;
buffor[3]=0xff;
buffor[4]=0xff;
buffor[5]=0xff;
buffor[6]=0x01; //SENDER MAC ADRESS 01 02 03 04 05 06
buffor[7]=0x02;
buffor[8]=0x03;
buffor[9]=0x04;
buffor[10]=0x05;
buffor[11]=0x06;
buffor[12]=0x08; //TYPE ARP 08 06
buffor[13]=0x06;
buffor[14]=0x00; //Hardware type (ETHERNET) 00 01
buffor[15]=0x01;
buffor[16]=0x08; //PROTOCOL TYPE (IP) 08 00
buffor[17]=0x00;
buffor[18]=0x06; //HARDWARE SIZE 06
buffor[19]=0x04; //PROTOCOL SIZE 04
buffor[20]=0x00; //OPCODE REQUEST 00 01
buffor[21]=0x01;
buffor[22]=0x01; //SENDER MAC ADRES 01 02 03 04 05 06
buffor[23]=0x02;
buffor[24]=0x03;
buffor[25]=0x04;
buffor[26]=0x05;
buffor[27]=0x06;
buffor[28]=0xAC; //sender IP 172.16.0.5
buffor[29]=0x10;
buffor[30]=0x00;
buffor[31]=0x05;
buffor[32]=0x00; //TARGET MAC ADRES 00 00 00 00 00 00
buffor[33]=0x00;
buffor[34]=0x00;
buffor[35]=0x00;
buffor[36]=0x00;
buffor[37]=0x00;
buffor[38]=0xAC; //TARGET IP 172.16.0.2
buffor[39]=0x10;
buffor[40]=0x00;
buffor[41]=0x02;

nic_init(); //MMLan2 init

output_low(PIN_B7); //LED off
delay_ms(15000); //delay (I put it to give time for Lan devices to initialize them- I think this is unnecessary)
output_high(PIN_B7); //Led on (after 15s period)

nic_begin_packet_tx(42);
nic_packet_put_data(*buffor[0],42);
nic_packet_end_tx();

}



The buffor is ARP request. My PC Ethernet interface is configured:
IP: 172.16.0.2
MAC 11:11:11:11:11:11
Mask:255.255.255.0

I execute Wireshark sniffer, but I do not receive any ARP request frame sent by my MMLan2 (Source IP 172.16.0.5 Source MAC 01 02 03 04 05 06).

The nic_init(); executes correctly because PC Ethernet is switched on.

What is wrong??
silelis



Joined: 12 Jun 2007
Posts: 68
Location: Poland, podlaskie district

View user's profile Send private message

PostPosted: Wed Aug 08, 2007 6:16 am     Reply with quote

Or maybe some one have his own test program for RTL8019as???
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group