updated as of: April 11, 2012
NewMagellan is one of the scale drivers included in this release.
It works to connect IS4C to a Magellan scanner/scale, but it also
serves as a base point for communicating with multiple external
NewMagellan is written in C# .NET. All traces of winforms have been
stripped out for the sake of mono compatibility. It doesn't require
Visual Studio on Windows; the .NET 2 SDK includes a command line that's
sufficient. Both a makefile for linux and a batch file for compiling
on windows included.
last author: Andy Theuninck
original author: Andy Theuninck
How it works
Magellan reads ports.conf to see what drivers to use. Entries are just
a port (COM1, /dev/Stty1, etc) and a driver name (e.g., SPH_Magellan_Scale).
You can have more than one driver running - say a scanner/scale
and a signature capture device.
Each driver is launched in its own thread. Other than implementing the
SerialPortHandler class, there's no hard and fast requirements what a driver
actually has to do. Reading from the relevant serial port would probably
be the most common. Writing to the file system is the easiest way I've found
to pass info to IS4C (similar to what ssd does).
After starting all the drivers, Magellan launches one more thread with
a simple UDP server. All it does is listen (port 9450 by default) and
pass any received messages to each driver. This way IS4C can send
commands to devices directly without intermediary files.
The current version accepts command line input of messages, too.
Re an init script to background the process see
Installing NewMagellan Scanner/Scale Driver
The windows version
compiles a second executable that can be registered as a windows service.
Win32 service notes: the port/driver configuration is hard-coded into
the executable, so you have to recompile to make changes (alternately you
could hard-code the path to ports.conf, but that would mean a recompile
too). The .NET SDK includes a utility called installutil.exe. To install,
run installutil.exe posSVC.exe. To remove, run installutil.exe /u posSVC.exe.
Installation prompts for a username and password. The username has to
include the machine name (e.g., POS1\is4c_user) to work. It took me awhile
to figure that out.
Currently Supported Input Messages
These are messages sent from POS to the driver via UDP.
- errorBeep [scale] issue three beeps
- beepTwice [scale] issue two beeps
- goodBeep [scale] issue one beeps
- twoPairs [scale] issue four beeps with a pause between the second and third
- rePoll [scale] re-request weight
- termReset [cc] reset terminal to its start transaction state
- termReboot [cc] reboot terminal hardware
- termManual [cc] display manual card entry screen
- termApproved [cc] display approval screen
- termGetType [cc] display card type selection screen
- termGetTypeWithFS [cc] display card type selection screen including foodstamp option
- termCashBack [cc] display cash backselection screen
- termGetPin [cc] display PIN entry screen
- termWait [cc] display wait-for-cashier screen
- termSig[suffix] [cc] do signature capture. The suffix is an optional
message to display on the screen (do not include the square brackets)
Currently Supported Output Messages
These are messages sent from the driver to POS by writing a file in
the ss-output directory.
Output notes / stuff to be aware of:
- [numeric value] [scale] UPC/EAN data
- GS1~[numeric value] [scale] GS1 barcode data
- S11[four digit weight [scale] current weight
- S141 [scale] not settled on a weight yet
- S142 [scale] error condition
- S143 [scale] weight is zero
- S145 [scale] weight is below zero (error condition as well)
- TERMCLEARALL [cc] term has reset to start transaction state. Clear
any pending POS-side data
- TERM:[type] [cc] card type selection. [type] will be
Credit, Debit, EbtFood, EbtCash, or Gift.
- TERMCB:[amount] [cc] cash back amount selection.
- PINCACHE:[entryped data] [cc] entryped PIN block
- PANCACHE:[entryped data] [cc] entryped card data (magstripe) block
- TERMBMP[filename] [cc] signature data available. The file should be located in
Any output that begins with S is assumed to be scale-weight data. Non-scale-weight output
containing a colon character is parsed entirely in the background. For example, if the cashier
has typed "5*" in the input box and scans an item, the driver output will be combined with
that "5*", where as a card type output would ignore the "5*". The colon is omitted from the
signature data command intentionally because that command is typically not used in conjunction
with the "main" pos2.php screen.