sid5432 / pyOTDR

Simple OTDR SOR file parser written in Python
GNU General Public License v3.0
71 stars 28 forks source link

Can we edit a .sor file ? #32

Closed Mglt-b closed 3 years ago

Mglt-b commented 3 years ago

Hello

there is a way to edit a .sor file ?

location A / B, cable_ID .. etc ?

Thanks

sid5432 commented 3 years ago

Editing a .SOR file is messy. It is a binary format, so you need to get a binary (or hexadecimal) editor. But the bigger problem is there are offsets encoded into the file, so unless you are replacing the strings with exactly the same number of bytes, inserting or removing bytes means that you will need to adjust all the down-stream offsets.

A few years ago somebody asked about this (with my Perl version, also under my sid5432 GitHub account), to change the cable ID. I wrote a simply program called change_fiberid.pl that does that. You might want to have a look at that. But I don't have anything readily available (in either the Python or the Perl version) that allows you to also change location data.

Mglt-b commented 3 years ago

Hello,

Thank you for the answer, I carry out fiber optic deployments in France, and sometimes the data entered during the processing of OTDR measurements are false (origin, end, cable name, pulse length, thresholds, etc.)

I was looking for a way not to go back to the field and take these measurements again, a little bit of cheating.

But according to your answer, I am too limited in Python / development knowledge to succeed in such a program

thank you

OSHI7 commented 3 years ago

Related question :Is there any hope to decode the proprietary data block?

On Wed., Jun. 9, 2021, 3:31 a.m. Mglt_b, @.***> wrote:

Hello,

Thank you for the answer, I carry out fiber optic deployments in France, and sometimes the data entered during the processing of OTDR measurements are false (origin, end, cable name, pulse length, thresholds, etc.)

I was looking for a way not to go back to the field and take these measurements again, a little bit of cheating.

But according to your answer, I am too limited in Python / development knowledge to succeed in such a program

thank you

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/sid5432/pyOTDR/issues/32#issuecomment-857459891, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFSR37RL4LC5WL25ZCN5H2LTR4KGNANCNFSM46JYG6RA .

RemiDesgrange commented 3 years ago

@Mglt-b I already wrote code to detect wrong sor file and detect wrong thresold (in a France FTTH context)

@OSHI7 if you can provide us some SOR files + the proprietary data (decode via viavi soft or other) then yes.

RemiDesgrange commented 3 years ago

@Mglt-b I am not on Windows, but this software seems to modify sor file: http://www.gazlan.ru/ (part of the source are on github).