Activity for FNET - Embedded TCP/IP Stack

  • Andrej Butok Andrej Butok posted a comment on discussion FNET User Forum

    Nice, the blind fix has helped. Thank you for reporting the issue.

  • Henning Henning posted a comment on discussion FNET User Forum

    So far the error seems to be fixed. Thank you for your help!

  • Andrej Butok Andrej Butok posted a comment on discussion FNET User Forum

    OK. Thanks.

  • Henning Henning posted a comment on discussion FNET User Forum

    That seems to be working. But we will do some further testing next week. We also had the exception at another point in the same function where cb->tcpcb_rcvchain = NULL , but couldn't reproduce it again. Maybe it was caused by the same line? I will post an update next week if the error still occurs. while(cb->tcpcb_rcvchain) { if(FNET_TCP_COMP_GE(seq, fnet_ntohl(FNET_TCP_SEQ(cb->tcpcb_rcvchain)))) { if(FNET_TCP_COMP_GE(fnet_ntohl(FNET_TCP_SEQ(cb->tcpcb_rcvchain)) + cb->tcpcb_rcvchain->total_length...

  • Andrej Butok Andrej Butok modified a comment on discussion FNET User Forum

    Hi, I have feeling, it should changed to: buf = cb->tcpcb_rcvchain; cb->tcpcb_count -= cb->tcpcb_rcvchain->total_length; cb->tcpcb_rcvchain = cb->tcpcb_rcvchain->next_chain; _fnet_netbuf_free_chain(buf); Could you check?

  • Andrej Butok Andrej Butok modified a comment on discussion FNET User Forum

    Hi, I have feeling, it should changed to: buf = cb->tcpcb_rcvchain; cb->tcpcb_count -= cb->tcpcb_rcvchain->total_length; cb->tcpcb_rcvchain = cb->tcpcb_rcvchain->next_chain; _fnet_netbuf_free_chain(buf); Could you check?

  • Andrej Butok Andrej Butok posted a comment on discussion FNET User Forum

    Hi, I have feeling, it should changed to: buf = cb->tcpcb_rcvchain; **cb->tcpcb_count -= cb->tcpcb_rcvchain->total_length; cb->tcpcb_rcvchain = cb->tcpcb_rcvchain->next_chain;** _fnet_netbuf_free_chain(buf); Could you check?

  • Henning Henning posted a comment on discussion FNET User Forum

    Hi, we are getting a null pointer exception in the _fnet_tcp_add_inpbuf function when receiving a lot of small tcp packets of around 100 Bytes. The exception occurs because cb->tcpcb_rcvchain is null, see attached picture. /* Delete the repeated segment.*/ buf = cb->tcpcb_rcvchain; cb->tcpcb_rcvchain = cb->tcpcb_rcvchain->next_chain; /* Set the new size of the temporary buffer.*/ /* Error cb->tcpcb_rcvchain = 0x0 */ cb->tcpcb_count -= cb->tcpcb_rcvchain->total_length; _fnet_netbuf_free_chain(buf);...

  • Hans Hans posted a comment on discussion FNET User Forum

    @Timo: many thanks for this hint, this fix resolved my sporadic connection loss issue. I was looking a long time for the reason why sometimes an RST was sent from FNET before the ACK from the Server arrived during FIN procedure.

  • Dev Dev modified a comment on discussion FNET User Forum

    Hi, I am building K60 bootloader project with FNET 4.7.1 and as per document bootloader size should nt be more than 60kB. Text section in linker file is written as m_text (RX) : ORIGIN = 0x00000410, LENGTH = 0x0007F3F0 / Original 0x0007FBF0 / length should be 60kB or not ? Please correct me if I am wrong. But after build size output is also greater than 60k: arm-none-eabi-size --format=berkeley shell_boot_twrk60d100m.elf text data bss dec hex filename 64404 988 97436 162828 27c0c shell_boot_twrk60d100m.elf...

  • Dev Dev posted a comment on discussion FNET User Forum

    Hi, I am building K60 bootloader project with FNET 4.7.1 and as per document bootloader size should nt be more than 60kB. But after build size output is: arm-none-eabi-size --format=berkeley shell_boot_twrk60d100m.elf text data bss dec hex filename 64404 988 97436 162828 27c0c shell_boot_twrk60d100m.elf can anybody explain.

  • qwantic qwantic posted a comment on discussion FNET User Forum

    Thanks, yes. I just realized I was misinterpreting what the subnet mask is actually there for. It's not supposed to filter out source ips that don't match the masked IP4!

  • Andrej Butok Andrej Butok posted a comment on discussion FNET User Forum

    Should be ok, if the destination adress is our address or a broadcast one.

  • qwantic qwantic posted a comment on discussion FNET User Forum

    Hi, I noticed that if I set a static IP4 address for FNET, say 192.168.2.1, with a subnetmask of 255.255.255.0, I still receive data from ip addresses with a different 3rd ip address octet like 192.168.5.6. Looking through the code, I don't see where the subnet mask comes into play for incoming frames (I was looking especially in fnet_ip_input_low() where it seems the check would be if anywhere). Just wondering what you thought, or if I missed something. thanks!

  • Timo Schüring Timo Schüring posted a comment on discussion FNET User Forum

    We had a similar problem. When the application calls fnet_socket_close, the socket is aborted which leads to sending the rst-packet. So far it is not really a problem but maybe irritating. If you exclude SS_CLOSING from the abort-procedure, an ABORT-Time interval is set and so fare we see the regular connection close procedure. static fnet_return_t _fnet_tcp_close( fnet_socket_if_t *sk ) { fnet_tcp_control_t *cb = (fnet_tcp_control_t *)sk->protocol_control; /* If the connection is closed, free the...

  • Andrej Butok Andrej Butok posted a comment on discussion FNET User Forum

    By default, the server socket is configured to send data as soon as possible, without delay (TCP_NODELAY ). You can try to play with its TCP socket options: https://fnet.sourceforge.io/manual/group__fnet__socket_ga989481a2cee0291e70f9076a091eddf1.html#ga989481a2cee0291e70f9076a091eddf1

  • Hans Hans posted a comment on discussion FNET User Forum

    Yes I see, but why is it segmenting even if the data size is so small that it could fit easily to a packet? And much more important why is the FIN not sent together with data ending and sometimes not at all? (There is nothing in the sending queue) Can you disable this TCP "feature"? ;)

  • Andrej Butok Andrej Butok posted a comment on discussion FNET User Forum

    TCP segmentation it is a feature of TCP ;)

  • Hans Hans posted a comment on discussion FNET User Forum

    Any idea what could be the problem? Andrej maybe? ;)

  • Hans Hans posted a comment on discussion FNET User Forum

    Dear, I have a problem with answering HTTP requests. When sent the text “test” as a response to a GET request I see in Wireshark that I get as response the answer separated into 3 TCP segments: segment containing: “HTTP/1.0 200 OK” segment containing: “test” segment containing no data bus finishing the packet with FIN flag. Now my question and problem: Why is FNET separating into 3 segments and not only sending 1 segment with the data + FIN flag? Is there a way to change this behavior? Reason why...

  • Jean-Paul Deryck Jean-Paul Deryck posted a comment on discussion FNET User Forum

    Thank you again, I will have a look at it Jean-Paul

  • Andrej Butok Andrej Butok posted a comment on discussion FNET User Forum

    Think about the MCUBoot secondary bootloader. It has security, recovery and differeant FW update modes.

  • Jean-Paul Deryck Jean-Paul Deryck posted a comment on discussion FNET User Forum

    Hello again, thank you very much for your quick answer ! Let me explain my usage of your bootloader: in the K64 FN1M we have 1 mega of flash (twice 512 k), my MQX app is about 400 kb At start the bootloader launch the MQX app written in the first 512k of the flash zone (the zone 1) when we want to update, our app download a new binary made for the zone 2 by http from our server, write it to the flash in the second 512k zone (the zone2) then, after check of a CRC32 , I update the go address params...

  • Andrej Butok Andrej Butok posted a comment on discussion FNET User Forum

    Yes you can.

  • Jean-Paul Deryck Jean-Paul Deryck posted a comment on discussion FNET User Forum

    Hello M. Butok, I use your the FNET bootloader version 2.9.0 in a CW 10.6 with an MQX application for K64FN1M processor I am asking me about the need of updating to a newer version of FNET (it should be a large amount of work and I will not do it unless really needed) I see in the change log that in the version 3.0.0 you made a fix in the fnet_isr_vector_init() function when I compare files, I see that you only swapped the call of fnet_isr_register() function and the fnet_cpu_isr_install() function....

  • Andrej Butok Andrej Butok posted a comment on discussion FNET User Forum

    Thank you for reporting, will look at it when have a time.

  • spiras spiras modified a comment on discussion FNET User Forum

    Hello; attached are 3 screenshots from wireshark capturing DNS activity from FNet dns client. The first packet is a regular dns query for www.google.com The second packet is the regular response from the server. For the purpose of this test, the response has been blocked, to force retries from the client. The third packet is a malformed retry from the client with FNET_CFG_DNS_RETRANSMISSION_MAX = 3 All retries are malformed; it looks like query retries are sent with 'response' flag set. Following...

  • spiras spiras modified a comment on discussion FNET User Forum

    Hello; attached are 3 screenshots from wireshark capturing DNS activity from FNet dns client. The first packet is a regular dns query for www.google.com The second packet is the regular response from the server. For the purpose of this test, the response has been blocked, to force retries from the client. The third packet is a malformed retry from the client with FNET_CFG_DNS_RETRANSMISSION_MAX = 3 All retries are malformed; it looks like query retries are sent with 'response' flag set. Following...

  • spiras spiras posted a comment on discussion FNET User Forum

    Hello; attached are 3 screenshots from wireshark capturing DNS activity from FNet dns client. The first packet is a regular dns query for www.google.com The second packet is the regular response from the server. For the purpose of this test, the response has been blocked, to force retries from the client. The third packet is a malformed retry from the client with FNET_CFG_DNS_RETRANSMISSION_MAX = 3 All retries are malformed; it looks like query retries are sent with 'response' flag set. Following...

  • spiras spiras posted a comment on discussion FNET User Forum

    Yes, it works for me. Thank you

  • Andrej Butok Andrej Butok posted a comment on discussion FNET User Forum

    Hi, Agree, this is the bug. But do not add fnet_htons(). The right code should be (fnet_stack\service\dns\fnet_dns.c, line 421): && ((header->flags & FNET_HTONS(FNET_DNS_HEADER_FLAGS_QR)) == FNET_HTONS(FNET_DNS_HEADER_FLAGS_QR)) /* Is response.*/ Please confirm, that it works for you. Thank you, Andrej Butok

  • spiras spiras posted a comment on discussion FNET User Forum

    Hello, I'm creating this topic after another post about a DNS problem, https://sourceforge.net/p/fnet/discussion/920346/thread/0748178cb3/#ad76 Now I'm seeing a different problem: all messages rejected by the client in fnet_dns.c function _fnet_dns_poll , case FNET_DNS_STATE_RX: when checking the "is response" flag in header->flags, the received message contains a correct response value (bytes 0x81 and 0x00 equal to 0x8100) but the machine evaluates the value as 0x0081 so the check always fails....

  • Andrej Butok Andrej Butok posted a comment on discussion FNET User Forum

    To have a MCUx example, it must be part of a MCUx SDK package. It is needed to convince NXP to add FNET support to the SDK.

  • Phan Phan posted a comment on discussion FNET User Forum

    Thanks for the hint, FNET_TCP_SGT_FIN flag is handy to trace where FIN will be set. I found 2 possible places where FIN-ACK can be sent. The _fnet_tcp_send_ack function has the implementation to call _fnet_tcp_send_headseg with FNET_TCP_SGT_FIN | FNET_TCP_SGT_ACK parameters. However, cb->tcpcb_connection_state must be FNET_TCP_CS_FIN_WAIT_1 or FNET_TCP_CS_LAST_ACK to fulfil the condition below. But the tcpcb_connection_state was FNET_TCP_CS_CLOSE_WAIT in my case. switch(cb->tcpcb_connection_state)...

  • Andrej Butok Andrej Butok posted a comment on discussion FNET User Forum

    You may search for FNET_TCP_SGT_FIN flag use, places where FIN is sent. For example, it sent with the last sent data ACK.

  • Phan Phan posted a comment on discussion FNET User Forum

    I also made the client send nothing to ensure no data in receive queue but still got the same result... I have reviewed the function _fnet_tcp_process_fin and compared it with the BSD TCP socket state machine. I believe tcpcb_connection_state* was changed from FNET_TCP_CS_ESTABLISHED to FNET_TCP_CS_CLOSE_WAIT and sk->state was set to SSCLOSING is correct following the picture closing.png. /* Process the final segment depend on state.*/ switch(cb->tcpcb_connection_state) { case FNET_TCP_CS_ESTABLISHED:...

  • Andrej Butok Andrej Butok posted a comment on discussion FNET User Forum

    Also, if there is data in your receive queue, RST should be sent.

  • Phan Phan posted a comment on discussion FNET User Forum

    The "unsent data" is not the root cause because I just isolated it by making the FNET no longer send any data but the FNET still sent RST when receiving FIN . I have captured the sequence call of the software when recving FIN: Inside _fnet_tcp_process_fin, the tcpcb_connection_state was changed from FNET_TCP_CS_ESTABLISHED to FNET_TCP_CS_CLOSE_WAIT and sk->state was set to SS_CLOSING. After that, the App call fnet_socket_close() to close the socket, and because the sk->state was SS_CLOSING, it fulfil...

  • Andrej Butok Andrej Butok modified a comment on discussion FNET User Forum

    Most probably, you still have unsent data. Please look inside FNET services source code, how they handle session states.

  • Andrej Butok Andrej Butok posted a comment on discussion FNET User Forum

    Most probably, you still have unsent data. Please look inside FNET services source code, how they handles session states.

  • Phan Phan modified a comment on discussion FNET User Forum

  • Phan Phan posted a comment on discussion FNET User Forum

    Sorry for making you confused, I mean the FNET received the FIN from the other side, but FNET didn't send the "second FIN", it sent RST instead.

  • Phan Phan posted a comment on discussion FNET User Forum

    Sorry for making you confused, I mean the FNET received the FIN from the other side, but FNET didn't send the "second FIN", it sent RST instead.

  • Andrej Butok Andrej Butok posted a comment on discussion FNET User Forum

    It sent FIN and waiting for FIN from other side. http://www.tcpipguide.com/free/t_TCPConnectionTermination-2.htm

  • Phan Phan posted a comment on discussion FNET User Forum

    Thank you for your reponse, yes, it is TCP. I desire to know if the FNET is designed to send the second FIN when receiving FIN from the other side of the TCP connection. I have tried many ways and also performed code inspection to see if there is any possibility but unfortunately haven't figured it out. I also tried the SO_LINGER option includes the timeout in seconds, but FNET still sends the RST instead of FIN. Do you think I should ensure that no unsent data is present in a socket? So the FNET...

  • Andrej Butok Andrej Butok posted a comment on discussion FNET User Forum

    This is TCP. To change behavior, read: https://fnet.sourceforge.io/manual/group__fnet__socket_ga6cb4c12c0fba44e02a019dc877fef373.html#ga6cb4c12c0fba44e02a019dc877fef373 https://fnet.sourceforge.io/manual/group__fnet__socket_ga989481a2cee0291e70f9076a091eddf1.html#gga989481a2cee0291e70f9076a091eddf1a6856768825eabef55d9d4175020da464

  • Phan Phan posted a comment on discussion FNET User Forum

    Other side request a FIN as want to close the conection, but the FNET socket does not automatically sent FIN,ACK and stuck at SS_CLOSING state, should we have to do something at the application to send FIN ACK? I also try to call fnet_socket_close() when the state SS_CLOSING is detected, but it sent RST insead of FIN. is there any reason for that? I also checked the code and it look like the treat receiving FIN as RST event, is that correct? static void _fnet_tcp_process_fin( fnet_socket_if_t sk,...

  • spiras spiras posted a comment on discussion FNET User Forum

    yes it was related to that same issue; the value of received was not actually 0; it receives a CNAME as rejects it thanks for the hint

  • spiras spiras posted a comment on discussion FNET User Forum

    thanks; I'm afraid it's not related, because: I tracked down to _fnet_dns_poll it goes into FNET_DNS_STATE_RX received is always 0 I'm still investigating

  • Andrej Butok Andrej Butok posted a comment on discussion FNET User Forum

    It can be related to: https://github.com/butok/FNET/issues/7

  • spiras spiras posted a comment on discussion FNET User Forum

    Hello, using 4.7.1 we have a case where DNS resolution fails; the DNS server is pingable from the device; in tcpdump we see the correct query packet and the response from the server, but the device does not receive the response. Any idea? I enabled the FNET_DEBUG_DNS macro, this is the output: resolving apps.xyz.com Sending query... Sending query... Sending query... Sending query... Sending query... Sending query... Timeout not resolved On the same device, telnet service is working normally. Here...

  • spiras spiras posted a comment on discussion FNET User Forum

    fyi example of actual script, 1201 bytes meter cal report meter calreg UOffsetA cc68 meter calreg IOffsetA fc60 meter calreg POffsetA 0000 meter calreg QOffsetA 0000 meter calreg POffsetAF 0000 meter calreg UOffsetB f788 meter calreg IOffsetB fc60 meter calreg POffsetB 0000 meter calreg QOffsetB 0000 meter calreg POffsetBF 0000 meter calreg UOffsetC fc60 meter calreg IOffsetC fc60 meter calreg POffsetC 0000 meter calreg QOffsetC 0000 meter calreg POffsetCF 0000 meter calreg UGainA cb98 meter calreg...

  • spiras spiras posted a comment on discussion FNET User Forum

    8k is a general purpose buffer, already present; now I am using it to implement scripts, that may be downloaded; I think the size of a script will never reach 8k, but it will certainly be larger than FAPP_CFG_SHELL_MAX_LINE_LENGTH (80 bytes) ! Thanks

  • Andrej Butok Andrej Butok posted a comment on discussion FNET User Forum

    In this case call it by line. Just curious, what are doing in this 8K script? Example?

  • spiras spiras posted a comment on discussion FNET User Forum

    it may be quite large: currently it's a static 8k buffer for text in ram; if I increase cmd_line_size it would dynamically allocate another 8k just to make a copy of the same data... no thanks, I will iterate through my data and make single-line calls to fnet_shell_script

  • Andrej Butok Andrej Butok posted a comment on discussion FNET User Forum

    Just increase the command line buffer size.

  • spiras spiras posted a comment on discussion FNET User Forum

    Hello, I'm trying to run a script from a text in memory: fnet_shell_script(shell_desc, p); //p is a char * to text at line 616 of fnet_shell.c I see: if(script_size + 1/*splitter*/ + 1/*size*/ > shell_if->cmd_line_size) { goto ERROR; } ok; shell_if->cmd_line_size is set at value 80 upon startup by fnet_shell_init: fnet_size_t cmd_line_buffer_size; /**< @brief Size of the command-line buffer. * It defines the maximum length of the * entered input-command line. */ It looks like scripts with large size...

  • boleokin boleokin posted a comment on discussion FNET User Forum

    Hello Brandon, I am seeing the same issue. What was your solution? You've mentioned "changing the address 'alignment' of the records". What was the mod to the srecord? I can't tell from you post. Thank you.

  • fkln fkln posted a comment on discussion FNET User Forum

    Because the changes are made by NXP in their driver files (fsl_enet.c fsl_enet.h) I have only made changes in fnet_enet.c Regards

  • Andrej Butok Andrej Butok posted a comment on discussion FNET User Forum

    It contains changes only in c file. Guess, missed .h changes.

  • Andrej Butok Andrej Butok posted a comment on discussion FNET User Forum

    Yes, stack supports multiple Ethernet and WiFi interfaces. Tested with two ENET Ethernet + one WiFi module. Search for FNET_CPU_NETIF_NUMBER, FNET_CFG_CPU_ETH1 and etc. to figure out.

  • spiras spiras posted a comment on discussion FNET User Forum

    Hello, MIMXRT1062 natively supports two ethernet interfaces; is this supported in FNet? I can't find anything about the number of interfaces in fnet_user_config.h Thanks

  • fkln fkln posted a comment on discussion FNET User Forum

    Hi, because NXP has changed the ethernet driver fsl_enet.c, the file /fnet_stack/port/netif_enet/fnet_enet.c must be adapted to the new SDK. Please find attached patch. Regards

  • jjt jjt posted a comment on discussion FNET User Forum

    I'm a bit confused by the changes that need to be made to port the boot loader. I have a TWR-K60F120M and custom hardware with same processor but a different clock and an ethernet switch that uses MMI. If I can get a build for the tower I understand the changes necessary for my board. My application is MQX5 and I'm using CW. I can start with a barebones CW project but I don't understand how/where to change processor (FNET_CFG_CPU???) and compiler to GCC (FNET_CFG_COMP??) I have my MQX example linked...

  • Joakim Jonsson Joakim Jonsson posted a comment on discussion FNET User Forum

    I'm planning to use the FNET bootloader with TCP/IP support for a NXP Kinetis K64 project. Have looked at the demo project from FNET with the TFTP support and it looks nice but my request is to have a simple web page with the possibility to upload the file by TLS instead of the TFTP server. Does anyone have any experience of doing this with the FNET TCP/IP stack?

  • Timo Schüring Timo Schüring posted a comment on discussion FNET User Forum

    The Motorola dBUG Shell has a lot of commands which are taking user input as long as similar tasks are performed. E.g. SHELL> md.l 0x60080200 60080200: 00000000 00000000 00000000 00000000 ................ 60080210: 00000000 00000000 00000000 00000000 ................ 60080220: 00000000 00000000 00000000 00000000 ................ 60080230: 00000000 00000000 00000000 00000000 ................ 60080240: 00000000 00000000 00000000 00000000 ................ 60080250: 00000000 00000000 00000000 00000000...

  • Andrej Butok Andrej Butok posted a comment on discussion FNET User Forum

    6LoWPAN is not supported. Contribution is welcome.

  • David DeMoney David DeMoney posted a comment on discussion FNET User Forum

    Is 6LoWPAN supported? I need to port this to a G3-PLC environment. Is there an existing implementation? If not, is there documentation on what needs to be done to add this?

  • Christian Christian posted a comment on discussion FNET User Forum

    Thank you very much for your quick reply. Yes, indeed, it is quite complicated. I had a lot of investigations in the stack handling so far. My main problem is that a lot of function calls are made by pointer references. Without the capability of a debugger it is very hard to follow the call structures (go to definition -> find all references -> analyze function -> find next call -> find all references....and so on If I will have some progress or success I may post it here Regards Christian

  • Andrej Butok Andrej Butok posted a comment on discussion FNET User Forum

    It was not designed for the RAW Ethernet frame sending from a user application. You may look inside _fnet_ip4_output()=> fnetip4netifoutput(), but it is not trivial.

  • Christian Christian modified a comment on discussion FNET User Forum

    Hello and happy new year, I would like to send and receive raw ethernet messages without any protocol overhead. But unfortunately I do not have understood how to do that by now. Background: Teensy 4.1 board with Visual Studio Code and platform.io and PTPv2 protocol on Ethernet mac layer (https://wiki.wireshark.org/Protocols/ptp) I tried to use the function void fnet_fec_output(fnet_netif_t netif, fnet_netbuf_t nb) void SendRawMessage(void){ fnet_netif_desc_t tempDefaultHw = fnet_netif_get_default();...

  • Christian Christian posted a comment on discussion FNET User Forum

    Hello and happy new year, I would like to send and receive raw ethernet messages without any protocol overhead. But unfortunately I do not have understood how to do that by now. Background: Teensy 4.1 board with Visual Studio Code and platform.io and PTPv2 protocol on Ethernet mac layer (https://wiki.wireshark.org/Protocols/ptp) I tried to use the function void fnet_fec_output(fnet_netif_t netif, fnet_netbuf_t nb) void SendRawMessage(void){ fnet_netif_desc_t tempDefaultHw = fnet_netif_get_default();...

  • Andrej Butok Andrej Butok posted a comment on discussion FNET User Forum

    Look at the FNET DHCP server source code (fnet_dhcp_srv.c=>fnet_dhcp_srv_init()). It does what you need. BTW: FNET socket functions are not blocking. So fnet_socket_recvfrom() should be polled.

  • Kevin Webster Kevin Webster posted a comment on discussion FNET User Forum

    I'm not able to figure out how I can set up a UDP broadcast message receiver and whatever I try just isn't working. I have an embedded web server running on the same device which I can load without issue - obviously this is TCP/IP however the address configuration is absolutely correct so I know that FNET is correctly configured. this->fnetAddress.sin_family = AF_INET; this->fnetAddress.sin_port = port; /* 52100 */ this->fnetAddress.sin_addr.s_addr = INADDR_BROADCAST; /* 255.255.255.255 */ // Create...

  • Andrej Butok Andrej Butok posted a comment on discussion FNET User Forum

    Or duplicate the code, and rely on a compiler to optimize it.

  • Henri de Veer Henri de Veer modified a comment on discussion FNET User Forum

    There is another (harmless) warning in the same file at ~ line 1534: switch(cb->tcpcb_connection_state) { case FNET_TCP_CS_SYN_SENT: case FNET_TCP_CS_LISTENING: break; case FNET_TCP_CS_SYN_RCVD: if((cb->tcpcb_prev_connection_state == FNET_TCP_CS_SYN_SENT) && (tcp_seq == (cb->tcpcb_sndack - 1u))) { break; } __attribute__ ((fallthrough)); /* Avoid compiler warning "this statement may fall through" */ default: /* Close the socket and send the reset segment.*/ _fnet_tcp_send_rst(&sk->options, insegment,...

  • Henri de Veer Henri de Veer posted a comment on discussion FNET User Forum

    There is another (harmless) warning in the same file at ~ line 1534: switch(cb->tcpcb_connection_state) { case FNET_TCP_CS_SYN_SENT: case FNET_TCP_CS_LISTENING: break; case FNET_TCP_CS_SYN_RCVD: if((cb->tcpcb_prev_connection_state == FNET_TCP_CS_SYN_SENT) && (tcp_seq == (cb->tcpcb_sndack - 1u))) { break; } __attribute__ ((fallthrough)); /* Avoid compiler warning "this statement may fall through" */ default: /* Close the socket and send the reset segment.*/ _fnet_tcp_send_rst(&sk->options, insegment,...

  • Andrej Butok Andrej Butok posted a comment on discussion FNET User Forum

    Good notice, will add a fix.

  • Henri de Veer Henri de Veer posted a comment on discussion FNET User Forum

    This part of code in fnet_tcp.c looks at least dubious with respect to the evaluation order: static void _fnet_tcp_initial_seq_number_update( void ) { /* Increase Initial Sequence Number. */ _fnet_tcp_initial_seq_number += FNET_TCP_INITIAL_SEQ_NUMBER_STEP + fnet_rand() & 0xFF; } According to the C rules it adds the left two operands first and LATER ands it with 0xff resulting in step of maximal 0-255 ? Shouldn't the code be this? : static void fnettcpinitialseqnumberupdate( void ) { / Increase Initial...

  • Brandon E Taylor Brandon E Taylor posted a comment on discussion FNET User Forum

    I need to some more debugging, but I was able to get the application to load and run correctly by modifying the following lines in the srecord: S21404000140060000FFFF03000000041005FFEF0098 S214040011800000E80D120118F2020418120218F208 S21404002102051810030300FBFF06143202044118EC S214040031F00702102700000400FAFF0718F0030275 S2140400410500F9FF08184301000410031301010118 S2140400510A081003C0FC0300C40412C80412CC042A S21404006112D00412D40412D80412DC0412E00412CE S214040071E40412E80412EC0412F0041004009004E0...

  • Brandon E Taylor Brandon E Taylor posted a comment on discussion FNET User Forum

    I currently have an application using MQXv5 that executes just fine unless I relocate the code from a base of 0x0000 to a base of 0xF000 (to accommodate a bootloader) and then jump to the application entry point (__boot) from the bootloader. I am using IAR EWARM 9.10 as my IDE. When jumping to the code from the bootloader, the application raises a hard fault early in the initialization process. More specifically, a hard fault is raised in __iar_data_init3 due to a data access error. The Bus Fault...

  • Andrej Butok Andrej Butok posted a comment on discussion FNET User Forum

    All porting code is placed in \fnet\fnet_stack\port You have to implement API in port\cpu\fnet_cpu.h And wrap your Ethernet/WiFi driver by fnet_eth_if_t interface structure. Use any supported platform as a reference.

  • Andrej Butok Andrej Butok posted a comment on discussion FNET User Forum

    You have to upgrade to the latest one.

  • supermariopros supermariopros posted a comment on discussion FNET User Forum

    Which are the versions with major fixes regarding to vulnerabilities? Is 4.6.3 "enough" for this regard or should we upgrade the FW to 4.7.0?

  • Andrej Butok Andrej Butok posted a comment on discussion FNET User Forum

    Hi, yes, all reported vulnerabilities were fixed.

  • supermariopros supermariopros posted a comment on discussion FNET User Forum

    A colleague of mine directed me to this page: https://github.com/Forescout/project-memoria-detector where they list some TCP/IP stacks, including FNET, and then they say: "Several of the above stacks were found vulnerable during the Project Memoria research." Following the "Project Memoria" link there, there is a reference to "INFRA:HALT" and a report (see attachment), where I didn't find FNET mentioned anywhere. My question is: do you know any current or old version vulnerability for FNET? Thank...

  • boleokin boleokin posted a comment on discussion FNET User Forum

    Hello Andrey, Looking for an FNET port for Texas Instruments TM4C129 microcontroller running Micrium uCOS-III operating system. Any documentation on how to do this? Is this simple to do? Any thoughts? I would appreciate any help or suggestions on this topic.

  • b'Andrey Butok committed [7c0e3a]

    Merge /u/henri62/fnet/ branch fix-var-types into master

  • Andrej Butok Andrej Butok merged merge request #3

    Fix type of variables to avoid warnings.

  • Andrej Butok Andrej Butok merged merge request #2

    Fix some additional typos.

  • Henri de Veer Henri de Veer created merge request #3

    Fix type of variables to avoid warnings.

  • Henri de Veer Henri de Veer created merge request #2

    Fix some additional typos.

  • Andrej Butok Andrej Butok merged merge request #1

    Fix typos in sources.

  • Henri de Veer Henri de Veer created merge request #1

    Fix typos in sources.

  • Andrej Butok Andrej Butok posted a comment on discussion FNET User Forum

    Yes, you may use FNET_DEBUG_PRINTF() where it is used for debugging.

  • Henri de Veer Henri de Veer posted a comment on discussion FNET User Forum

    Will you accept any pull request? If so I assume I can make a merge request? NOTE: This means changing all fnet_printf() into FNET_DEBUG_PRINTF() in the core code where it is used for debugging. (So nowhere in the applications/demos where the use is OK)

  • Henri de Veer Henri de Veer modified a comment on discussion FNET User Forum

    This is not what I meant, for example if i look at fnet_stack/stack/fnet_eth.c @ function fnet_eth_trace() the fnet_printf is clearly used as debug output. I indeed saw that a "stream" is used with some get/put methods to control it but I did not find a way to specify it without modifying the FNET stack code itself. It looks like it always want to send it to some serial port. For example I would like to send it to our the jtag (swo_debug) lookalike device because all our serial ports (in this case...

  • Henri de Veer Henri de Veer modified a comment on discussion FNET User Forum

    Redefining FNET_DEBUG_PRINTF only redirects fnet_enet.c and fnet_qca.c debug output not the other usages in about 20 other files. So only hacking a stream-override inside the fnet_serial.h file can do the job OR modifying all other files, which is obvious not something I want to do. Another way to fix this is to be able to supply your own stream structure for the fnet_printf calls and use a pointer variable instead of the compiler constant FNET_SERIAL_STREAM_DEFAULT which now points to a static structure....

  • Henri de Veer Henri de Veer modified a comment on discussion FNET User Forum

    Redefining FNET_DEBUG_PRINTF only redirects fnet_enet.c and fnet_qca.c debug output not the other usages in about 20 other files. So only hacking a stream-override inside the fnet_serial.h file can do the job OR modifying all other files, which is obvious not something I want to do. Another way to fix this is to be able to supply your own stream structure for the fnet_printf calls and use a pointer variable instead of the compiler constant FNET_SERIAL_STREAM_DEFAULT which now points to a static structure....

  • Henri de Veer Henri de Veer posted a comment on discussion FNET User Forum

    Redefining FNET_DEBUG_PRINTF only redirects fnet_enet.c and fnet_qca.c debug output not the other usages in about 20 other files. So only hacking a stream-override inside the fnet_serial.h file can do the job OR modifying all other files, which is obvious not something I want to do. Another way to fix this is to be able to supply your own stream structure for the fnet_printf calls and use a pointer variable instead of the compiler constant FNET_SERIAL_STREAM_DEFAULT which now points to a static structure....

1 >