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.
Saturday, May 30, 2009
Saturday, May 9, 2009
Tuesday, April 28, 2009
usb tiny isp programmer / user accessible
To make an usbtiny programmer usable directly as user from avrdude or the arduino toolkit, add the following line to a new file in /etc/udev/ :
I created a file called /etc/udev/joost.rules with this line.
Reload udev with
ATTRS{idVendor}=="1781", ATTRS{idProduct}=="0c9f", MODE="0664", GROUP="plugdev"
I created a file called /etc/udev/joost.rules with this line.
Reload udev with
/etc/init.d/udev reload
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.
(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!
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!
Friday, April 3, 2009
De Post - volmachten
Blijkbaar heeft De Post een nieuwe melkkoe gevonden: de kleine zelfstandige.
Vandaag stond de postbode aan mijn deur met aan pakketje voor de firma. Hij vertelde me doodleuk dat het niet mag afgeven worden, want ik moet hiervoor een volmacht hebben.
Deze volmacht kun je gaan halen op de post en kost elk jaar geld.
De postbode gaf zelf toe dat dit puur geldklopperij is.
Je bent dus gewaarschuwd: zorg dat verzendingen met de post als geadresseerde je privé gegevens bevatten en niet je firmanaam. Of werk met een andere firma dan De Post.
Ikzelf hang er nu al aan voor dit jaar.
Gelukkig is het zalig weer :)
Vandaag stond de postbode aan mijn deur met aan pakketje voor de firma. Hij vertelde me doodleuk dat het niet mag afgeven worden, want ik moet hiervoor een volmacht hebben.
Deze volmacht kun je gaan halen op de post en kost elk jaar geld.
De postbode gaf zelf toe dat dit puur geldklopperij is.
Je bent dus gewaarschuwd: zorg dat verzendingen met de post als geadresseerde je privé gegevens bevatten en niet je firmanaam. Of werk met een andere firma dan De Post.
Ikzelf hang er nu al aan voor dit jaar.
Gelukkig is het zalig weer :)
Monday, March 30, 2009
Wednesday, March 25, 2009
Subscribe to:
Posts (Atom)