Wiz810Mj problem TxSendMyIP

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 8.

Moderator: Benj

Post Reply
Ferla
Flowcode v5 User
Posts: 126
Joined: Sun Jan 06, 2013 8:58 pm
Location: Italy
Been thanked: 19 times
Contact:

Wiz810Mj problem TxSendMyIP

Post 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

User avatar
LeighM
Matrix Staff
Posts: 2178
Joined: Tue Jan 17, 2012 10:07 am
Has thanked: 481 times
Been thanked: 699 times
Contact:

Re: Wiz810Mj problem TxSendMyIP

Post by LeighM »

Did you call TxStart beforeTxSendMyIP and TxEnd after?
If that does not resolve the issue, could you attach your program?

Ferla
Flowcode v5 User
Posts: 126
Joined: Sun Jan 06, 2013 8:58 pm
Location: Italy
Been thanked: 19 times
Contact:

Re: Wiz810Mj problem TxSendMyIP

Post 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
Attachments
Wiz810_16F1937_SendIPChange.fcfx
(25.28 KiB) Downloaded 207 times

User avatar
LeighM
Matrix Staff
Posts: 2178
Joined: Tue Jan 17, 2012 10:07 am
Has thanked: 481 times
Been thanked: 699 times
Contact:

Re: Wiz810Mj problem TxSendMyIP

Post 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.

Ferla
Flowcode v5 User
Posts: 126
Joined: Sun Jan 06, 2013 8:58 pm
Location: Italy
Been thanked: 19 times
Contact:

Re: Wiz810Mj problem TxSendMyIP

Post 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

User avatar
LeighM
Matrix Staff
Posts: 2178
Joined: Tue Jan 17, 2012 10:07 am
Has thanked: 481 times
Been thanked: 699 times
Contact:

Re: Wiz810Mj problem TxSendMyIP

Post by LeighM »

Have you tried the Webserver component? ...
Webserver.jpg
Webserver.jpg (20.35 KiB) Viewed 6729 times

Ferla
Flowcode v5 User
Posts: 126
Joined: Sun Jan 06, 2013 8:58 pm
Location: Italy
Been thanked: 19 times
Contact:

Re: Wiz810Mj problem TxSendMyIP

Post 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

User avatar
LeighM
Matrix Staff
Posts: 2178
Joined: Tue Jan 17, 2012 10:07 am
Has thanked: 481 times
Been thanked: 699 times
Contact:

Re: Wiz810Mj problem TxSendMyIP

Post 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.

Ferla
Flowcode v5 User
Posts: 126
Joined: Sun Jan 06, 2013 8:58 pm
Location: Italy
Been thanked: 19 times
Contact:

Re: Wiz810Mj problem TxSendMyIP

Post 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?

Ferla
Flowcode v5 User
Posts: 126
Joined: Sun Jan 06, 2013 8:58 pm
Location: Italy
Been thanked: 19 times
Contact:

Re: Wiz810Mj problem TxSendMyIP

Post by Ferla »

Hi LeighM,
Were you able to check why it didn't send IPs after the change? Have I abandoned my request?
Thanks

User avatar
LeighM
Matrix Staff
Posts: 2178
Joined: Tue Jan 17, 2012 10:07 am
Has thanked: 481 times
Been thanked: 699 times
Contact:

Re: Wiz810Mj problem TxSendMyIP

Post 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?

Ferla
Flowcode v5 User
Posts: 126
Joined: Sun Jan 06, 2013 8:58 pm
Location: Italy
Been thanked: 19 times
Contact:

Re: Wiz810Mj problem TxSendMyIP

Post 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.

User avatar
LeighM
Matrix Staff
Posts: 2178
Joined: Tue Jan 17, 2012 10:07 am
Has thanked: 481 times
Been thanked: 699 times
Contact:

Re: Wiz810Mj problem TxSendMyIP

Post 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

Ferla
Flowcode v5 User
Posts: 126
Joined: Sun Jan 06, 2013 8:58 pm
Location: Italy
Been thanked: 19 times
Contact:

Re: Wiz810Mj problem TxSendMyIP

Post 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

User avatar
LeighM
Matrix Staff
Posts: 2178
Joined: Tue Jan 17, 2012 10:07 am
Has thanked: 481 times
Been thanked: 699 times
Contact:

Re: Wiz810Mj problem TxSendMyIP

Post 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

Ferla
Flowcode v5 User
Posts: 126
Joined: Sun Jan 06, 2013 8:58 pm
Location: Italy
Been thanked: 19 times
Contact:

Re: Wiz810Mj problem TxSendMyIP

Post by Ferla »

very interesting, I use port 80 but nothing prevents me from replacing it.

Post Reply