• Updated 2023-07-12: Hello, Guest! Welcome back, and be sure to check out this follow-up post about our outage a week or so ago.

Converting Acard AEC-7722 to AEC-7726

jcarron2

New member
Edit for the above post: (unable to edit original one? )

I have tried running this on Win10, and Win7. My scsi card is only working on Win7, so that is why I am using older python in the above example (3.8).

On a Win10, with Python 3.11, I run into the same issue...

C:\Python\Python311>python.exe SCSIDEHacker.py
File "C:\Python\Python311\SCSIDEHacker.py", line 25
print 'SCSIDE was started'
^^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?


And need to modify the code with the parentheses... After doing that I run into the same error as in above post #60.

Jonathan
 

jcarron2

New member
Learned more about python than I ever wanted to, managed to get a little bit further, but ran into I think a policy issue in Python.

Had a look at an example of python hooking (below link), but tbh it is probably too much for me to just jump into having near nil experience with python :
(https://github.com/srw/windows-api-hooking-in-python-with-deviare-sample)
Nektra forums (http://forum.nektra.com/forum/) appear to be down ...

Did anyone have any luck making this work? Right now I'm stuck with the pythoncom error: Python error invoking COM method.

Here is what I have done so far:

-Download, extract Deviare binary from github, extract Deviare.2.8.3.zip and regsvr32 DeviareCOM64.dll, regsvr32 DeviareCOM.dll
-Download Python python-2.7.17, and pip for 2.7 (https://bootstrap.pypa.io/pip/2.7/get-pip.py)
-Install Python 2.7.17, and execute python -m get-pip.py
-change dir to python directory/scripts, and run pip2.7.exe install pywin32

Unzip SCSIDEHacker.py and you will need to edit it.
Update the below lines, spacing is apparently important or you will get an error message about "inconsistent TAB USE" - WOW... python=painful

1. Update path for

sSCSIDEExe = 'C:\Program Files\SCSIDE Firmware Utility\SCSIDE.exe'

2. Goto line # 188 - print("Cannot launch {}" % (scside))
Code:
  File "SCSIDEHacker.py", line 188, in main
    print("Cannot launch {}" % (scside))
TypeError: not all arguments converted during string formatting

There seems to be an issue with printing string "CAnnot launch" and type scside.
Within my few hours of learning a bit about python, there doesn't seem to be a easy way to convert the scside spyManager.CreateProcess result to a string, so I just removed that part and printed the text only.


From an elevated command prompt, I was able to launch the python script after the above modifications, however I now see some messages related to "pythoncom error: Python error invoking COM method."

Code:
EG: 03:37:12.806000 (PRE) DeviceIoControl(0x00000294) IOCTL_SCSI_GET_ADDRESS
lpInBuffer (0 bytes):

03:37:12.806000 (POST) DeviceIoControl(0x00000294) IOCTL_SCSI_GET_ADDRESS
lpOutBuffer (8 bytes):
0000:  08 00 00 00 02 00 01 00                          ........

03:37:12.821000 (PRE) DeviceIoControl(0x00000294) IOCTL_SCSI_PASS_THROUGH_DIRECT

lpInBuffer (80 bytes):
0000:  2c 00 00 00 00 00 06 0e 01 5d 80 00 38 00 00 00  ,........]..8...
0010:  ff ff 00 00 64 f7 18 00 30 00 00 00 12 00 00 00  ....d...0.......
0020:  38 00 00 00 00 00 00 00 00 00 00 00 00 00 7c 00  8.............|.
0030:  00 00 00 00 c8 5d 80 00 fc f7 18 00 27 e7 66 77  .....]......'.fw
0040:  c8 5d 80 00 00 00 00 00 14 f8 18 00 06 71 63 76  .]...........qcv
pythoncom error: Python error invoking COM method.

Traceback (most recent call last):
  File "C:\Python\Python27\lib\site-packages\win32com\server\policy.py", line 27
7, in _Invoke_
    return self._invoke_(dispid, lcid, wFlags, args)
  File "C:\Python\Python27\lib\site-packages\win32com\server\policy.py", line 28
2, in _invoke_
    return S_OK, -1, self._invokeex_(dispid, lcid, wFlags, args, None, None)
  File "C:\Python\Python27\lib\site-packages\win32com\server\policy.py", line 64
9, in _invokeex_
    return DesignatedWrapPolicy._invokeex_( self, dispid, lcid, wFlags, args, kw
Args, serviceProvider)
  File "C:\Python\Python27\lib\site-packages\win32com\server\policy.py", line 58
5, in _invokeex_
    return func(*args)
  File "SCSIDEHacker-mod.py", line 37, in OnFunctionCalled
    self.DeviceIoControl(nktHook, nktHookCallInfo, nktProcess)
  File "SCSIDEHacker-mod.py", line 78, in DeviceIoControl
    sptd = self.DumpSPTD(lpInBuffer)
  File "SCSIDEHacker-mod.py", line 107, in DumpSPTD
    raise Exception("Invalid SCSI_PASS_THROUGH_DIRECT length")
Exception: Invalid SCSI_PASS_THROUGH_DIRECT length

03:37:12.868000 (POST) DeviceIoControl(0x00000294) IOCTL_SCSI_PASS_THROUGH_DIREC
T
lpOutBuffer (44 bytes):
0000:  2c 00 00 00 00 00 06 00 01 5d 80 00 24 00 00 00  ,........]..$...
0010:  ff ff 00 00 64 f7 18 00 30 00 00 00 12 00 00 00  ....d...0.......
0020:  38 00 00 00 00 00 00 00 00 00 00 00              8...........
pythoncom error: Python error invoking COM method.

So made a little progress, however, I am really not sure what is stopping Python from invoking COM method. It seems this rabbit hole may go pretty deep at the moment.. Probably something related to security or some hole that was plugged long ago by a KB patch....

At this point I'm thinking it's going to be faster to unsolder the TSOP chip and buy some PLCC flash chips and mess about.. sigh.

Hopefully someone out there has some idears!

Jonathan
 

Decker

New member
Do you have anyinfo on how to get this working?
I have downloaded the binary Deviare2, extracted it and tried starting the CSharpConsole COMHookingBasis [Edit I don't know what im doing here] , but when I run the python script I get the following (after installing pywin32com)

Note 2 - modified python script as Python reported all the "print statements weren't valid -
Code:
C:\Python\Python38-32>python.exe SCSIDEHacker.py
  File "SCSIDEHacker.py", line 25
    print 'SCSIDE was started'
          ^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print('SCSIDE
was started')?

Changed lines like
print 'SCSIDE was started'
to
print ('SCSIDE was started')

C:\Python\Python38-32>python.exe SCSIDEHacker-mod.py
Traceback (most recent call last):
File "C:\Python\Python38-32\lib\site-packages\win32com\client\dynamic.py", lin
e 86, in _GetGoodDispatch
IDispatch = pythoncom.connect(IDispatch)
pywintypes.com_error: (-2147221005, 'Invalid class string', None, None)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "SCSIDEHacker-mod.py", line 198, in <module>
main()
File "SCSIDEHacker-mod.py", line 181, in main
spyManager = win32com.client.DispatchWithEvents('DeviareCOM.NktSpyMgr', NktS
pyMgrEvents)
File "C:\Python\Python38-32\lib\site-packages\win32com\client\__init__.py", li
ne 312, in DispatchWithEvents
disp = Dispatch(clsid)
File "C:\Python\Python38-32\lib\site-packages\win32com\client\__init__.py", li
ne 117, in Dispatch
dispatch, userName = dynamic._GetGoodDispatchAndUserName(dispatch, userName,
clsctx)
File "C:\Python\Python38-32\lib\site-packages\win32com\client\dynamic.py", lin
e 106, in _GetGoodDispatchAndUserName
return (_GetGoodDispatch(IDispatch, clsctx), userName)
File "C:\Python\Python38-32\lib\site-packages\win32com\client\dynamic.py", lin
e 88, in _GetGoodDispatch
IDispatch = pythoncom.CoCreateInstance(
pywintypes.com_error: (-2147221005, 'Invalid class string', None, None)

C:\Python\Python38-32>

thanks for any info
Jonathan
Lesson: Do not waste time on a vague post. Didn't even specify what OLD version of Python they were using. Two or three more lines of info would have saved people a lot of time. So it's just a useless approach. Take the flash off and put the PLCC socket on. Please don't waste more time on this. :)

Caveat: FYI: You cannot talk to a SCSI interface using the PASS THROUGH DIRECT "hack" junk method unless it's 16 or 32 bit mode. If you try over an 8 bit SCSI bus it will fail no matter what.
 

Abe

New member
Has anybody figured out how to reflash a 7722 so it works with IDE hard drives and/or CompactFlash-to-IDE adapters withOUT desoldering or [re-]soldering anything?

Given a working procedure and all the needed files, I could do it on Mac [“real” Mac OS, i.e. pre-X], Mac OS X [either PowerPC 32-bit or Intel either 32 or 64-bit], GNU/Linux on a PC [I still have Debian/PowerPC on one or two 32-bit machines, if I can still get it working], or even [blech, holds nose] Microsoft Windows or DOS-for-a-PC [e.g. MS-DOS].

My soldering/desoldering skills are close to non-existent.

I bought a 7722 from a little-to-no-information eBay seller who didn`t bother to post in the listing the fact that the device is ATAPI-only as shipped from the factory, probably didn`t know that himself, and probably wouldn`t have understood it if I had told him in technical terms such as “ATAPI-only” rather than idiot-friendly terminology such as “this adapter is only for CD and DVD drives”. IIRC [this was at least several months ago], I played around with a Mac-based reflashing utility, I think one that was provided by ACard — maybe one for Mac OS 8 or 9 — and did _not_ succeed. My 7722 has been sitting in its cardboard box doing nothing ever _since_.
 
Top