How is the Ethernet MAC address for usb0 defined?
Dr. H. Nikolaus Schaller
hns at computer.org
Fri Aug 10 14:21:23 CEST 2007
Mikko,
I have now extended my analysis and found the following:
1) on the Zaurus
ifconfig reports this HW address
40:00:01:00:00:01
while the interface on the MacOS X side becomes
40:00:02:00:00:01
Virtually, the USB cable is a local network with TWO MAC devices.
The address 40:00:02:00:00:01 is provided by the Ethernet functional
descriptor through the USB configuration data - so it is somehow
defined by the Zaurus. Most probably, the usbd0 driver does this.
My fgrep for finding scripts that define these addresses were NOT
successful, so it is not defined in User Space.
2) GTA01
root at fic-gta01:~$ ifconfig
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:4 errors:0 dropped:0 overruns:0 frame:0
TX packets:4 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:344 (344.0 B) TX bytes:344 (344.0 B)
usb0 Link encap:Ethernet HWaddr 86:1E:F8:42:35:D5
inet addr:192.168.0.202 Bcast:192.168.0.255 Mask:
255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:89 errors:0 dropped:0 overruns:0 frame:0
TX packets:36 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:9817 (9.5 KiB) TX bytes:4255 (4.1 KiB)
root at fic-gta01:~$
While MacOS X reports that it receives this from the USB device
descriptor
Aug 10 08:05:02 MacBook-hns kernel[0]: AJZaurusUSB::configureDevice -
vendor id=5207 (0x1457)
Aug 10 08:05:02 MacBook-hns kernel[0]: AJZaurusUSB::configureDevice -
product id=20770 (0x5122)
Aug 10 08:05:02 MacBook-hns kernel[0]: AJZaurusUSB::configureDevice -
power id=500mA
Aug 10 08:05:02 MacBook-hns kernel[0]: AJZaurusUSB::configureDevice -
max packet size for Endpoint 0=16
Aug 10 08:05:02 MacBook-hns kernel[0]: AJZaurusUSB::configureDevice -
speed=1
Aug 10 08:05:02 MacBook-hns kernel[0]: AJZaurusUSB::configureDevice -
manufacturer=Linux 2.6.20.7-moko8/s3c2410_udc
Aug 10 08:05:02 MacBook-hns kernel[0]: AJZaurusUSB::configureDevice -
product=RNDIS/Ethernet Gadget
Aug 10 08:05:02 MacBook-hns kernel[0]: AJZaurusUSB::configureDevice -
serial number= idx=0
Aug 10 08:05:02 MacBook-hns kernel[0]:
AJZaurusUSB::getFunctionalDescriptors
Aug 10 08:05:02 MacBook-hns kernel[0]:
AJZaurusUSB::getFunctionalDescriptors - Header Functional Descriptor
- type=36 subtype=0
Aug 10 08:05:03 MacBook-hns kernel[0]:
AJZaurusUSB::getFunctionalDescriptors - Union Functional Descriptor -
type=36 subtype=6
Aug 10 08:05:03 MacBook-hns kernel[0]:
AJZaurusUSB::getFunctionalDescriptors - Ethernet Functional
Descriptor - type=36 subtype=15
Aug 10 08:05:03 MacBook-hns kernel[0]:
AJZaurusUSB::getFunctionalDescriptors - Ethernet string=12F8E3C0068B
Aug 10 08:05:03 MacBook-hns kernel[0]:
AJZaurusUSB::getFunctionalDescriptors - Ethernet address (string 3):
12.f8.e3.c0.06.8b
Aug 10 08:05:03 MacBook-hns kernel[0]:
AJZaurusUSB::getFunctionalDescriptors - Maximum segment size 1514
i.e. a second completely randomized MAC address (12.f8.e3.c0.06.8b)
So, changing ifconfig HW does not solve the problem :-(
The only workaround I currently have is to overwrite with a static
MAC address - but then, I can't connect multiple devices...
Now I wanted to reboot - but the battery is dead again - argggh.
Best,
Nikolaus
Am 09.08.2007 um 07:18 schrieb Mikko J Rauhala:
> [Replying to you guys directly in addition to the list since the list
> seems to be having problems.]
>
> On ti, 2007-08-07 at 17:43 -0400, michael at crosscode.org wrote:
>> This [static USB MAC address determining and setting] is
>> getting a little bit more complicated, and more interesting. I
>> think I may
>> go ahead and do this one...
>
> Yeah, sounds good. As far as choosing the actual address goes, I got
> around to reminding myself how to generate proper link-local MAC
> addresses. Seems that turning the universally administered
> Bluetooth MAC
> into a different link-local MAC usable on the USB interface would
> be as
> simple as to flip the second least significant bit of the most
> significant byte into a 1¹. This would give us Neo-spesific static
> link-local MACs in the simplest possible manner, and will allow us to
> easily tie together the BT and USB MACs also from the host side, if
> desired. How's that sound to you?
>
> As an aside, last night I wrote up some suggestions on how to deal
> with
> USB network IP and routing settings in the final product, with use
> cases². You're welcome to add your own input to the wiki, if you have
> any; that's what it's there for.
>
> ¹ <URL: http://en.wikipedia.org/wiki/MAC_address >
> ² <URL: http://wiki.openmoko.org/wiki/Talk:USB_Networking >
>
> --
> Mikko J Rauhala <mjrauhal at cc.helsinki.fi>
> University of Helsinki
>
More information about the device-owners
mailing list