View previous topic :: View next topic |
Author |
Message |
katipefendi
Joined: 24 Oct 2013 Posts: 30
|
Posted: Wed Jul 04, 2018 11:13 pm Post subject: SETTCP Change LocalPort in Runtime |
|
|
Hello,
how can i Change the Prt like IP, Submaske, Gateway a.s
Is it possible?
thanks
Katip |
|
Back to top |
|
|
albertsm
Joined: 09 Apr 2004 Posts: 5922 Location: Holland
|
Posted: Thu Jul 05, 2018 8:59 am Post subject: |
|
|
there is the variable named LOCAL_PORT which you can alter.
See also config tcpip _________________ Mark |
|
Back to top |
|
|
katipefendi
Joined: 24 Oct 2013 Posts: 30
|
Posted: Thu Jul 05, 2018 4:57 pm Post subject: |
|
|
Hi Mark,
can you show me how can i change this in my case?
Code: |
Dim Local_port As Long
'Setip_r = Maketcp(setip)
'Setsubmaske_r = Maketcp(setsubmaske)
'Setgateway_r = Maketcp(setgateway)
'Settcp 0.8.220.77.05.11 , Setip_r , Setsubmaske_r , Setgateway_r
Local_port = 2011
Config Tcpip = Int0 , Mac = 0.8.220.77.05.11 , Ip = 192.168.178.29 , Submask = 255.255.255.0 , Gateway = 192.168.178.1 , Localport = 2005 , Chip = W5500 , Spi = 1 , Cs = Portb.4
|
i get only an error, that Variable not dimensioned |
|
Back to top |
|
|
albertsm
Joined: 09 Apr 2004 Posts: 5922 Location: Holland
|
Posted: Thu Jul 05, 2018 9:08 pm Post subject: |
|
|
local_port is already defined by the compiler !
When using CONFIG TCPIP (see help) , a variable LOCAL_PORT is created which is a WORD variable.
After the config tcpip you can use :
LOCAL_PORT = something _________________ Mark |
|
Back to top |
|
|
|