2024-06-25 11:06 PM
Using B-L072Z-LRWAN Board, I'm trying to Enumerate the USB Port as a Ethernet Adapter.(As Device not Host)
Thereby I integrated just the USB-ECM Stack provided by the STM32 itself.
I initially had issues with Driver, Post Following the Guide/Post from @tjaekel , i.e USB ECM demo - how to setup host? I used Belcarra USBLAN Driver, Though it got installed and is shown under Network Adapter, I see a Warning Sign for it
On Linux though, It gets identified as Android Tethering Device but doesn't show up on Wireshark nor Control Panel(Under Network).
So Below are my Issues:
2024-06-27 05:04 AM
@Andrew Neiland @Pavel A. , Thanks for Taking time on this post.
To Answer a Few Points:
> But @Pavan_LohiaGroup's objective seems to be to have this "just work" with the standard, built-in networking of "all OS Platforms" - not custom crafting raw packets ... ?
Yes, I would not fiddle or play around with the Incoming Data, I would like to Just Receive the RAW Ethernet Packets in its correct fragmentation/format.
i.e. I would like to just receive these Hex values (Captured from Wireshark), as it is at every interrupt/packet.
> Throughput is still going to be waaaaaaaaaaaay faster than the LoRa radio!
Yes, Your Understanding is right, I will just forward those packets that I receive (Raw Ethernet) to the LoRa Radio. Similarly I will Forward all the Data I receive from LoRa Radio to this Enumerated USB-ECM.
> @Andrew Neil It is possible to use raw "ethernet" packets without IP stack. There were times before IP...
The Pain Point I'm still facing is, Having just the Middle ware of USB-ECM isn't making my Dev. board get detected as either Virtual Ethernet nor as any Physical Ethernet Port under any OS. Or In other Words, Even if Right Drivers are installed too, They are either Disabled/Can't be used too.
> For a really tiny IP stack. maybe consider uIP: https://dunkels.com/adam/software.html
Thanks will give it a Shot soon and Update.
Again Thanks all for Responses and Guidance.
2024-06-27 05:13 AM
@Pavan_LohiaGroup wrote:Yes, I would not fiddle or play around with the Incoming Data, I would like to Just Receive the RAW Ethernet Packets in its correct fragmentation/format..
But how will you get "all OS Platforms" to send such raw ethernet packets?
Surely, they will expect to have a TCP/IP conversation? Or UDP/IP at the least?
2024-06-27 05:25 AM - edited 2024-06-27 05:30 AM
> Having just the Middle ware of USB-ECM isn't making my Dev. board get detected as either Virtual Ethernet nor as any Physical Ethernet Port under any OS.
Correct, Windows for example will need a custom driver for CDC/ECM. Windows has in-box driver (usb8023.sys) only for RNDIS flavor of USB networking. But if you get a compatible driver for CDC/ECM, just answering correctly the USB descriptor requests should get the device recognized. No TCP/IP middleware is involved in this. On Linux more or less same. Install a compatible driver.
If you need more help with development or research on this project, here it can be found.
2024-06-27 05:30 AM
Yes, There would be Conversation of Both TCP/IP and UDP/IP too.
So would both need a IP Stack? I understand if TCP/IP might probably need as It needs to Connect first before any Communication. But would it be needed even for UDP too, Shouldn't a Static IP assigned to Adapter be sufficient for it?
2024-06-27 05:36 AM
@Pavan_LohiaGroup wrote:But would it be needed even for UDP too, Shouldn't a Static IP assigned to Adapter be sufficient for it?
Hmmm - maybe ...
But then you're getting into needing a specific app of some sort to do that.
If you're going to need a specific app anyhow, why not just have it use a VCP - surely "all OS Platforms" support VCP?
2024-06-27 05:40 AM
As mentioned earlier, I tried using Belcarra USBLAN for ECM too. But for reasons unknown to me, it has some warnings and thereby not even shown in control panel > networking devices > adapters.
I indeed Tried RNDIS too, It partially works in Linux, Driver/Adapter is Disabled in windows, Details arementioned in this below post too.
2024-06-27 05:45 AM
The Device is expected to be connected to PLC's, Motor Drives and Other Industrial Machines which works / is configured to work mostly over Ethernet, so if its to be used as VCP, The existing systems/devices should also be reprogrammed to communicate over VCOM which I'm trying to avoid all together so This Product can acts as a Plug and Play Device.
2024-06-27 05:54 AM
Looks like a bug in function descriptors. The Windows USBView isn't maintained well and cannot be trusted too much, prefer Linux tools. See the link in my reply above.
2024-06-27 05:58 AM
Surely Will Double Check and Verify things.
I will Explore the fiverr.com for more details and understanding.
Thanks
2024-06-27 06:01 AM - edited 2024-06-27 06:01 AM