amiberry icon indicating copy to clipboard operation
amiberry copied to clipboard

Network device emulation not working (including uaenet.device)

Open giantclambake opened this issue 1 year ago • 2 comments
trafficstars

See #1475 for reference.

Using the Roadshow TCP stack, none of the provided drivers match emulated network cards ;

ex

It does however identify the uaenet.device correctly, and provide the applicable driver file to which you can attach the tcp stack, but it doesn't work (see discussion above) as no packets flow.

ex2

AFAICT, the emulated ethernet device is not being built ; slirp is providing mac_addr, but all other network device functionality is missing, and thus Roadshow cannot find a qualifying device.

TIA

giantclambake avatar Oct 19 '24 01:10 giantclambake

Only uaenet.device will be injected by Amiberry during runtime, for the other emulated hardware boards, you'll need the proper .device file from Roadshow or similar software. However, the implementation probably needs more - pcap might be required to make use of uaenet.device, or other cards.

Of course, bsdsocket.library should work without any further requirements.

midwan avatar Oct 19 '24 15:10 midwan

Yeah, if you enable A2065 in Amix, bootup stalls completely twiddling it's thumbs over net_if init.... unfortunately, the bsdsocket.library doesn't work in Amix ....but ofc Amix with A2065 enabled in WinUAE works ;)

giantclambake avatar Oct 20 '24 01:10 giantclambake

Just to add I updated to 7, imported over my working WinUAE Amix setup and whilst it boots, I couldn't get the network to do anything. I suspect a lot of uaenet.device is not exactly 'platform independent'

SonnyJim avatar Jan 15 '25 12:01 SonnyJim

Yeah, this is still currently broken ~ midwan's spun off a separate branch to work on the issues here =)

giantclambake avatar Jan 15 '25 12:01 giantclambake

Yeah, this one requires a pcap implementation like the one on WinUAE, but for Linux/macOS. That is some work that I haven't had time to look into yet, so I left this issue open for a future attempt at fixing it.

midwan avatar Jan 15 '25 14:01 midwan

@giantclambake Even though PCAP is not implemented yet, I just fixed an issue with the SLIRP implementation, which might affect this case as well. Can you run a new test when you have a chance, to see if it's any better with the latest from master ?

midwan avatar Mar 08 '25 18:03 midwan

Did a quick test myself, using the A2065 device driver from Aminet: https://aminet.net/driver/net/a2065v216a.lha

And it works, at least basic functionality like browsing a website.

midwan avatar Mar 08 '25 20:03 midwan

Well... one can't use that device in amix (I don't think?), and amix still fails to load -- that said, output in the logfile has changed, so maybe there is a clue there .... (I'll attach it, disregard filesystem checks)....

amiberry.log.gz

giantclambake avatar Mar 09 '25 01:03 giantclambake

@giantclambake I tested with NetBSD 9 and it seems to work, at least in the sense that I could open an SSH connection from there to another machine in my LAN, without problems. I used the A2065 network card with SLIRP network mode, and had to enable the DHCP client manually, to get an IP in the system. Otherwise, it worked as expected, after the fixes I mentioned above.

midwan avatar Mar 09 '25 17:03 midwan

@midwan I'll restest in the next few days ~ bit hard atm, with the cyclone having hit, and our power going on/off like a yo-yo ;^/

Just one question ~ which SLIRP mode did you use?... SLIRP User mode NAT ..or.. SLIRP + Open ports ?

Thanks

giantclambake avatar Mar 10 '25 04:03 giantclambake

@midwan I'll restest in the next few days ~ bit hard atm, with the cyclone having hit, and our power going on/off like a yo-yo ;^/

Just one question ~ which SLIRP mode did you use?... SLIRP User mode NAT ..or.. SLIRP + Open ports ?

Thanks

Either SLIRP mode should work - in NetBSD, I used the User mode NAT.

midwan avatar Mar 13 '25 15:03 midwan

Decided to reinstall everything again + patch disk.

The network interface is detected, and can be configured, and seems to be able to ping self, however, using wireshark I see no packets coming from the guest emulation at all. I was looking at this thread for clues, but nothing seems to work as expected.

giantclambake avatar Mar 17 '25 09:03 giantclambake

Decided to reinstall everything again + patch disk.

The network interface is detected, and can be configured, and seems to be able to ping self, however, using wireshark I see no packets coming from the guest emulation at all. I was looking at this thread for clues, but nothing seems to work as expected.

I have exactly the same problem with Raspbian :( No connection what so ever. bsdsocket.library works, but i need an ip address :)

VelocityNL avatar Mar 23 '25 18:03 VelocityNL

I'm not entirely sure how it's all supposed to route (at a tcp/ip level) ~ as midwan said above, User mode NAT seemed to work wrt NetBSD, and I should try that in Amix (but I'm in no way hopeful ;). AFAIK some form of NAT has to take place (because) you've got the conundrum of the $HOST tcp/ip connection to the outside world...like, sure you could do eth0:0 eth0:1 and filter by mac_addr...but in theory the NAT routing should take care of this....I'll have to muck around a bit more....

giantclambake avatar Mar 24 '25 05:03 giantclambake

Hoping midwan gets uaenet.device to work :) Then i should get an iP using a TCP/IP stack like AmiTCP or Miami :) Thought this should work out of the box, so bought a Raspberry Pi 5 to use as a Telnet BBS using Ami-Express within Amiberry.

VelocityNL avatar Mar 29 '25 14:03 VelocityNL

Just pulled the latest git and compiled on my Linux box, gave it my Amix hardfile and working WinUAE config. Unsurprisingly still no network, although it boots and I can ping 127.0.0.1 / whatever address was assigned to the NIC, it can't ping anything outside of itself (ie can't ping host computer). Tried running SLIRP on the host PC and didn't seem to make a huge chunk of difference.

SonnyJim avatar May 11 '25 12:05 SonnyJim

I've added some initial support for uaenet.device using libpcap (new dependency, you'll need to install that before building). The changes are in a separate branch, until they are tested. I didn't have time to do any proper tests so far, besides building and running, to ensure nothing crashes.

Feel free to test using that branch and provide any feedback.

midwan avatar May 22 '25 16:05 midwan

Thank for working on this. Just tried it out, together with Roadshow:

Image

uaenet.log

It correctly enumerate all pcap devices, and Roadshow is configured with uaenet.device unit 2.

dlundqvist avatar May 23 '25 06:05 dlundqvist

Finally had a chance to test and compare this with WinUAE. Using the same Workbench installation in both, and the same emulator configuration (disable bsdsocket emulation, enable uaenet.device), I got it to work in the same way.

AddNetInterface reported the same thing, and got an IP correctly. uaenet was configured with unit 0, which is the default.

I could then open IBrowse and get to Aminet as expected.

midwan avatar Jun 13 '25 09:06 midwan

I still can't get uaenet.device to work. Neither using a unit that corresponds to my network device or unit 0. I don't know what SLIRP is or how to configure it in Linux, do you have any guides/information about this?

dlundqvist avatar Jun 18 '25 18:06 dlundqvist

@dlundqvist I didn't have to use any SLIRP mode for this to work. Did you follow the same steps in WinUAE? I only did what I mentioned above, and it seemed to work with IBrowse.

midwan avatar Jun 30 '25 17:06 midwan