Net_Ethernet_28j60_connectTCP NOT COMPILE

General discussion on mikroPascal PRO for AVR.
Post Reply
Author
Message
KrEn
Posts: 4
Joined: 05 Mar 2013 13:14
Location: Slovenia

Net_Ethernet_28j60_connectTCP NOT COMPILE

#1 Post by KrEn » 29 Mar 2018 14:02

Hello,
i try to redesign my project.

Im download library for ethernet from LIBSTOCK.

and i try to compile example.

at code:
i := Net_Ethernet_28j60_connectTCP(IP, 2000, 10000, @SOCKET_GLOBAL);

compiler show error.
Like this:
40 327 Incompatible types ("complex type" to "simple type") test tpcip.mpas
40 1512 Warning: Implicit typecast of integral value to pointer test tpcip.mpas
45 304 Syntax error: Expected ")" but "." found test tpcip.mpas

if i comment err then compile without errors-



I try all combination... but without any result?

I need help with this example... tnx.



BR Greg

KrEn
Posts: 4
Joined: 05 Mar 2013 13:14
Location: Slovenia

Re: Net_Ethernet_28j60_connectTCP NOT COMPILE

#2 Post by KrEn » 29 Mar 2018 20:32

Many years ago.. on this forum...
Basic and similar problem:

viewtopic.php?f=111&t=58712#


BR
Greg

User avatar
petar.suknjaja
mikroElektronika team
Posts: 683
Joined: 05 Mar 2018 09:44
Location: Belgrade

Re: Net_Ethernet_28j60_connectTCP NOT COMPILE

#3 Post by petar.suknjaja » 30 Mar 2018 11:40

Hi,

I downloaded the Ethernet library for Net_Ethernet_28j60
and the example is compiling and working without problem.
Looking at code I couldn't find the line that you have problems with.

Could this be that you are trying to compile the code from Help Section?
If you read it through you`ll see it's not the actually working example,
just a reference on how to use different routines from library.

If you want to try working example,
try navigating to Project Explorer window, click on Packages Example Folder, click on Network Ethernet AVR folder then on Examples folder and double click on HTTP_Demo_28j60.mppav

If the problem still persist, tell me what version of mikroPascal PRO for AVR do you have,
and zip and post project files to see what's the issue.


Kind regards,
Petar

KrEn
Posts: 4
Joined: 05 Mar 2013 13:14
Location: Slovenia

Re: Net_Ethernet_28j60_connectTCP NOT COMPILE

#4 Post by KrEn » 30 Mar 2018 13:50

hello,
tnx for support.

After 4 hours i found problem:

i := Net_Ethernet_28j60_connectTCP(@IP, 2000, 10000, @SOCKET_GLOBAL);
In all examples are IP without @.

Ok, after compiling mcu freeze at this command.
Im change timeout in library to 2 s. But problem persist.
Im debuging this problem via serial port.
Before command print msg.
Mcu wait at this program to WDT reset.


BR Greg

KrEn
Posts: 4
Joined: 05 Mar 2013 13:14
Location: Slovenia

Re: Net_Ethernet_28j60_connectTCP NOT COMPILE

#5 Post by KrEn » 31 Mar 2018 17:39

Hello,

tnx for support.


now i try next step:
Configuration:
AVR mega 128 with ENC28j60 IP: 192.168.001.101
PC witn open TCP/IP server at port:4001 at IP: 192.168.001.102

In ATT is file with my example.
If i try to send from PC to AVR via TCP or UDP port packet. AVR recive packet, blink with led and
answer TCP ( if i use TCP/IP).

But i := Net_Ethernet_28j60_connectTCP(@SLAIpAddr, 4001, 4001, @sock);
command not connect to PC.

PING from pc to avr answer with time 2ms.
Attachments
test tpcip.rar
(1.15 KiB) Downloaded 100 times

Post Reply

Return to “mikroPascal PRO for AVR General”