Arduino


See my post in the support section - there's an issue with the serial port driver on SZ. The rxtxserial library tries to do a tcgetattr on all the ports, and if it fails it doesn't list the port. So none are being populated by the arduino IDE. The real question is why it failed on my Arduino (/dev/ttyACM0) port last night. I'll try again at home this evening.
 
This is interesting news. I've tried a few times to get the Pandora to play nice with my Breadboarduinos, but after getting the Arduino IDE up and running it always fell flat on its face when it came to serial access.
 
Got sketches (Including c++) compiling & uploading & running via the IDE. This is using the latest and greatest binutils/gcc/g++/avrdude/rxtx/arduino packs.


Now I (just) have to pnd it up! Hohum.
 
..and here's a youtube video using the new Arduino IDE on the Open Pandora coding for 2 custom libraries and uploading to an Arduino and getting the voice recognition hardware / LCD and relays to work - all from the Open Pandora. how cool is that?! well, it is for me.... :p

https://www.youtube.com/embed/V_0MSjOfVK8?feature=oembed

thanks again hdonk!


(btw - if you want to know why I'm saying "SlamGuard" and the word "CAR" is output to the LCD, you'll have to wait for the 'Custom Car' magazine article featuring my awesome "hot-rod" (called "SlamGuard") that is currently being measured up to have the Open Pandora mounted in the centre console!)
 
how cool is that?!
In terms of cool points, its over niyene thouwwwsand!!!


Seriously, for me this is probably on par with getting real power management and the DSP to work. Give yourself a round of applause, hdonk :)
 
Last edited by a moderator:
Good news indeed... I look forward to using this when I get my Pandy.


Thanks and awesome work hdonk.
 
I'm having difficulty getting the Arduino IDE to work. The program will exit suddenly when i try to upload a sketch (the verify part seems to take it's time and work ok). This also happens when i try to open the Serial Monitor.


I was able to upload to the arduino using tony.pigram's guide and avrdude. I initially had some trouble (stk500_recv(): programmer is not responding) until I started messing around with the avrdude options and found that increasing the baud rate to 115200 got it to work.


I'm using a Rebirth 600Mhz 256MB, an arduino uno. the arduino shows up on ttyACM0 when plugged in.


Any ideas what could be causing the IDE to quit?


Cheers
 
No idea why the IDE would quit randomly. Worked fine on my original Pandora... Anything in the /temp/pndrun log file?
 
If you launch the pnd from the terminal you will be able to see the errors leading to the program terminating, I believe. That goes a long way to confirm what is happening. 
 
Arduino owner since yesterday \o/

Nevermind that spoiler, it works after relogging, duh.

edit, Pandora doesn't recognize the Leonardo, usb hub doesn't seem to help.. gonna try a different one

Just tried the IDE, the .out file says
Code:
=======================================================================================
PND             : /media/4GB/pandora/menu/arduino.pnd
PND_FSTYPE      : Squashfs
APPDATADIR      : /media/4GB/pandora/appdata/hdonk_arduino
APPDD_FSTYPE    : vfat
PND_CPUSPEED    : <unset>
EXENAME         : arduino.sh
ARGUMENTS       : <unset>
=======================================================================================
[ START ]--- Mount the PND ----------
Mounting : mount -t squashfs -o ro "/dev/loop0" "/mnt/utmp/hdonk_arduino"
Mounting the Union FS : mount -t aufs -o exec,noplink,dirs="/media/4GB/pandora/appdata/hdonk_arduino=rw+nolwh":"/mnt/pnd/hdonk_arduino=rr" none "/mnt/utmp/hdonk_arduino"
[SUCCESS]--- Mount the PND ----------
[ START ]--- Starting the application (arduino.sh ) ----------
[SUCCESS]--- Starting the application (arduino.sh ) ----------
[ START ]--- Restoring the frame buffer status ----------
[SUCCESS]--- Restoring the frame buffer status ----------
[ START ]--- uMount the PND ----------
[ START ]--- Waiting the Union to be available ----------
[SUCCESS]--- Waiting the Union to be available ----------
auplink:plink.c:223: AUFS_CTL_PLINK_MAINT: Inappropriate ioctl for device
rmdir: failed to remove `/mnt/utmp/hdonk_arduino': Device or resource busy
[ START ]--- Waiting the PND mount dir to be free ----------
[SUCCESS]--- Waiting the PND mount dir to be free ----------
cleanup done
[SUCCESS]--- uMount the PND ----------
=======================================================================================
Return code is : 1
 
Last edited by a moderator:
Arduino owner since yesterday \o/

Nevermind that spoiler, it works after relogging, duh.

edit, Pandora doesn't recognize the Leonardo, usb hub doesn't seem to help.. gonna try a different one
I'm going to assume the version of Arduino IDE I built doesn't have the configs for Leonardo? If so I can prbably do a new build. If not, is it the there's no kernel support for its serial usb interface?
 
Sorry I wasn't talking about the IDE, it has Leonardo in a dropdown I saw at a quick glance. Just the USB Hub on the Pandora won't recognize it. I checked dmesg, lsusb. Still gotta try that other hub. I find myself in demand of a single port USB hub which does 2.0. Like an adapter of sorts. Shame we can't directly plug in 1.1 gizmos, still gets on my nerves.
 
Not that I can make that much sense of it, but the out file indicates that java is throwing an exception;

=======================================================================================

PND             : /media/PANDORA/pandora/menu/arduino.pnd
PND_FSTYPE      : Squashfs
APPDATADIR      : /media/PANDORA/pandora/appdata/hdonk_arduino
APPDD_FSTYPE    : vfat
PND_CPUSPEED    : <unset>
EXENAME         : arduino.sh
ARGUMENTS       : <unset>
=======================================================================================
[ START ]--- Mount the PND ----------
Mounting : mount -t squashfs -o ro "/dev/loop0" "/mnt/utmp/hdonk_arduino"
Mounting the Union FS : mount -t aufs -o exec,noplink,dirs="/media/PANDORA/pandora/appdata/hdonk_arduino=rw+nolwh":"/mnt/pnd/hdonk_arduino=rr" none "/mnt/utmp/hdonk_arduino"
[sUCCESS]--- Mount the PND ----------
[ START ]--- Starting the application (arduino.sh ) ----------
/mnt/utmp/hdonk_arduino/arduino
:java/lib/rt.jar:java/lib/tools.jar:lib/RXTXcomm.jar:lib/core.jar:lib/ecj.jar:lib/jna.jar:lib/pde.jar
Found java.pnd at /media/PANDORA/pandora/menu/java.pnd
Attempting to execute jvm at /mnt/utmp/java/jdk/bin/java
Args are: -cp :java/lib/rt.jar:java/lib/tools.jar:lib/RXTXcomm.jar:lib/core.jar:lib/ecj.jar:lib/jna.jar:lib/pde.jar -Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel processing.app.Base
Error parsing gtk-icon-sizes string: ''
fhs_lock: creating lockfile:       5150

fhs_unlock: Removing LockFile
fhs_lock: creating lockfile:       5150

fhs_unlock: Removing LockFile
fhs_lock: creating lockfile:       5150

fhs_unlock: Removing LockFile
fhs_lock: creating lockfile:       5150

fhs_unlock: Removing LockFile
fhs_lock: creating lockfile:       5150

fhs_unlock: Removing LockFile
fhs_lock: creating lockfile:       5150

fhs_unlock: Removing LockFile
fhs_lock: creating lockfile:       5150

fhs_unlock: Removing LockFile
fhs_lock: creating lockfile:       5150

fhs_unlock: Removing LockFile
fhs_lock: creating lockfile:       5150

fhs_unlock: Removing LockFile
fhs_lock: creating lockfile:       5150

fhs_unlock: Removing LockFile
fhs_lock: creating lockfile:       5150

fhs_unlock: Removing LockFile
fhs_lock: creating lockfile:       5150

fhs_unlock: Removing LockFile
fhs_lock: creating lockfile:       5150

fhs_unlock: Removing LockFile
fhs_lock: creating lockfile:       5150

fhs_unlock: Removing LockFile
fhs_lock: creating lockfile:       5150

fhs_unlock: Removing LockFile
fhs_lock: creating lockfile:       5150

fhs_unlock: Removing LockFile
fhs_lock: creating lockfile:       5150

fhs_unlock: Removing LockFile
fhs_lock: creating lockfile:       5150

fhs_unlock: Removing LockFile
fhs_lock: creating lockfile:       5150

fhs_unlock: Removing LockFile
fhs_lock: creating lockfile:       5150

fhs_unlock: Removing LockFile
fhs_lock: creating lockfile:       5150

fhs_unlock: Removing LockFile
fhs_lock: creating lockfile:       5150

fhs_unlock: Removing LockFile
fhs_lock: creating lockfile:       5150

fhs_unlock: Removing LockFile
fhs_lock: creating lockfile:       5150

fhs_unlock: Removing LockFile
fhs_lock: creating lockfile:       5150

fhs_unlock: Removing LockFile
fhs_lock: creating lockfile:       5150

fhs_unlock: Removing LockFile
fhs_lock: creating lockfile:       5150

fhs_unlock: Removing LockFile
fhs_lock: creating lockfile:       5150

fhs_unlock: Removing LockFile
fhs_lock: creating lockfile:       5150

fhs_unlock: Removing LockFile
fhs_lock: creating lockfile:       5150

fhs_unlock: Removing LockFile
fhs_lock: creating lockfile:       5150

fhs_unlock: Removing LockFile
fhs_lock: creating lockfile:       5150

fhs_unlock: Removing LockFile
fhs_lock: creating lockfile:       5150

fhs_unlock: Removing LockFile
fhs_lock: creating lockfile:       5150

fhs_unlock: Removing LockFile
fhs_lock: creating lockfile:       5150

fhs_unlock: Removing LockFile
fhs_lock: creating lockfile:       5150

fhs_unlock: Removing LockFile
fhs_lock: creating lockfile:       5150

fhs_unlock: Removing LockFile
fhs_lock: creating lockfile:       5150

fhs_unlock: Removing LockFile
fhs_lock: creating lockfile:       5150

fhs_unlock: Removing LockFile
fhs_lock: creating lockfile:       5150

fhs_unlock: Removing LockFile
Binary sketch size: 1,090 bytes (of a 32,256 byte maximum)
fhs_lock: creating lockfile:       5150

fhs_unlock: Removing LockFile
fhs_lock: creating lockfile:       5150

fhs_unlock: Removing LockFile
fhs_lock: creating lockfile:       5150

fhs_unlock: Removing LockFile
fhs_lock: creating lockfile:       5150

fhs_unlock: Removing LockFile
fhs_lock: creating lockfile:       5150

fhs_unlock: Removing LockFile
fhs_lock: creating lockfile:       5150

fhs_unlock: Removing LockFile
fhs_lock: creating lockfile:       5150

fhs_unlock: Removing LockFile
fhs_lock: creating lockfile:       5150

fhs_unlock: Removing LockFile



RXTX WARNING:  This library was compiled to run with OS release 3.2.21 and you are currently running OS release 3.2.30.  In some cases this can be a problem.  Try recompiling RXTX if you notice strange behavior.  If you just compiled RXTX make sure /usr/include/linux is a symbolic link to the include files that came with the kernel source and not an older copy.


press enter to continue
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x20676e68, pid=5150, tid=1312748688
#
# JRE version: 7.0_06-b24
# Java VM: Java HotSpot Client VM (23.2-b09 mixed mode linux-arm )
# Problematic frame:
# C  0x20676e68  _fini+0xdff38e34
#
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# An error report file with more information is saved as:
# /tmp/hs_err_pid5150.log
#
# If you would like to submit a bug report, please visit:
#   http://bugreport.sun.com/bugreport/crash.jsp
#
/mnt/utmp/java/sunjava.sh: line 12:  5150 Aborted                 "$JAVA_HOME/bin/java" "$@"
auplink:plink.c:223: AUFS_CTL_PLINK_MAINT: Inappropriate ioctl for device
rmdir: failed to remove `/mnt/utmp/java': Device or resource busy
[sUCCESS]--- Starting the application (arduino.sh ) ----------
[ START ]--- Restoring the frame buffer status ----------
[sUCCESS]--- Restoring the frame buffer status ----------
[ START ]--- uMount the PND ----------
[ START ]--- Waiting the Union to be available ----------
[sUCCESS]--- Waiting the Union to be available ----------
auplink:plink.c:223: AUFS_CTL_PLINK_MAINT: Inappropriate ioctl for device
rmdir: failed to remove `/mnt/utmp/hdonk_arduino': Device or resource busy
[ START ]--- Waiting the PND mount dir to be free ----------
[sUCCESS]--- Waiting the PND mount dir to be free ----------
cleanup done
[sUCCESS]--- uMount the PND ----------
=======================================================================================
Return code is : 6
Also, it mentions a version missmatch of RXTX (the serial library?). Could that be the reason the serial monitor causes it to go pop also.

I did try the older java.pnd from the repository, but I wasn't able to the arduino IDE to run.

Also I tried to run the pnd from a terminal (using pnd_run.sh) to see if that would garner any additional info, but I had no luck there either.
 
I'm saying this as a just-in-case reminder list - dont be offended if this sounds like "you did turn it on?"... You did plug the device into the hub, then the hub into the pandora? (That way atleast used to work better due to some bug with empty hubs.). You did enable usb host? (I think you did because something else already worked, but stilll.). And you used lsusb as root? (sudo lsusb - I remember it not showing devices when you're normal user, way back atleast or on some other device if I misremember...).
 
I'm not sure if you were replying to me or kuru. If it was me, I'm happy that the arduino, usb hub and host are all working correctly as I was able to upload sketches using avrdude. I think the problem is with either java or the IDE or a conflict of version between the two. I'm just not sure what to do about it.

It would be handy to know if anyone else has it working with the latest versions of everything.
 
Just posting for completeness.

My IDE also quits after uploading a new sketch to the board.

i.e. I can open the application, load a sketch into the window, compile and upload that to the Arduino. Then the app just quits.

Cheers.

edit. Just to say, also using the latest firmware here.
 
Last edited by a moderator:
Arduino owner since yesterday \o/

Nevermind that spoiler, it works after relogging, duh.

edit, Pandora doesn't recognize the Leonardo, usb hub doesn't seem to help.. gonna try a different one

Just tried the IDE, the .out file says

=======================================================================================
PND : /media/4GB/pandora/menu/arduino.pnd
PND_FSTYPE : Squashfs
APPDATADIR : /media/4GB/pandora/appdata/hdonk_arduino
APPDD_FSTYPE : vfat
PND_CPUSPEED : <unset>
EXENAME : arduino.sh
ARGUMENTS : <unset>
=======================================================================================
[ START ]--- Mount the PND ----------
Mounting : mount -t squashfs -o ro "/dev/loop0" "/mnt/utmp/hdonk_arduino"
Mounting the Union FS : mount -t aufs -o exec,noplink,dirs="/media/4GB/pandora/appdata/hdonk_arduino=rw+nolwh":"/mnt/pnd/hdonk_arduino=rr" none "/mnt/utmp/hdonk_arduino"
[SUCCESS]--- Mount the PND ----------
[ START ]--- Starting the application (arduino.sh ) ----------
[SUCCESS]--- Starting the application (arduino.sh ) ----------
[ START ]--- Restoring the frame buffer status ----------
[SUCCESS]--- Restoring the frame buffer status ----------
[ START ]--- uMount the PND ----------
[ START ]--- Waiting the Union to be available ----------
[SUCCESS]--- Waiting the Union to be available ----------
auplink:plink.c:223: AUFS_CTL_PLINK_MAINT: Inappropriate ioctl for device
rmdir: failed to remove `/mnt/utmp/hdonk_arduino': Device or resource busy
[ START ]--- Waiting the PND mount dir to be free ----------
[SUCCESS]--- Waiting the PND mount dir to be free ----------
cleanup done
[SUCCESS]--- uMount the PND ----------
=======================================================================================
Return code is : 1 
Finally got around to trying a different USB hub, now the Leonardo is recognized properly by the OS. In the IDE I select the board and virtual COM port, put the two basic loops in the sketch and hit the Upload button. It says 'compiling' and when it should get to the 'uploading' part it suddenly quits.

Code:
Error parsing gtk-icon-sizes string: ''
fhs_lock: creating lockfile:       2998
 
fhs_unlock: Removing LockFile
fhs_lock: creating lockfile:       2998
quite a lot of those lock/unlocksactually and then

RXTX WARNING:  This library was compiled to run with OS release 3.2.21 and you are currently running OS release 3.2.30.  In some cases this can be a problem.  Try recompiling RXTX if you notice strange behavior.  If you just compiled RXTX make sure /usr/include/linux is a symbolic link to the include files that came with the kernel source and not an older copy.press enter to continue #

# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x20676e68, pid=2998, tid=1312724112
#





# JRE version: 7.0_06-b24
# Java VM: Java HotSpot Client VM (23.2-b09 mixed mode linux-arm )
# Problematic frame:

# C 0x20676e68 _fini+0xdff52e34
#
# Failed to write core dump. Core dumps have been disabled. To enable core du
mping, try "ulimit -c unlimited" before starting Java again
I simply hate this board's editor.
 
Last edited by a moderator:
Back
Top