Forum Widgets
Latest Discussions
Netx Duo Question - NX_TCP_SOCKET and BSD fd_sets Functionality
Hi, I hope this is the correct place to ask this question. I'm looking at porting an existing application across to Duo, this app uses WEBSOCKETS/TLS/TCP within a BSD socket and makes use of the BSD fd_sets mechanism to detect receive data, ability to send data and loss of connection, sending multiple messages over a single socket. Using the Duo API's I need to use the NX_TCP_SOCKET based APIs, to gain WEBSOCKETS/TLS functionality but so far, I haven't spotted a bsd_fd_set equivalent mechanism for this socket type. Is there a similar feature available? The examples I've found don't persist a socket across multiple messages so don't need that feature. Any help/information on this appreciated. Many Thanks Waynewayne_ellisAug 26, 2025Copper Contributor40Views1like1CommentNetXDuo mDNS domain set issue
Hello, My issue is related to:- MCU: STM32H733 Middleware: Azure RTOS Middleware Component: NetxDuo (6.2.0) Addon: mDNS I am using Azure RTOS with NetxDuo, I implemented a secure https server in my device and implemented mDNS which was working very well for me till I required to change domain. I want to add a sub-domain like (myhostname.mysubdomain.local). In documentation it is stated that by default the domain is .local but can be changed using nx_mdns_domain_name_set API Now, I have implemented this API in my code like this: ``` status = nx_mdns_create(&mdns_instance, &ip_instance, &netxduo_packet_pool, MDNS_PRIORITY, mdns_thread_stack, sizeof(mdns_thread_stack), (UCHAR *)hostname, (VOID *)local_service_cache, sizeof(local_service_cache), (VOID *)peer_service_cache, sizeof(peer_service_cache), NX_NULL); if (status != NX_SUCCESS) { Error_Handler(); } status = nx_mdns_domain_name_set(&mdns_instance, "home"); status = nx_mdns_enable(&mdns_instance, PRIMARY_INTERFACE); ``` It returns success and according to the document I must be able to ping hostname.home but thats not the case not matter what I done it will be always accessible through hostname.local I checked the domain name buffer inside mdns_instance, its updated to home but even then changed domain is not accessible. Goal: To be able to add subdomain Bigger Picture: I want to use wild card while generating certificate and keys in alt name and CN so that same certificate can be used in many devices thats why I need subdomain as it allows wild card in *.example.local not in *.localfintisarJul 18, 2024Copper Contributor1.1KViews0likes0CommentsUSBX: hard fault after reading fx_directory_information_get
Hi team, I'm using stm32f746disco and trying to implement USBx as a host with AZURE RTOS. Everything goes well until I want to read the file size using the "fx_directory_information_get" function. The function runs without failure and returns the values correctly, but if I unplug the USB, the MCU goes to a hard fault. Questions: 1) Am I using the right function to read the file size? 2) Does it need to call any other function before or after "fx_directory_information_get" somehow to close or flush the media?Armin_hmJun 10, 2024Copper Contributor238Views0likes0CommentsHow to tune azure netxduo to receive more incoming connections?
Hello, I am using the stm32h563 processor in my project. I made a TCP Server application using the ethernet connections of this processor and I was able to run it as I wanted. But I saw that it could not connect to another client over the same IP address without breaking the connection with one client. Even though I set the NX_MAX_PHYSICAL_INTERFACES defined value to two, there was no change. Also, in the files I shared, it is said that we can make a tcp server and 2 tcp client connections and open a separate socket for each (1). After some research, I realized that this problem can be solved with lwip + freertos. Below are examples of these solutions. How can I make a similar solution on Azure RTOS Netx side? Our problem with lwip + freertos solved community issue(2) was previously shared and the solution was "By tweaking the options in lwipopts.h, it should be possible to receive more incoming connections: MEMP_NUM_TCP_PCB, MEMP_NUM_TCP_PCB_LISTEN, MEMP_NUM_NUM_NETCONN, etc... " was returned as ". As a similar header you can see the extension(3) under the References header. References: https://learn.microsoft.com/en-us/azure/rtos/netx-duo/overview-netx-duo (2)https://community.st.com/t5/stm32-mcus-embedded-software/how-to-tune-lwip-to-receive-more-incoming-connections/td-p/227809 (3) https://community.st.com/t5/stm32-mcus-embedded-software/i-hope-to-achieve-one-to-many-connections-using-tcp-socket/m-p/592109 Best Regards Eren AkyolEren_AkyolFeb 01, 2024Copper Contributor356Views0likes0CommentsNetX Duo and AWS
Hi, I am currently using Azure RTOS on my project. I want to connect my device with AWS(Amazon Web Services). I found some sources but, I did not find any examples on STM32 devices. Is there any examples with NetX Duo on AWS? On the other hand I have found examples with FreeRTOS. Do I have to use FreeRTOS to access all features of AWS? Regardsmkilic_makDec 04, 2023Copper Contributor571Views0likes1CommentConfiguring Levelx
I am kind of lost about filex vs levelx configuration. My memory is the w25q64jv, it has 8mb being 2048 blocks of 4096 bytes. Configuring levelx: nor_flash->lx_nor_flash_total_blocks = 2048; nor_flash->lx_nor_flash_words_per_block = 128; What I have understood is Levelx uses 1 sector (512b) for control, so 7 sectors are left for data for each block (4096b). Now I computed the total data sectors available: 7 x 2048 = 14336 and have used this amount when formating the media (total_sectors). Is that right?TheFlyvioNov 13, 2023Copper Contributor755Views0likes2CommentsLevelX NandFlash Problem
The page size of nand flash used is 8KB, a block has 128 pages, a total of 10 * 1024 blocks are used, but when _lx_nand_flash_open function is used to open, it is found that the opening fails. According to my code trace, it was found that the LX_NAND_PAGE_TYPE_ERASE_COUNT_TABLE branch in the _lx_nand_flash_open function caused an error when page_index=1. But this value is actually written using the _lx_nand_flash_format function, Because the _lx_nand_flash_metadata_build function gets page_count=2 (page_count= (nand_flash ->) when erasing counts. lx_nand_flash_block_status_table_size + (nand_flash -> lx_nand_flash_bytes_per_page - 1)) / nand_flash -> lx_nand_flash_bytes_per_page;) I would like to ask, does levelX not support such a large Nand-Flash? Or is there something wrong with my configuration?baymaxPPSep 27, 2023Copper Contributor450Views0likes0Commentsminor bugs in nx_dns.c
Hi all, working on nx_dns.c versio 6.1.12 I found some minor bugs. In function 3911 _nx_dns_host_resource_data_by_name_get() we have a NX_DNS_QUERY_FAILED 0xA3 /* DNS query failed; no DNS server sent an 'answer' */ return value on most errors, end even if we got a reply. It seems that it is due to line 4052 4052 return(NX_DNS_QUERY_FAILED); while 4052 return(status); would return actual error. You can test this searching a non existing domain name (e.g. goo4gle.com) or setting server address to a non existing dns server (e.g 91.1.1.1). Digging deeper, I found another non optimal return value in function 4888 _nx_dns_response_process() Here we have NX_DNS_SERVER_AUTH_ERROR 0xAC /* Server not able to authenticate answer/authority data*/ for any reply with reply code 0x2, 0x3, 0x6, 0x7, but not alla are errors. Can be reproduced as before with non-existing domain. it comes from line 4039 nad folowing if ((status & NX_DNS_ERROR_MASK) == NX_DNS_ERROR_MASK) { /* Release the source packet. */ nx_packet_release(packet_ptr); return NX_DNS_SERVER_AUTH_ERROR; } Best would be to add in nx_dns.h #define NX_DNS_REPLY_CODE_OK 0xB8 /* base value for reply code management */ #define NX_DNS_REPLY_CODE_FORMERR 0xB9 /* DNS Query Format Error */ #define NX_DNS_REPLY_CODE_SERVFAIL 0xBA /* Server failed to complete the DNS request */ #define NX_DNS_REPLY_CODE_NXDOMAIN 0xBB /* Domain name does not exist */ #define NX_DNS_REPLY_CODE_NOTIMP 0xBC /* Function not implemented */ #define NX_DNS_REPLY_CODE_REFUSED 0xBD /* The server refused to answer for the query */ #define NX_DNS_REPLY_CODE_YXDOMAIN 0xBE /* Name that should not exist, does exist */ #define NX_DNS_REPLY_CODE_XRRSET 0xBF /* RRset that should not exist, does exist */ #define NX_DNS_REPLY_CODE_NOTAUTH 0xE0 /* Server not authoritative for the zone */ #define NX_DNS_REPLY_CODE_NOTZONE 0xE1 /* Name not in zone */ and change 4939 if (((status & NX_DNS_QUERY_MASK) == NX_DNS_RESPONSE_FLAG) && ((status & NX_DNS_RCODE_MASK) != NX_DNS_RCODE_SUCCESS)) { /* Release the source packet. */ nx_packet_release(packet_ptr); return (NX_DNS_REPLY_CODE_OK + (status & NX_DNS_RCODE_MASK)); } This allows to take proper action if required.mikebargauanJul 13, 2023Copper Contributor563Views0likes0CommentsUNSUPPORTED features - why not have some flexibility?
Hi all, I am working with Azure RTOS and from time to time I get in situations where there are protocols or other items unsupported by Azure. It make a lot of sense that Azure team dos not waste development time outside roadmap, no question. Nevertheless, some time we do need add these features; as today, only way is to patch Azure code and this is, in my mind, a true crime. There is a very nice way to solve this at zero cost. Every time there is a tree that ends into an error or discard for non supported item, add a macro that allows to add some code to any developer without modifying original code. Example: Azure ACTUAL CODE ***************************** if(protocolA){ ... } else if(protocolB){ ... } else { /* unsupported case */ error(); } ***************************** Proposed modification: ***************************** #define UNSUPPORTED_CASE_A if(protocolA){ ... } else if(protocolB){ ... } else { UNSUPPORTED_CASE_A; /* unsupported case */ error(); } ***************************** This allow to add user handling of unsupported feature, either implementing feature or just adding appropiate management instead of generic error or discard function. Adding undefined macro, will not weakens code quality, will not cost in code development, while it add flexibility to developers to custom handle unsupported cases. Any coment on this proposal? Mike BargauanmikebargauanJul 06, 2023Copper Contributor629Views0likes0Comments