@ame thankyou, first of all i carnt use a serial port adapter that plugs onto gpio, it has to be fully through usb, second of all i carnt use sockets because it has to be done all offline because the computer will be on a diffrent network then the pi.
I believe your understanding of network sockets and the ethernet gadget is flawed.
The ethernet gadget presents to both the Pi and the USB host as an ethernet interface*. Those form an isolated network with just two members.
Network applications (including python) will work as expected as long as you use the correct IP address which must be in a different subnet to the ones used by any other interfaces on either machine.
Do you have a guide? i was able to setup gadget but couldnt get python to comunicate to recive and send messages between each device.
[shameless self promotion]
USB Ethernet Gadget A Beginner's Guide
[/shameless self promotion]
Hit a web search for python socket tutorials.
Be aware that the 3B(+) cannot function as a USB gadget. The 4B can but only via its USB C port.
*: Windows can be picky about the ethernet gadget - more in my guide.
Statistics: Posted by thagrol — Sun May 26, 2024 11:29 pm