Jump to content

goofball

Members
  • Content Count

    5
  • Joined

  • Last visited

  1. goofball

    serial output on linux

    splutter. well, it's easy, i guess, if you're paying attention. but if you're like me, then, it's not, evidently. this code works well enough to read the accelerometer serial example. obviously, it's trivial.... the one gotcha that i saw was that this does nothing if the serial monitor in energia is also watching the output. so it may seem like it's not working. # include <stdio.h> #define LL 20 int main(void) { char card[LL]; int nlines=0; char *cgot; FILE *serial; serial = fopen( "/dev/ttyACM1","r" ); if( serial != NULL ) { printf("not null....\n"); while( nlines < 40 ) { cgot = fgets(card,LL,serial); if( cgot != NULL ) { printf("%s",card); nlines++; } } fclose(serial); } else printf("no worky that way\n"); return 0; } and, obviously, you need to change the "fopen" line if the port isn't ttyACM1. sigh. j.
  2. goofball

    serial output on linux

    sheesh. is my face red. okay, finally figured out what the magnifying glass in the upper right corner is for. though i'd tried it before and the window just sat there, this time i went to tools->port and tried all of the ports, and ... ta-da! there it was. i guess my next trick will be to try to read the serial line from a program on my "main" computer. sigh. j.
  3. goofball

    serial output on linux

    Linux ws.jgscrater.com 3.10.0-327.36.3.el7.x86_64 #1 SMP Mon Oct 24 16:09:20 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux MSP430f5529LP educational boosterpack mark 2 lsusb output: # w/ launchpad in Bus 001 Device 004: ID 0451:2046 Texas Instruments, Inc. TUSB2046 Hub Bus 001 Device 002: ID 0409:005a NEC Corp. HighSpeed Hub Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub # w/ launchpad in Bus 001 Device 005: ID 2047:0013 Texas Instruments Bus 001 Device 003: ID 046d:c31c Logitech, Inc. Keyboard K120 I've run several of the examples that appear under the "edu mark 2" list. The ones that do output to the serial port -- I never see. I was guessing that somehow the output would show up in a terminal window, but, no. Oh, I went to rpmforge and installed the epel....rpm, but yum -y install putty still does nothing -- no such rpm. I have no cu, no minicom, no... So, assuming I should see something, where do I find it? I did a search on linux serial and it seemed that the issues I found had to do with energia/uploading. I can upload the stuff, I see the blinking light, and energia windows say the upload completes. So I'm good there. (Examples to play the tunes work, and so on.) If this isn't the right place to post, tell me. I considered stuff under Energia but.... decided against it. Do I write a C program to just endlessly read /dev/ttyACM0 or whatever? Thx. j.
  4. goofball

    can't find DSLite?

    yup. that was it. yum -y install glibc.i686 modified the error it got, it complained about a specific library. locate libgcc_s.so.1 rpm -q --whatprovides /usr/lib64/libgcc_s.so.1 yum -y install libgcc.i686 and now it works. Thanks, Robert. FWIW it was using ttyACM0 as the [serial] port. j.
  5. goofball

    can't find DSLite?

    java.io.IOException: Cannot run program "/VOLUMES/gizmonics/work/msp430/energia-1.6.10E18/hardware/tools/DSLite/DebugServer/bin/DSLite": error=2, No such file or directory at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048) at java.lang.Runtime.exec(Runtime.java:620) at java.lang.Runtime.exec(Runtime.java:485) at processing.app.helpers.ProcessUtils.exec(ProcessUtils.java:11) at cc.arduino.packages.Uploader.executeUploadCommand(Uploader.java:130) at cc.arduino.packages.uploaders.SerialUploader.uploadUsingPreferences(SerialUploader.java:209) at cc.arduino.UploaderUtils.upload(UploaderUtils.java:78) at processing.app.Sketch.upload(Sketch.java:1187) at processing.app.Sketch.exportApplet(Sketch.java:1160) at processing.app.Sketch.exportApplet(Sketch.java:1132) at processing.app.Editor$DefaultExportHandler.run(Editor.java:2410) at java.lang.Thread.run(Thread.java:745) Caused by: java.io.IOException: error=2, No such file or directory at java.lang.UNIXProcess.forkAndExec(Native Method) at java.lang.UNIXProcess.<init>(UNIXProcess.java:248) at java.lang.ProcessImpl.start(ProcessImpl.java:134) at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029) ... 11 more An error occurred while uploading the sketch Heh. I expect this is a known/old problem but I failed when trying to google it. Trying to run blink. energia ver 1.6.10e18 /VOLUMES/gizmonics/work/msp430/energia-1.6.10E18 I get the above error when I try to upload. That file is there. mode 755, user,group=root and running energia as root. uname -a Linux ws.jgscrater.com 3.10.0-327.36.3.el7.x86_64 #1 SMP Mon Oct 24 16:09:20 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux My board was selected correctly by default. MSP420F5529LP, I've tried all three ports, ttyS0, ttyACM[01]. No joy. The sketch won't upload. (I get compilation warnings, which is kinda sad, but it seems to compile.) I did not find a serial port driver on the web page, so I guess I don't need it? or is that the issue? j.
×