Shop OBEX P1 Docs P2 Docs Learn Events
Check out my Linux port of JavelinDirect — Parallax Forums

Check out my Linux port of JavelinDirect

judejude Posts: 3
edited 2007-02-07 05:56 in General Discussion
avelin Folks,

I had some time between jobs, so I tried porting Parralax's JavelinDirect program to Linux, replacing the ComDrv32.pas source with a POSIX-compliant ComDrv32.cpp, so downloading to Javelin outside of Wine would be possible.

Currently, the download portion is not working. I suspect it has to do with my configuring the baud rate at 19200 instead of 28800, which doesn't seem to be available in Linux.

The source and some comments about how far I got is available at http://www.pwan.org/JavelinDirect/index.html

Let me know if you see anything that's wrong with the port configuration, or any other bugs I may have introduced with the port.

Sorry in advance if there's already a Linux port available, but I couldn't find it if there is one.

Thanks,

- jude

Comments

  • Peter VerkaikPeter Verkaik Posts: 3,956
    edited 2006-11-01 18:55
    This is great.
    You need to have the 28800 baud though.
    So if anyone knows how to set 28800 baud under linux, let us know.

    regards peter
  • para6654para6654 Posts: 30
    edited 2006-11-04 16:57
    I couldnt open the .tar file on your site.· Any ideas?·· I get an error from Winzip that says "Error reading header after processing 0 entries."

    Post Edited (para6654) : 11/4/2006 5:01:12 PM GMT
  • judejude Posts: 3
    edited 2006-11-05 16:39
    I got the same error when I tried to open with WinZip directly.
    However, if I saved the file to disk first, and then opened with WinZip, it worked OK.
    I was using an evaluation copy of WinZip version 10.0
  • para6654para6654 Posts: 30
    edited 2006-11-05 22:59
    I was able to copy it to CygWin drive and use tar to extract it.· Thanks.·
  • judejude Posts: 3
    edited 2006-11-06 00:02
    I was able to poke around with this a little more, but still without any success.

    I tried to force the port to 28800 using the command 'setserial /dev/ttyS0 spd_cust baud_base 28800 divisor 1'.
    I also tried using a base baud rate of 115200 and a divisor of 4, but without any luck.

    I was basing this on section 14.3 of the Linux Modem HOWTO
    (http://www.linux.com/howtos/Modem-HOWTO-14.shtml)

    I also tried using stty, but for some reason I can't set the baud rate past 19200 with stty.

    My setserial / stty output is below, if anyone's interested.

    Thanks,

    - jude


    pwan /home/pwan/ >stty -F /dev/ttyS0 -a
    speed 19200 baud; rows 0; columns 0; line = 0;
    intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = <undef>; eol2 = <undef>;
    swtch = <undef>; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R; werase = ^W; lnext = ^V;
    flush = ^O; min = 0; time = 10;
    -parenb -parodd cs8 hupcl -cstopb cread clocal -crtscts
    ignbrk -brkint ignpar -parmrk -inpck -istrip -inlcr -igncr -icrnl -ixon -ixoff -iuclc -ixany
    -imaxbel -iutf8
    -opost -olcuc -ocrnl -onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0
    -isig -icanon -iexten -echo -echoe -echok -echonl -noflsh -xcase -tostop -echoprt -echoctl
    -echoke

    pwan /home/pwan/ >setserial /dev/ttyS0 -G -a
    /dev/ttyS0, Line 0, UART: 16550A, Port: 0x03f8, IRQ: 4
    Baud_base: 28800, close_delay: 50, divisor: 1
    closing_wait: none
    Flags: spd_cust skip_test callout_noh

    pwan /home/pwan/ >stty -F /dev/ttyS0 38400
    stty: /dev/ttyS0: unable to perform all requested operations
  • Peter VerkaikPeter Verkaik Posts: 3,956
    edited 2006-11-06 00:04
    This package should allow you to add 28800 baud
    http://sourceforge.net/projects/serial/
    It is a standalone package for 8250/16550 compatible chips.

    regards peter
    ·
  • aprunickiaprunicki Posts: 44
    edited 2006-12-18 17:07
    Has anyone had any luck getting the 28800 to work on Linux?

    If not, I'd be glad to help as I have made a good deal of progress
    communicating with the Javelin using a Java port of JavelinDirect
    on Linux.
  • Peter VerkaikPeter Verkaik Posts: 3,956
    edited 2006-12-18 18:30
    If you have a working port of JavelinDirect,
    please post it.

    regards peter
  • aprunickiaprunicki Posts: 44
    edited 2006-12-30 16:24
    I intend to post it soon (probably to sourceforge).

    I actually just performed my first successful upload to a javelin last night.

    - Andrew
  • DorlingDorling Posts: 32
    edited 2007-01-25 11:16
    any news on this Andrew?

    Thanks

    Jonathan
  • aprunickiaprunicki Posts: 44
    edited 2007-02-07 05:56
    Dorling,

    I have just published release 0.1.0-RC1 of JavelinTools for Linux. Check out: http://forums.parallax.com/forums/default.aspx?f=8&m=170317 for details.

    - Andrew
Sign In or Register to comment.