Showing posts with label debian. Show all posts
Showing posts with label debian. Show all posts

Tuesday, January 10, 2017

stable wifi on the shuttle xs36v with Debian

The Wifi connection of this machine is very slow, especially noticeable when logging in to the machine via ssh.
The solution is to follow the notes on https://wiki.debian.org/rtl819x , copied here:

Devices supported by this driver may suffer from intermittent connection loss. If so, it can be made more reliable by disabling power management via module options ipsand fwlps. These can be supplied by creating a new file:
/etc/modprobe.d/rtl8192ce.conf


  • options rtl8192ce ips=0 fwlps=0


Sunday, December 15, 2013

madparts release 1.2.1

This is mostly a bug-fix release, mainly fixing bugs to do with rotation of certain parts, especially in combination with KiCAD export.

Builds are available for Debian Jessie and Wheezy, Ubuntu Saucy, MacOSX and Win32.

Go download one of them at http://madparts.org/footprint.html#download !






Friday, November 29, 2013

using efm32 simplicitystudio under Linux

Intro


So I went to a workshop yesterday mostly about the Silabs/Energy Micro micro-controllers. The workshop was rather interesting, but the workshop was done with the tools in Windows 7. As I'm working almost exclusively under Linux since 1998, this was quite a painful experience for me. Especially USB device handling is so much smoother in Linux. But enough about my windows pain. The EFM32 micro-controllers are based around ARM Cortex and seem to be genuinely nice ICs with a bunch of special low-power features. I'm not going to list all those as this is not a marketing post, you can find enough information about that on the internet already.

I came back home with two very nice dev-boards, which is pretty cool in itself!

EFM32 ZERO GECKO running a nice Space Invaders clone demo
EFM32 WONDER GECKO running a light sense demo


Linux

When I arrived back home I started reading up a bit more about the ICs and one of the first things I found  in a vid on youtube is that the simplicity studio is also available for Linux and OSX.

Going to the silabs download website only gave a download for windows, but a quick google brought me to the Energy Micro forum where there is a beta download or simplicity studio for Linux and OSX available. After a few tricks it works smoothly in Linux, if only I had known that a day sooner ;)

Installation

What I did to get a working installation on on my x86-64 Debian Jessy laptop:
  • download the simplicity studio beta
  • unzip the zipfile somewhere
  • enter the studiow/ map
  • start the start-studio.sh shell script: ./start-studio.sh
This will provide you with an installer for the simplicity studio software. This installer will install all the needed software. When the software is installed you can start simplicity studio itself also with ./start-studio.sh.

In the simplicity studio main tool page press the add-remove button and use it to install everything. This will download all the examples, demos and app-notes.

Now while the main tool works, I quickly found out that most sub-tools didn't. It turned out that because simplicity studio is a 32-bit application and my system is 64-bit, I was missing some 32-bit libraries it needs, although I could imagine some people also missing some libraries on their 32-bit system.

A quick apt-get to the rescue:

sudo apt-get install libusb-0.1-4:i386 libqt4-svg:i386 

Depending on your system you may need to install some more missing libraries. This is rather easy to see as if you started simplicity studio from the command-line it will print out a missing library when you access a tool that is needing it.


Demos

The easiest way to play with the dev-kits is run some of the demos. Connect the board with the mini usb cable and press the Demos button in simplicity studio. Select a demo and press start. It will upload the demo and start the energyAware profiler program allowing you to real-time monitor the current consumption for that particular demo.


Compilers & Uploading

Demos are fun, but compiling your own code requires some more setup.

  • download and install the arm-gcc compiler from https://launchpad.net/gcc-arm-embedded
  • in simplicity studio press examples, select the dev-board you're using (EFM32WG_STK3800 for the wonder gecko, EFM32ZG_STK3200 for the zero gecko)
  • choose the blink example (or another one)
  • press open folder, this will open some gui explorer for your desktop environment
  • go to that directory in the shell, in my case it is /some/path/kits/EFM32WG_STK3800/examples/blink
  • enter the armgcc directory
  • there is a makefile there called Makefile.blink
  • open the file with an editor and a definition for your toolchain location to it, in my case I added
 LINUXCS := /some/path/gcc-arm-embedded/gcc-arm-none-eabi-4_7-2013q3

  • alternatively you could just export that LINUXCS to the environment
  • now do:
make -f Makefile.blink
  • it will now have made a file blink.bin in the exe/ subdirectory
  • you can upload this bin file with the tool called "energyAware commander", this should be easy
  • alternatively you can use energyAware commander to upload from the commandline:
./start-eACommander.sh --flash /some/path /kits/EFM32WG_STK3800/examples/blink/armgcc/exe/blink.bin

The same principle works for other examples and app-notes.

Some more pics

a closeup of the 128x128 sharp memory LCD display on the ZERO GECKO

ZERO GECKO running an analog clock demo


Cortex-M0+ closeup
Cortex-M4 closeup


Monday, August 19, 2013

madparts release 1.2

It's been a few months, but finally the new madparts 1.2 release is available!

Madparts is a functional electronics footprint editor with support for the Kicad and Eagle electronics Cad programs.

screenshot of madparts 1.2 running on linux/xmonad

Highlights


 KiCad support


Finally full support for importing and exporting footprints from/to KiCad is now available. madparts supports both the old .mod file format and the newer .pretty/.kicad_mod file format.

More shapes


1.2 adds support for arcs, partial circles, polygons and holes.

QtScriptEngine


Alex Schultz contributed javascript handling with QtScriptEngine instead of PyV8. This means there is one less dependency for the program making it easier to install, package and maintain. It is also faster! Thanks again Alex!

More documentation


Documentation is still sparse, but there is some more description of the supported features and code structures. Be sure to also have a look at my own private github repo of madparts footprints for more code examples.

Conclusion

If you want to give it a try, head to the website at http://madparts.org/ for more information and downloads. If you find issues or have questions, don't hesitate to email me.

The future

For madparts 1.3 a few changes are planned:
  • switch to SVG based graphics rendering to get rid of the dependency on modern openGL 2.1, making the program also usable on older computers
  • more documentation
  • better error handling

Friday, May 24, 2013

madparts release 1.1

A new release of the madparts functional electronics footprint editor is available.

Important changes are:

  • py2exe simple Windows installation: just unzip the zip file and execute madparts.exe
  • linux packages for madparts and pyv8 for Debian and Ubuntu i386 and x86_64
  • a ton of bug-fixes
  • various internal code cleanups
  • simple built-in command line interface for listing of libraries and import and export of footprints
For downloads, and more details head over to the madparts.org website. As always, don't hesitate to contact me with questions or feedback at joost@madparts.org or use the github bugtracker.

The next release will normally contain support for KiCad, but I first I need to learn working with it :)

madparts running on macosx

Wednesday, April 6, 2011

debian, grub2, booting the "other OS"

Recently my debian installation switched to grub2 and the boot menu no longer showed a working entry for booting my old XP partition.

The solution is simple:

sudo apt-get install os-prober
sudo update-grub

From now on grub2 will automatically detect and add to its menu all other OS partitions on your local disks.

Sunday, August 22, 2010

digicorder and recording subsequent programs

Digital television is getting the norm in Belgium, and typically people rent a "digicorder" from the TV provider. This allows you to watch television and also record programs for later consumption.

In practice my family only records a few programs and watch them later. It's very convenient not to be bound to a specific schedule. (On the other hand it would probably be cheaper to just buy the DVD boxes of the series we like instead of having television at all, but that is another discussion :) ).

In general, the digicorder works fine, I have one big gripe with it though: recording of subsequent programs.

Lets say we're recording subsequent programs A and B from channel 0. Let's assume there is some advertisement in between programs. This gives as timescale something like this:



Now, there are three ways the digicorder can record the program, not counting the completely faulty ways when timing goes all wrong.

Both programs want to record a time-slice before and after their program, but this goes wrong in the middle, and only one recording ends up with the middle part.

correct


The correct recording is with the break point in the middle like this:



I presume there are not some kind of markers in between the broad-casted programs on commercial television because it makes their advertisement store even worse.

Therefor, in practice you typically end up with one if these two:

B in recording 1







This is problematic because if you don't remember not to erase recording 1 after watching program A, the start of program 2 will be lost.

A in recording 2







This is even worse. Lets say you want to watch program B first.

You first have to open recording 1, fast forward all the way to the start of program B, start watching and after a few minutes switch to recording 2. This will also leave recording 1 marked as "watched" even though you didn't watch program A yet. More confusion!

A simple solution


In the end this is a simple technical problem with an even simpler solution: record the overlap in a separate file and make it part of both recordings. Visual:



If you watch recording 1, you get recording 1 + X. If you watch recording 2, you get X + recording 2.

If you erase recording 1, X stays. Only if both recording 1 and recording 2 are erased, X gets deleted.

More in general there will be X areas both in front and at the end, etc...

Would be nice if the biggest TV provider of Belgium could implement this. If the digicorder was open source I would've done this already months ago...
I guess I'll have to look into some kind of MythTV like setup one day.

Friday, February 12, 2010

Nokia N82 Bluetooth + GPRS/3G

A few months ago I did an interesting discovery about using my cellphone to go on the internet via bluetooth. I had this strange situation before where it just stopped working, and after revisiting all configs it worked again.

What really happens is that my cellphone somehow crashes, after which I power cycle it by removing the batteries. The phone then boots again, but here is the twist: the service channels in the phone are re-allocated and apparently in a random order!

This implies that the RFCOMM channel configured in the /etc/bluetooth/rfcomm.conf file is possible wrong now!

Solution: just browse the services again with sdptool browse, adapt the file and it should work again!

Saturday, May 30, 2009

how to set a serial port at MIDI speed in linux

Linux serial ports only work at standard speeds by default. MIDI runs at 31250 baud, which is not a standard speed. However there are tricks to get custom speeds, but documentation is quite fuzzy. This is a simple recipe that worked for me with an FT232 USB-Serial board.

Check the baud base of the device:

$ setserial -g -a /dev/ttyUSB0
/dev/ttyUSB0, Line 0, UART: unknown, Port: 0x0000, IRQ: 0
        Baud_base: 24000000, close_delay: 0, divisor: 0
        closing_wait: infinite
        Flags: spd_normal low_latency

As you can see the baud base is 24000000 here.
Next calculate the divisor by dividing the baud_base you see here by the speed you want.
In my case 24000000/31250=768.

Apply the new setting:

$ setserial -v /dev/ttyUSB0 spd_cust divisor 768

Next start your serial application, you might want to make sure it is already set to the correct speed before you do the above changes else it might destroy your settings. The correct speed is 38400 baud, which is now aliased to 31250.

With minicom just use the menu (CTRL-A Z) to change the settings.

Screen can be used like this:

screen /dev/ttyUSB0 38400

Exit screen by pressing CTRL-A CTRL-\

Sweet.

Tuesday, April 28, 2009

arduino toolkit on x86_64 linux Debian/Ubuntu

Update:

I received an email from Ethan Bisset with a much nicer solution: just use the debian provided serial library instead of the one provided with the arduino software.

This is his recipe:

1. Get arduino software
2. apt-get install sun-java6-bin binutils-avr avr-libc gcc-avr librxtx-java
3. Untar arduino software
4. Delete <arduino>/lib/librxtxSerial.so
5. Done!


(below is the old entry:)

Download the linux 32-bit arduino toolkit from the arduino toolkit download page and untar in a directory.

Install the avr tools: apt-get install avr-libc binutils-avr gcc-avr

Install "ia32-sun-java5-bin". ( apt-get install ia32-sun-java5-bin )

Adapt the "arduino" startup script script and replace java in it by

/usr/lib/jvm/ia32-java-1.5.0-sun/bin/java

Execute the "arduino" startup script. It works just fine now.

Thats all.

Many thanks to the Debian java packagers for providing this 32-bit compatibity jvm!

Sunday, March 1, 2009

glibc 2.9 - maradns

As Debian has been released my "unstable" box recently upgraded to glibc 2.9.
This caused DNS resolving to mysteriously fail in some applications.

Turns out that only IPv6 enabled applications suffer.

Apparently libc now fires both an IPv4 and IPv6 DNS resolving request in parallel. It looks like some DNS servers don't handle that correctly and answer an error on the IPv6 request before the IPv4 request even has time to resolve further in the internet.

In my case it was my local NSLU2 running Debian lenny causing the trouble, more specific the maradns local DNS server and DNS proxy running on it.

I manually upgraded maradns to the latest version (> 1.3.10) and things are "back" to normal.

Another solution is to disable IPv6 systemwide but I prefer not to do that as I use IPv6 occationally for testing.

I fear that this will cause more trouble for alot of people with routers doing DNS proxying.

Saturday, February 7, 2009

openMSX 0.7.0

A new version of openMSX has been released!

Important new feature is save-states. This gave me the means to finally finish the very first game I bought as a kid: Konami's Nemesis 2 for the MSX computer.

In these times games were usually hard. Nemesis 2 is even harder.  The only way to play it without save-states is not dying all 15 levels. Given that Nemesis 2 is a shooter this is VERY hard :)


nemesis2_stage_24_2.png



Each one of those red bullets and grey stones is fatal :)

But save-states wasn't enough. I also enabled "old-people" mode, meaning running the emulator at 75% speed of the original MSX computer.

After more then an hour of hard labour playing using alot of save-states I finally managed to finish the game.

Only 22 years late ;-)

P.S.: I checked with my MSX friends and no-one was able to finish this game without some form of cheating....

dell precision m6400 power brick

I'm really happy with my new Dell precision M6400.
The only thing most people complain about is the size of the power brick, and I can't agree more. It's a huge 200 Watt thing and it's really as large and heavy as a stone brick.

Luckily I still have a spare power brick of my old Dell precision M65: a 90 Watt  PA-10 family power brick. It has exactly the same voltage (19.5 Volt) so I decided to try it.
I've been using it now for a few days when at customer sites and it works fine.

(Try at your own risk!)

Monday, January 19, 2009

a month

Last year I even did it for longer then a month, but this year I want at least to redo a minimal effort, thus I'm going for a month of sobriety, as a kind of cleansing :) (and no, I'm not religious).

These are my 5 daily checkpoints:

  1.  smoothie for breakfast

    This is something which we (me and my wife) do already anyway, have a fresh fruit smoothie for breakfast. Currently our favorite mix is 4 blood oranges, freshly pealed and parted, a seep of  Sea-buckthorn elixir, and a couple of frozen strawberries (or cranberries). Mix all in the blender, long enough to don't have any parts left. It is extremely tasty, and gives a serious vitamin boost for the winter. The idea is to have it for breakfast and then don't drink or eat anything else for at least 1.5 hours, to make sure it's (almost) fully digested.

  2. < 4 coffee

    This is a hard one; people who know me will know I'm a serious coffee lover. I have a special espresso machine, and typically serve single origin or special blend coffees. It's hard to resist :)

  3. exercise

    Just a walk with the dogs already counts.

  4. no sugar

    This is usually not so hard for me, as I'm not into sweets anyway.

  5. no alcohol

    This is tougher. I'll have to stick to coffee, tea and fruit juices.
This is all as much a physical as a mental exercice :)


Saturday, November 29, 2008

Linux, Debian & Bluetooth

I was getting sick of all the wires on my desk, and I needed a new keyboard anyway,
so I bought a logitech bluetooth key and mouse (mx 5000). It's supposed to work just fine.

The keyboard comes with a bluetooth dongle, but it's rather silly not to use the bluetooth build in my laptop, so i never tried the dongle.

I was running linux-image-2.6.26-1-amd64 on my laptop and it had serieus issues with bluetooth. It was very hard to get the device to pair, it imvolved alot of manual probing/forcing.

This morning I upgraded kernel to 2.6.27.7 from kernel.org and it all started working flawlessly...

P.S.: might be fun to see if I can find a way to have it's LCD display work in Linux ;-)

Tuesday, November 25, 2008

first snow (meme)

Since everybody is posting pictures of the first snow of the year, I can't stay behind. Quickly popped out this morning to make this snap of my favorite habitat, the valley of the "Grote Nete":





(click on the image to enlarge)


nikon d300 • tamron 17-50 f/2.8 • © 2008 Joost Yervante Damad





Saturday, November 15, 2008

Intel® Matrix Storage: software raid?

It's still unclear to me if this is software raid or not.
It might depend on the chipset. My chipset is "Intel® ICH9M-E SATA AHCI/RAID controller hub" which seems to hint that it is hardware RAID.

Dear lazyweb, anyone know how to find if this is software or hardware raid?

Thursday, October 30, 2008

RC-Bugs / Debian Bug Sprint

The Debian Lenny release has still quite a big list of Release Critical bugs, and as Debian developer I feel that I should do my share, and at least look at the list of bugs and see if there's any I could do something for.

Almost always though, I find that I won't touch the remaining bugs in the list.because of one or more of these reasons:

  1. a package I really don't care about
  2. hugely complex package or might also use something obscure like cddb
  3. it seems like people are already looking into it
  4. it requires a political solution, not a technical one

As part of the effort to get Lenny released, Joss Mouette started the Debian Bug Sprint.
This is really a cool concept, and it is a shame not more people participated.

The reason for me it is cool is that it forced me to break the rules I mentioned above, because I got a bug which fitted 1 and 4 of my list above!

Turned out this bug is really a border case in interpretation of Debian policy.

The package is perfectly usable without any extern dependencies, hence it is currently in the main section of Debian. However it doesn't end there. The package also has a download script that can fetch firmware images for certain printers. It appears for people with these printers the package is NOT usable without external files.

Aparantly though, the current, as one person involved in the bug calls it, "spirit" of Debian is to tolerate this, as it is good enough that it is usable without external dependencies for SOME persons.

However the bug submitter doesn't agree, and thinks this is a case that needs addressing withing the Debian project.

I suggested splitting up the package and moving the download script to contrib, but this was mostly dismissed as idea.

The end result is that the maintainer decided to escalate the problem to the Debian CTTE.
This means it probable won't be solved by today, soo I will have to bake cookies for someone :)

Tuesday, October 28, 2008

getaddrinfo V4MAPPED

When writing an IPv6 enabled server, using the AI_V4MAPPED flag to get IPv4 addresses as IPv6 mapped addresses also somehow requires the AI_ALL flag or it doesn't work.

This conflicts the manual page and also the opengroup docs.

Update: the above is on Debian GNU/Linux sid with glibc 2.7-15.
Just tested it on opensolaris and they DO provide the correct behaviour. Time for a bugreport

Thursday, October 23, 2008

adobe flash 10 in debian unstable

Because I see a lot of very complex tutorials, I'd like to point out that it can be done much easier:

  1. add deb http://ftp.nl.debian.org/debian experimental main contrib to your /etc/apt/sources.list (replace nl by your favorite mirror)
  2. aptitude update
  3. aptitude -t experimental install flashplugin-nonfree
  4. done :)
That's all.