Custom Search

Category Archives: Linux

Ubuntu 10.04, 10.10, 11.04 The bane of my existence!!

6
Filed under Linux, OS, programing, software
Tagged as , , , , , , , ,

I have been an avid fan of ubuntu and I still am, but for newer hardware only. Recently I had to upgrade to 9.10 and then to 10.x. let start with my first issue in 9.10  and we will go from there. In 9.10 my sound and video would not play. this was caused by pulse audio and also not working together or something like that, personally i could not find the exact issue or cause, which made this issue very hard to fix…. but a fix was found….i will go over that in a min or two lol.

Next issue was the keyboard and mouse locking up on ubuntu 10.04 and higher, this is a big pain, because once they lock up, both the PS2 keyboard and mouse freeze, and so do the usb keyboard and mouse. This makes is very hard to find a fix since i may have 2 secs of the mouse moving or i might get 5 mins, either way it locks and i have to reboot, and thats not a guaranteed fix.

So lets start on how i fixed the 9.10, 10.04, 10.11 with an audio issue. The symptoms are choppy music play and then it cuts out, log file filled with “karmic pulseaudio [1653]: ratelimit.c: 2 events supressed” also video usually stops or wont play as well…… to Help most of you out, i have tried everything from recompiling the kernel, to installing from source, compiling pulse from source, changing alsa drivers, changing the scheduling, using every google fix there is……not even launchpad couldnt give me any info. There are bugs listed but no real fixes or workarounds…until now lol.  if you have applications that use pulseaudio ( im not sure what depends on it) this may not be a good workaround.

Fix:

Unistall Pulse Audio!!! (Thanks Kevix from the 43oh IRC room/forums!!) He stated that most programs still use alsa and dont need pulseaudio.

as soon as i did that, my sound worked as well as my video, even the system alerts could be heard!!

this worked for me, on my audiology and on board sound card…..I do not know the extent of pulse integration with ubuntu desktop so try at your own risk and feel free to let me know how it worked out for you. :)

on to my next issue Ubuntu 10.4-11.04 Keyboard and mouse do not work/ freeze after a few min.

This issue has been going on since i had tried 10.04 a little after the initial release, I haven’t tried nearly as much as i had worked on the other issue, but this one is inherently very hard to pinpoint for me. no log messages or errors, even on verbose…….tried combination of ps2 and usb with no luck at all.  I even tried reinstalling Dbus and Hal with no luck ….. and this is where i am stuck.

My choices are continue on working on the issue and be down a PC (this is my main PC used for everything) or find a distro that works with my older PC, both require a decent amount of work to get it all going, including all the programs i have compiled from source.

So any ideas ? any thoughts? another distro i could try? im willing to try almost anything to get my PC up and running so i can watch youtube on my tv!!

PC specs

P4 2 x cores with asus motherboard

ATI 9600/128mb

ram 1.2Gb

nothing too special lol

Leave some comments :)

-justin

MSP430 tools for linux

0
Filed under electronics, General, Hardware, Linux, OS, software

For your MSP430 launchpad to work on Linux you may have to do a little work, lol hopefully you expected this…..So lets get to it…..by the way i have Ubuntu 9.04 for my system, but that shouldn’t matter, except for dependencies may be different then mine.

First you will need a few things to get it all working, so gather your tools and programs and lets start…..

  1. launchpad with 430 value line chip
  2. http://mspgcc4.sourceforge.net/ you will need at leas the binaries, or you can build it yourself
  3. http://mspdebug.sourceforge.net/ this is the program that will let you program your msp430 launchpad and debug it if needed
  4. libusb dev files (usb headers for compilation)
  5. Readline dev files
  6. and texinfo dev files

after you have gathered all that you need you can start installing, you will most likely need the CLI to do most of the work, since we will be moving files into a root owned folder.

  1. First Build or install MSP430-gcc and other binaries for the tool chain http://mspgcc4.sourceforge.net/
  2. next install or copy the binaries /usr/ or usr/local ( i choose /usr/) I unpacked my archive inside my home folder and then CPd(copied) everything into /usr/ folder
  3. then check to see that they work, run msp430-gcc or msp430-gdb, it should just give the usage or start the program if all went well
  4. Now you want to install mspdebug, this program allows you to connect to the launchpad and reprogram the chip or debug it . It should be the simple make && make install on the source and it should go fairly quickly. if you have dependencies issues please consult the maintainer, I only listed the ones that i needed to download.
  5. after its done installing run it and test. to run it type “mspdebug rf2500″ and it should start up
  6. jsolarski@server-001:~$ sudo mspdebug rf2500
    [sudo] password for jsolarski:
    MSPDebug version 0.9 - debugging tool for MSP430 MCUs
    Copyright (C) 2009, 2010 Daniel Beer
    This is free software; see the source for copying conditions. There is NO
    warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


    Trying to open interface 1 on 005
    Initializing FET...
    FET protocol version is 30066536
    Configured for Spy-Bi-Wire
    Set Vcc: 3000 mV
    Device ID: 0xf201
    Device: MSP430F2013
    Code memory starts at 0xf800
    Available commands:
    = erase hexout mw read run sym
    cgraph gdb isearch opt regs set
    dis help md prog reset step
    Available options:
    color gdb_loop
    Type "help " for more information.
    Press Ctrl+D to quit.
    (mspdebug)

  7. now that it is connected its time to try and reprogram the flash, or play around with the registers.

Now that its hooked up and ready to go you can go ahead and play around with mspdebug, or connect it up with gdb to debug and reprogram as well, but im just going to go into mspdebug because i have not learned gdb as well as i should.

The main commands for mspdebugare

=        erase    hexout   mw       read     run      sym
cgraph   gdb      isearch  opt      regs     set
dis      help     md       prog     reset    step

the ones that i have used so far in my learning this program

  • dis <address>< length> — disassembles that block of memory dis 0xf800 2048
  • prog <file> program the target board “prog main.elf”
  • md <address><length in bit> read an address
  • regs    displays your registers for the board
  • erase   erases the flash memory of the board

There are plenty of other things you can do in mspdebug but that is beyond my knowledge at this point.

To reprogram the board just follow the simple instructions of  erase, prog. simple as that.

Personally the easiest way to reprogram it is use this archive, which has all the files needed to do a test reprogram …and its been edited so it can be compiled with mspgcc.

Demo program that works with GCC and mspdebug and msp tools

this is the same source code and make file found on This site. I have not modified it all i did was take the .tgz and package it up into a zip file so its an archive with in a zip file. this is the same program that’s on the 2231 chip that comes with the launchpad except a few changes to make it work with gcc.

At this point you should have a good starting point to work with this chip…just a little more research and i should be able to creating programs that do what i want them to do….

Hope this helps!!

MSP430 launchpad dev kit how too

Filed under electronics, Hardware, Linux, software

A few weeks ago I had purchased a few MSP430 Launchpad, originally from Mouser, but there wait times for shipment of the product wasn’t until mid AUG to SEP

and decided that was unacceptable for my terms of getting product and or waiting for parts…..very few times have i waited for more then a month for anything that I wanted, Sugru was different so I waited for it…..but back to the MSP430.

after searching around I found a company that sold it and was in stock, so i Decided to cancel my other orders and go with them, the company was Newark, and i was very happy with there customer service….very friendly and polite. but i have finally gotten it and was able to do a little testing but not much in the way of programming, I haven’t set up the software for it or the library’s. But i did get to solder on the 32KHz crystal that was sent with the board………to my surprise it was a SMD 1.4mm+-.1mm crystal, with the leads .5mm apart from each other. I saw this and wondered why TI hates us hobbyist. I was expecting a regular through hole crystal, like they showed in one of the videos but that’s not the case, so i will do my best to solder one on to the boards and connect all the headers. I chose the regular female headers, sorta like the arduino, and i left the other board blank so i could solder wires and add other interesting gizmos to it and also to have a board that relies on the internal oscillator. so back to the how too……. Installing the crystal is probably the hardest part of the whole kit, just because the crystal is so small and hard to handle, but if you do it smart you can solder this piece in no time flat. So lets begin with things you may need

  • Supplies
  • Launch pad
  • 32KHz crystal
  • soldering iron
  • solder
  • headers
  • Bright lamp
  • electrical tape or tape like substitute
  • odds and ends (lol)(tweezers or other tool for manipulation)

after getting your supplies ready its time to start plugging stuff in and getting things setup

Read More »

twitter script for linux

0
Filed under General, Hardware, Linux, software
Tagged as , , , ,

Well let me give you an interesting script i found on Tech Republic………..

Its how to Tweet from the command line using cURL, its very simple and to the point….just like a script should be
tweet.sh

#!/bin/sh
tweet="${@}"
user="username"
pass="sekret"
if [ $(echo "${tweet}" | wc -c) -gt 140 ]; then
echo "FATAL: The tweet is longer than 140 characters!"
exit 1
fi
curl -k -u ${user}:${pass} -d status="${tweet}" https://twitter.com/statuses/update.xml >/dev/null 2>&1
if [ "$?" == "0" ]; then
echo "Successful tweet!"
fi


to us it just type this
$ ~/bin/tweet "social server rules"
the only other thing to worry about is you have to escape “?”, “!” -> “\?”, “\!”

Lubuntu LDXE

2
Filed under Linux, OS
Tagged as ,

I was checking out Hackaday (one of my favorite sites)
and found this http://blog.lxde.org/?p=514
and looked it over, its pretty cool that they took a debian system and brought it down under 400MB, which is pretty amazing, but its still not small enough for me, so i will still be compiling my lfs system but i am going to try out this new distro, so look later for a quick review

update- I might have to wait till I get home, my proxy is telling me no route to host, may be due to Hackaday syndrom, I will try later