Discussion:
Disabling Hard Reset in OVAL
(too old to reply)
Omar Rojas
2004-09-21 17:50:09 UTC
Permalink
Dear Colleagues

I tried to disable the hard reset functions from OVAL with the Psion
E2PROM SDK and Program Example with no success.
Anybody knows how to to that?

Thanks in advance,

Omar Rojas
***@exatec.itesm.mx
Keld Laursen
2004-09-28 20:17:46 UTC
Permalink
I haven't really tried this, but using a generic I/O function, you should be
able to do it.
Have you read the eerom.pdf file that describes the (C-callable version of
the) eerom driver.
Have a look at the FSENSE and FSET functions. They read and write a
structure of data that is the system settings.
IIRC (I'm a bit rusty these days), you can only read and write the user data
with the OVAL functions "as is".

Using the Systemcall control, you can get the address of a buffer that you
need in order to be able to call the FSET and FSENSE functions.

HTH

Keld Laursen
Post by Omar Rojas
Dear Colleagues
I tried to disable the hard reset functions from OVAL with the Psion
E2PROM SDK and Program Example with no success.
Anybody knows how to to that?
Thanks in advance,
Omar Rojas
Vincent BENNER - PAGE UP
2004-09-30 12:17:59 UTC
Permalink
Hello,

Into the Load event of the main form, add this
code :

Call PatchEEROM



Create a sub PatchEEROM with the following
code :


Sub PatchEEROM ()

'-----------------------------------------------------------'
' © PSION TLK 1998
'-----------------------------------------------------------'

On Error GoTo PatchEEROM_BeforeOpen
EEROM.Open "ERM:", -1

On Error GoTo PatchEEROM_AfterOpen
EEROM.IOWithWait P_FSENSE, EEdata, dummy

'-----------------------------------'
' Get EEData
'-----------------------------------'
If Mid$(EEdata, HardDisable, 1) <> Chr$(1) Then
Mid$(EEdata, HardDisable, 1) = Chr$(1)
EEROM.IOWithWait P_FSET, EEdata, dummy
infomsg "PATCHED !"
Else
'infomsg "ALREADY PATCHED !"
End If

'-----------------------------------'
' Update
'-----------------------------------'
EEROM.Close
Exit Sub

PatchEEROM_AfterOpen:

EEROM.Close

PatchEEROM_BeforeOpen:

Exit Function
End Sub



Add the following code into a EEROm.bas file

Global EEdata As String * 40
Global eValid As Integer
Global dummy As Integer

' the following definitions are the byte offsets into a structure
Global Const UserSize = 1
Global Const UniqueID = 3
Global Const SerialNumber = 7
Global Const SoftDisable = 19
Global Const HardDisable = 20
Global Const Compat = 21
Global Const PortAlloc = 22
Global Const FamilyA = 23
Global Const TypeA = 24
Global Const FamilyB = 25
Global Const TypeB = 26
Global Const SysConfig = 27
Global Const LinkSpeed = 28
Global Const LinkPort = 29
Global Const IRPort = 30
Global Const IRPosition = 31
Global Const UARTMode = 32
Global Const Spare33 = 33
Global Const Spare34 = 34



Add this file to you project and make a Ctrl B on it (Add to Build)




Execute you programme and DON'T FORGET TO MAKE AN HARD RESET !




Regards,

Vincent BENNER
Omar Rojas
2004-10-11 17:20:38 UTC
Permalink
Thank you, Vincent, for replying my msg

I was out of town for a long while and i didn't check the forum.
Actually i found that the EEROM Project in OVAL from PSION does work.
After selecting to disable the Hard or Soft Reset, is necessary to
remove the backup and the batteries, with this, when you put the
batteries again, the Resets are disabled.

Thank you for your support, i'm keeping your example as a reference.

Sincerely,

oMar rOjas

Loading...