EtherUSB
James Peacock (318) 129 posts |
EtherUSB$MAC_Configured is SMSC9xxx specific and was added to allow multiple machines with such devices to be used on the same network. IIRC, if this isn’t defined then the MAC is set to a hard coded value. EtherUSB$MAC_XXXXXXXXXXXX is handled by the ‘core’ of EtherUSB, and supported by all backends assuming the devices have distinct and predicable MAC addresses. This was initially added to make development easier when you have 4 devices getting added and removed continually. I did a little bit of work on a way to generate a consistent MAC, so if there were multiple devices without a MAC each would always get the same MAC regardless of which order they were plugged in/removed etc. The function currently uses the machine’s ID and the unit number, which isn’t any use as the unit number isn’t known at the point of time when the MAC is first required. What it needs is to use is the machine’s ID and an ID of some sort of consistent ID from the device or the USB system. |
Raik (463) 2061 posts |
How can I change the MAC address? With EtherUSB in the ROM I have no way “EtherUSB$MAC_Configured” to set before EtherUSB is loaded. A rmreinit apparently works (no error messages, etc.) but I have no network services. I’ve also tried this in Predesk. DHCP seems to work, the MAC has changed, but I have no network services again. I need different MAC addresses, because I have different network shares via the MAC address. |
Chris Gransden (337) 1207 posts |
As a workaround you could try ‘unplug EtherUSB’, making sure cmos settings are saved. Then softload from ‘PreDesk’ instead so it picks up EtherUSB$MAC_Configured. |
Raik (463) 2061 posts |
That’s what I mean. Works for me, unfortunately, not correct. |
Leo (448) 82 posts |
I think I ran into this when getting my RPi up and running. The issue seemed to be that after restarting EtherUSB it showed the correct MAC address (i.e. the one in the EtherUSB$MAC_Configured) when I queried the module using ejinfo. however when I did an ‘ifconfig -a’ the MAC address listed there was the ‘default’ one that EtherUSB originally assigned. Having the same interface with two different MAC addresses is probably going to cause the packets to end up in the wrong place. Unfortunately I couldn’t work out a way around that, so for now my RISC OS RPi is stuck with the default MAC. |
Raik (463) 2061 posts |
I can confirm this. Two MAC adresses. Ejinfo the “changed” and the “default” with ifconfig. But only with the ROMs with EtherUSB inside. |
James Peacock (318) 129 posts |
I’ve noticed this in the past when swapping adapters, so the MAC address of ej0 changes. As far as I could tell, EtherUSB was correctly deregistering and reregistering the device so I assumed it was something to do with the Internet module. I don’t have hard evidence for this. Try the following (untested) after boot: *Set EtherUSB$MAC_Configured .... *RMReinit EtherUSB *RMReinit Internet *ifconfig -a You’ll probably have to reinitialise the DHCP module as it seems to ignore a attempts to reconfigure an interface it has already configured. Do all the machines without MAC addresses have unique machine IDs available via the usual SWI? |
Raik (463) 2061 posts |
This in Predesk before SetUpNet *Set EtherUSB$MAC_Configured …. works on xM and Panda. |
James Peacock (318) 129 posts |
That It looks like the Internet module doesn’t expect MAC addresses to change. |
Raik (463) 2061 posts |
As far as I am on my actions this morning remember the first attempt was not successful without ejconfig. The MAC addresses were the same, but I still had no network services. |
Leo (448) 82 posts |
I’ve updated my ‘SetupMAC’ file in PreDesk to now look like
And that gives me a working system with the correct MAC address set. of course it does increase startup time slightly |
Theo Markettos (89) 919 posts |
Just a note that it needs to be: |
Theo Markettos (89) 919 posts |
I notice 0.20 is picking up the machine ID for SMSC chips if there’s no MAC provided. Any chance we can retain the ability to override that MAC via EtherUSB$MAC_Configured? I’m using this to spoof my MAC to avoid having to pollute our DHCP/inventory database with lots of Raspberry Pi entries. |
Raik (463) 2061 posts |
Supported EtherUSB in ROM the same chipsets as the old modules? I have a adapter that works with my BBC4 last year but not with the Pandora yet. |
Steve Drain (222) 1620 posts |
In anticipation of the arrival of the Model A Pi, I have been thinking of how to get one networked. Ideally, some clever person would write a USB Wifi driver for at least one chipset. ;-) Failing that, I have bought a cheap USB-Ethernet dongle for less than £6. USBDevices identifies it as an ASIX AX88x72A chipset, so I have Set EtherUSB$Product and it is recognised by EJInfo as Unit 0, with the internal interface as Unit 1. I was then pleased to see that Configure offered me the option of either unit to use for DHCP. However, on re-boot I was not surprised to find that the information was lost. Where in Boot should I Set the Product, and possibly RMReInit EtherUSB, so that the dongle will be used successfully for DHCP? I can get ShareFS to recognize other machines, so I think the dongle itself is OK. |
andym (447) 473 posts |
@Steve
Could you tell us the make/model of the £6 adaptor? Possibly with a link to where you bought it (unless it was from your mate around the corner!)? |
Steve Drain (222) 1620 posts |
It was from an Ebay supplier – RM Express UK – where it is described as being for a MacBook Air. It has no brand make or model, just USB 2.0 Ethernet Adaptor, although the package shows it is for all types of machine and the disc has a multitude of drivers. I bought this one because it has a lead, although there are cheaper ones that just plug in. From USBDevices it is described as Class FF/FF ASIX Elec. Corp. AX88x72A. From USBDevInfo it is Vendor 0B95 Product 772A. |
Steve Drain (222) 1620 posts |
A little further on, I put the EtherUSB$Product and RMReInit commands in [pling]Internet.[pling]Run". DHCP works for the dongle and DHCPInfo reports sensible values. However, data transfer is not working correctly. The dongle LED flashes away, but NetSurf, for instance, times out. I think the dongle is not going to work for me, but any help would be welcome. |
Rick Murray (539) 13840 posts |
then…
Ummm, isn’t the price of a dongle more than the difference between model A and model B?
Oh God yes… well, we can hope, right? |
Raik (463) 2061 posts |
Î have a comparable with this . In black with the same Vendor and Product from Steve. |
Steve Drain (222) 1620 posts |
My principle reason for thinking about the model A is for portable use, ie with a Lapdock. The A is reported to use considerably less current than the B. If you are near a cable LAN connection you are likely to be near a power point, so adding a USB-LAN dongle then is not a power consideration. However, doing the maths: B at £25, A at £15 – difference £10 – add VAT £12.50. The dongle I bought was £5.85, including VAT and postage, but the cheapest are about £2.50. A cheap USB port expander is roughly the same cost bracket, which brings things up to about the same overall cost. AFAICT the chips in these cheap items are identical to more expensive branded ones, but of course the support electronics and fabrication quality might be dreadful. |
Steve Drain (222) 1620 posts |
@Raik I saw that Edimax unit as an ideal expander for an A, but it is far too expensive and Rick’s question of cost applies. It is interesting that it has the identical chipset to the cheap one. Perhaps there is a subtle difference indicated by the ‘A’ suffix that means that it is not [yet] compatible with James P’s EtherUSB. |
Raik (463) 2061 posts |
How can I change the MAc adress with the new EtherUSB in the 02 April ROM? |
Chris Hall (132) 3554 posts |
How can I change the MAc adress with the new EtherUSB in the 02 April ROM? The Aemulor, soon to be released for the Pi, will be tied to the MAC address. Being able to change the MAC address is therefore likely to be frowned upon. Tying software to the MAC address might be a very useful way to provide ‘cheaper’ versions of commercial software aimed at the Pi. For example provide a demo version of Artworks and different pricing for the Pi. If purchased at the cheaper price, it will only work on a Pi and then only on a specified single machine. |
Raik (463) 2061 posts |
Sorry, I forget. The RPi is not the problem. Every RPi has a own hardcoded MAC. But the xM and the Panda have not. As we worked on the EtherUSB Thomas implemented a way to change the MAC adress. I have give my two xm and my two Pandas any old MACs from my RiscPC and other old cards. |