Solved: Can not get my RTL8029AS to work

A forum for Classic Amiga specific support issues.
User avatar
Cyborg
AmigaOS Core Developer
AmigaOS Core Developer
Posts: 59
Joined: Wed Feb 16, 2011 1:29 pm

Re: Error: Can not get my RTL8029AS to work

Post by Cyborg »

Lumby wrote: My problem is I can not get my RTL8029AS to function at all.
The reason is that rtl8029.device (and also rtl8139 and rtl8169) only check for the default realtek PCI IDs. Back when I wrote those drivers, I only had cards with default Realtek IDs and the same for the betatesters. So I never had a chance to add more cards to the list of supported cards. BUT luckily I gave the user the ability to overwrite those default IDs ;)

Here is the relevant section of the (internal) documentation:

Code: Select all


  The driver reads a file from "ENV:rtl8029.device/" named "unit<X>" where
  <X> replaced by the unit number (0-7). The variable must contain one line
  of configuration text which follows this template:

     HALFDUPLEX/S,FULLDUPLEX/S,NOFLOWCONTROL/S,FLOWCONTROL/S,
     VENDORID/K,DEVICEID/K

  The options should be fairly self-explanatory, so just a few words
  regarding VENDORID/K and DEVICEID/K: These two are meant to overwrite
  the standard Realtek vendor and device PCI IDs, which might be usefull
  for rebranded network cards with a supported Realtek chip. To get both
  IDs, run "pciscan" in a shell and look for your card. The ID's *must*
  be given as 16-bit hex values, e.g. 0x10EC or just 10EC. Case is
  ignored.

  By DEFAULT the device looks for cards with vendor ID 0x10EC (Realtek),
  device ID 0x8139, 0x8169 or 0x8029 depending on what device you're
  using and tries to autonegotiate the best link setup with the other
  side (e.g. 1000Mbit full-duplex flowcontrol for 8169).
 
So in your case, assuming you only have one rtl8029 card in your computer, you have to create this environment variable:

Code: Select all

ENVARC:rtl8029.device/unit0
with this content:

Code: Select all

VENDORID 0x4A14 DEVICEID 0x5000
Now rtl8029.device should be able to find and use your card (maybe do a reset after creating the envvar, just to be sure).

Would be nice if you could report back if your card works. Then I could include their IDs directly in the next release of rtl8029.
Please contact support@hyperion-entertainment.com rather than trying to send PMs to me. Thanks! :)
User avatar
Cyborg
AmigaOS Core Developer
AmigaOS Core Developer
Posts: 59
Joined: Wed Feb 16, 2011 1:29 pm

Re: Error: Can not get my RTL8029AS to work

Post by Cyborg »

Lumby wrote:So I got me another 8029AS as described above.
But unfortunately with the same result :cry:

So I'm becoming very frustrating.
It is display fine in RANGER.

What can I give of data so that some can help me.
The second card you got does also not work? Holy cowly.. you seem to be a very "lucky" guy to only get 8029 cards with non-default IDs... could you please check the vendor and device ID of that second card too and quote them here? Would be also nice if you could try that second card with a correctly set envvar then and report back. If all goes well, rtl8029.device will have built-in support for 2 other cards with the next release ;)
Please contact support@hyperion-entertainment.com rather than trying to send PMs to me. Thanks! :)
User avatar
Slayer
Beta Tester
Beta Tester
Posts: 851
Joined: Tue Dec 21, 2010 4:19 am
Location: New Zealand

Re: Error: Can not get my RTL8029AS to work

Post by Slayer »

We have no such envarc setting for the 8139 (nor have I ever needed it) so this must have be related to something else (then again perhaps AmigaOS > 3.9 was updated to ID 8139 correctly OR possibly just so ranger identifies it correctly?).

In any-case (although I don't think this will help him ;) ) I do hope it works and my gut is wrong and only complaining about the food it just ate :D
~Yes I am a Kiwi, No, I did not appear as an extra in 'Lord of the Rings'~
1x AmigaOne X5000 2.0GHz 2gM RadeonR9280X AOS4.x
3x AmigaOne X1000 1.8GHz 2gM RadeonHD7970 AOS4.x
User avatar
Cyborg
AmigaOS Core Developer
AmigaOS Core Developer
Posts: 59
Joined: Wed Feb 16, 2011 1:29 pm

Re: Error: Can not get my RTL8029AS to work

Post by Cyborg »

Slayer wrote:We have no such envarc setting for the 8139 (nor have I ever needed it) so this must have be related to something else (then again perhaps AmigaOS > 3.9 was updated to ID 8139 correctly OR possibly just so ranger identifies it correctly?).
Oh! I'm sorry that I thought I'd know how the software works which I wrote myself.. maybe I was just daydreaming back then :roll:

Nevertheless, I'll try again to explain how it works:
Realtek sells their chips to a zillion network card manufacturers. Some, but not all of them have an own PCI ID range. Those of them, who don't have an own range or who think their free IDs are too valuable, just keep the default Realtek IDs. I.e. vendor ID 0x10EC == Realtek, device ID depending on the used chip 0x8029, 0x8139, 0x8169, etc. But other manufactures stick their own PCI IDs in the EEPROM, which causes a lot of Realtek based cards to not show up as obvious Realtek card. D-Link for exactly loves to hide the actual chip used behind their own IDs.

Now, because of that ID mess, a driver coder (like me) can only add those devices to the list of known devices which were either reported and confirmed as being a "compatible" card or which the developer owns himself.

In my case, I own plenty of 8029, 8139 and 8169 cards. But unfortunately all of my 8029 and 8169 cards did carry the default Realtek IDs. Also there was not a single betatester who reported 8029 or 8169 based cards using different IDs. The case is different for 8139. I own quite some 8139 cards with custom PCI IDs and I got quite a number of reports from betatesters about custom IDs. That's why I was able to give rtl8139.device a number of IDs it can scan without the need of the user to manually overwrite them.

Oh and that was also the reason, why I implemented the possibility to overwrite the PCI IDs by using an environment variable in ALL my drivers.

Here are the IDs the realtek devices check for... the first column is the vendor ID, the second is the device ID (PCI_VENDOR_REALTEK and PCI_DEVICE_RTL8xx9 are defines for the default IDs I mentioned above):

rtl8029.device:

Code: Select all

	PCI_VENDOR_REALTEK,	PCI_DEVICE_RTL8029,
rtl8139.device

Code: Select all

	PCI_VENDOR_REALTEK,	PCI_DEVICE_RTL8139,
	0x10ec, 0x8138,
	0x1113, 0x1211,
	0x1500, 0x1360,
	0x4033, 0x1360,
	0x1186, 0x1300,
	0x1186, 0x1340,
	0x13d1, 0xab06,
	0x1259, 0xa117,
	0x1259, 0xa11e,
	0x14ea, 0xab06,
	0x14ea, 0xab07,
	0x11db, 0x1234,
	0x1432, 0x9130,
	0x02ac, 0x1012,
	0x018a, 0x0106,
	0x126c, 0x1211,
	0x1743, 0x8139,
	0x021b, 0x8139,
rtl8169.device:

Code: Select all

	PCI_VENDOR_REALTEK,	PCI_DEVICE_RTL8169,
As you can see, rtl8139.device already comes with a number of known IDs, the others don't. THAT is the reason, why it is unlikely that you will find a 8139 card which doesn't work out of the box.. and it is also the reason, why it may well be that you find an 8029 or 8169 card, which does NOT work out of the box. Just like it happened to Lumby.

BTW: Any stuff prior to AmigaOS 4 is absolutely irrelevant as the realtek drivers were developed by myself from scratch for AmigaOS 4.
In any-case (although I don't think this will help him ;) ) I do hope it works and my gut is wrong and only complaining about the food it just ate :D
You are wrong. See above.

I'm absolutely sure that both of Lumby's 8029 cards (assuming that they are not broken) will start working as soon as he puts their correct IDs (as shown by PCIScan or Ranger) into the environment variable. Lumby, please don't forget to report back here! ;)
Please contact support@hyperion-entertainment.com rather than trying to send PMs to me. Thanks! :)
User avatar
Slayer
Beta Tester
Beta Tester
Posts: 851
Joined: Tue Dec 21, 2010 4:19 am
Location: New Zealand

Re: Error: Can not get my RTL8029AS to work

Post by Slayer »

Well that is a far far better explanation! :D It would have made my gut happier too I think ;)
BTW: Any stuff prior to AmigaOS 4 is absolutely irrelevant as the realtek drivers were developed by myself from scratch for AmigaOS 4.
Yes, I had entertained that idea when I said "then again perhaps AmigaOS > 3.9 was updated"

We need to add all this stuff to the troubleshooting section of the relevant guide!

Thanks for your time Cyborg, I know you have very little to spare!
~Yes I am a Kiwi, No, I did not appear as an extra in 'Lord of the Rings'~
1x AmigaOne X5000 2.0GHz 2gM RadeonR9280X AOS4.x
3x AmigaOne X1000 1.8GHz 2gM RadeonHD7970 AOS4.x
User avatar
ZeroG
Posts: 124
Joined: Sat Jun 18, 2011 11:31 am
Location: Germany

Re: Error: Can not get my RTL8029AS to work

Post by ZeroG »

Cyborg wrote: Here is the relevant section of the (internal) documentation:
I just had a look in SYS:Documentation/ (4.1u4) and it's "external" documentation... :mrgreen:
Lumby
Posts: 12
Joined: Sun Dec 25, 2011 2:50 pm

Re: Error: Can not get my RTL8029AS to work

Post by Lumby »

First a big thank you to all

@Cyborg
I can confirm that your description worked.
So now I've got my Network up!

I have not read VENDORID and DEVICEID from my Micronet RTL8029as yet.

Will try it tomorrow and give notice.

Sincerely
Lumby
User avatar
Cyborg
AmigaOS Core Developer
AmigaOS Core Developer
Posts: 59
Joined: Wed Feb 16, 2011 1:29 pm

Re: Error: Can not get my RTL8029AS to work

Post by Cyborg »

Lumby wrote:First a big thank you to all

@Cyborg
I can confirm that your description worked.
So now I've got my Network up!

I have not read VENDORID and DEVICEID from my Micronet RTL8029as yet.

Will try it tomorrow and give notice.
Very good to hear!

So did I understand correct, that your 8029 card with vendor ID 0x4A14 and device ID 0x5000 is working fine? If so, I will add it directly to the driver for the next release.
Please contact support@hyperion-entertainment.com rather than trying to send PMs to me. Thanks! :)
Lumby
Posts: 12
Joined: Sun Dec 25, 2011 2:50 pm

Re: Error: Can not get my RTL8029AS to work

Post by Lumby »

Cyborg wrote: Very good to hear!

So did I understand correct, that your 8029 card with vendor ID 0x4A14 and device ID 0x5000 is working fine? If so, I will add it directly to the driver for the next release.
It is understand correctly.
It sounds good you Will insert it in the next update.
User avatar
Slayer
Beta Tester
Beta Tester
Posts: 851
Joined: Tue Dec 21, 2010 4:19 am
Location: New Zealand

Re: Error: Can not get my RTL8029AS to work

Post by Slayer »

Cool Bananas

Time to update your title to solved as opposed to error :)
~Yes I am a Kiwi, No, I did not appear as an extra in 'Lord of the Rings'~
1x AmigaOne X5000 2.0GHz 2gM RadeonR9280X AOS4.x
3x AmigaOne X1000 1.8GHz 2gM RadeonHD7970 AOS4.x
Post Reply