Can anyone upload to an Arduino Uno on FreeBSD?

Hi All,

Bit of an odd question:

Can anyone confirm if they can upload to an Arduino Uno using the devel/arduino port?

If so, could you let me know, and maybe your output of uname -a, the version of java/openjdk and comms/rxtx being used sucessfully please?

Pulling my hair out here, and am trying to work on differentials now to thin this issue out...

Kind regards,

James.
 
This isn't helpful at all but, last year, I tried getting it to work and couldn't so I just worked with Windows. But I was in a hurry to get it done and didn't take the time to troubleshoot the issue.
 
It may not be useful anymore for the OP but I would like to report success with devel/arduino on 10.2R.
I have a custom Arduino board that closely resembles Arduino Nano with ATmega328 which I use exclusively as a poor man's AVRISP so I have not really tested any Arduino IDE functionality besides Verify/Upload button for that particular sketch. I remember having some trouble picking the appropriate /dev/cua* device but that seems to have gone away.
 
Me too! It works nicely. I have a feeling that the ports tree broke at some point, and I had to wait for the right dependencies to align themselves again in order to run arduino. Choosing the right USB device in this java application is very important too. My current setup:
  • FreeBSD 10.1-RELEASE
  • arduino-1.0.6,1
  • openjdk-7.80.15_1,1
  • openjdk8-8.66.17_1
  • rxtx-openjdk7-2.2p2_2
  • rxtx-openjdk8-2.2p2_2
(and I very RARELY upgrade stuff when I have a setup that works.)

Dominique.
 
Connected an Arduino UNO to my workstation today, it connected as umodem0 and cuaU0 / ttyU0. started the arduino ide, selected the correct serial port and uploaded a sketch. Worked like a charm. Serial ports: both /dev/cuaU0 and /dev/ttyU0 works. Thanks to the good folks who made this port, and fixed the RXTX problems.
 
tingo JamesElstone So can you guys give a little step by step instruction on how to get this connected? I have an Arduino Uno and programmed it to do some theatrical effects, a couple of years ago, but I had to use a Windows notebook to do so. I'd much rather do it on my FreeBSD box but I don't know how to set up the serial ports or even which ports are considered serial on my box.

I installed /devel/arduino and can get to the IDE but, with my Windows set up, I just ran a cable from the USB port on the notebook to the serial printer-type connector on the Arduino. I'm just ignorant about how to go with that on my FreeBSD workstation and how to test to make sure it's connected.

If I can get that far, I think I'd be good to go.
 
So I plugged into a USB port on my box to the Arduino and I see in dmesg that I'm connected at usbus0 but I'm not sure how to be sure the IDE is communicating so it can upload my programs once I start. I will start reading the tutorials but if someone can give me a head start on this I'd appreciate it.

EDIT: Hmm. I need to set the serial port but this is grayed out in the IDE. I need to set COM1. I remember this part but how do I set that?

EDIT: Ah! Found the FreeBSD wiki and ~/.arduino/preferences.txt. I changed the serial.port to umodem0 but the IDE says it's still not selected. Same for ugen2.3 which are listed in dmesg. So I'm stuck but need to go to bed.

Code:
ugen2.3: <Arduino www.arduino.cc> at usbus2
umodem0: <Arduino www.arduino.cc product 0x0043, class 2/0, rev 1.10/0.01, addr 3> on usbus2
umodem0: data interface 1, has CM over data, has break
 
That's not what shows in dmesg so I'm not sure what to do. I did try just changing the port in the Arduino preferences but it didn't help.

I read on the Arduino forum where the port /comms/uarduno should be installed but previous posts, here, don't mention that. Do I need to install that?

EDIT: I installed /comms/uarduno, and it reports the board at uarduno0 but that isn't in /dev. I tried changing preferences to /dev/uarduno and just uarduno to no avail.

EDIT: I had forgotten that uarduno thinks the board's id is different than mine and changed it in ids.txt to 0x0043. Reloaded with kldload but still no joy.

EDIT: I should note that /dev/cuaU0 shows under /dev when I plug this device in but the IDE claims it is "not found". It also shows cuaU0.init and cuaU0.lock which rings a bell to me. Am I forgetting something?

Aha! SOLVED. While I had added myself to the dialer group, I forgot to log out and log back in for it take effect. Problem solved. Thanks, Doc! :)
 
Hi there.
One update here that took me days to notice :( : if you ever used the serial port to a virtual terminal like me, please disable it in /etc/ttys or arduino will not work.
#ttyU0 "/usr/libexec/getty std.9600" vt100 on secure

Now it works fine.
What I did, in case it helps anybody:

  1. make shure /etc/ttys has no ttyU0 entry
  2. install comms/uarduno
  3. kldload uarduno (add it to /boot/loader.conf)
  4. add myself to dialer group and logoff/logon or reboot for changes to take effect
  5. check if /etc/devdfs.* has no older configurations that could mess with /dev/cuaU? nodes
  6. attach Arduino UNO :
    ugen0.4: <Arduino www.arduino.cc> at usbus0
    uarduno0: <Arduino www.arduino.cc product 0x0043, class 2/0, rev 1.10/0.01, addr 3> on usbus0
  7. See https://wiki.freebsd.org/AVR/ArduinoNative to adjust ~/.arduino/preferences.txt
  8. run /usr/local/bin/arduino : the IDE will open with a footer message "Arduino Uno on /dev/cuaU0"
My ~/.arduino/preferences.txt :

board=uno
browser.linux=mozilla
build.path=/tmp/
build.verbose=true
console=true
console.auto_clear=true
console.error.file=stderr.txt
console.length=500
console.lines=4
console.output.file=stdout.txt
editor.antialias=false
editor.caret.blink=true
editor.divider.size=0
editor.divider.size.windows=2
editor.external=false
editor.font=Monospaced,plain,12
editor.font.macosx=Monaco,plain,10
editor.indent=true
editor.invalid=false
editor.keys.alternative_cut_copy_paste=true
editor.keys.alternative_cut_copy_paste.macosx=false
editor.keys.home_and_end_travel_far=false
editor.keys.home_and_end_travel_far.macosx=true
editor.keys.shift_backspace_is_delete=true
editor.languages.current=
editor.linenumbers=false
editor.tabs.expand=true
editor.tabs.size=2
editor.window.height.default=600
editor.window.height.min=290
editor.window.width.default=500
editor.window.width.min=400
export.applet.separate_jar_files=false
export.application.fullscreen=true
export.application.platform.linux=true
export.application.platform.macosx=true
export.application.platform.windows=true
export.application.stop=true
export.delete_target_folder=true
last.ide.1.0.6.daterun=1510682283
last.ide.1.0.6.hardwarepath=/usr/local/arduino/hardware
last.screen.height=768
last.screen.width=1366
last.sketch.count=1
last.sketch0.location=-1,29,1368,740,562
last.sketch0.path=/tmp/untitled4390929545194398498.tmp/sketch_nov14a/sketch_nov14a.ino
launcher=/usr/local/bin/firefox
platform.auto_file_type_associations=true
preproc.color_datatype=true
preproc.enhanced_casting=true
preproc.imports.list=java.applet.*,java.awt.Dimension,java.awt.Frame,java.awt.event.MouseEvent,java.awt.event.KeyEvent,java.awt.event.FocusEvent,java.awt.Image,java.io.*,java.net.*,java.text.*,java.util.*,java.util.zip.*,java.util.regex.*
preproc.output_parse_tree=false
preproc.save_build_files=false
preproc.substitute_floats=true
preproc.substitute_unicode=true
preproc.web_colors=true
programmer=arduino:avrispmkii
run.display=1
run.options=
run.options.memory=false
run.options.memory.initial=64
run.options.memory.maximum=256
run.present.bgcolor=#666666
run.present.exclusive=false
run.present.exclusive.macosx=true
run.present.stop.color=#cccccc
run.window.bgcolor=#DFDFDF
serial.databits=8
serial.debug_rate=9600
serial.parity=N
serial.port=/dev/cuaU0
serial.stopbits=1
sketchbook.path=/home/marcelbonnet/devel/arduino/
target=arduino
update.check=true
update.id=4606115978147653583
upload.using=bootloader
upload.verbose=true
upload.verify=true
 
Back
Top