The forum

[Script] Alcoma ASD Client 9.1

Service utility for Alcoma radio devices

Author Replies
jbubik Thursday 16 May 2013 at 20:32

Alcoma a.s. is a Czech engineering company and a manufacturer of quality backhaul and lastmile radio relay systems. Their radio devices are managed by Alcoma ASD Client - a small windows program available on their website. It is a commercial program that needs a licence file to work. Such a licence file is available to Alcoma customers only. ASD Client can communicate with the radio device over TCP/IP or via serial cable (requires COM port or USB2COM cable).

This PoL script downloads a ZIP file with the program and unzips it. It takes special care to setup WINE correctly for serial port. It also copies the users licence over to the program directory. The only dependency is the command "unzip" for extracting the files. Otherwise it should be pretty portable. The screenshots are a little boring as there is nothing to see in a service utility such as ASD. Please try it and recommend for signature :-)

# Date : (2013-05-14 22-45)
# Last revision : (2013-05-16 20-28)
# Wine version used : 1.2.2 and 1.4
# Distribution used to test : Ubuntu 10.04 LTS, Ubuntu 10.10, Ubuntu 12.04 LTS
# Author : jbubik
# Script licence : GPL
# Program licence : commercial software / free to use for holders of Alcoma licence file
# Depend : unzip
[ "$PLAYONLINUX" = "" ] && exit 0
source "$PLAYONLINUX/lib/sources"
TITLE="Alcoma ASD Client 9.1"
PROGDIR="$REPERTOIRE/wineprefix/$PREFIX/drive_c/Program Files/ASD/"
# Presentation
POL_SetupWindow_presentation "$TITLE" "ALCOMA a.s." "" "jbubik" "$PREFIX"
# Create Prefix
POL_Wine_SelectPrefix "$PREFIX"
POL_System_TmpCreate "$PREFIX"
cd "$POL_System_TmpDir"
#download a ZIP file from vendor
POL_Download "" "a3022fe53c6cae9e2540c8e60d4e48b1"
[ -f ] || POL_Debug_Fatal "$(eval_gettext 'An error happened during download.')"
#unzip the archive
POL_SetupWindow_wait "$(eval_gettext 'Unzipping downloaded files. Please wait.')" "$TITLE"
mkdir -p "$PROGDIR"
unzip "$POL_System_TmpDir/"
#select the licence file and copy it to program directory
POL_SetupWindow_browse "$(eval_gettext 'You need a licence file to use $TITLE. Please select the file now!')" "$TITLE" "licence.key"
[ -f "$APP_ANSWER" ] && cp "$APP_ANSWER" "$PROGDIR/licence.key"
#configure WINE to use specific COM port
POL_SetupWindow_menu "$(eval_gettext 'Select the COM port to use for direct communication with the device:')" \\
                     "$TITLE" "none|/dev/ttyS0|/dev/ttyS1|/dev/ttyUSB0|/dev/ttyUSB1" "|"
if [ "$APP_ANSWER" != "none" ] ; then
  [ -w "$APP_ANSWER" ] || POL_SetupWindow_message "$(eval_gettext 'Symbolic link created for COM1 in $COMDEVICE\\n\\nWARNING: it seems that COM port either does not exist or is not accessible for this user.\\nPlease correct the symlink or permissions before using $TITLE.')" "$TITLE"
#configure WINE registry for COM port enumeration - taken from WineBug #4282
cat << EOF >> "$REPERTOIRE/wineprefix/$PREFIX/system.reg"
#notify user to copy his specific radio channel tables to ASD
POL_SetupWindow_message "$(eval_gettext 'Please manually copy channel table files to program directory:\\n$PROGDIR\\n\\nInstallation complete.')" "$TITLE"
# Create Shortcuts
POL_Shortcut "asdclient.exe" "$TITLE"
exit 0



petch Thursday 16 May 2013 at 22:43

HI jbubik,
Not much to say about your script, only two remarks:
[ -f ] || POL_Debug_Fatal "$(eval_gettext 'An error happened during download.')"

Shouldn't be strictly necessary, POL_Download should raise an error if the file doesn't pass the hash check, that it cannot pass if it doesn't exist ;)

#configure WINE registry for COM port enumeration - taken from WineBug #4282

That may have been "ok" in 2006, but is a no go today; Create a separate .reg file somewhere in the temp directory and register its content into the system registry using POL_Wine regedit.
They're lots of examples around, but to give just one:

# Remove the "beta DirectX version" warning upon first run
cat <<_EOFREG_ > "$POL_USER_ROOT/tmp/dxtested.reg"
[HKEY_LOCAL_MACHINE\\Software\\Massive Entertainment AB\\Ground Control II]
POL_Wine regedit "$POL_USER_ROOT/tmp/dxtested.reg"
rm "$POL_USER_ROOT/tmp/dxtested.reg"

After those fixes (specially the second one) I think you can submit it into the repository for signing (not sure in which category though).


Edited by petch