jbrzusto / TO_DO

sensorgnome / motus TODO list for jbrzusto
0 stars 0 forks source link

SG Serial number collisions #12

Closed jbrzusto closed 8 years ago

jbrzusto commented 8 years ago

So far, there are only two SGs with the same serial number, 1614BBBK1911 (Motus/PointLepreau and CTRiver/Sugarloaf), so this is a rare situation which we don't want to overcode against.

While MAC addresses on the beaglebones will be unique, including them in filenames is an extra burden for all SGs. (mainly an issue in data transfers, where long filenames don't always survive). This was our original workaround, but seems poor now.

A simpler approach is to append a "_1", "_2", ... to the serial number of a receiver when it registers, if its serial number is already in our database as belonging to another unit (as determined by MAC address). Then each registered receiver will have a unique serial number.

This requires changing the onboard code so that serial number is only computed once, then saved in /etc/beaglebone_id; at registration time, the receiver would modify that file to add the appropriate "-N" if any, but after that the file would not be changed.

An update will be installed on Sugarloaf to add "_1" to its effective serial number.

jbrzusto commented 8 years ago

Sugarloaf site has been re-run with augmented serial number for 2015, 2016. SG processing scripts will augment serial number on any new files with this serial number and site prefix != "Lepreau".

jbrzusto commented 8 years ago

CTRiver Sugarloaf receiver is now registered with serno SG-1614BBBK1911_1