Hi Everyone,
I developed a product using the TCP_IP libary from MikroEletronika and my product works well. I am using PIC32 microcontroler, mikrobasic and my product works in client operation.
The problem is that if I turn off my product and turn on again I dont get to connect again. I need to re start the App in the server and start again my product to connect again. I think that I have a problem with socket, but the IPs, port are ok, such as that it connects in the first time.
Somebody can help me?
Thank you in advanced.
prof. Wagner
Problem to do the connection in TCP-IP client
-
- Posts: 417
- Joined: 10 Jan 2009 22:03
Re: Problem to do the connection in TCP-IP client
Professor,
I am currently struggling with the same thing on a PIC32 and the library. I had it connecting for about 30 minutes the other day now I can't get it to connect to save my life. If you find anything please post it....
Jim
I am currently struggling with the same thing on a PIC32 and the library. I had it connecting for about 30 minutes the other day now I can't get it to connect to save my life. If you find anything please post it....
Jim
-
- Posts: 126
- Joined: 25 Mar 2011 04:35
Re: Problem to do the connection in TCP-IP client
Hi Jim,JimKueneman wrote:Professor,
I am currently struggling with the same thing on a PIC32 and the library. I had it connecting for about 30 minutes the other day now I can't get it to connect to save my life. If you find anything please post it....
Jim
I got some progress. If I put to the client port a random number (remember that I am work in client mode) I get to receive data after that I turn off and turn on again my product (the server remains running) but I don't get to send data yet. I have fixed the port_server but a random Port_client. I get to receive data from server but I don't get to send data from client (my device) to server. This problem occurs if I turn off and turn on again my device without turn off the server.
Net_Ethernet_28j60_connectTCP(@IP_SERVER,PORT_SERVER,RANDOMICO,@SOCKET)
Regards
Prof. Wagner
Last edited by Prof.Wagner on 06 Nov 2014 18:29, edited 1 time in total.
-
- Posts: 417
- Joined: 10 Jan 2009 22:03
Re: Problem to do the connection in TCP-IP client
Thanks. I found my problem. The MMI config bit got flipped and the mE compiler dialog box has bugs and does not reflect the correct state of the bits.
Jim
Jim
-
- Posts: 417
- Joined: 10 Jan 2009 22:03
Re: Problem to do the connection in TCP-IP client
I just realize you are using the 28J60. The reason I moved from the dsPIC family to the PIC32 was the build in ethernet module. I have had little to no success with robust solutions with either of the Microchip SPI ethernet chips, SPI CAN chips or serial FTDI USB to UART chips at very high speeds. These days I use a micro that has the module built in (Ethernet, CAN and USB). Since moving this direction my aggravation level has dropped drastically in working with these technologies (I still fight my own bugs though )
Jim
Jim
Re: Problem to do the connection in TCP-IP client
Hi,
Regards,
Filip.
Which MCU were you using ?Thanks. I found my problem. The MMI config bit got flipped and the mE compiler dialog box has bugs and does not reflect the correct state of the bits.
Regards,
Filip.
-
- Posts: 417
- Joined: 10 Jan 2009 22:03
Re: Problem to do the connection in TCP-IP client
Fusion 7 with the big PIC32 795 (I think) with built in Ethernet. The microprog does not reflect some of these bits correctly in the mcu settings. If you read in a mcu hex it won't update correctly either
Jim
Jim
Re: Problem to do the connection in TCP-IP client
Hi,
Ethernet RMII/MII Enable should have value RMII enabled (instead of Disabled, which is now present) and MII enabled (instead of Enabled, which is now present).
Ethernet I/O Pin Select should have value Default Ethernet I/O (instead of Enabled, which is now present) and Alternate Ethernet I/O (instead of Disabled, which is now present).
These bits are correctly passed to the mikroProg (I have verified this with MPLAB, the correct bits were set), just the bit value names are not intuitive.
Regards,
Filip.
Ethernet RMII/MII Enable should have value RMII enabled (instead of Disabled, which is now present) and MII enabled (instead of Enabled, which is now present).
Ethernet I/O Pin Select should have value Default Ethernet I/O (instead of Enabled, which is now present) and Alternate Ethernet I/O (instead of Disabled, which is now present).
These bits are correctly passed to the mikroProg (I have verified this with MPLAB, the correct bits were set), just the bit value names are not intuitive.
Regards,
Filip.
-
- Posts: 126
- Joined: 25 Mar 2011 04:35
Re: Problem to do the connection in TCP-IP client
Hi Everyone,Prof.Wagner wrote:Hi Jim,JimKueneman wrote:Professor,
I am currently struggling with the same thing on a PIC32 and the library. I had it connecting for about 30 minutes the other day now I can't get it to connect to save my life. If you find anything please post it....
Jim
I got some progress. If I put to the client port a random number (remember that I am work in client mode) I get to receive data after that I turn off and turn on again my product (the server remains running) but I don't get to send data yet. I have fixed the port_server but a random Port_client. I get to receive data from server but I don't get to send data from client (my device) to server. This problem occurs if I turn off and turn on again my device without turn off the server.
Net_Ethernet_28j60_connectTCP(@IP_SERVER,PORT_SERVER,RANDOM_port,@SOCKET)
Regards
Prof. Wagner
Nobody can help me about my problem above?
Thank you in advanced.
Prof. Wagner