STM32L5 Using Mongoose over RNDIS and USB CDC #1922
Replies: 9 comments 6 replies
-
Mongoose runs either over a Berkeley-compatible socket API or using its own TCP/IP stack with a driver over an Ethernet frame transport (including a device like pcap or tap). Can you provide any one of those ? What is your environment (OS, etc) ? What is your use case ? |
Beta Was this translation helpful? Give feedback.
-
Baremetal STM32L4 or L5 device using USB CDC RNDIS Stack From the HAL
Libraries.
See attached for the STM32 CDC RNDIS Class Library.
Michael Margolese
Principal Engineer
Tenuvah Designs
http://www.tenuvahdesigns.com
Phone: (424) 288-9585
…On Wed, Dec 14, 2022 at 4:09 AM Sergio R. Caprile ***@***.***> wrote:
Mongoose runs either over a Berkeley-compatible socket API or using its
own TCP/IP stack with a driver over an Ethernet frame transport (including
a device like pcap or tap). Can you provide any one of those ? What is your
environment (OS, etc) ? What is your use case ?
—
Reply to this email directly, view it on GitHub
<#1922 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AYMHAOXGFE5I3LKKBFRQBGDWNG2GXANCNFSM6AAAAAAS6AOHEQ>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
I want to do Ethernet over USB and use LWiP as the networking layer.
Simple concept is that the embedded device can interact with a browser
using WebSockets
for being able to control devices from webpages or over the internet.
Here is an example project that I have mostly integrated but I am no expert
in LWiP
Device enumerates as a CDC ACM device (Virtual Com Port) *but* does not get
a proper driver from windows to show up as an ethernet device
Dont know if i am using the LWiP stack incorrectly.
https://www.dropbox.com/t/0hPg5khaUG1gnZ3t
Let me know what you think
Michael Margolese
Principal Engineer
Tenuvah Designs
http://www.tenuvahdesigns.com
Phone: (424) 288-9585
…On Thu, Dec 15, 2022 at 5:03 AM Sergey Lyubka ***@***.***> wrote:
Thanks @scaprile <https://github.com/scaprile> ! @sckid1108
<https://github.com/sckid1108> , it looks like it is quite possible to do
- could you put together a brief description of what you're trying to
achieve on a high level, please? Feel free to email ***@***.***
to setup a quick call to discuss that.
—
Reply to this email directly, view it on GitHub
<#1922 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AYMHAOR75Z6GF6GYZ5YPWDTWNMJKRANCNFSM6AAAAAAS6AOHEQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Hey Guys,
Here is a much better example I got working on my STM32L422KBT board.
https://www.dropbox.com/t/nmUJp3phrQUdkyu8
Uses TinyUSB with LWiP to serve a web page etc. Would be SOOO much better
with Mongoose.
Michael Margolese
Principal Engineer
Tenuvah Designs
http://www.tenuvahdesigns.com
Phone: (424) 288-9585
…On Thu, Dec 15, 2022 at 9:48 AM Sergio R. Caprile ***@***.***> wrote:
This is baremetal, lwIP works with NO_SYS=1 hence it does not provide a
socket-compatible interface, so Mongoose would need an adaptation layer to
work with lwIP's RAW API.
—
Reply to this email directly, view it on GitHub
<#1922 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AYMHAOTXSKZZ37QLYV33VB3WNNKYVANCNFSM6AAAAAAS6AOHEQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
AMAZING !!! I will port to my board and test as well !
Michael Margolese
Principal Engineer
Tenuvah Designs
http://www.tenuvahdesigns.com
Phone: (424) 288-9585
…On Mon, Dec 19, 2022 at 6:39 AM Sergey Lyubka ***@***.***> wrote:
@sckid1108 <https://github.com/sckid1108> we've added a mongoose example
for tinyusb + rndis, see
https://github.com/cesanta/mongoose/tree/master/examples/stm32/nucleo-f429zi-usb-rndis
Clone mongoose repo, go to this directory and type make. You need ARM GCC
installed.
That was tested on F429 board, on MacOS:
[image: Screenshot 2022-12-19 at 14 37 28]
<https://user-images.githubusercontent.com/601816/208450122-c7227a82-66a2-43c0-9374-94d4b72a924e.png>
Talking to a device web server from the workstation:
$ curl 192.168.3.1
hi
—
Reply to this email directly, view it on GitHub
<#1922 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AYMHAORZO4ZB2XDTXJDPGC3WOBXQPANCNFSM6AAAAAAS6AOHEQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
I will send you my code if i get it working.
For shipping products we ship BAREMETAL. No RTOS at all.
Michael Margolese
Principal Engineer
Tenuvah Designs
http://www.tenuvahdesigns.com
Phone: (424) 288-9585
…On Mon, Dec 19, 2022 at 11:23 AM Sergey Lyubka ***@***.***> wrote:
@sckid1108 <https://github.com/sckid1108> we might prep the STM32L
example as well.
Out of curiosity, what middleware do you use ? FreeRTOS ?
—
Reply to this email directly, view it on GitHub
<#1922 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AYMHAOXLAOVAYPA4LV4C3K3WOCY4LANCNFSM6AAAAAAS6AOHEQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
STM32 HAL Libraries also
Michael Margolese
Principal Engineer
Tenuvah Designs
http://www.tenuvahdesigns.com
Phone: (424) 288-9585
…On Mon, Dec 19, 2022 at 11:23 AM Sergey Lyubka ***@***.***> wrote:
@sckid1108 <https://github.com/sckid1108> we might prep the STM32L
example as well.
Out of curiosity, what middleware do you use ? FreeRTOS ?
—
Reply to this email directly, view it on GitHub
<#1922 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AYMHAOXLAOVAYPA4LV4C3K3WOCY4LANCNFSM6AAAAAAS6AOHEQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Hey Gang,
I got it working. (Didn't need netif/ethernet.h since ETHERNET header
length already defined in TUSB).
I assume you guys added DHCP server etc ? (didn't see this in mongoose i
originally downloaded, thats why i couldnt get it working)
BTW mongoose is now totally *bad ass* and I will be using this instead of
LwIP for our projects in the future.
Tested on Windows 10 (automagically uses the built-in driver. Attached is
my complete build directory.
I wouldn't mind doing a STM32L5 (Cortex-M33 version).
[image: image.png]
[image: image.png]
*MEMORY USAGE USING HAL AND USART FOR DEBUG (Debug code build)*
[image: image.png]
*MEMORY USAGE FOR RELEASE*
[image: image.png]
mongoose_custom.h
#pragma once
#include <errno.h>
#define MG_ARCH MG_ARCH_NEWLIB
#define MG_ENABLE_MIP 1
#define MG_ENABLE_CUSTOM_MILLIS 1
#define MG_IO_SIZE 256
Let me know if you want anything else from me. BTW We use HAL often to
get things working during development and
to do things like configuration for clocks, IO, etc.
Michael Margolese
Principal Engineer
Tenuvah Designs
http://www.tenuvahdesigns.com
Phone: (424) 288-9585
…On Mon, Dec 19, 2022 at 1:33 PM Sergey Lyubka ***@***.***> wrote:
@sckid1108 <https://github.com/sckid1108> baremetal, awesome.
That's what our example is. We don't even use HAL, only CMSIS headers.
—
Reply to this email directly, view it on GitHub
<#1922 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AYMHAOVHYXYAH2X4FPXMSQ3WODICRANCNFSM6AAAAAAS6AOHEQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
@sckid1108 awesome, thanks for letting us know!
Would you be able to share some info about the end product, and specifically - that USB use case, please? The email is support@cesanta.com if you do not want it open to the public. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Has anyone gotten this to work ?
Beta Was this translation helpful? Give feedback.
All reactions