-
Describe the bug When I try the same but using the RJ45 connection and normal ethernet driver on the same board it works perfectly. I've tested the USB connection on a nrf board where it works without issue. This leads me to believe it is a problem with the thread safety of the usb networking stack on the stm32 platform. To Reproduce Expected behavior Impact Logs and console output Environment (please complete the following information):
Additional context |
Beta Was this translation helpful? Give feedback.
Replies: 8 comments 6 replies
-
These two statements are at odds with each other, civetweb was unmaintained for a few releases and was removed prior to the 3.2 release. Please fix your post |
Beta Was this translation helpful? Give feedback.
-
@Coi-l Would you be able to share a project that could be used to reproduce the issue you're seeing? |
Beta Was this translation helpful? Give feedback.
-
I'm not sure why you have such an aggressive tone. While I am new to zephyr community interactions I sincerely hope that your attitude is not representative for the rest of the community here. |
Beta Was this translation helpful? Give feedback.
-
I can't share the full project. I will try to put together a smaller example. |
Beta Was this translation helpful? Give feedback.
-
However, you should understand that you are probably reporting a bug in your project to upstream. There is no more support for civetweb, your description is very vague, and claims to be a bug in upstream. Please report it so that it can be reproduced with few changes in the tree, without external dependencies (like civetweb). @erwango +1 to move to discussion. |
Beta Was this translation helpful? Give feedback.
-
I understand that. I am very open for the possibility that it is a bug in my own project/civetweb integration. However the behaviour I saw at least in my opinion hinted at a bug somewhere in the stm32 networked usb stack. |
Beta Was this translation helpful? Give feedback.
-
ok, moving to discussion until a genuine upstream bug is characterized |
Beta Was this translation helpful? Give feedback.
-
I've done some more poking around and have a branch with the problem here: Any changes to the prj.conf is at the end. I am no longer sure that it is a threading issue, but might be related to memory instead. Or more likely something I don't understand regarding the zephyr stack. Running the example as it is will caues a lot of errors and warnings in the usb stack: This seems to be related to receiving, which is a bit weird since there is not much receiving going on. and also this: So, there seems to be too little memory. My naive assumption was that the network/tcp stack would chunk this up in proper chunks and feed the usb drivers in proper chunks as well. The problems seems to go away with increasing the memory with these configs: CONFIG_NET_PKT_RX_COUNT=25 available in the prj.conf file. However, I don't really understand why these would need to be increased, nor how I should calculate what they need to be. Any help or insight into this would be appreciated. |
Beta Was this translation helpful? Give feedback.
I've done some more poking around and have a branch with the problem here:
https://github.com/skunkcollective/zephyr/tree/usb-web-problem
The example is a modified civetweb/websocket example where I've extended it with more files to load from the index.html page.
Any changes to the prj.conf is at the end.
I've tested this on linux/firefox/chrome.
The branch requires a change in civetweb.c to work (see commit message). It is due to the stack size of the civetweb threads.
You need to manually set your ip address on the new network interface. The board is running on 192.0.2.1/24. Port 8080.
You can bring up the developer console in firefox to see the file loading if you are familiar with that.
…