Search found 51 matches

by darko.jola
07 Aug 2013 08:39
Forum: Library Development Discussion
Topic: New Ethernet library with improved TCP/IP Stack
Replies: 100
Views: 111356

Re: New Ethernet library with improved TCP/IP Stack

Hello, active LED1 indicating valid link, and blinks to indicating link activity. You can check status of link by poling bit 2 of Basic Status register of LAN8720 phy chip. You can use some code like this: const char _PHY_BSR = 1; int regValue; ... regValue = 0; while(!(regValue & 0b100)) { Net_Ethe...
by darko.jola
01 Aug 2013 07:37
Forum: Library Development Discussion
Topic: New Ethernet library with improved TCP/IP Stack
Replies: 100
Views: 111356

Re: New Ethernet library with improved TCP/IP Stack

Hello I download your code and change only network parameters. I try it multiple times and always get same result: 0 fails. Untitled.jpg I can see from your code that you use different config parameter during init on AVR and STM. It works for me, but is could be possible that AUTO_NEGOTIATION makes ...
by darko.jola
23 Jul 2013 13:51
Forum: Library Development Discussion
Topic: New Ethernet library with improved TCP/IP Stack
Replies: 100
Views: 111356

Re: New Ethernet library with improved TCP/IP Stack

If there is no traffic during first _dnsResolve it is most likely that ethernet module is still in initialization state, so try to increase time between _Init and _dnsResolve calls.

Best regards
Darko
by darko.jola
19 Jul 2013 10:30
Forum: Library Development Discussion
Topic: New Ethernet library with improved TCP/IP Stack
Replies: 100
Views: 111356

Re: New Ethernet library with improved TCP/IP Stack

I can't see any issue with your code. Can you tell me, did you try DNS resolve in some simple project (which only initialize ethernet module, and periodically call dnsResolve in some loop)? We can see from that if you hardware works.

Best regards
Darko
by darko.jola
18 Jul 2013 09:51
Forum: Library Development Discussion
Topic: New Ethernet library with improved TCP/IP Stack
Replies: 100
Views: 111356

Re: New Ethernet library with improved TCP/IP Stack

I just tried some simple code which test dnsResolve: GPIO_Digital_Output(&GPIOD_BASE, _GPIO_PINMASK_ALL); GPIOD_ODR = 0; while(1) { counter++; memcpy(resolvedAddr, Net_Ethernet_Intern_dnsResolve("www.mikroe.com", 5), 4); if( memcmp(resolvedAddr, mikroeIP, 4)!=0 ) { GPIOD_ODR = 0xff; while(1); } memc...
by darko.jola
15 Jul 2013 13:48
Forum: Library Development Discussion
Topic: New Ethernet library with improved TCP/IP Stack
Replies: 100
Views: 111356

Re: New Ethernet library with improved TCP/IP Stack

Hi, currently you can not access to DMA buffers in library. It is library task to manage DMA descriptors and transfers, so it is not recommended to do this in interrupt routine. About missing packets, I can see from your picture that there is a some strange value of SEQ of last packet (SEQ = 25, it ...
by darko.jola
25 Jun 2013 10:40
Forum: Library Development Discussion
Topic: New Ethernet library with improved TCP/IP Stack
Replies: 100
Views: 111356

Re: New Ethernet library with improved TCP/IP Stack

Field dataLength contain payload size of TCP packet, and it should not be always equal to MY_MSS. If remote side sends data over multiple packets, it tries to send max bytes of data over each packet. So in most cases size of each packets, except last, is MY_MSS bytes (maximum size of bytes that we c...
by darko.jola
22 Jun 2013 11:01
Forum: Library Development Discussion
Topic: New Ethernet library with improved TCP/IP Stack
Replies: 100
Views: 111356

Re: New Ethernet library with improved TCP/IP Stack

For AVR it can happen because you enter the loop during OST and immediately exit the loop.

Best regards
Darko
by darko.jola
21 Jun 2013 11:58
Forum: Library Development Discussion
Topic: New Ethernet library with improved TCP/IP Stack
Replies: 100
Views: 111356

Re: New Ethernet library with improved TCP/IP Stack

Hello.
You should wait in loop until CLKRDY becomes 1 (OST has expired and PHY is ready), not 0 according to your code.

Take a look into ENC28J60 datasheet:
CLKRDY: Clock Ready bit
1 = OST has expired; PHY is ready
0 = OST is still counting; PHY is not ready
Best regards
Darko
by darko.jola
17 Jun 2013 11:08
Forum: Library Development Discussion
Topic: New Ethernet library with improved TCP/IP Stack
Replies: 100
Views: 111356

Re: New Ethernet library with improved TCP/IP Stack

Hello, when you call Net_Ethernet_28j60_getByte() in your loop, you should take care about TCP payload size ( dataLength field of SOCKET_28j60_Dsc). When you read all of payload bytes from received packet, you must wait for next call Net_Ethernet_28j60_UserTCP to read next packet (which contain rest...
by darko.jola
12 Jun 2013 08:00
Forum: mikroC PRO for PIC32 General
Topic: Ethernet client software problem.
Replies: 9
Views: 10106

Re: Ethernet client software problem.

Hi if you want know what is source of GeneralException you can read EPC register: unsigned long register_value; register_value = CP0_GET(CP0_EPC); Before go to exception, processor pushes the Program Counter into the Exception Program Counter (EPC) register, so you can resolve what instruction gener...
by darko.jola
03 Jun 2013 09:24
Forum: Library Development Discussion
Topic: New Ethernet library with improved TCP/IP Stack
Replies: 100
Views: 111356

Re: New Ethernet library with improved TCP/IP Stack

Hello boris. Firs of all, thank you for sharing your experiences with Net_Ethernet library! I've found that the tx buffer needs to be reduced in size. I agree with you that for such project would be better if you can change tx buffer size. We can try to implement this sometime. Is the "state" on the...
by darko.jola
10 May 2013 15:48
Forum: mikroC PRO for PIC32 General
Topic: Ethernet client software problem.
Replies: 9
Views: 10106

Re: Ethernet client software problem.

Hello. There is a problem with if(( socketServer->state == 3 ) && (mark==1)) line, because if you do not call Net_Ethernet_28j60_connectTCP function, pointer socketServer is not initialized. In such case you read some "dummy" state field during comparasion, which may be in irregular part of memory. ...
by darko.jola
25 Apr 2013 13:13
Forum: mikroBasic PRO for ARM General
Topic: Retransmision packets and duplicated ack
Replies: 5
Views: 4054

Re: Retransmision packets and duplicated ack

Hi arocca.
You are right about help-note. It may be confusing..
I'm really glad to hear that your problem is solved. Good luck with your project.

Best regards
Darko
by darko.jola
25 Apr 2013 08:05
Forum: mikroBasic PRO for ARM General
Topic: Retransmision packets and duplicated ack
Replies: 5
Views: 4054

Re: Retransmision packets and duplicated ack

Hi, you should not change value of ACK in your code. Library will do this. From your other post, I have seen that you also change value of "DataLength" of socket. This can cause a problem, because this value use library for update ACK. http://www.mikroe.com/forum/viewtopic.php?f=185&t=53806&p=212248...

Go to advanced search