All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefan Schmidt <stefan@osg.samsung.com>
To: "linux-wpan@vger.kernel.org" <linux-wpan@vger.kernel.org>
Cc: Werner Almesberger <werner@almesberger.net>,
	Alexander Aring <alex.aring@gmail.com>,
	Phoebe Buckheister <phoebe.buckheister@itwm.fraunhofer.de>
Subject: Strategy for permament extended/EUI64 address writing and updating in atusb
Date: Wed, 10 Jun 2015 14:28:04 +0200	[thread overview]
Message-ID: <55782D54.2030508@osg.samsung.com> (raw)

Hello.

Background:
With the atusb device we have the possibility to store some data in 
EEPROM as non-volatile memory. Qi hardware as the company behind this 
devices also has an IEEE OUI assigned which we can use for a range of 
valiud and unique EUI64 addresses we can use as permanent extended 
addresses in IEEE 802.15.4

http://en.qi-hardware.com/wiki/IEEE_OUI_assignments

Status:
o I enhanced the firmware to access the EEPROM to allow write and 
update/read operations
o A new command allows the reading of the whole EUI64 over usb (ATUSB_EUI64)
o The ATUSB_EUI64 command is used in the atusb driver to read the 
address during probe and set it correctly for the default wpan0 
interface. This basically replaces the
ieee802154_random_extended_addr() call.
o The above is tested and works fine with a device being unplugged and 
re-plugged and still showing the permanent address read from EEPROM.

Update/Write Strategy:
Right now i changed the firmware to intercept write to the IEEE_ADDR 
register which gets updated whenever the hardware address filter 
callback fires. (adding a new interface with extended address and 
bringing it up is such a case). This is hacky and comes with some side 
effects like your "permanent" address gets overridden by bringing up an 
interface :)

I also thought about exposing a sysfs entry to write the new address. 
This would allow an easy way to change it right through the kernel 
driver. Easy to use but also kind of violates the idea of having a 
"permanent" address which is not touched by the driver at all. I chatted 
a bit with Phobe on IRC about it and really the solution that seems to 
make most sense is to have a small host utility that uses libusb to read 
and write the EUI64 to the device. It would be combined with a simple 
list of known serial numbers and their mapped allocated address.

For this I will remove the intercepting part of the firmware and expose 
the writes through another ATUSB command over USB.

Let me know if you think this goes into the wrong direction. I will be 
working on this over the next days.

regards
Stefan Schmidt

             reply	other threads:[~2015-06-10 12:28 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-10 12:28 Stefan Schmidt [this message]
2015-06-10 14:49 ` Strategy for permament extended/EUI64 address writing and updating in atusb Marcel Holtmann
2015-06-10 15:29   ` Alexander Aring
2015-06-10 15:38     ` Marcel Holtmann
2015-06-10 16:09       ` Alexander Aring
2015-06-10 21:23     ` Werner Almesberger
2015-06-11  8:17       ` Alexander Aring
2015-06-11  8:23         ` Marcel Holtmann
2015-06-11  9:39           ` Stefan Schmidt
2015-06-11 12:48             ` Werner Almesberger
2015-06-11 13:39               ` Stefan Schmidt
2015-06-11 16:14                 ` Werner Almesberger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=55782D54.2030508@osg.samsung.com \
    --to=stefan@osg.samsung.com \
    --cc=alex.aring@gmail.com \
    --cc=linux-wpan@vger.kernel.org \
    --cc=phoebe.buckheister@itwm.fraunhofer.de \
    --cc=werner@almesberger.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.