Skip to content

Conversation

@davidalo
Copy link

@davidalo davidalo commented Aug 15, 2024

Hello everyone.

Working on a b_l4s5i_iot01a board which is using a ESWIFI chip with offloaded sockets. I am struggling to make it work in order to connect to an LWM2M server and get the full functionality.

For now the following problems have been / need to be addressed:

  • Add support or ignore F_GETFL and F_SETFL ioctl calls from lwm2m_engine
  • Add support for sending in offloaded poll.
  • Add support for recvfrom with addr.
  • Review send invalid bytes (see information below).
  • Review recv invalid bytes (see information below).

With the first 3 commits I can properly connect to a LWM2M server (i.e. leshan or thingsboard).
However, I still face two issues:

  1. When the LWM2M server performs a read request, it seems to be completed successfully but the server is reporting unexpected 0xFF bytes in CoAP.
[CoapServer(main)#9] INFO  org.eclipse.californium.ban - [LWM2M Server-coap://0.0.0.0:5685] Found payload marker (0xFF) but message contains no payload;
  1. When pushing an image from the LWM2M server to the device, bytes received are incorrect. As an example, the first bytes of the binary file are 3db8 f396 0000 0000 0002 0000 58a7 0200 and we receive 3db8 f396 0000 0000 0002 0000 5ca7 0200 in the LWM2M function.

LWM2M code seems fine as it is working well when running in a Ethernet board, so I guess that problems come from ESWIFI. Any help for debugging this is highly appreciated.

@github-actions
Copy link

Hello @davidalo, and thank you very much for your first pull request to the Zephyr project!
Our Continuous Integration pipeline will execute a series of checks on your Pull Request commit messages and code, and you are expected to address any failures by updating the PR. Please take a look at our commit message guidelines to find out how to format your commit messages, and at our contribution workflow to understand how to update your Pull Request. If you haven't already, please make sure to review the project's Contributor Expectations and update (by amending and force-pushing the commits) your pull request if necessary.
If you are stuck or need help please join us on Discord and ask your question there. Additionally, you can escalate the review when applicable. 😊

@davidalo davidalo changed the title ESWIFI: Fixes for LWM2M Draft. ESWIFI: Fixes for LWM2M Aug 15, 2024
@davidalo davidalo force-pushed the eswifi-fixes-for-lwm2m-client branch from d12c6fd to bd2d8bf Compare August 15, 2024 14:36
@davidalo
Copy link
Author

Maybe related #76483

@jukkar
Copy link
Member

jukkar commented Aug 15, 2024

Just a minor comment to the commits. Please use drivers: wifi: eswifi: .... prefix instead ESWIFI: ... for the commit subjects.

@davidalo davidalo force-pushed the eswifi-fixes-for-lwm2m-client branch from bd2d8bf to 679ad39 Compare August 19, 2024 16:36
@davidalo
Copy link
Author

Just a minor comment to the commits. Please use drivers: wifi: eswifi: .... prefix instead ESWIFI: ... for the commit subjects.

Done

@davidalo
Copy link
Author

A quick update from this weekend. It seems that rx of invalid bytes was an mistake on my end. RX is successful when using fixes from #76483.

Still need to dig deeper to check invalid bytes tx.

@davidalo davidalo changed the title Draft. ESWIFI: Fixes for LWM2M Draft. drivers: wifi: eswifi: Ignore F_GETFL and F_SETFL ioctl calls. Add ZSOCK_POLLOUT revent in offloaded poll. Use peer_addr as addr in recvfrom. Aug 22, 2024
@davidalo
Copy link
Author

I still need to investigate invalid TX (will open a new PR if needed) but the rest of the fixes seems fine. Ready to review @jukkar .

@davidalo davidalo changed the title Draft. drivers: wifi: eswifi: Ignore F_GETFL and F_SETFL ioctl calls. Add ZSOCK_POLLOUT revent in offloaded poll. Use peer_addr as addr in recvfrom. drivers: wifi: eswifi: Ignore F_GETFL and F_SETFL ioctl calls. Add ZSOCK_POLLOUT revent in offloaded poll. Use peer_addr as addr in recvfrom. Aug 22, 2024
Copy link
Contributor

@rlubos rlubos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please follow https://docs.zephyrproject.org/latest/contribute/guidelines.html#commit-message-guidelines regarding commit message format. All commits need a commit message body and a signoff entry.

@github-actions
Copy link

github-actions bot commented Nov 3, 2024

This pull request has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this pull request will automatically be closed in 14 days. Note, that you can always re-open a closed pull request at any time.

@github-actions github-actions bot added the Stale label Nov 3, 2024
@github-actions github-actions bot closed this Nov 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants