Wednesday, June 6, 2012

New SSL certificates for tomatoUSB and tomato

Problem: Google Chrome under MacOS (after Apple's 10.7.4) update will not connect (https://) to tomatoUSB admin page

Solution: generate a new 1024 bit self-signed certificate for your tomatoUSB router

Hints thanks to the following links:
and the tomato source code (follow the source in httpd.c which launches '').

Read the links above and ensure you are comfortable with that is needed to be done. The information below is only an addendum to those steps to help and is not intended to replace those instructions.

The file, /usr/sbin/ has the steps needed to generate a new self-signed certificate. The problem with the script is that it generates an rsa 512-bit key which Apple's update flags as a weak key.

Before following the instructions contained within the links above, I was motivated to use 'openssl' and the specific command line arguments used by tomatoUSB without trying to guess just what flags I should/could use to make the proper certificates and keys. So using the commands in '':

log on to your tomatoUSB router (ssh root@
cd /tmp
mkdir new
cd new
sed 's/rsa:512/rsa:1024/g' \
    < /usr/sbin/ \
    > ./
chmod 755 ./
# see code below about generating a serial number
export _serial=433691111918831033
./ ${_serial}
This will put two new files in /etc (cert.pem and key.pem). You can check the results by issuing the commands:
openssl x509 -text -in /etc/cert.pem
openssl rsa  -text -in /etc/key.pem
Now you can follow the remaining instructions shown in the links above

Result: Chrome will now connect (again) to https://192.168.... (admin interface)

Ahh... the code to generate the serial number. You can compile and run this code on any machine with a good GNU C compiler. This was inspired from the code in httpd.c from the tomato source code. Warning: i was lazy, there is absolutely no error checking in this code.

#include <stdio.h>
#include <sys/types.h>
#include <sys/uio.h>
#include <unistd.h>

  unsigned long long sn;
  int f = open("/dev/urandom", 0);
  read (f, &sn, sizeof(sn));
  printf ("%llu\n", sn & 0x7FFFFFFFFFFFFFFFUL);

Monday, September 20, 2010

t-mobile's t-zones on the unlocked Motorola SLVR L7

You will need a t-mobile account/SIM card for this.

Create a new entry for web sessions.

menu -> Web Access -> Web Sessions -> [New Entry]

Name: t-zones
Service Type 1: HTTP
Proxy 1:
Port 1: 8080

Leave the rest of the settings as default, no need for usernames or passwords.

Name this the default Web Session and the Carrier Key/Button on the right hand side of the phone will not launch t-zones.

Saturday, January 16, 2010

Memorex 6142U Scanner and Windows 7

After installing Windows 7 on a laptop, I needed to get my legacy scanner, a Memorex 6142U Flatbed Scanner, to operate. Previous to this, the scanner was working perfectly well under Windows XP Pro.

After running the legacy driver installer under Windows 7, and Windows 7 failing (still) to detect the scanner. I reviewed the installer's log file in C:\Program Files\42 Bit Scanner and noticed that the installer was installing files in (C:\Windows\Inf\i386\). However, upon inspection of that folder after the installer ran, I found nothing there (not even the folder).

The solution for me was to go back to another Windows XP system which had this specific scanner on that computer and copy the files from that folder to the Windows 7 folder, re-insert the USB scanner, and let Windows 7 try to find the drivers (but this time explicitly specifying the folder (C:\Windows\Inf\i386\)) to search for the drivers. Bingo! It now works.

So, in summary, my specific steps were:

  • run/install memorex_scan_42Bit.exe (md5sum 'bcb6ef0283107acb3d01134ca96bce5d' that checksum should be search-able via your favorite search engine)
  • copy these files to C:\Windows\Inf\i386\ (create this folder if necessary):
  • E1.ini
  • plug in the scanner, likely the device will not be found.
  • open device manager
  • select find 'Other devices'
    find 'USB Scanner'
    right click 'Update Driver Software'
    browse to 'C:\Windows\Inf\i386\'
    select 'Install this driver anyway'
  • you should see 'Windows has successfully updated your driver software'
    select 'Close'
To test, I used Picasa:
  • open 'Picasa'
  • click 'File -> Import From...'
  • select "Import From: Scan Manager"
  • use the manager to preview/crop/scan your image
  • exit 'scan manager' when done