Unable to Change Read-Only Property of a File using Cinterion® ELS61-E-R2 AT Command Set | Telit Cinterion IoT Developer Community
May 3, 2023 - 9:46am, 61 views
Hi all,
I am currently working with the Cinterion® ELS61-E-R2 module and I am having trouble finding the AT command to change the read-only property of a file in the AT Command Set documentation. I need to change the read-only property to truncate the file. Here's the link to the documentation I am referring to: (here the link).
To truncate the file, I am using the command:
AT^SFSA="open","a:/rfidlocaluserslist.active",18 , where truncate= 16, read/write= 2
Below are the outputs of the AT^SFSA="stat","a:/rfidlocaluserslist.active" and at^scfg? commands:
Output of AT^SFSA="stat","a:/rfidlocaluserslist.active":
^SFSA: 26
^SFSA: "23/05/02,13:52:42"
^SFSA: 1
^SFSA: 0
OK
Output of at^scfg?:
^SCFG: "Audio/Loop","0"
^SCFG: "Call/ECC","0"
^SCFG: "Call/Speech/Codec","0"
^SCFG: "GPRS/AutoAttach","enabled"
^SCFG: "Gpio/mode/ASC1","std"
^SCFG: "Gpio/mode/DAI","gpio"
^SCFG: "Gpio/mode/DCD0","gpio"
^SCFG: "Gpio/mode/DSR0","gpio"
^SCFG: "Gpio/mode/DTR0","gpio"
^SCFG: "Gpio/mode/FSR","gpio"
^SCFG: "Gpio/mode/MCLK","gpio"
^SCFG: "Gpio/mode/PULSE","gpio"
^SCFG: "Gpio/mode/PWM","gpio"
^SCFG: "Gpio/mode/RING0","gpio"
^SCFG: "Gpio/mode/SPI","rsv"
^SCFG: "Gpio/mode/SYNC","std"
^SCFG: "Gpio/port/MCLK","GPIO4"
^SCFG: "Ident/Manufacturer","Cinterion"
^SCFG: "Ident/Product","ELS61-E R2"
^SCFG: "MEShutdown/Fso","0"
^SCFG: "MEShutdown/sVsup/threshold","0","0"
^SCFG: "MEopMode/CFUN","0","1"
^SCFG: "MEopMode/Comp1",""
^SCFG: "MEopMode/CregRoam","0"
^SCFG: "MEopMode/ExpectDTR","current"
^SCFG: "MEopMode/ExpectDTR","powerup"
^SCFG: "MEopMode/SoR","off"
^SCFG: "MeOpMode/SRPOM","0"
^SCFG: "Radio/Band/2G","0x00000014"
^SCFG: "Radio/Band/3G","0x00000081"
^SCFG: "Radio/Band/4G","0x08080085"
^SCFG: "Radio/Mtpl/2G","0"
^SCFG: "Radio/Mtpl/3G","0"
^SCFG: "Radio/Mtpl/4G","0"
^SCFG: "Radio/OutputPowerReduction","4"
^SCFG: "RemoteWakeUp/Event/USB","none"
^SCFG: "RemoteWakeUp/Ports","current"
^SCFG: "RemoteWakeUp/Ports","powerup"
^SCFG: "Serial/Ifc","0"
^SCFG: "Serial/Interface/Allocation","1","1"
^SCFG: "Serial/USB/DDD","0","0","0409","1E2D","005B","Cinterion Wireless Modules","ELSx",""
^SCFG: "Tcp/IRT","3"
^SCFG: "Tcp/MR","10"
^SCFG: "Tcp/OT","6000"
^SCFG: "Tcp/TLS/Version","MIN","***"
^SCFG: "Tcp/WithURCs","on"
^SCFG: "Trace/Syslog/OTAP","0"
^SCFG: "Urc/Ringline","local"
^SCFG: "Urc/Ringline/ActiveTime","2"
^SCFG: "Userware/Autostart","1"
^SCFG: "Userware/Autostart/Delay","0"
^SCFG: "Userware/DebugInterface","0.0.0.0","0.0.0.0","0"
^SCFG: "Userware/DebugMode","off"
^SCFG: "Userware/Passwd",
^SCFG: "Userware/Stdout","null",,,,"off"
^SCFG: "Userware/Watchdog","1"
Does anyone know how to change the read-only property of a file using the AT Command Set for the Cinterion® ELS61-E-R2 module? Any guidance or alternative solutions would be greatly appreciated.
Additionally, if there is any other information that could be helpful in resolving this issue, please let me know.
Thank you in advance for your assistance.
Hello!
Unfortunately this is a known issue on ELS61 modules.
The read/write mode should overwrite the read-only mode but unfortunately it doesn't.
You can't change the read-only mode using the AT command,
The only workaround that I found, if you'd like to recover the file to it's previous state is to export the file to your PC, change the read-only mode there and import it to the module again.
All in all this was not fixed due to the fact that opening a file in read-only mode is uncommon as you can always use the read/write mode which I suggest.
As long as you don't open a file in read-only, everything should be fine :)
Best regards,
Lukasz
Hi Lukasz,
thank you for your response!
Sadly however this did not fix our problem. I modified all parts of our code that open the file in read only mode to read/write which did resolve the write protection but truncating a file still does not work.
Any idea of how to resolve this?
Thank you in advance for your help.
Hello,
I did few tests. Here's the result:
- when a file is open with 64 'Read-only' <FileAccessFlag> and then closed, the <StatAttribute> acquired with 'AT^SFSA="stat", ' command shows value 1 'read-only'
- then it is impossible to open the file with <FileAccessFlag> 18 ('Truncate' + 'Read/write')
- but it is possible to fix this by opening the file with for instance 2 'Read/write' <FileAccessFlag> and closing it
- the above clears the 'read-only' <StatAttribute> and makes it possible again to open the file with 18 <FileAccessFlag> ('Truncate' + 'Read/write')
This may be because the first operation applied after opening the file with <FileAccessFlag> 18 is truncation which is not possible when the 'read-only' attribute is preserved. Fortunately opening the file with 'Read/write' flag only can clear this state.
I suppose that the above should help to prepare the workaround for this issue.
Best regards,
Bartłomiej