Monday 10 November 2003

(In)Sane Scanner for Linux

I'm blogging this one because I have needed it before today (this time being the 2nd time I have needed to know this info).

I have a BENQ 4300U USB Scanner, was $70 8 months a go and is still great.

Making it work with Linux is not too hard as some might think.
install the sane drivers .. (apt-get install sane) debian-esq

apt-get install xsane (the front gui scanning tool)


and now the firmware,

The sane driver (snapscan.sf.net) needs to know
how to talk to the scanner.
This is all in the scanner driver/bios/something file (i don't care much
for these details. I just need it to work .. gosh I'm changing :-), in the past
I would investigate everything..

so .. find this file on your windows install .. reference the table at snapscan.sf.net
My file is the u176v046.bin

How do I know this ?
Easy .. the device has a number, when you plug the USB scanner in, the linux USB drivers will
detect it and throw a message in /var/log/messages about such event.

In the log message, is the device number, which will correspond to the snapscan device id they know
about.. egc:

# dmesg | grep -i usb
... skip all this to the last lines ..
hub.c: new USB device 00:07.2-1, assigned address 3
usb.c: USB device 3 (vend/prod 0x4a5/0x20b0) is not claimed by any active driver.

vendor id and product ID .. 0x4a5/0x20b0

These quite cheerily map to the table entry at the aforementioned driver website.

So Search for this file on your windows boxen.
Mine of course is u176v046.bin

So .. I created a directoy /usr/lib/sane/firmware (anyone know where else this is meant to go, seems good to me)

and then edit the /etc/sane.d/snapscan.conf file ,
at the top set the path to your firmware file.

restart xsane and hey presto ..

BUT, something has changed since I did this on the laptop.

As I understand it, previously, sane used to use an object file
scanner.o method to talk to the scanner.
now it is all via /proc/bus/usb, which debian rightly warned me,
only root has access to.

So, a quick check in /usr/src//Documentation/usb
grep usbfs reveals proc_usb.txt, in there reveals
that you set devmode=0666 for the mount and the device entry points will get
-rw-rw-rw-

so my now /etc/fstab entry for the /dev/usbfs looks like

none /proc/bus/usb usbfs defaults,devmode=0666 0 0


Hope that all helps someone (and me next time I have to do it again and forgot
how I did it last time).

cheerios.

Saturday 11 October 2003

1RY CPU coolers for AMD are hard to find

I am currently in the process of building a lowish spec 1RU server for a project I'm working on.

The Server spec is an AMD XP 2000+ 512MB RAM and IDE Disks. (big whoop I hear - I told you it was low spec).

SO anyways, a 1RU server needs a 1RU CPU heat sink and fan.

the AMD Chip was the lowest in the Athlon range at the moment. I think it's around 1.6Ghz
but, being the lower end, puts it in the workstation class of course, so do you think I
could find a CPU heat sink and fan for it easy. Nope, issue was (here is Aussie World) that
most suppliers won;t stock it, not a "fast moving item".

Since it is a 'desktop' class CPU most people just answered, "Nope, don't have any, won't have any"

So anyway, thanks to the nice mag I buy monthly (just to keep my ear on the hardware ground)
Computer Market (not related to www.computermarket.com.au)
(where was I.. ). Yeah, this mag, I find an ad
for some guy selling lots of Fan stuff. This is after 2 weeks of calling about 20 suppliers,
going straight to thermaltake.com.au in Melbourne even and asking them. (it's one of their fans I was
after)

This guy, www.comparts.com.au had one of the Tsunami fans I wanted.
A Socket 462 AMD Athlon 1U (1RU) Heatsink and fan.So $40 later it should be in my mailbox on Monday.

I'd just like to add that so far service from there is great!

Also, the 1RU case I have purchased (if your interested also)
was a good buy..
1RU server case: Maccase 101 1RU ATX Case
From: Online Marketing Pty Ltd (Sydney - Often good prices)
Direct Product Listing here

Wednesday 8 October 2003

Had a birthday the other day

As you do most every year, I have had my 28th birthday.

Got myself a CD or two
* Grandaddy's 2003 album, title escapes me. Fine listening there
* The Beatles White Album (laying now)

some parfume (is it perfume for guys or aftershave ?) some nice
smelly Gucci Stuff that is.. and an egg cooker. Bit of a funny
one that..

Growing up my mum had a Sunbeam Egg Center. It cooked your eggs. :-)
It was shaped like a flying saucer (like a bad B-Grade Movie FLying Saucer).

The eggs sat it a tray (5 or 6 I think). You filled the lid (had a measure
in it) to your desired 'softness', poured that water into tha base,
turned it on and waited.

I gues it detects a rise in temp to know when it's boiled off all the water.

Anyway, a few months back, that got me thinking (I was never getting the
cooked egg thing right by guessing the timing).
I grabbed a saucepan, put in 1/2 cup of water, but on top of the saucepan
the 'asian style' steamer (made of bamboo). Put in my 4 eggs (standard issue
700 grammers).

Put on the lid, gas on high, and waited.

I waited probably 5 minutes, the trick I figured was, given I got the amount
of water correct, all I had to do was listen and detect the lack of
water in my pot.

First few goes weren;t too bad, overcooked them really. I like
a soft/mushy centre.

SO .. I worked out that 1/2 a cup of water was just right, and you
could just hear when there was no more boiling
water, thus eggs a ready.

BUT, I wanted a better way. My next thought (untested) is to put
in the saucepan (with the water), some light balls, like ceramic
balls the size of marbles. This way, they would get tossed by the water
making a sound until the water is no more, then you know the eggs
are ready. reduce the amount of water to soften your eggs etc..

So little beknownst to I, Sara had bought me a 'real egg cooker'

It's shaped like a chicken, fancy that. and it cheeps when the eggs are
ready.

Ahh the joys of the XBox

Just today, I've noticed my xbox has stopped a responding on the network.
Not hardware related as the EvoX menu responds with pings (Phew).

Bit of a fiddle here and there, looks like my XBox ethernet card is failing
to be picked up by the kernel.

No matter, on to debian xbox 0.4.1 I say.

I installed this on my brothers XBox and it went ithout a hitch,
my issue is going to be if it will allow me to install over the top of the existing filesystem
since I have my full datastore on there.

I _think_ it's time to get the datastore (aka my 80G drive) _out_ of the XBox and back
into the server. Im a little nervous about not having that nice control
of the drive when it's in the XBox. Putting it on
the server again means I can still have nfs'd.

Ahh ramblings. .. and All I want to do is get on with the other big project
Im working on.

Bah!

Thursday 21 August 2003

A Nifty SQL for T-SQL (Sybase and MS-SQL)

A nifty SQL for T-SQL (Sybase and MSSQL) - @ 12:31:24
When playing with SQL I often find that I create some massive SQL statement .. like

select blah,blah, (case foo when ... end)
from ...
and i need to put that into a temp table.. what should the temp table look like was always the next step. So .. thinking about it
I decided to hack up my solution.

Insert the select statement into a #temp_table
select *
into #my_tmp_table
from ...
and then I wrote this whopper to extract out of the sys tables
what the Temp table looks like as a CREATE statement

It's a bit crude but it will give the basic overview of what you want

select sc.name + ' ' + st.name +
       (case st.name
when 'varchar' then
'(' + convert(varchar,sc.length) + ') ' + (case status when 0 then 'not null' else 'null' end) + ','
when 'numeric' then
'(' + convert(varchar,sc.prec) + ',' + convert(varchar,sc.scale) + ') ' + (case status when 0 then 'not null' else 'null' end) + ','
when 'decimal' then
'(' + convert(varchar,sc.prec) + ',' + convert(varchar,sc.scale) + ') ' + (case status when 0 then 'not null' else 'null' end) + ','
else
' ' + (case status when 0 then 'not null' else 'null' end) + ','
end) ,-- sc.*
from tempdb..syscolumns sc
inner join systypes st
on st.usertype = sc.usertype
where id in (select id
from tempdb..sysobjects
where name like "#transaction%")
HTH.

Ramon

Sunday 8 June 2003

My XBOX is Up

xbox is up - @ 15:15:25
we finally did it. My Mod took a very long to to complete (all of about three weeks I would guess).

What Happened I here you ask?
The CromWell BIOS that came with my Modchip did not sit too well with
heat issues.

Each time Tux the penguin started to go across the screen, he would stop
about halfway and freeze. This became worse and worse upon each succession of boot.
After about two or three goes. No go. The XBOX would show the red circle
as if a hardware failure had occurred.

Disable the Modchip however, and all was well.

I spoke with a few people on IRC (Wilber #ozxchip) whom pointed me to info
regarding the cromwell and this very issue.

My solution was to re flash the chip with a later version, or try
a different BIOS altogether.

So I decided to go the programmer route.. being a hands on that I am
I decided to make the CheapLPC Programmer at this site
This was most wonderfully pointed out to me by GreenGian (#ozxchip) whom happens to run
that site. He had some good tips.

So off I went on my merry way.

The Programmer proved to be a tough nut to crack for me.

Spending about $15 all up on parts I started with the power circuit.
My brother helped out there where I used a circuit with a voltage regulator (opted
not to use USB because, well I didn't).

The voltage circuit was perfect, 3.32v all the time (could go up or
down in increments of about .01v according to my multi-meter.

Day 4
So once that was complete, I then had the lovely task of putting the
whole thing together

Day 6
After a few days of rest The circuit was complete and the weekend was here.
I sat down a late Friday evening with my trusty multi-meter, my beauty Laptop
and the programmer.

After a bit of sorting stuff out, I had the milksop software pumping
out some data for me.

On Windows XP. milksop was showing 1100 fairly consistency (1100 being the output
of it's testing procedure).

Knowing I was to be expecting 1111 I decided to ditch XP and I put the
programmer into the back of my trusty Linux Server of 2 years.

Now here it was worse, 1100 1010 0011 1101 and stuff like that ..
but consistently unusual.

I slowly (after about 2 hours, and many conversations with my brother again) worked
out that the issue was that I had some software (a kernel module paraport)
listening in on my conversations on the alp0 port and was stuffing
my readings.

telinit 1 into safe (root user only) mode
and check ..

better but not good. 1101 and then 1010 on and off.

.. now Here I thought, aha! Software on the XP was stuffing
my readings as well. and sure enough, at 3am. It all came together..
the Programmer testing software showed up 1111 and n o 1010 every 20 seconds.

(I shutdown the print spooler).

So onto re-flashing my modchip.

no go either
The actually flashing never succeeded, The milksop software wonderfully
written by Andy Green could not detect my device and I had to concede
defeat on my programmer (5am).

I packed up and washed the dishes.

9am rolls around and I chucked all my gear in bags
and hopped on a train (little to know trains weren't running and I would
be on a 2.5 hr buss trip) I made my way to the Central Coast at my brothers place.

Install fest of XBOX v1.1 and v1.0
Jono and I discussed the dilema, he being a fully qualified electrical and
electronic engineer, in his wisdom said, "Forget the programmer, we will spend
hours on this thing as it's hard stuff".

Our other option: Mod his v1.0 XBox (Which we had to do anyway) and flash my
chip.

The v1.0 Mod
Jono started on his mod, got the solder out of the LPC header (I didn't have to
do that thankfully) and put in the pins.

Identifying the d0 port on the back he started to fix his wire, and after a
few bad takes, BANG! the d0 point just came right off the board and also broke the
track.

Bugger! But Jono, determined as he is, stuck at it, With my trusty B and W camera
lens from an old video camera helping as his eye, he fixed that track (even De-soldered
the CAP next to the d0 to get at the point so he could put in his wire).

After about 2 hours of fun (about 4am Sat just gone) he had the mod installed.
Scary stuff, we almost lost the XBox then.

Onto flashing my chip
Thankfully i brought 3 CD-RW's with me and we proceeded to burn the ozxflash.

After about an hour, we had my chip flashed with Xecutor-2 BIOS and .. it worked!

I was able to boot and also play my games still.

So next thing was to get my 80G drive in there. I booted trusty EvolutionX
and found the FTP server, Backed up the data and then went on
to do the HDD swap trick.

It goes horribly wrong 2
Now, I've been working IT for about 9 year and in my time, I have hot swapped
one or two drives. (that weren't meant to be hot swapped) and it never did
what I wanted and I was always worried about damaging them.

Well wouldn't you know it. I hot swap this drive following their instructions
very carefully and it .. well I now have a dead 10G harddrive. (I'm yet
to determine what exactly has gone wrong, but Jono suspects that I have damaged the buffer
chip of something like that on the PCB of the drive).

When you boot a PC with this 10G in, it detects OK, but then says (for eg:) Secondary Master Hard
Disk Fail. A clear indication that the computer was not able to contact the drive.

Unbeknownst to us. I continued on thinking, this HDD swap didn't work, there
must be another way to get my drive in the machine.

I plugged the 10G back into my XBox after the failed attempts and ..

XBox no longer liked my drive
The XBox would start it's little BIOS routine and make a beautiful BRRRRR
sound (brief, about a 1/2 a second or so) before it shows the X logo.

Noticing this straight away, I got worried. of course, the XBox only gives
error codes and all I could determine was... the DVD would no
longer eject, The XBox would boot to my MS Dashboard (I hadn't
installed EvolutionX Dashboard) and it would no longer boot off any DVD (play games etc).

where's my paddle?
When I disabled the XBox BIOS, i still got the brrr sound but then I would get an error
code of 6 and a notice to contact Tech support.

Not to be out done. I decided, put this drive in Jono's XBox and see how
it goes... same thing .. BRRRRR.

I took the drive out (11PM there abouts) and put it in the spare PC we had and that's
when I first saw the "Secondary Master Hard Disk Fail" having seen this more than a few thousand
times over the past 9 year I knew exactly what had happened, my heart sank. I had done in
my HDD (which incidently I was going to flog off on EBay after I had unlocked it)..

Not to worry .. I had the 80G to put in anyways! :-)

3am and I fall asleep
So we put the 80G in my machine and it booted CD-RW's again, put it in Jono's XBox and same thing.

I did some fishing around and Found reference to Slayers ISO Tools. Looked like it
could format my HDD, Brilliant!.

Download that and burnt it to a CD-RW (about 0th or 10th CD-RW we had reburmt that evening).

Loaded it up and it had a few options for what i was looking for. One, Format Drive and
install EvoX.. Select .. wait..

Looks good.

Put it on My XBox .. Error 13. No Default DashBoard found!!! Bugger!

I think, from memory it was at about this time that I fell asleep.
I was sitting on the couch and .. next thing I know, I woke up to Jono was asking me a question.
I was out to it. I had been up since 7am on the Friday morning and it was now 2am on Sunday morning. That makes about 43 hrs (I had about a 40min sleep on the bus).

That brief moment of sleep ... it woke me up.. I thought more, Jono and I talked
more and about an hour later decided to call it a night.


A Remote Control
I woke at about 10am that morning. (Jono was up much earlier trying to fix his 2nd TV's
remote control so we could have 2 TV's to be doing installs and setups with.).


Why a remote ? Well the previous night we tried to get his little TV to work but the TV (as like many, don't have the TV/AV switch on the TV, only the remote, and as a result we weren't able to
switch the TV to AV to see XBox. (and had no Video Player to act as an AV to RF converter) ah well.

This brief attempt at fixing the remote didn't work ( I suspect Jono spent a good hour
or two doing that :-).

Config Magic
Enter Config Magic. So I jumped on IRC again and spoke with some guy
called I_am_zim on #xbox-scene. He mentioned this software "Config Magic" but didn't
mention what it was. I jumped onto the old XBox place and pulled it down.

After a quick Format and burn of the CD_RW we saw this cool tool booting up
on Jono's XBox. We put my 80G drive into his and played abit .. inadvertently locking
it to his XBox ..
well little did we know .. this cost us about 4 hours of pain and grief,

A locked drive can only stay locked for so long
Locking my 80G Drive to his XBox . meant that now .. we were seeing
a different error code on my XBox .. 9 I think it was. well many boots
later I started to get this sick feeling in my throat that, not only had I
destroyed my 10G drive, but I had also stuffed the IDE Bus on My XBox as well.

We tried all sorts of stuff, but nothing would make my XBox boot.
Sometimes I would see an error 16 and at one stage, we saw this Error
page but it was Half there Cut diagonally, top left, to bottom right
and the bottom half was black (It was the Xecutor2 error page) and the error
number was 16.

OF course, the PC we had could not read my 80G drive (BIOS was not supportive :-)
and that just made stuff hard.

The drive worked in Jono's, not in mine.

Finally, we started at the beginning again.

Downloaded Cromwell 1.22dev from xbox-linux.sf.netand flashed my chip (In the 1.0 XBox). With this BIOS we could actually
see what was going on.

We put in a 1.2G Hard Drive into my XBox and booted Cromwell. It locked up .. Not too worry.. grabbed my trusty BIG fan and .. whoohoo! it went further, even booted the debian install CD.

SO .. this proved that my XBox was still okay, but there was something wary with the 80G HardDrive. (and my 10G hee hee).

Put the 80G in and debian install showed all this BUS Errors, failed to read from
disk error seeking etc etc .. now I should have clicked at this stage but not
being around XBox stuff for long it wasn't obvious.

Incidently, the 1.2G Drive freaked out Xeceutor2 BIOS (and native XBox BIOS, possibly because
it is too small and they were trying to read past the end of the drive looking for
the non-partition table FATX partitions.

So a few more plays with trying various things, (seeing if I could reformat my drive in another
machine (which required flashing it's BIOS to support 80G drives) and then

a Road to freedom
and then... (a quick toilet stop) and bang! it hit me .. we had locked my drive
to Jono's XBox.

So .. fired up this cool tool Config Magic and unlocked it, re-flashed my BIOS BACK
to Xecutor2.

We did this because even though the 1.22dev still booted okay it locked up
through an attempt at install on the 1.2G drive which was to me a heat problem again, not unlike the 1.18 stuff I saw. With the 1.18 I used the fan as well but never had ANY luck, so they must be close
to fixing that issue because the 1.22dev worked so much better.

After a re-flash, and confirmed that my drive worked in mine, we backed up
Jono's drive and then copied stuff onto my 80G Drive and then I finally
after 2 weeks and then a MEGA install fest of 16 hours .. had my XBox booting
EvolutionX! (not wanted that, as it is running Linux solely).

Whoa!.

Unplug that DVD for me could you?
Oh did I mention, because Jono's box was 1.0, he had a Thomson drive and none
of the CD-Rw's we had would boot on that drive (additional to the fact that Jono's
CD-RW drive was freezing when it was trying to burn his CD-RW's he had ..).

We used my Philips Drive (comes with most of the v1.1 XBoxes apparently) and decided
to between the two XBox's. I think I swapped that DVD out about 20 or 30 times.

so because we had three Verbatim CD-RW's we rotated then on a number system.
1 2 and 3 and a sheet that showed what was on them. (go pen and paper).

The Stuff we were rotating on three CD's over the whole time was

EvolutionX
Ozxflash
bios's for Ozxflash
Slayers tool (yup, I_am_zim said it was useless)
Config Magic < -- this saves the world. Debian Install CD Debian Boot CD All of the time, a Quick Erase using CD Creator was okay to make the CD. We used Disk At Once.2 speed.

When I finally booted debian install on my XBox with my 80G drive attached
It started okay, but wouldn't login to X properly.. no probs..
I flicked to Console and started the install of XBOXLinuxInstall.

It seemed to come up okay but . then halfway through copying the
files saw all these errors everyone and then about unable to read from
device hdb (the DVD) ..

I though, ahh, maybe she'll be okay.. but when I rebooted into the install
vi wouldn;t work.
"Bus Error"

was the err message.
No worries.

ssh the config files off and edit them on the server and transfer back ..
"Bus Error"

ifup eth0
"Bus Error"

hrmmm, maybe those errors had something to do with my bus errors.
jono's Linux Install worked okay. (he used CD-RW 1 I think, whereas mine
was from CD-RW 3, just the numbering system).

I decided to call it a day at Jono's and came home.


I wake up and did a few chores. (make chicken soup).

and reformatted (COMPLETE) one of Jono's CD-RW's he had .. lMEDIA was the brand.

Waited, the reburnt Ed'd Debian to the CD and ..

it installed .. no errors I have no BUS errors.

AND ..

here I am .. typing out this beautiful story of sadness and joy on my IBM
USB keyboard looking at a fuzzy Mozilla Browser on my 48cm colour TV with my
XBox pulling down deb relevant to debian unstable whilst listening to Sting
on my CD player (not the XBox yet, coming).

And I hope this was a nice read and you picked up some tips from the
pain Jono and I felt.

:-)

Sunday 1 June 2003

Problems booting the Cromwell BIOS on the XBox

So I installed the modchip all okay. But no luck being able to boot the cromwell BIOS (GPL BIOS for the XBox).

I found a survey for failed cromwell booting info so go there and help out.

I will be tryong to flash up to a later version at some stage soon.

in the mean time, it's still an XBox (shame im not much of a gamer :-)

Saturday 24 May 2003

Drummers Click Alternative

Drummers click alternative - @ 14:45:02
I've found a great solution to the annoying beep in your ear that keeps you in time.

A friend let me in on this one which I haven't tried yet but I'm sure that you will be interested Ramon.

Well you know the shock packs you buy for games which you strap to your back and it pumps a low level sound or something into your back. Well simply get one and plug it straight into your click track's headphones output and it'll pump the click into the pack. Neat hey!

You can buy them from JB Hi-Fi for about $20

And when your not using it on ur drums plug it into the tv out and feel the tremble of the movies you watch.

Music via JavaScript - (Reading the floppy drive from the browser ? :-)

Umm,

Click on this link to take you to some weird javascript that uses your floppy
to make music, and yes I wrote it ;)

floppy music

(just couldn't resist could you.. :-)
and They said I'd grow up!

Wednesday 21 May 2003

MOding the XBox with an OZXChip

Reason: to run linux..
details so far.

I mod'd the xbox.

The new BIOS screen loaded up straight away.. no issues. (so far)
(yet to boot linux or put in new harddrive)

A good note I read was, before you mod the xbox, burn a copy of
a music CD and see if you can use the standard Xbox music copy
thingo to 'rip' it to the harddrive, if you can then the CD
brand you used should be okay, some DVD drives don't like CD-R's


I used a cheapey CDR and it ripped okay.. I have heaps of CDRW's
which are said to have far less problems.

I put the BIOS disable/enable switch at the back
(drilled hole in plastic and metal sheeting)
I completely dismantled it to do this though.

There was a few tricks, in all.

1. the picture in 4b of instructions does not give a clear view
of which pin to solder the wire onto.

This piccy helped me
modchip pikky


2. my wire was a little taught for my liking if I went around the board
so I ran it through one of the spare holes in the LPC plug where the
modchip goes.

the wire can be soldered to the top or bottom,(i think)
but the bottom has a lot better access and less obstacles.

3 to remove the metal tray, you have to remove the front panel
after you have removed the motherboard, usb ports, powersupply.

the front panel is clipped on the sides and three clips along the front
inside (easy to see with everything removed)
I just gently prised one side clip and the closest front clip to that
side to pop it off.

4. The fan, unclips at the bottom, either side, and slides up and
unclips again at the bottom to come out.

the back of my xbox looks like

(x) (o)
[vga/soundport] [net]


(x) is the switch.. it's high and clear of the board inside and
plenty of room there, I think it's nicer
at the back.

(o) is a dummy hole (only in metal, not in plastic)
next to the installed toggle, i put 2nd hole in the metal
sheet, but not in the plastic, (in case i want to add that 2nd toggle
for BIOS protection or something other later).

ramon

Monday 19 May 2003

Paper jams on HP LaserJet and Canon LBP Printers (a free fix)

Does you Laser printer take too many sheets ?

Does it Jam when it takes too many sheets ;)

This might be your answer, HP has it.

Found a fix for it (a bit left field).
Apparently there is a fault with some
HP lasejets and the fix is provided by HP
HP Support.

Read more from these URL's google

The fix is a tool they send out, for Free and you use this tool to fix the printer.

Basically, Our printer is a Canon LBP-660 and about a year a go it started taking
2 then 3 then more sheets of paper.

I scouted aroud for a DIY fix and found a reference somwehere for paper jams
and the HP laserjet. Knowing that some printer engines are the same (manufactured
by same company) I did some more googling and found that the canon printer I have
is similar to a HP one (just ngine wise, not firmware interface etc).

So, thought I'd give it a go, (it was free).

The parcel took about 2 months to arrive.. but, it worked.

The 'thing' that HP gives away is like a sticky label that is installed
into the printer using this tool they provide. (weird)

.. why post this now? Well 9 months has past and the printer is at it again
and luckily I have found the URL. so .. when I need to find it next time
I can just look on my website ;)

I can't remember which of the printer 'tool' version I ordered. Maybe it
was for the 6L that I used. The difference is in the shape of the tool
that they provide.

The tool is made of cardboard

Monday 21 April 2003

First Sync in linux with my m505

First thing would be to get the palm pilot syncing. I have a Palm m505
and it comes with a USB cradle only. First thought was that I would need
to go out an buy a serial sync cable to get the console.

But thanks to some awesome work, there is the visor module (created from
the original HandSpring Visor as it was the first Palm to have USB
as it's syncing technology.

So .. to get syncing...
I used this site to do my first linux sync.
http://home.earthlink.net/~cleryd/

Best part of all this was simple steps. Because I run debian (any many
other distros support this also), all I had to do was



modprobe visor



This loaded the module into the kernel.
and I saw this spew up on the console, always a good sign (no errors)



usb.c: registered new driver serial

usbserial.c: USB Serial support registered for Generic

usbserial.c: USB Serial Driver core v1.4

usbserial.c: USB Serial support registered for Handspring Visor

usbserial.c: USB Serial support registered for Palm 4.0

usbserial.c: USB Serial support registered for Sony Clié 3.5

usbserial.c: USB Serial support registered for Sony Clié 4.0

visor.c: USB HandSpring Visor, Palm m50x, Sony Clié driver v1.5



next bit was to get the pilot-link

(thanks debian ...)



apt-get install pilot-link



I notice there is another 'type' of syncing software, coldsync.
Didn't / haven't tried it, will tell more when I know more I guess.

So now, the test, let's back this baby up.



mkdir somedir

cd somedir

pilot-xfer -p /dev/ttyUSB1 -b .



* Press the HotSync *



:-( didn't work..

oh wait, I need the core usb stuff loaded...
(* took a guess, ohci (either that or uhci, there is a way to
work out what type of bridge you have, it's all in the lspci
from memory) *)



modprobe usb-ohci



That worked !!

So now , try again,



pilot-xfer -p /dev/ttyUSB1 -b .

* Press the HotSync button, whammo! *



I saw this on the console..



usbserial.c: Palm 4.0 converter detected

visor.c: Palm 4.0: Number of ports: 2

visor.c: Palm 4.0: port 1, is for Generic use and is bound to ttyUSB0

visor.c: Palm 4.0: port 2, is for HotSync use and is bound to ttyUSB1

usbserial.c: Palm 4.0 converter now attached to ttyUSB0 (or usb/tts/0 for devfs)

usbserial.c: Palm 4.0 converter now attached to ttyUSB1 (or usb/tts/1 for devfs)



Now, notice a few things here, I had no idea if the Palm was on
ttyUSB0 or ttyUSB1. But I just followed what was done before,
and lo and behold, it was the right one because if you see,
The USB interface must have two logical ports, which the visor kernel module
must map to the 'serial like' devices USB0 and 1
.. and the "HotSync use and is bound to ttyUSB1" says it all.

cool!

Now on to compiling my first linux kernel into this puppy and blow it up!

Thursday 20 March 2003

Satellite SM200D Installation Instructions for Smoothwall (and IPCop)

Okay..

After a huge delay, I have finally managed to put the smoothwall/satellite mod together...

smoothwall_sm200d_1.0.tgz - my v1.0[415k]
list_of_new_files.txt - A list of the files I have changed/added.

The original drivers.
SM200D SkyMedia Telemann v2.20 drivers - For SM200Dxx Series.

Helps to see what I did if you diff each file against the original smoothwall file.
It really wasn't that hard. Just a lot of working out. So use what I ahev done and go forth!

eg: tar cvfz /tmp/originals.tgz -T list_of_new_files.txt
diff -r

What's in there ?
  • Compiled 2.20 Text Drivers (app and module) against the 2.2.25 Kernel (smoothwall kernel in 2.2.25) (using debian of course)

  • Built for smoothwall 1.0 patch level 4.

  • Control scripts to load the module and change firewall rules (at start up)

  • A web interface to put in the settings you need.


  • How do I use them
    Backup your smoothie, (of it's a new one, don't worry you've got the CD ;)
  • patch it to level 4. (if they go beyond level 4, let me know and I'll check
    this tar file for conflictions).

  • Setup smoothwall to be a normal dialin machine. (Red Modem is Dialup)
  • Using scp (scp, WinSCP etc etc), copy the tgz to /tmp

  • Login as root.

  • cd / && tar xvfz /tmp/

  • Go to the smoothwall admin and you will see a new link under [dialup] satellite. Put your settings in there.
    I just realised that the IP address is irrelevant. leave it as 1.1.1.1 if you want. I used to use it where the dialup account was not meant for dialup (was given a different IP address via PPP)

    Email me if you have any issues - ramon_at_thebuckland.com and I'll see if I can help.

    How did I compile them
    1. Loaded up a 2.2.25 kernel in debian to match that of smoothwall. (this isn't necessary I believe)
    2. Obtained the kernel headers for 2.2.25.
    3. Downloaded the drives from telemann's site.
    4. Ran the INSTALL script once.
    5. Edited the INSTALL script and commented out the 'gzip lines for each section'
    6. edited drv/drv.mak and added -I/usr/src/kernel-headers-2.2.25/include
    to the end of CFLAGS (after the -O)
    7. Ran the INSTALL again.
    8. This did create some warnings, but all googling showed that they were okay.
    ... but I can't test these drivers as I no longer have this card. This is just a service to you :-)
    hope you appreciate it.
    9. collected the bits together (in the Release directory)
    10. Used the smoothwall 1.0 patched to level4.
    11. Added my mods created back in April last year.

    Some notes
    I have noticed that there is a mysterious 2.30 version of the driver but I was never able
    to find it. A friend pointed me to an smdstats program that someone wrote. Text based, similar to the Windows stuff, shows the signal strength. (Excercise for the reader to get it into smoothwall).

    This 'hack' is not suggested to work against a smoothwall > 1.0 pl 4.

    I don't have a card, so these drivers may not work. But they error saying they can't
    find a card okay so that is always good.

    If you want to donate me a card ;) i can test them and get them working proper.

    Extra bits
    I used to use my satellite service with a dialup ISP that did not know about it.
    What this meant was that the dialup account I used did not have the satellite IP address.
    It was dynamic.

    Basically, on top of this patch above, what I did was added some lines to the /etc/ppp/ip-up
    to create an alias interface so my packets would go out with the source address of my satellite

    Add this after
    system('/usr/bin/killall', 'dnrd');
    system @commandlist



    # change the ppp0 to ppp0:0 for satellite

    &readhash("${swroot}/satellite/settings", \%satsettings)



    if ($satsettings{'ENABLED'} eq 'on')

    {



    $localip = $satsettings{'IP_ADDRESS'};

    $interface = $interface . ':0';



    # ifconfig ppp0:0 netmask 255.255.255.255 pointopoint

    er-IP>



    &log("Satelite: < ".$interface."> is now ".$satsettings{'IP_ADDRESS'});

    system(@cmd,('/sbin/ifconfig',$interface, $localip,'netmask',

    '255.255.255.255','pointopoint',$remoteip));



    system(@cmd,('/sbin/route','del','default'));

    system(@cmd,('/sbin/route','add','default','gw',$remoteip,'dev',$interface));



    }



    Cheers!
    Ramon
  • Current 5 booksmarks @ del.icio.us/pefdus