HP Forums

Full Version: Important: ILPER for Linux -- bug fix
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,

I've been trying to get the PILBox to work with OpenBSD and found out that it does not work.
The reason is twofold, on one hand Christophe Gottheimer's Linux port only supports 9600 bps, while the new PILBox firmware no longer supports the slow speed.

So I looked at the code and found out that it has a very straightforward bug, in that it does not set the serial speed correctly.

Here is the trivial change in the source code that makes it work @ 115200 bps:

% diff ilmain.c ilmain-orig.c
583,584c583
< tp.c_cflag = CS8 | CREAD;
< tp.c_ispeed = tp.c_ospeed = B115200;
---
> tp.c_cflag = B9600 | CS8 | CREAD;


I am so happy that it works now, since I kinda like *nix systems better.

Also the code compiles out of the box on OpenBSD (you only need to use gmake instead of make). Good work!

BTW Christophe has posted ILPER for Linux on github, so its better to get future versions from there, because they are likely to be up-to-date.

**vp
Hello,

Thank you to Vassilis to provide this patch and using ilper on OpenBSD Smile

I will submit a final patch on my github in the coming days, with a possibility to choose between 9600 bps and 115200 bps (If I remember, my PIL-Box does not work very well at 115200 bps...).

Christophe
(11-24-2016 11:52 AM)cgh Wrote: [ -> ]Hello,

Thank you to Vassilis to provide this patch and using ilper on OpenBSD Smile

I will submit a final patch on my github in the coming days, with a possibility to choose between 9600 bps and 115200 bps (If I remember, my PIL-Box does not work very well at 115200 bps...).

Christophe

Christophe - FYI, the latest PIL-Box firmware (v2) also operates at 230kbps, so while making the patch, you may as well cover this speed as well, to cover all cases.
Reference URL's