Shop OBEX P1 Docs P2 Docs Learn Events
download in PropellerIDE fails in Ubuntu Linux (first-timer) — Parallax Forums

download in PropellerIDE fails in Ubuntu Linux (first-timer)

rikkirikki Posts: 53
edited 2016-06-04 16:13 in General Discussion
I've just attempted my first power-up and download using a Spinerette.

With PropellerIDE open and the Prop Plug connected, the terminal-related icons came alive
(Download, Write, Memory Map, and Terminal), no longer greyed-out.

An attempt to download results in the Download window popping open for a few seconds.
The message "Download Failed!" is displayed.

I would suspect first a problem with my PC seeing the Prop Plug, except the icons appearing in Propeller Tool leads me to believe that the PC does communicate OK. If I unplug the USB connector from the Prop Plug the icons go back to greyed-out.
I realize that this only confirms that the PC is communicating with the Prop Plug itself..


Can anyone offer troubleshooting tips or point me to any help-files or description of the procedures I need?

Thanks very much for your time to help a clueless beginner!

Comments

  • ElectrodudeElectrodude Posts: 1,657
    edited 2016-06-04 16:13
    Are you using Propeller Tool under Wine, or are you using PropellerIDE, which has a native Linux version?

    If you're using Wine, you need to set up your serial ports properly.

    However, you should probably just use PropellerIDE, since it has a native Linux version.
  • rikkirikki Posts: 53
    edited 2016-06-04 16:13
    I'm using the PropellerIDE directly in Linux (not in Wine).
    Now I'm confused.

    Bear with me please.. I'm not certain.
    That is, I was originally attempting to install SimpleIDE.
    Several days passed as I was interrupted with a family emergency during this time, and I lost track here.

    Under the ABOUT menu it reads PropellerIDE ver 0.33.3

    Thanks for straightening me out there, I'll revise my thread title for the benefit of others.

  • Possibly a clue..

    Occasionally (not always) when I select BUILD or DOWNLOAD, an error displays to inform that "Cannot start usr/bin/openspin"

    If I restart PropellerIDE the build reports success.

  • Propeller Tool is the windows-only IDE. You said you were using Propeller Tool and not PropellerIDE (they're different), so I was afraid you were unaware of PropellerIDE and were trying to use Propeller Tool under Wine.
    rikki wrote: »
    Possibly a clue..

    Occasionally (not always) when I select BUILD or DOWNLOAD, an error displays to inform that "Cannot start usr/bin/openspin"

    If I restart PropellerIDE the build reports success.

    Open up a terminal and run
    which openspin
    
    Does it print out a path, or does it say something like "which: no openspin in ( <lots of paths> )"?

    On my computer, it prints out:
    /opt/parallax/bin/openspin
    


    If it does print something out, then open up PropellerIDE and go to Edit -> Preferences -> Languages. The path under "Compiler" should match the output of "which openspin".
  • rikkirikki Posts: 53
    edited 2016-06-04 16:30
    openspin is present, and has the required permissions it seems.

    the which utility returns a path (/usr/bin/openspin)

    Also present in /usr/bin are propman and propterm.
    What are these?
  • sorry. missed that final line.

    MENU > Preferences > Compiler is set to the correct path (I used Browse previously to ensure it was set to the required to the correct path).

    Thanks very much for your attention here.
  • Closing PropellerIDE and re-starting it, the error message goes away and BUILD reports compilation OK, but DOWNLOAD continues to fail.
  • propman downloads programs to the Propeller, and propterm is a serial terminal program.

    What kind of error does the download fail with?

    Please run propelleride from inside a terminal, have it try to download a program, and then post what it prints to its terminal here.
  • propman downloads programs to the Propeller, and propterm is a serial terminal program.

    What kind of error does the download fail with?

    Please run propelleride from inside a terminal, have it try to download a program, and then post what it prints to its terminal here.

    Thanks very much..
    I'll be interrupted a while here.
    I expect to try your suggestion in an hour or so.

    I appreciate your guidance.
  • Following your instructions Electrodude, this was returned to the terminal:


    bool QSerialPort::setBaudRate(qin32, Qserial::Directions):device not open [PropellerManager] ttyUSB0: ERROR: Device not open

    Being only a little more knowledgeable in Linux than I am with the Propeller, I can guess this means that the USB port is not active?

  • Run these two commands and tell me what they output:
    stat /dev/ttyUSB0
    
    groups
    
  • rikkirikki Posts: 53
    edited 2016-06-04 21:05
    Sir, thanks for your continued attention!
    (I believe I'm about to learn a little more about Linux, in addition to the PropTool.... excellent!)

    stat /dev/ttyUSB0 returns:

    File: ‘/dev/ttyUSB0’
    Size: 0 Blocks: 0 IO Block: 4096 character special file

    Device: 6h/6d Inode: 35006 Links: 1 Device type: bc,0
    Access: (0660/crw-rw----) Uid: ( 0/ root) Gid: ( 20/ dialout)
    Access: 2016-06-04 14:14:44.260591599 -0400

    Modify: 2016-06-04 14:14:44.260591599 -0400
    Change: 2016-06-04 14:14:44.260591599 -0400
    Birth: -


    groups returns:

    rick adm cdrom sudo dip plugdev netdev lpadmin sambashare


    I'm guessing this is about permissions, yes?
  • rikkirikki Posts: 53
    edited 2016-06-04 21:07

    <dumb comment>
    I don't believe that my USB port is USB0..
    I have 5 USB ports total.
    </dumb comment>

    I'm looking into it now..
    thanks again.
  • lsusb reports:

    Bus 002 Device 003: ID 046d:c52b Logitech, Inc. Unifying Receiver
    Bus 002 Device 004: ID 0403:6001 Future Technology Devices International, Ltd FT232 Serial (UART) IC
    Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
    Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
    Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

    I believe it's Bus 002 Device 004: ID 0403:6001 Future Technology Devices International, Ltd
  • rikkirikki Posts: 53
    edited 2016-06-04 21:06
    I ran off the rails a little there, yeah?
    The error returned by Propman specified /dev/ttyUSB0, as per your point above.

    dmesg reveals it to be:

    [11129.467491] usb 2-1.1: FTDI USB Serial Device converter now attached to ttyUSB0


  • It appears I have it working Electrodude.
    With much thanks for you guidance.
  • ElectrodudeElectrodude Posts: 1,657
    edited 2016-06-04 22:19
    You're welcome! How did you fix it? Did you just add yourself to group dialout, or what?

    I was about to say that the problem was that you didn't have permissions to it, since only root and dialout had read and write permission to /dev/ttyUSB0 and you weren't in group dialout, and that you should fix it by adding yourself to group dialout: (I'm guessing your username is rick, since you're in group rick)
    sudo gpasswd -a rick dialout
    
    Then, you'd just log out and log back in again, and it would hopefully work.


    On most Linuxes (I think it's changeable, but nobody does it), the number in ttyUSB0 has nothing to do with which physical port you plug it into. It has to do with when you plug it in. If you have no USB-serial converters plugged in and then you plug one in, it gets named ttyUSB0. If you plug in another one without unplugging ttyUSB0 first, the second one gets named ttyUSB1. But, when in doubt, check dmesg. On my computer, I always have my system log, which includes the kernel log, displayed on virtual terminal 12 for easy access.
  • You're welcome! How did you fix it? Did you just add yourself to group dialout, or what?

    I was about to say that the problem was that you didn't have permissions to it, since only root and dialout had read and write permission to /dev/ttyUSB0 and you weren't in group dialout, and that you should fix it by adding yourself to group dialout: (I'm guessing your username is rick, since you're in group rick)
    sudo gpasswd -a rick dialout
    
    Then, you'd just log out and log back in again, and it would hopefully work.


    On most Linuxes (I think it's changeable, but nobody does it), the number in ttyUSB0 has nothing to do with which physical port you plug it into. It has to do with when you plug it in. If you have no USB-serial converters plugged in and then you plug one in, it gets named ttyUSB0. If you plug in another one without unplugging ttyUSB0 first, the second one gets named ttyUSB1. But, when in doubt, check dmesg. On my computer, I always have my system log, which includes the kernel log, displayed on virtual terminal 12 for easy access.


    Sir, I did just that, added myself to the group dialout.

    I cannot thank you enough. You not only found the solution, you did so in a way that pushed me into learning more about the fundamentals of Linux, these particular specifics (permissions and serial-port configuration) being also something I badly needed.

    Because of present personal circumstances, had you not stepped up to help when you did I probably would have been forced to lay the Prop aside for a while.
    Now I can continue to make progress.

    Thanks again, be well and stay safe!
  • evanhevanh Posts: 15,916
    Yes, thank you. The maze of shell commands has me swamped most of the time.
Sign In or Register to comment.