Gedashield

May 8, 2009 by Tom

For a few months now, in between other jobs, I have been designing a piece of test equipment. I hope that it will be on sale around early August, depending on how much other work comes along in the meantime. For this I need to use PCB design software. Whilst there are many packages available, I require one that is linux friendly and ideally free, like beer and speech.

Until recently I have been using Eagle for my PCB designs, whilst this has been fine until now. My work-flow is slowly being crippled by its proprietary nature. It appears that really the only package available is gEDA and PCB.

One of the main “Features” of eagle is its (binary) libraries. I seem to spend most of my time drawing footprints and symbols so one of the biggest selling points for gEDA/PCB is text based libraries. Like so many others, after a brief (probably too brief) search of the Internet I decided to write my own tools for making pcb parts. Although it is quite possible to draw and write parts by hand, who wants to place hundreds of pads on a grid manually. I find the system used to notate the pads rather un-intuitive so at its least these tools act as an abstraction layer between the way I think and the way PCB thinks. For example PCB draws a SMD pad by specifying a line and a width where the line is shorter than the pad by the pads width. I just want to think about the pads dimensions x/y and position X/Y/A(angle) or any other co-ordinate system that suits my situation.

Another gripe is that Tragesym (also a Python script) takes tab separated CSV which whilst exportable from openoffice with little hardship, is not very compatible with a make based situation. It would also be nice to use one ods file for each component with a separate tab for each part of the symbol. ods2trag attempts to provide this functionality by converting each table of an ods spreadsheet into individual csv files that are compatible with tragesym.

I have written these tools as I needed them. They have already served me well, I hope they may be of some use to others too. Suggestions and contributions are welcome. I hope to clean up/comment/re-write some of the filthy bits but I guess the structure will stay the same.

SVN stat + externals = visual horror

February 23, 2009 by Tom

The student robotics firmwares pull in a library, Rob has implemented this wizzardy with svn externals. Whilst I enjoy the idea, I find the modified output of svn stat quite hard to scan quickly and therefore hard to read:

X      lib-fw/flash430/trunk/types
X      motor/firmware/trunk/flash430
X      motor/firmware/trunk/types
?      pwm/svn-stat-dump
?      pwm/svn-stat-dumppy
X      pwm/firmware/trunk/flash430
X      pwm/firmware/trunk/types
M      pwm/firmware/trunk/main.c
X      jointio/firmware/trunk/flash430
X      jointio/firmware/trunk/types
?      power/pcb/trunk/gerbers/power-bstop.gbr
?      power/pcb/trunk/gerbers/power-tstop.gbr
X      power/firmware/trunk/flash430
X      power/firmware/trunk/types

Performing status on external item at ‘motor/firmware/trunk/flash430′
X      motor/firmware/trunk/flash430/types

Performing status on external item at ‘motor/firmware/trunk/flash430/types’

Performing status on external item at ‘motor/firmware/trunk/types’

Performing status on external item at ‘pwm/firmware/trunk/flash430′
X      pwm/firmware/trunk/flash430/types

Performing status on external item at ‘pwm/firmware/trunk/flash430/types’

Performing status on external item at ‘pwm/firmware/trunk/types’

Performing status on external item at ‘lib-fw/flash430/trunk/types’

Performing status on external item at ‘jointio/firmware/trunk/flash430′
X      jointio/firmware/trunk/flash430/types

Performing status on external item at ‘jointio/firmware/trunk/flash430/types’

Each external adds at least two lines, three if modified. So five minutes produced this

usage is:  svn stat | pystat.py, I think I will add an alias as I use it quite a bit.

giving a cleaner output (the white space is a bit mangled by wordpress! X,M,? etc should all line up, I should probably find a way to fix this):

X      lib-fw/flash430/trunk/types
X      motor/firmware/trunk/flash430
X      motor/firmware/trunk/types
?      pwm/svn-stat-dump
?      pwm/svn-stat-dumppy
X      pwm/firmware/trunk/flash430
X      pwm/firmware/trunk/types
M      pwm/firmware/trunk/main.c
X      jointio/firmware/trunk/flash430
X      jointio/firmware/trunk/types
?      power/pcb/trunk/gerbers/power-bstop.gbr
?      power/pcb/trunk/gerbers/power-tstop.gbr
X      power/firmware/trunk/flash430
X      power/firmware/trunk/types
ext  X      motor/firmware/trunk/flash430/types
ext  X      pwm/firmware/trunk/flash430/types
ext  X      jointio/firmware/trunk/flash430/types
ext  X      power/firmware/trunk/flash430/types

This was also one of those things Ive been thinking about for ages, but unwilling to commit the time for such a minor irritant. Once I eventually broke, I decided to time the implementation, it really was sub 5 min including (swift) testing! So yes it was definitely worth it for reduced groan!

Dictation pedals

February 16, 2009 by Tom

At about 1930 on Tuesday I decided to go and see Jeff’s jewellery at the Southampton artsoc’s exhibition. The timing is important  because it was that evening. To make any use of the evening, I had to be in Southampton by 2100. The hours journey time gave me 30 minutes to pack, ablute and generate the necessary black tie for the evening. Needless to say, it was somewhat neglected after its last outing. The restricted spin up time meant I packed minimum of clothes and more crucially, didn’t take the hacking box.

After Southampton, I headed down to Exeter to see Rob and Anne. Anne is a PHD student, as part of her research she has conducted a bunch of interviews, which need transcribing. She borrowed some dictation pedals from the secretaries in her department but could not get them to work with her mac….. need I say more. The idea of these pedals is that one can pause, play and rewind the playback of dictated recordings. This sounded like a hack in the making. Whilst wondering around the town centre, I picked up some seeds of an idea, a £12 game controller and some bits of hardware. Having left the hacking box at home the only tools available to me were my leatherman and any kitchen implements found in a well stocked student kitchen. Later that night, after an evening in the real world, the hack was on. Some major bodgery combined pygame and vlc through the medium of python into some very sketchy dictation software. Its seriously unpleasant due to limited development time but can be found here.

After a bit of flailing, I managed to attach a footplate (angle bracket) to one of the thumb pads. The screws I bought from the hardware store in town were too long so I needed a spacer. As the pictures show, the best thing I could find was the handle of my disposable razor, cut with some scissors – yuk!

After a few hours debugging, the system was put to the test. I transcribed 16min of recording in about 3 hours. I was amazed it takes so long!

The basic usage is to start the program, listen and transcribe simultaneously until ones mental buffer reaches capacity, then hit the foot pedal – whilst continuing to type from ones mental FIFO. The first pedal press pauses playback and rewinds five seconds. After transcribing as far as memory permits, the pedal is pressed again, restarting playback. The five second rewind permits error checking and allows you to re-sync with the data-stream. Further, consecutive stop-start cycles rewind further in blocks of approximately five seconds.

Using the vlc RC interface in addition to the standard gui permits more advanced functions to be performed in the “normal way” eg slowing playback by clicking a button.

joy-pedal

joy-pedal-use

I intend to leave the “pedal” with Anne in actual deployment so hopefully there will be more feedback soon.

Ps, using the vlc RC interface in the manner I have is a really bad idea, its massively un-resilient to change because it is not possible to flush the pipes. Hence it is easy to get in an unexpected state – see all the debug statements left in!

Pps: This is a sample of the interview I transcribed:

” But I mean there are, you, you, you could actually, there are places which ive tried to do something with temporarily. But its not warm, its cold. It lets all the cold air in so therefore its not efficient. It lets all my heat out as-well, if it lets the cold in, the heat must go out.”

I dont envie Anna, its really very hard dealing with what is being said on the recordings, mainly because people often tend to mumble total drivel! Good luck to her.

Ppps: Thanks to Mr Steve who gave me a quick pointer on the tkinter being included in python.

Timestamp and Fossdem

February 5, 2009 by Tom

Just noticed for once in advance that its one of those magic dates coming up.

Fri, 13 Feb 2009 23:31:30 GMT

Translates into 1234567890 in unix timestamp!

In other news, I will be in Brussels from tomorrow at FOSDEM, If anyone fancies a beer or cup of tea etc (provided it doesn’t taste like caffeinated bong water) Give me a shout.

Open office passified (Document recovery console)

February 2, 2009 by Tom

I use open-office quite a lot, mainly for spreadsheets. I find the document recovery console extremely annoying, its as tenacious as a playful puppy that’s just eaten a bag of haribo. I know for sure other people are also irritated by it and I don’t think Ive ever used it intentionally.

So finally Ive found a way to stop it…

alias oocalc=’oocalc -nologo -norestore’
alias oowriter=’oowriter -norestore -nologo’

added to my.bashrc and no more shouting at openoffice. It also gits rid of the splash screen that only obscures ones typing elsewhere for a few seconds. I guess this doesn’t work for icon clicking but that’s fine by me, I basically don’t use icons. Presumably there is a way to pass arguments with shortcuts.

NB: This has had only minor testing and removes a saftey-net, so be sure you actually want this

PCB Specs – The hole-ey grail

January 27, 2009 by Tom

It always seems impossible to get any information When dealing with PCB houses. When asked for specs, they usually reply “If you send us some plans we can advise you”. This is epically dumb, then I have to find out by trial and error, where a whole iteration potentially takes a whole pcb design/route procedure. If I knew what made things easier/what the limits are then it would make both my life and theirs easier.

Whilst writing a library for generating pcb footprints(more soon), I stumbled on this document. It appears to be some sort of spec and appears to be superseded by IPC-7351 but it does at least provide some information about things to consider like fiducials, pick and place, solder mask clearances. Even if these things are wrong/old, the presence of these considerations is more than anyone seems to be willing to tell.

Why didn’t they teach this kind of stuff at university…..that might have been useful!

Employment licensing

January 27, 2009 by Tom

Warning, Ive just re-read this and it is a bit dull….but possibly important

I am currently designing something with and fpga (more soon) which has an architecture quite similar to the USRP motherboard. Whilst perusing the GNUradio repository, I came across the OpenBTS project, started by this chap, who is currently being sued by this chap. I found the case interesting because I am considering a career as freelance engineer (I believe the term consultant is often used here). I know relatively little about employment and licensing law, mainly because I am uninterested and found my law lectures very dull (I actually opted for that waste of time for once!). But I know that I don’t know and was happy to leave it at that.

In summary (I think) The Good guy David is developing a really cool cheap way of getting(possibly solar powered) GSM access into rural areas, particularly Africa . Using the USRP as a GSM/SIP gateway! He clearly knows his stuff. Is being sued by a previous user of his services, regarding alleged IP theft. It appears somewhat a case of sour grapes.

I ended up reading the whole 38 page response, I was really interested. Its crazy that someone can cause so much aggro and cost using the might of a “legal system” when the allegations(and frankly, apparently pathetic at that) are unproven and require great finances to simply match let alone defeat.

This lead me to think about how contracting of freelancers/consultant seems to be all about protecting the party purchasing services, rather than the party providing the service. This seems particularly true in the case of individuals.

In his blog David mentions going independent to avoid giving “someone else ownership of everything I do or think”. This lead me to wonder about having some sort of standard contract/document that is an accessory to freelancing situations that comes from the freelancers point of view. Providing some protection and ground rules. This hopefully might give security for the freelancer primarily and hence the other parties contracting them. By standardising this, it unifies the resources of many people in the same dilemma. Giving strength in numbers, a sort of communal open law resource.

This is a similar situation to discussions I have had recently regarding the legality of reverse engineering here in the UK. The current information suggests our quest borderline and the prescribed method is give it a go, see if you get sued. This is clearly unacceptable considering the potential pain/cost of going to court even if victorious. One can possibly employ a lawyer to decide if its legal, but they cost obscene amounts. This is something that many people would benefit from clarification and whilst I cannot afford one, there might be 99 other people prepared to stump up 1/100th of the cost.

So a shared law resource?? Useful? possible?

Ps, Please mentally insert appropriate mitigating words like “allegedly” anywhere I should have to avoid getting into trouble/annoying anyone.

PPS, go check out Kestrel and the openBTS situation, its cool and I wish them the very best with the case.

The Beatback Inspiration

January 23, 2009 by Tom

During my latter university years, I played in a six-piece funk/jazz group called the Beatbacks. We are effectively disbanded, that is unless we somehow get offered a gig. Sam the Bassist (hes the tall one wearing a beanie) just sent me this link. Quite a surprise, its a nice thought that the Beatback vibe carrys on. Hopefully if i ever visit Vancouver, I can go and see them play! Good luck to them.

Automated fish mangle

January 20, 2009 by Tom

How do people end up building these kind of things. More to the point how do I end up doing it?

I wonder what the debugging was like? DSP, windows, water, fish and compressed air…..?

Samsung SGH-E250 unlock

January 19, 2009 by Tom

I have regularly ranted about my dealing with telecoms providers. Well my phone is starting to show its signs of age – I have replaced every single part (literally) except that which is locked to a Network. So I dig through the filing system and found the Tupperware box containing all of my hatred for O2 and investigated getting a new phone. Meanwhile I came across a brand new Samsung SGH-E250 that was locked to the virgin network. After a little googling I discovered a slightly corroborated post about resetting it. Gave it a go and amazingly it worked! Quite a contrast to the Nokia experience I had previously.

In summary:
Power up phone with sim half inserted. I have subsequently investigated weather this makes a difference, I think the significant part is that the phone boots without the sim so doesn’t go to the dialogue wanting an unlock code but you insert the sim (when asked) so that after the reboot in the next step the sim is present and accepted for some reason.

  • Type *2767*3855# //the phone does an “E2P reset” Presumably this is EEPROM and allegedly “temporarily unlocked” after a reboot
  • Type *7465625*638*00000000*00000000# //The phone responds with “network lock personalised”
  • Type #7465625*638*00000000# //The phone responds with “network lock deactivated”
  • *#7465625# produces a menu in the user style that displays all the locks.

This worked well for me other people have reported Rodger their phones with it. As per usual no guarantees, don’t come complaining if badness occurs.

As an aside, the first time got on the O2 network, my settings came by text, I repeated the reset but they did not come again. Presumably the provider stores the imei of the phones it has sent them too so that you don’t get annoyed by them every time you switch phones(if you do it regularly). I quite often lend my phone to people to swap their sim into so that they can get numbers as my phone is unlocked. Does this mean that the network providers have a list of all the people have met and temporarily swapped handsets with?

Phone during reset

Phone during reset