cancel
Showing results for 
Search instead for 
Did you mean: 

Firmware update via ethernet

dpravinkumar6199
Associate II
Posted on February 04, 2015 at 11:08

Hai all,

   I am sending GPIO toggle application via ethernet to STM32F407.My application total length is 2920(.hex file).But in controller side i am getting 1460 data only.

In controller i am receiving data like,

         data = (char*)p->payload;         458

 data_t = (char*) p->next->payload;         512

 data_t1 = (char*) p->next->next->payload; 490

      Total data i am getting only (458+512+490) = 1460.

For remaning data i am using like,

data_t2 = (char*) p->next->next

->next

->payload;

     0

But i am not getting remaing data...

Kindly anyone help me plz plz plz......

Thanks.

    
10 REPLIES 10
Posted on February 04, 2015 at 14:14

Do you think you've provided sufficient detail for anyone to solve this?

Check the data transmission code.

Check the data receiving code.

Check the data on the wire. (WireShark, etc)

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
dpravinkumar6199
Associate II
Posted on February 05, 2015 at 05:52

Thanks for your reply Clivel..

I am using ethernet sample code of STM32F407.

Also in my case STM32F407 as a tcpserver.In client side i wrote one simple client program to send data.Client side i conformed that i am sending 2920 bytes data.

Server(STM32F407) side i am checking the received data using doclight. By that only i conformed that i am not receiving full data.

In tcpserver(STM32F407) code ,we have common buf(pbuf) to receive all data. I am receiving data using singly linked pbuf chain.(My previous discussion).

My doubt is,in STM32F407 how can i receive more data using singly linked pbuf chain. 

Now i hope that,by this reply i provided sufficient details to understand my issue..

Kindly anyone help me plz..

Posted on February 05, 2015 at 18:28

Ok, what board and software specifically? The 407 is a chip, a system with Ethernet has more components and software behind it. Cite the websites or packages.

Where is the code manifesting the memory from? Is it malloc'ing from the heap, is the heap large enough? Do you pre-allocate the buffers? What error codes or status is the software providing.
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
arro239
Associate III
Posted on February 06, 2015 at 05:01

is not 

1460 the maximum payload size of a TCP packet? I wonder if your sending application is NOT actually sending, maybe you need to invoke something like flush() on your sending side?

you might also want to check your data transmission with some tcp sniffing tool
dpravinkumar6199
Associate II
Posted on February 06, 2015 at 06:44

NOTE: edited by moderator on Oct 6th, 2016

Thank you clive1..

I am using STM32F407 chip with Ethernet component DP83848PHY.

My software example url :

[[this link/image has been flagged as malicious by our security scan software and has been deleted]]

In this example code,the size of each pbuf in the pbuf pool defined as 512.

#define PBUF_POOL_BUFSIZE       512

If i increase this value, i can able to receive more data in single buffer,but not more than 1460.

I dont know,in this sample code where 1460 size getting allocated.If i want to receive more than 1460 data,where i have to change in this sample code.

Kindly help me plz..

dpravinkumar6199
Associate II
Posted on February 06, 2015 at 06:48

Thank you  belomutskiy.andrey.

Client side i am sending data by reading .hex file.While sending in client side, i conformed data what i am sending, by printing the length of the data..

arro239
Associate III
Posted on February 06, 2015 at 13:59

Printing the size does not confirm much - it only confirms that you have submitted the data into the tcp stream. There are all kinds of buffers on multiple layers, you need to really confirm that the data was sent out. Once again, I suggest some kind of sniffing software.

dpravinkumar6199
Associate II
Posted on February 06, 2015 at 15:46

Thank you belomutskiy.andrey.

In client side i conformed that what i am sending..Issue on client side not in server side...

Thank you so much..

dpravinkumar6199
Associate II
Posted on February 11, 2015 at 06:54

Now in client side i conformed i am sending all data by printing in client only..

But in server(STM32F407) der is MACRO as  TCP segment size.

/* TCP Maximum segment size. */

#define TCP_MSS                 (2017 - 40)  /* TCP_MSS = (Ethernet MTU - IP header size - TCP header size) */

Using this i am able to get the data.But i cant able to receive more than 1977(2017 - 40) in server.

How can i set Ethernet Configuration parameters to receive more data in STM32F407. 

Kindly anyone help me plz plz...