Open Drawer/Till Windows 7 / VendHQ Without Printing ANY Receipts

Recently I had to set up a computer to manually open a till drawer without using an installed program and without printing a receipt.

I read several forums and info and finally put together the information to allow me to do this.

One of the  biggest issues I noticed was people trying to send commands via COM ports to USB printers or LPT1 – there is a really simple way to actually fix this up.

In Windows it is actually possible to map LPT1 to a network share with the following command:

net use \\computername\sharename lpt1

Edit (3/4/2014) just realised the above command is wrong correct command below:

net use lpt1: \\computername\printersharename /persistent:yes

So the first step is, share your printer and make sure you know the share name. Find out the name of your computer (CTRL+Pause Break on your keyboard or Right Click Computer and goto Properties)

Once you know the two details the command is as above – net use lpt1: \\computername\printersharename

netuse

 

Once this is done, you can now send plain text print jobs via LPT1 but it will actually send it to your USB connected printer, or realistically any printer that you have set up the mapped connection to.

The next step is to get your till open codes for your printer. There is a comprehensive list of them here.

Once you have the till codes you then need to actually convert them to hexadecimal (hint: if you are using a calculator you need to do each number inidividually then put them together end result will be something like 1b700019fa or similar)

I then used the info from here that explains how to convert the code from hexadecimal to ASCII using Notepad++

Once you save that file, you are ready to send it to your printer and provided you have the correct codes it should open your cash drawer without printing a single line.

To send it to the printer, make a batch file in the same location as your text file that contains the open drawer codes and add this line to it:

Copy /b open.txt lpt1

Call it opendrawer.bat or something similar so you know what it is for. Now you can just double click this to open the drawer. All the above line does is sends the text file that you created earlier as a binary file to port lpt1 – which we conveniently have mapped to our POS printer earlier. When the printer receives this file its response is I got a drawer open code, send those voltrons out the DK port and open up that bad boy (technically it sends a 24V signal to a solenoid in the drawer that makes it open but I think the other description is easier to understand)

I ended up setting this up for a customer because VendHQ can not open the drawer without printing a small line of text (because of the way Vend prints it is practically impossible to support opening a drawer without printing something so don’t hold that against them)

If you want to make the opendrawer.bat file accessible from quick launch there is a trick to, create a shortcut to the batch file, then copy this (ctrl+c) then create a new shortcut (right click create new shortcut anywhere on the desktop) and paste in the location that you just copied. However, before clicking next make sure you add ‘explorer’ to the front of the line:

Capture

 

Click next, name the file what you want and you can now drag it to the quick launch bar (however it will have an explorer icon)

Hope this helps some people out there. Later I will upload my batch file and code file that I created to open the drawer on an Epson TM88V.

 

 

 

TP-Link Archer C7 5GHz and AES issues with Apple Macbook Air/iMac/Mac Mini

I recently ordered myself an Archer C7 to play around with, for the price it seemed like quite a decent unit, offering dual band 2.4GHz and 5GHz, guest network and gigabit LAN ports.

Since I have some older devices I configured both the 2.4GHz band and the 5GHz band.

After this I noticed on my Macbook Air if I connected it to the 5GHz network, traffic was hit and miss. Sometimes I would have LAN access, others I did not, and the same went for internet access. However, if I connected to the 2.4GHz network everything operated normally.

I emailed TP-Link support about this and they asked me to perform a variety of tests and although some of my devices are still not working correctly one of the suggestions they made did fix the issue on one device.

If you are having this issue, make sure you run all of the EFI and SMC updates for your Mac, after I installed these I was able to connect to 5GHz with AES using my Macbook Air

Note: This particular issue from what I have read seems to be isolated to wireless cards that use the Broadcom Chipset (which unfortunately is a lot of Apple products)

TP-Link apparently have senior engineers working to fix this issue (as it has been noted that there are throughput issues with broadcom cards as well), however in the meantime if you want to use the 5GHz band it is recommended that you leave the network with open security (i.e. No passwords) and set up MAC address filtering to prevent unauthorised access.  This is definitely not a “fix” more of a band-aid solution, because seriously what home user is going to add a MAC address every time they want to connect a new device.

If you still seem to have issues connecting after doing an SMC and EFI update it is recommended that you make your Mac forget the networks – make a new network location and then try to connect again. See this document http://support.apple.com/kb/HT5289 for information on network locations.

Newznab Basics Explained

If you use usenet, you will probably notice that indexers are becoming quite hard to find, or you find one and they disappear overnight.

A lot of people now are building their own using Newznab.

I recently did this and stumbled across a few issues that the help team resolved, unfortunately searching for these issues on google nothing really comes up so I thought I would write about them here.

Issue 1 – Could not select group (bad name?)
For me, there was two issues that I found out about. The first was me being lazy and adding the groups by just typing a.b.groupname you need to write alt.binaries.groupname in full.

The second issue was that my usenet provider was actually returning no results. Two providers I know work really well, do your research and find one that works with newznab or you may get the same error.

Issue 2 – Changing Usenet Providers
Once I found that my provider was not returning group binaries I changed providers – now to do this is actually a bit of a process.

First – Login to your mysql newznab database either from the terminal or via phpmyadmin if you have it setup

mysql -u databaseusername -p newznab

It will ask for your password, enter the password to your database and you will be at a mysql prompt.

Once here, you need to truncate the tables binaries, parts and partrepair using these commands:

truncate partrepair;
truncate binaries;
truncate parts;

If you typed it wrong, you will get an error.

Once you have truncated the tables above you need to reset some settings in the groups table, otherwise you will get errors because you will be filling the binaries from the wrong starting point. To reset the group settings do this in the mysql database:

update groups set last_record = 0;
update groups set last_record_postdate = null;

As long as that completed successfully, you are ready to change your provider settings:

Goto the root directory of newznab, then into the www directory. In the www directory there is a file called config.php

You need to edit this ile and change NNTP_USERNAME, NNTP_PASSWORD and NNTP_SERVER and possibly some other settings if your proivder offers SSL (change the NNTP_PORT and NNTP_SSLENABLED settings if they do)

Here is an example of what the section you need to edit looks like

define(‘NNTP_USERNAME’, ‘usenetusernamehere’);
define(‘NNTP_PASSWORD’, ‘usenetpasswordhere’);
define(‘NNTP_SERVER’, ‘yournewsserverhere’);
define(‘NNTP_PORT’, ‘119’);
define(‘NNTP_SSLENABLED’, false);

Once edited, save and exit then run update_binaries and then once thats done run update_releases.

Issue 3 – No releases found

I didnt actually have this issue (because i pruchased newznab +) but I noticed a lot of people complaining about it over several forums.

When you run update_releases.php regular expressions are ran on the data gathered to create the releases.

When you run this using the plus version, you will see that during update releases latest regexes are used, this bundled with a whole heap of other reasons is why you should just pay for newznab, seriosuly it is not that expensive.

However, if you are running the free version of newznab you have a very limited regex table – but you can goto this website www.newznabforums.com some users have posted their own regex for particular groups – this will help you build releases properly. Be aware, it is very very easy for someone to write an incorrect regex that will take a considerable amount of CPU/Memory resources to process.

Like I said above though, its easier to pay a small amount then to write your own regexes.

Issue 4 – Killed appears when running update_releases.php

This occurs when php runs out of memory entirely. There is two reasons this may occur – php.ini has memory_limit set too low – newznab recommend this bet set to 256M as a minute (yes I wrote just M as thats what php.ini requires) if you want to run php with no memory limit set this:

memory_limit = -1

If you had memory limit set unlimited, and the process is still killed you may be trying to process to many releases at once like I was, I had tried to backfill a group 11 months back and then process the releases, of course not a good idea so I suggest you don’t do that either.

Special Notes:

Prior to setting this up I read a lot about how newznab uses lots of diskspace, lots of bandwidth.

I currently have 53,491 releases stored and am using less than 5GB of data storage.

I have used over 100GB of data though (which is a lot if you are in Australia like me), So I purchased a VPS through RamNode that way, my internet at home isnt affected by newznab hitting the bins all day long. Plus Ramnode offer the ability to buy more bandwidth if necessary – but the plan I am on is 3TB a month which I doubt I’ll hit. Certain Ramnode VPS also give you the ability to upgrade storage as well so even if you have a large collection of nzbs or plan on backfilling several groups you can get enough storage.

I hope this helps people that are trying to set up Newznab.

I would also like to say that Newznab + is worth the small cost they ask, and that the support team they have are exceptional.

 

ATO Portals TAP & BP Portal on a Mac (OSX Mountain Lion and 10.8)

***SPECIAL NOTE: This will only work with the SAFARI browser, it may work in firefox but I have not tested it. It WILL NOT work in Chrome****

If you work in an accounting firm you will probably unfortunately have to use the ATO’s incredibly flakey Tax Agent Portal and Business Portal.

If you are moving from a windows computer to a mac you will need to copy your AUSKey from your existing system to the new Mac.

To do this goto your AUSKey directory:

%appdata%\Auskey

In this directory there is a file called keystore.xml copy it to a USB device.

Now, that you have got the key store file saved you need to install the Auskey software and Java.

AUSKey for mac can be downloaded here:

https://www.auskey.abr.gov.au/CredentialRequest/EnablerDownload.aspx?Task=c33eebbe-0e98-4b3b-8837-5da09e0f1ac4&NavGraph=EnablerDownload&View=EnablerDownload&pid=71&js=1

Download and install the software.

Now that AUSKey is installed on the Mac, you will now have to plug your USB Key into your mac to copy the keystore.xml file to the AUSKey folder on the mac.

The AUSKey folder is stored in Library\Application Support\AUSKey

To open your library folder, open finder then click “Go” in the menu bar then press alt (option) this will bring up the shortcut for library.

Once in the library open Application Support folder, then open AUSKey folder.

Now drag and drop the keystore.xml file from your flash drive (or wherever you stashed it) to the AUSKey folder.

At this point you have the files that are required for accessing the portals set up but now you will need to install Java and edit it slightly:

Please refer to the first post here http://forums.whirlpool.net.au/archive/1999743 for the instructions on how to correctly install Java and the Java patch – However DO NOT try to access the portal like it says at the bottom.

Prior to accessing the portal goto:
http://www.java.com/en/download/testjava.jsp

One of two things will happen – you will either get a nice little java logo displayed or you will get text that says “Inactive Plugin” – if you see the Java logo go ahead and you should be able to access the portal (providing that the ATO have not broken it themselves).

If you see the text that says Inactive Plugin simply click the Inactive Plugin text and it should activate Java – run any of the applications and allow anything that pops up related to Java until you can see a Java logo where Inactive Plugin was.

 

The Windows Starter Issue

I admit now with windows 8 we wont see this much but I know some people still unfortunately have the  base Windows starter 7 edition on some netbooks.

What is the issue?  For some strange reason after 180 days starter believes your password is incorrect or expired and will not allow you to log in.

Reset the password using MsDART locksmith and you are good to go again right?

No, well you are temporarily but the problem will come back again.

Unfortunately as well windows starter has much of the basic user password abilities inaccessible so you can’t just edit your users and fix the issue. Oh and forget about gpedit.msc that won’t work either

Luckily though we can use the trusty command prompt to set what most people normally see as a tick next to “Password Never Expires”

The command is simple:
net accounts /MaxPWAge:Unlimited

Once you have done this, you shouldn’t be prompted to set a password in 180 days again and can continue to use your computer as normal.

 

Automating Downloading with a Raspberry Pi

I jumped on the bandwagon when the Pi was released as just about every other tech/nerd did as well.

After the long wait, when the unit finally arrived I was unsure of what to do with it – until a friend of mine introduced me to Sick Beard, Couch Potato and Sabnzbd Plus.

I had already set up my Pi to run Raspbmc for XBMC but found it was slow and I did not need it to be my media center as I already have 2 Apple TV’s running Firecore.

Being lazy, instead of reinstalling Raspbmc with another OS I decided to adjust it so I didnt have to take the SD card out of the Pi and could just use SSH to configure everything.

This isnt a full guide it is just a list of what to be aware of.

Booting – Raspbmc loads xbmc automatically on boot, it is loaded by a script in /etc/init.d, if you dont want xbmc to run on boot any more delete these scripts and it wont, i think it would be nearly impossible to run everything and xbmc so I would suggest deleting the init.d scripts for it

Performance – Raspbmc is set to have a significant ammount of ram used for the GPU, if you dont change this (like I did not to begin with) Sick Beard and SabNZBPlus will crash. To change these settings use:

sudo nano /boot/config.txt
change gpu_mem_256=256 to gpu_mem_256=64
change gpu_mem_512=512 to gpu_mem_512=128

Reboot and run free -m or run top and you will notice a significant increase in available RAM, enough for Sab and Sick Beard to run, I decided not to run couchpotato but it should be enough for it as well.

Directories – It is best to make a directory structure that is easy to mange, most people make an incoming folder for incoming downloaded then completed/category (e.g. TV) for completed downloads. Keeping this structure will make it easier for Sick Beard to scrape and easier to configure.

Storage – There are a few options for this, some people run USB hubs with Storage drives attached to the Pi. Most people I assume will be using Samba shares.

***You need to istall cifs-utils or mounting samba will not work, you will most likely need to edit /etc/apt/source.list to install packages from apt***

___________________________________________________________
These are the lines from my sources.list

deb http://archive.raspbian.org/raspbian wheezy main contrib non-free
deb http://ftp.de.debian.org/debian squeeze main contrib
deb-src http://mirrordirector.raspbian.org/raspbian/ wheezy main contrib non-free rpi
——————————————————————————–

I made mount points for the samba shares I have, mapped them in fstab but then found that sab could not write even though from the command line I could make directories and files as the user sab ran as. I found that I needed to add the user uid to the fstab line and then writing worked fine. Here is an example:

//192.168.1.254/completed /mnt/completed cifs defaults,uid=1000

uid=1000 on my pi is the user that sab runs as, I suggest you use the uid that your sabnzbdplus install works under.

Once you edit fstab, instead of rebooting you can run sudo mount -a to reload fstab and it will tell you if there are any errors.

To check your mount points are owned by the right user run ls -al in the /mnt directory (if thats where you made your mount points, you should have made them there). The third column will show the user the share was mounted by, if this is not your sab user, you have your uid wrong in fstab.

I hope this helps the people that have had the same issues I have, I ended up reading through many different sites and brushing up on a lot of linux commands to get this all running so I thought brief explanations in one place would make it easier for other people attempting the same thing.

 

 

 

 

Can not install .pkg files on Mac OSX

Recently I was called out to an onsite where the user could not install Adobe Lightroom.

After investigating further I found that the disk image for the application (the .dmg file) was mounting perfectly fine but the pkg file would come up with an error saying there is no file associated with file type .pkg.

This is because OSX uses the Disk Image Mounting utility for dmg files but it uses Installer.app to unpack/install .pkg files.

It is important to first check the CoreServices folder under /System/Library/CoreServices and make sure that Installer.app is in this folder. If it is, all you need to do is right click the package file, click get info then change open with to be the program Installer.app

If the file does not exist, you can copy it from another Mac into your CoreServices directory and then you should be able to install the package file. Before doing this make sure that your Mac OSX Version matches the other Mac that you are getting the file from or it may not work.

It should also be possible to extract the Installer.app file from your OSX installer disks if you still have access to them.

iPhone 3GS Carrier Lock and how to Unlock it.

Last week a friend of mine called me saying he knew someone who had just moved to Australia from the UK and just wanted to use her iPhone on an Australian carrier.

Normally the original carrier has to remove the carrier restriction from the phone – this person was having immense trouble getting her original carrier to do this though so I sought an alternative way of addressing the problem.

What does a carrier lock do?
A carrier lock prevents a phone from connecting to another mobile network i.e. another carrier. Most carriers today now offer the ability to remove the lock for either a small charge or for free. Unfortunately not all carriers are leniant, or easy to get in contact with.

How to remove it on an iPhone 3GS and iOS variants
To remove the carrier lock we first need to Jailbreak the iPhone so that we can install a package manger called Cydia. To jailbreak you will need to download redsn0w from here. You will also need an iDevice USB cable.

Upon opening redsn0w you will see a button that says Jailbreak. Read all the prompts after you click this button or things simply wont work (e.g. plug phone in whilst switched off…). Make sure you click “Install Cydia” on the list of options. Redsn0w will guide you through placing the phone into DFU mode and will begin the jailbreak process. At the time of writing this post redsn0w is working for iOS versions 4.3.3 and above – on the release of iOS6 it may no longer be functional.

Once the phone has rebooted an App called Cydia will be available to open. Open the app and click the manage button at the bottom. Make sure you are connected to a working Wifi network or you wont be able to do much at all.

Once in the manage section you now have the ability to add Sources by clicking on sources then pressing add. You need to add the respository repo.iparelhos.com otherwise you will not be able to download the application that unlocks the carrier restriction.

Once you have added the repository you can press the search button in Cydia and type in ultrasn0w. This is the app that you need to install, so if you can find it click on it then press install. If you cant – you may have typed the repo in wrong.

Please note if you are using iOS 5.1 or above you will also need to search for and install ultrasn0w fixer for whatever iOS version you are running.

Once the app is installed, reboot the iPhone – insert your sim card and see if you get a message saying Searching or if you get service. If you have service, congratualations you are done.

If you dont have service – dont worry this happened to me, you will need to use redsn0w again. One of the options you get upon Jailbreaking is “Install iPad baseband” – you will need to follow the process in redsn0w again however make sure that this option is ticked. Again – Read carefully the messages in redsn0w, if you dont you can severely damage your iPhone.

If you had already installed ultrasn0w and ultrasn0w fixer you should have service as soon as the phone boots up.

IMPORTANT NOTE: All iOS Jailbreaks are very dependent on the iOS version they were designed for. If you want your carrier unlock to continue to work DO NOT update your phone in iTunes. Why? – the jailbreak you are using may no longer apply to a newer iOS version which means there will be no way to unlock the phone. If you really want to try out that new iOS version make sure you have saved your SHSH blobs with Tiny Umbrella so you can downgrade to your original iOS version.

 


Samsung Galaxy S i9000 – improve speed and GPS

The samsung Galaxy S i9000 was Samsungs flagship phone that was released to be a main competitor to Apple’s iPhone.

Although the Galaxy S was quite comparable specifications wise to the iPhones of the same era the software was no where near as polished as what iOS was and several people experienced issues with lagging response.

I purchased one of the i9000 handsets when they were released as I knew that Googles android operating system that comes with it was an open source platform – not closed like iOS. I wanted to see how far the Android OS and the devices had come since I initially used an HTC Dream running Android 1.1.

There was a significant jump between 1.1 and 2.2 that the Galaxy S shipped with, the interface was much more polished however lacked operational speed. Everyone hates slow technology. Disappointed I began to research whether others had speed issues and what they had done to solve them.

One of the main reasons these phones lagged so badly with the original software was that Samsung used their own filesystem that meant that large cachces of write operations would bank up and then all be passed to the disk at a single point in time.

I continued to search and found a custom firmware called Darkys ROM. This ROM set the stage for many others by using an ext2 filesystem – commonly used in linux distributions. I installed this ROM and needless to say my speed issue was resolved and many other abilities were available using this particular firmware.

Software is only one issue they have had though – GPS locking was another let down. Many of the alternative firmwares offered fixes for this by changing the GPS servers – however the most successful modification to strengthen your GPS signal is to remove the black tape covering the antenna that is right next to where your sim card it. Be very careful removing it though, use a small flatblade and slowly lift the tape and it will reveal the antenna.