Archive for the ‘Hackz’ Category

usb 2 serial adapter - UBUNTU

Sunday, February 7th, 2010

The procedure for using the USB adapter from the BOM wasn’t in the wiki - nor was it immediately obvious, so, here goes.

If you are using the usb -> RS232 adapter, the serial drivers may need to be installed for the device to work properly. After plugging in the device, first check the hardware messages to see the device was detected:

dmesg

Torward the end of the messages, you should see this:

usb 1-1: new full speed USB device using uhci_and address 2
usb 1-1: configuration #1 chosen from 1 choice

Now, we need to figure out the device vendor number and product number to tell the usbserial driver. For this we can use lsusb. The easiest way to find the information is to first unplug the device, then run lsusb:

lsusb

You will see a summary list of your USB devices on the system, I only have one:

Bus 001 Device 001: ID 0000:0000

Now, plug the device back in, and run lsusb again:

lsusb

Which returns the summary list again, but now showing the new USB device:

Bus 001 Device 002: ID 4348:5523
Bus 001 Device 001: ID 0000:0000

Now, we can load up the driver for this device:

sudo modprobe usbserial vendor=0×4348 product=0×5523

Finally, check dmesg again to ensure it loaded properly.

dmesg

Near the end, you should see something like:

usbserial_generic 1-1:1.0: generic converter detected
usb 1-1: generic converter now attached to ttyUSB0
usbcore: registered new interface driver usbserial_generic

Congratulations, your link is up - in this example, the device can be used on /dev/ttyUSB0. As much fun as you had doing this, there is some chance you want to do this automatically in the future. Just add this line:

usbserial vendor=0×4348 product=0×5523

to /etc/modules with the vendor and product numbers you found. Now, you should have no problem using this device for RepRap like a normal serial port. Huzzah! grinning smiley

Changing The Site URL

Sunday, January 4th, 2009

WordPress stores two addresses inside the database. These determine where your blog files are, and where the main index is. On a normal install, these addresses are the same.

There are two occasions where you will need to access the database to alter one or both of these settings:

1. If you have tried to alter the Blog URL or WordPress URL in Settings, and an error has occurred.
2. If you have moved to a domain/subdomain with a different name.

BACKUP your database before you begin and store the backup off your site server, like on your hard drive. See: Backing Up Your Database.
Quick fix method

If you have access to the site via FTP, then this method will help you quickly get a site back up and running, if you changed those values incorrectly.

1. FTP to the site, and get a copy of the active theme’s functions.php file. You’re going to edit it in a simple text editor (like notepad) and upload it back to the site.

2. Add these two lines to the file, immediately after the initial “

update_option(’siteurl’,'http://example.com/blog’);
update_option(’home’,'http://example.com/blog’);

Use your own URL instead of example.com, obviously.

3. Upload the file back to your site, in the same location. FileZilla offers a handy “edit file” function to do all of the above rapidly, if you can use that, do so.

4. Load the login or admin page a couple of times. The site should come back up.

5. Repeat the above steps, but remove those lines. IMPORTANT: Do NOT leave those lines in there. Remove them immediately after the site is up and running again.

If there is no functions.php file in the theme: Create a new text file called “functions.php”. Edit it with notepad, and add this text to it, using your own URL instead of example.com:

update_option(’siteurl’,'http://example.com/blog’);
update_option(’home’,'http://example.com/blog’);

Upload that to your theme directory, then proceed as stated above. Remove the file afterwards.

remote desktop

Friday, January 2nd, 2009

Att ansluta från Ubuntu till XP.

rdesktop 192.168.bla.bla.bla

från commandline,  easy enaugh even for spankman  :)

Hugos B-net server

Monday, December 29th, 2008

Högerklicka på länken och välj “spara som”.

http://192.168.33.145/~henke/wp-content/uploads/2008/12/battlenet.reg

How to install font in Ubuntu

Sunday, December 28th, 2008

mkdir /usr/share/fonts/truetype/newfonts