Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Intermittent "'Unknown error' (error 9)" and "Download timed out" - 0.38.5 on Raspberry Pi 3, Raspbian Jessie #6

Open
Gadgetoid opened this issue Aug 23, 2016 · 14 comments

Comments

@Gadgetoid
Copy link
Contributor

Looks like we're back to the old chestnut of a misbehaving propman on the Raspberry Pi.

It's successfully uploading sometimes, but also periodically throwing an error:

$ sudo propman test.binary
pm.loader: [ttyAMA0] Preparing image...
pm.loader: [ttyAMA0] Downloading to RAM...
pm.loader: [ttyAMA0] ERROR; 'Unknown error' (error 9)
pm.loader: [ttyAMA0] ERROR: Download timed out

This is on the Raspberry Pi 3, with bluetooth disabled for a stable serial port.

Additionally, if I don't run it as root then it simply spams:

pm.device: Failed to open device: "ttyAMA0"
pm.device: Failed to open device: "ttyAMA0"
pm.device: Failed to open device: "ttyAMA0"
pm.device: Failed to open device: "ttyAMA0"
pm.device: Failed to open device: "ttyAMA0"
pm.loader: [ttyAMA0] ERROR: Device not open

It shouldn't need root permissions to open a serial port? My user is in the relevant groups, and I've got several different apps/libraries that can access it perfectly fine.

@bweir
Copy link
Collaborator

bweir commented Aug 23, 2016

Aye, these AMA devices don't work the same as regular serial devices... if
QSerialPort is reporting Unknown Error, that means not even the library
developers know anything about it. >.< What version of Qt are you using?

Unfortunately it's going to be awhile before I really have a chance to look
at it again. It's do or die with LameStation right now and getting the
kickstarter off the ground, so I don't have time (or funds) for much else.

This might be something you're better off diving into yourself as you have
a lot more experience dealing with the Pi. If you can find a solution, I'd
be happy to take a look at it.

On Aug 23, 2016 2:17 AM, "Philip Howard" [email protected] wrote:

Looks like we're back to the old chestnut of a misbehaving propman on the
Raspberry Pi.

It's successfully uploading sometimes, but also periodically throwing an
error:

$ sudo propman test.binary
pm.loader: [ttyAMA0] Preparing image...
pm.loader: [ttyAMA0] Downloading to RAM...
pm.loader: [ttyAMA0] ERROR; 'Unknown error' (error 9)
pm.loader: [ttyAMA0] ERROR: Download timed out

This is on the Raspberry Pi 3, with bluetooth disabled for a stable serial
port.

Additionally, if I don't run it as root then it simply spams:

pm.device: Failed to open device: "ttyAMA0"
pm.device: Failed to open device: "ttyAMA0"
pm.device: Failed to open device: "ttyAMA0"
pm.device: Failed to open device: "ttyAMA0"
pm.device: Failed to open device: "ttyAMA0"
pm.loader: [ttyAMA0] ERROR: Device not open

It shouldn't need root permissions to open a serial port? My user is in
the relevant groups, and I've got several different apps/libraries that can
access it perfectly fine.


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#6, or mute the
thread
https://github.com/notifications/unsubscribe-auth/AJEcGNzjNFTkkb7PAvb7EQsPt5e07HBTks5qirq6gaJpZM4Jqtr4
.

@Gadgetoid
Copy link
Contributor Author

I'd figured as much. I'll see if I can find the time to dig into it. This is built against Qt 5.3.2.

@bweir
Copy link
Collaborator

bweir commented Aug 23, 2016

An easy thing to try would be building the IDE again Qt 5.7 on the off
chance that whatever was wrong has been fixed by now. >.~

On Aug 23, 2016 2:32 AM, "Philip Howard" [email protected] wrote:

I'd figured as much. I'll see if I can find the time to dig into it. This
is built against Qt 5.3.2.


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#6 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AJEcGDdXiPBf1jba-Bzp6_bhrB_T0iEuks5qir4TgaJpZM4Jqtr4
.

@RogueM
Copy link

RogueM commented Aug 24, 2016

I built the IDE against Qt 5.3.2 in Jessie (clean image) on a Pi3 and propman is as solid as 0.36.7 was here. I have the pi3-disable-bt overlay loaded obviously.

... I also don't have to run with elevated privileges so I'm not sure why the discrepancy in behaviour between our 2 installs @Gadgetoid. Could it be that you use the pi3-miniuart-bt overlay instead?

On a sidenote, I was looking for the PackThing wiki but the links I found where broken.

@RogueM
Copy link

RogueM commented Aug 24, 2016

err, that was using the dev source code, not the 0.38.5... I can try the later in case that was a freak snapshot in time?

@RogueM
Copy link

RogueM commented Aug 24, 2016

I just built and tested after checking out the 0.38.5 tag and no issues either. I guess it might be worth exchanging our test binaries and see if their size might be the difference between success and failure.

@RogueM
Copy link

RogueM commented Aug 24, 2016

also @bweir it seems that PackThing 1.0.0 on pypi is broken:

Downloading/unpacking packthing
  Downloading packthing-1.0.0.tar.gz
  Running setup.py (path:/tmp/pip-build-GGW2_X/packthing/setup.py) egg_info for package packthing
    Traceback (most recent call last):
      File "<string>", line 17, in <module>
      File "/tmp/pip-build-GGW2_X/packthing/setup.py", line 3, in <module>
        with open('README.md') as f:
    **IOError: [Errno 2] No such file or directory: 'README.md'** 
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):

  File "<string>", line 17, in <module>

  File "/tmp/pip-build-GGW2_X/packthing/setup.py", line 3, in <module>

with open('README.md') as f:


IOError: [Errno 2] No such file or directory: 'README.md'

---

Cleaning up...
Command python setup.py egg_info failed with error code 1 in /tmp/pip-build-GGW2_X/packthing
Storing debug log for failure in /root/.pip/pip.log```

... granted I can use the repo, I thought you might want to know ;-)

@RogueM
Copy link

RogueM commented Aug 24, 2016

trying to build 0.38.5 on Pi3 using PackThing, second guessing what toolchain is required, is not particularly fun, but well... maybe I can succeed with a little nudge in the appropriate direction:

Master version: 0.38.5
==================================== BUILD =====================================
---------------------------------- doc (dir) -----------------------------------
cksum:
-------------------------------- library (dir) ---------------------------------
cksum:
------------------------------- propbasic (fpc) --------------------------------
Building propbasic in PropBasic.lpr

  • fpc -O3 -Tlinux -opropbasic PropBasic.lpr
    Traceback (most recent call last):
    File "/usr/local/bin/packthing", line 9, in
    load_entry_point('packthing==1.0.0', 'console_scripts', 'packthing')()
    File "/usr/local/lib/python2.7/dist-packages/packthing-1.0.0-py2.7.egg/packthing/main.py", line 419, in console
    pm.build(args.jobs[0])
    File "/usr/local/lib/python2.7/dist-packages/packthing-1.0.0-py2.7.egg/packthing/util.py", line 50, in wrapper
    res = func(_args, *_kwargs)
    File "/usr/local/lib/python2.7/dist-packages/packthing-1.0.0-py2.7.egg/packthing/main.py", line 262, in build
    outfiles = self.projects[path].build(jobs, r['exclude'])
    File "/usr/local/lib/python2.7/dist-packages/packthing-1.0.0-py2.7.egg/packthing/builders/fpc.py", line 55, in build
    subprocess.check_call(args)
    File "/usr/lib/python2.7/subprocess.py", line 535, in check_call
    retcode = call(_popenargs, *_kwargs)
    File "/usr/lib/python2.7/subprocess.py", line 522, in call
    return Popen(_popenargs, *_kwargs).wait()
    File "/usr/lib/python2.7/subprocess.py", line 710, in init
    errread, errwrite)
    File "/usr/lib/python2.7/subprocess.py", line 1335, in _execute_child
    raise child_exception
    OSError: [Errno 2] No such file or directory

... that's after issuing sudo packthing --arch=armhf deb
packthing was installed from repo.

@RogueM
Copy link

RogueM commented Aug 24, 2016

err, and here's the checkout section if relevant:

=================================== CHECKOUT ===================================
( 0.0.0 ) doc https://github.com/parallaxinc/spin-docs.git
( 1.0.0 ) library https://github.com/parallaxinc/spin-standard-library.git
( 1.44.2 ) propbasic https://github.com/parallaxinc/PropBasic.git
( 0.0.0 ) ide-prebuilts https://github.com/bweir/ide-prebuilts.git
( 0.38.5 ) propelleride https://github.com/parallaxinc/PropellerIDE.git
( 0.3.0 ) openspin https://github.com/bweir/OpenSpin.git

I'm going to dig around and hopefully find the culprit but feel free to pitch in...

@RogueM
Copy link

RogueM commented Aug 24, 2016

right, looking into the PropBasic building instruction, apt-get install fpc should do the trick, hopefully.

@RogueM
Copy link

RogueM commented Aug 24, 2016

OK, I was able to build a deb... will test on a clean system and if all good will pass on to @Gadgetoid to push out (the raspi link at http://www.lamestation.com/propelleride/ is broken btw).

@RogueM
Copy link

RogueM commented Aug 24, 2016

build worked beautifully on clean Jessie...

@Gadgetoid
Copy link
Contributor Author

Okay, with help from @RogueM today I narrowed this down as a pebkac error, I still had some serial config in my /boot/cmdline.txt which was causing these errors. Cryptic!

@iley
Copy link

iley commented Jan 9, 2017

Any update on this? I occasionally get the same error with PropellerManager built from master (5118c19) on my Raspberry Pi 2 with Raspbian Jessie.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants