SRA Lab Open Source Code

9Oct/110

Feedback on GNOME 3.0

After 5 months with GNOME 3.0, I'm really happy with the experience. At the end of work day,
my mind is no more exhausted of windows placement fighting and application finding.

GNOME 3.0 is really stable, except with the Open Source driver on my Radeon 5870 (4 crashes in 2 months).

I really like the behavior of dual-head where the secondary screen has only one virtual screen.
For me, there are just 3 annoying points:

  • Ctrl + Del to remove a file in Nautilus, may be it's a Fedora settings but this change is just @!# I've already a Trash to undo my mistakes (http://www.khattam.info/howto-enable-delete-key-in-nautilus-3-fedora-15-2011-06-01.html)
  • Alt key to shutdown, no I don't want to waste energy for days and my PC boots quickly.
  • only vertical virtual screens, I found a bit painful to move down two screens when the screen is reachable with one move with a 2x2 layout but I understand this layout doesn't fit well with the GNOME 3 design.

To have a good experience with GNOME 3, I use:

  • Windows key + type to launch everything
  • Ctrl + Shift + Alt + arrows to move the application between the virtual screen
  • Ctrl + click in the launcher when I really want a new instance (the default behavior is perfect)
  • snap à la Windows 7 is great
  • Alt + Tab then the arrow keys to select an app

Don't forget to read https://live.gnome.org/GnomeShell/CheatSheet or the Help (System key + 'Help').

It's not specific to GNOME 3 but you can change the volume when your mouse is over the applet (don't click, think hover) and a mouse scroll.
With GTK+, do you know you can reach the end of scrolled area with a left click on the arrow and a specific position by middle click?

I'm impressed by the new features of GNOME 3.2 and I'm waiting for Fedora 17 to enjoy it!

29Jul/110

Tip for python-mode with Emacs

If you expect 'Alt + d' wil only remove the first part 'foo_' of 'foo_bar' with the great python-mode, you can make this change to python-mode.el:

- (modify-syntax-entry ?\_ "w" py-mode-syntax-table)
+ (modify-syntax-entry ?\_ "_" py-mode-syntax-table)

Thank you Ivan.

Update with python-mode v6.0.4, add this line to python-mode-syntax-table (line 153):

(modify-syntax-entry ?\_ "_" table)

22Jul/110

v3.0.1 to avoid ".0" problems

A dot zero isn't a dot zero without few problems, so I've released libmodbus v3.0.1 to fix problems with non-recent Linux kernels and other platforms.

libmodbus 3.0.1 (2011-07-18)

  • Avoid useless serial_mode integer when TIOCSRS485 isn't supported
  • Fix compilation failure on Windows (RS485 support) by Tobias Doerffel
  • Properly check TIOCSRS485 define by Matthijs Kool
  • Rename package to libmodbus5 to fix lintian warning
12Jul/110

Magic libmodbus 3.0.0 is out

OK, the new stable release of libmodbus is finally out! Only 2 years after libmodbus v2.0.3 and 400 commits, I'm happy to release this new version which contains many changes to improve the API and enhance the Modbus protocol conformity. The major features of this release are:

  • more coherent and extended API
  • POSIX error return codes
  • full documentation of the API
  • IPv6 support
  • new backend design
  • support for Windows, MacOS X and FreeBSD
  • rewriting of the message reading to avoid timeout
  • native serial communication on Windows

Thanks to the many contributors

Tobias Doerffel, Florian octo Forster, Hannu Vuolasaho, Patsy Kaye, Ivo De Decker,
Allan Cornet, Manfred Gruber, Jason Oster, Petr Parýzek, Antti Manninen, Barry Grumbine,
Kirill Smelkov, Anibal Limón, David Olivari, Sisyph, aladdinwu, Jeff Laughlin, Yishin Li , Henrik Munktell, Paul Fertser, Norbert Koch and Stéphane Raimbault.

The development continues for the next v3.1 release with this roadmap.

Have fun!

27Apr/110

Not compliant device can be time consuming!

Travis Atkinson of Com-Pac Filtration and me have worked together to find out why the HMI of Weintek Labs I-Series, with Ethernet, answered only to request sent by the modpoll program (proprietary software).

After many emails and the help of Wireshark, we have discovered modpoll uses the unit identifier as slave ID for TCP requests, according to the Modbus specs that's incorrect (cf page 23 of Modbus Messaging Implementation Guide v1.0b) but else the device drops the request! Two problems can sometimes lead to proper operation or Weintek company has designed this product on modpoll requests :-/

PS: The workaround was to set the slave ID with modbus_set_slave()

18Apr/110

La DjangoCong 2011 est terminée

Grâce à Makina Corpus, j'ai pu assister à nouveau à la DjangoCong. C'est une occasion idéale pour retrouver l'équipe des Djangonautes de Makina au grand complet ;)

La nouvelle organisation du WE mettait l'accent sur la participation avec des mini-confs très courtes le matin (12 mn) et des ateliers à la barcamp, et encore une fois les organisateurs ont été irréprochables, bravo ! C'est un plaisir de retrouver des têtes connues et de rencontrer de nouveaux venus pleins de bonnes idées. Les entreprises étaient plus impliquées cette année (merci les sponsors) et l'écosystème autour de Django semble en bonne voie avec des produits tels Django SHOP et Django CMS,

Nous quittons Marseille avec quelques outils à utiliser au plus vite et de bonnes idées:

DjangoCong est la conférence Django francophone à suivre !

Quelques photos http://www.flickr.com/photos/vineolia/sets/72157626398900439/

14Apr/110

libmodbus for Arduino (almost!)

The libmodbus project is a real success on many platforms and to conquer the world, I've written a version dedicated to Arduino devices. My goals are:

  • to talk with a standard Arduino UNO or Duemilanove via the integrated USB
    serial line (8N1)
  • to have the lowest footprint (binary sketch size and SRAM)
  • to be robust

OK, you're right, other projects exist already:

  • Master/slave by jpmzometa and others is great but the reading in loop doesn't handle serial latency and the code contains too many arrays IMHO
  • ModbusMaster is a master and I want a slave.
  • Arduino-Modbus, the code is, eh, ugly!
  • modbusmq by Mario Di Bacco is based on libmodbus but it aims Modbus TCP.

So I've extracted/adapted only the slave, RTU, reading/writing registers of libmodbus. To reduce the footprint even further, I've replaced the fast CRC code based on precomputed arrays (512 bytes) by a slow one (not so slow!). The result is clean library for Arduino able to handle exceptions if an error occurs.

The binary sketch size is 2,450 bytes and around 1,830 bytes of memory still free when running on 2K SRAM model.

The source code is available on github and have the project is referenced in the arduino.cc playground wiki.

6Apr/110

New IRC channel

I've just registered #libmodbus channel on Freenode, so let's talk!

25Mar/110

The libmodbus documentation has landed

You've been numerous to ask for documentation and the work of gass with GTK-doc help me to prioritize it, so this month I've finally tackled this problem but not as expected!

At first, I loved the GTK-doc solution, I'm a GNOME lover after all, but GTK-doc can't generate man pages and the setup code is too cumbersome IMHO. To choose the best solution for libmodbus, I read a comparison matrix on Wikipedia, after some tests with GTK-doc, Doxygen and AsciiDoc, and I finally choose AsciiDoc.

However, there is a major difference between AsciiDoc and the other envisaged solutions, the documentation isn't included in the source code. I used to think it was good idea to keep the both at the same place to keep them in sync but:

  • it doesn't prevent you to code without updating the documentation
  • the documentation must be escaped by the language comment tags
  • I don't want to abuse my wheel mouse (to skip documentation) when I code

The 0MQ project, endless source of inspiration, was a very good starting point to learn some tricks with AsciiDoc.

Now, I'm looking for help to review and extend the documentation which has just landed in git (make doc to generate man pages). I've generated the documentation in HTML for the web site.

28Jan/110

Les premières images d’Android 3.0 me rappellent quelque chose

Le site Ars Technica nous offre ce matin un avant goût du futur Android 3.0.
Peut être est-ce un hasard mais l'interface et le thème me font penser à GNOME Shell. Si GNOME Shell devient une source d'inspiration en design, c'est un vrai succès dans un domaine inhabituel à l'Open Source.

http://static.arstechnica.com/honeycombscreens/thumb-screenshot7.png
http://static.arstechnica.com/honeycombscreens/thumb-screenshot10.png

Cerise sur le gâteau, quand Fred écrit un courriel, Ars Technica en fait un article (ou presque, en fait juste une capture, un bout, l'entête) !
Fred est partout