Post Reply 
Important: ILPER for Linux -- bug fix
11-24-2016, 11:24 AM
Post: #1
Important: ILPER for Linux -- bug fix
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
Find all posts by this user
Quote this message in a reply
11-24-2016, 11:52 AM (This post was last modified: 11-24-2016 11:52 AM by cgh.)
Post: #2
RE: Important: ILPER for Linux -- bug fix
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
Find all posts by this user
Quote this message in a reply
11-24-2016, 03:28 PM
Post: #3
RE: Important: ILPER for Linux -- bug fix
(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.

--Bob Prosperi
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)