Turris Omnia - campaign ends soon

Robert Hass robhass at gmail.com
Sat Jan 9 00:34:29 CET 2016


>Theoretically yes: The I2C lines from the SFP cage are connected to the
main CPU and the Linux I2C interface is going to be accessible from user
space. By now we have tested only reading from EEPROM in a SFP module but
not the >DDM part. I am adding this to my to-do list. Thanks for bringing
this up! And we - or anybody interested - might port or create some tool
for reading and interpreting DDM data. It should be quite simple to do.

Here is code printing DDM data as human readable:

EEPROM Section 0xA2, starting offset is 0x60

unsigned int temp1=0;    // 0x60
unsigned int temp2=0;    // 0x61
unsigned int txbias1=0;    // 0x62
unsigned int txbias2=0;    // 0x63
unsigned int txpwr1=0;    // 0x64
unsigned int txpwr2=0;    // 0x65
unsigned int rxpwr1=0;    // 0x65
unsigned int rxpwr2=0;    // 0x66

printf("Temperature = %i.%u C\n",temp1,temp2*1000/256);
printf("TX Bias     = %i.%i mA\n",txbias1 >> 1,(((txbias1 &&
0xFE)*256)+txbias2)*1000/512);
printf("TX Power    = %.4f
dBm\n",log10((float)(txpwr1*256+txpwr2)*(float)0.0001)*10);
printf("RX Power    = %.4f
dBm\n",log10((float)(rxpwr1*256+rxpwr2)*(float)0.0001)*10);

Rob
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://trubka.network.cz/pipermail/bird-users/attachments/20160109/41721d4a/attachment.html>


More information about the Bird-users mailing list