Page 1 of 1

Wiz810Mj problem TxSendMyIP

Posted: Tue Dec 10, 2019 7:23 pm
by Ferla
Hi guys
I ask you to see if the following problem ever happened to you.
I'm working with the following component and module (EB023-00-3) and this happens to me ...... Configure the IP address, for example 192.168.1.10 and Subnet 255.255.255.0 using the program properties, I use the component pic16F1937 and after programming I can ping my PC and I can receive the address on WIZ810MJ via UDP by transmitting it with the macro component TXSendMyIP, everything is ok here!
Next step ... in the project I developed I make a change to the IP address immediately after switching on, so I leave in the properties of the IP address component 192.168.1.10 and Subnet 255.255.255.0, but I change to the Main IP address eg 10.1.200.8 and Subnet 255.255.255.0 using SetMyIP macros and savo all in Eprom so that when the power is turned back the addresses remain the ones set by re-reading the Eprom, then to verify change my PC by bringing it to the same class es.10.1.200.7 and Subnet 255.255.255.0 and by executing Ping I can successfully view the form.,ping succesful.
Problem: after changing the IP I cannot receive it via UDP even if everything is aligned. It seems that the TxSendMyIP macro component stops working, why?

Many thanks for those who have spent time reading my problem
Ferla

Re: Wiz810Mj problem TxSendMyIP

Posted: Wed Dec 11, 2019 9:05 am
by LeighM
Did you call TxStart beforeTxSendMyIP and TxEnd after?
If that does not resolve the issue, could you attach your program?

Re: Wiz810Mj problem TxSendMyIP

Posted: Wed Dec 11, 2019 4:59 pm
by Ferla
Hi LeighM
Right observation but these are the steps I have taken.
I enclose the summary of the program.
As you can see, I created the convenience variable that can take 0 to leave IP in Default, so the values expressed in the component property, if it takes the value 1, establishes a customized IP.
I have eliminated the rest of the program but if we give custom values to IP1, IP2, IP3, IP4 I press the button and nothing is sent, while if it is default yes.

Thanks ,Ferla

Re: Wiz810Mj problem TxSendMyIP

Posted: Thu Dec 12, 2019 10:52 am
by LeighM
Try moving the call to CreateUDPSocket() to after the point that you have changed MyIP details.
Also you have an Initialise in the while loop, this is not needed and will possibly clear the socket such that the following Tx calls will not work.

Re: Wiz810Mj problem TxSendMyIP

Posted: Thu Dec 12, 2019 6:45 pm
by Ferla
Hi,
i tried how you recommended me but it doesn't work.
Can I use another way to receive the IP present? I'll ask you another question I hope you help me .... I would like to create a web-server with a known IP to know the address I assigned to Wiz810. Can I do this? Now I'm limiting myself to checking IP when I change it but I always have to be in the same class with the PC.
Thanks..
Ferla

Re: Wiz810Mj problem TxSendMyIP

Posted: Fri Dec 13, 2019 9:56 am
by LeighM
Have you tried the Webserver component? ...
Webserver.jpg
Webserver.jpg (20.35 KiB) Viewed 7020 times

Re: Wiz810Mj problem TxSendMyIP

Posted: Fri Dec 13, 2019 10:10 am
by Ferla
Good morning :wink:
I tried doing some tests but since I'm new to the subject not to take a wrong turn I ask:
- Can I use both UDP and WebServer on the same channel at the same time?
- Can I assign 2 different IP addresses? or should I spit the channels?
-If I have to split the channels can I see through the web page IP of the other channel?

I did some tests on the web server but only the first 2 IP variables were displayed eg. IP 192.168.1.0 I saw only 192.168 and nothing more.
:D

Re: Wiz810Mj problem TxSendMyIP

Posted: Fri Dec 13, 2019 12:13 pm
by LeighM
Can I use both UDP and WebServer on the same channel at the same time?
Unfortunately, no.
You could use the TCP/IP component and create TCP and UDP sockets on different channels.
You would then need to code your own web server using the TCP socket.
(The webserver component does all the work for you)
Can I assign 2 different IP addresses?
If you mean your local host address, then no, you can only have one local IP address for the network interface.

Re: Wiz810Mj problem TxSendMyIP

Posted: Fri Dec 13, 2019 12:41 pm
by Ferla
I could take the selected values ​​to the IP variables of channel 0 and transmit them via WebServer on channel 1, what do you think?

Re: Wiz810Mj problem TxSendMyIP

Posted: Tue Dec 17, 2019 11:30 am
by Ferla
Hi LeighM,
Were you able to check why it didn't send IPs after the change? Have I abandoned my request?
Thanks

Re: Wiz810Mj problem TxSendMyIP

Posted: Tue Dec 17, 2019 11:39 am
by LeighM
Can you attach your latest project file, and also explain in more detail what you are trying to do and what is not working as you expect?

Re: Wiz810Mj problem TxSendMyIP

Posted: Tue Dec 17, 2019 11:51 am
by Ferla
The file is the one I attached to you last time with the changes you suggested.
I would just like to simply send IP via UDP after having it replace, and as mentioned above it does not.
More advice and know how to see an address even if it is not in the same class as Wiz810.
you know why I ask you this, it is because sometimes I send the string via UDP to change IP but strangely random takes address which is not the one desired and I lose control of the HW. Obviously I created the way to get it back to the defoult address which is the one set in the macro FC component.

Re: Wiz810Mj problem TxSendMyIP

Posted: Tue Dec 17, 2019 2:12 pm
by LeighM
So, I think you want to set the local IP and subnet from EEPROM at boot, then send a UDP packet with the details to your PC?
I don’t think I’ve tried changing subnet dynamically, but I don’t see why it should not work.
I think the sequence should be:
Intialise
SetSubnetMask
SetMyIP
SetGateway
CreateUDPSocket
SetDestination
TxStart
TxSendMyIP

TxEnd

Re: Wiz810Mj problem TxSendMyIP

Posted: Thu Dec 19, 2019 9:13 am
by Ferla
Hi LeighM
I thank you for your suggestion, but from the tests I discover that as it is not possible to receive anything from Wiz810 even if the macro SetDestination
is that of the PC. I have to do something about it :roll: ......At the moment selected idea and a display
Ferla

Re: Wiz810Mj problem TxSendMyIP

Posted: Thu Dec 19, 2019 9:37 am
by LeighM
Hi Ferla,
You will have problems with Windows using ports below 1025
https://en.wikipedia.org/wiki/List_of_T ... rt_numbers.
Leigh

Re: Wiz810Mj problem TxSendMyIP

Posted: Thu Dec 19, 2019 9:55 am
by Ferla
very interesting, I use port 80 but nothing prevents me from replacing it.