DashPro not connecting to the Ubuntu USB controller

I’m just getting started with a DashPro, connected to an Ubuntu based Arduino IDE. I’m not able to see the port activated for the card after I plug in the usb cable. I can see the power up led’s activate so it appears to have power. I’ve checked with dmesg and lsusb and still am not seeing anything. I’m expecting to see something similar to the Arduino board that I also use - “/dev/ttyACM0”, but so far nothing. Any help is appreciated.

Update: I’ve followed two paths: Linux & Windows

Linux
I downloaded the updater utility and tried to update to the latest firmware 0.9.2, but still not connecting, I received an error message saying no device available. No new port available within the Arduino IDE. dmesg and lsusb still not showing anything. I’m going to try using a powered usb hub to eliminate power issues.

Windows
I’ve had better/partial luck in a Windows 7 HP laptop. I was able to download the updater utility and update successfully to the latest firmware 0.9.2 using the USB connection. I was not able to see the new COM port in the Arduino IDE until I updated the usb driver using the recommended driver set. I then used the Arduino IDE and compiled the Hello World sketch. I was able to export the bin file and upload using the updater utility (not the IDE) and confirmed receiving the Hello World messages in the cloud. Unfortunately, I’m still not able to load from the IDE as it failed with the following error message:

Arduino: 1.6.9 (Windows 7), Board: “DashPro, 120MHz, Check”

Sketch uses 12,740 bytes (1%) of program storage space. Maximum is 1,014,764 bytes.
Traceback (most recent call last):
File “dashupdater.py”, line 369, in
File “dashupdater.py”, line 354, in main
File “dashupdater.py”, line 303, in update
File “libs\updatergui.py”, line 123, in show_exception
File “site-packages\easygui\boxes\derived_boxes.py”, line 522, in exceptionbox
File “site-packages\easygui\boxes\derived_boxes.py”, line 542, in codebox
File “site-packages\easygui\boxes\text_box.py”, line 36, in textbox
File “lib-tk\Tkinter.py”, line 1814, in init
_tkinter.TclError: Can’t find a usable init.tcl in the following directories:
C:/Users/h100718/AppData/Local/Temp/lib/tcl8.5 C:/Users/h100718/AppData/Local/Arduino15/packages/konekt/tools/dashupdater/0.7.0/lib/tcl8.5 C:/Users/h100718/AppData/Local/Arduino15/packages/konekt/tools/dashupdater/lib/tcl8.5 C:/Users/h100718/AppData/Local/Arduino15/packages/konekt/tools/dashupdater/0.7.0/library C:/Users/h100718/AppData/Local/Arduino15/packages/konekt/tools/dashupdater/library C:/Users/h100718/AppData/Local/Arduino15/packages/konekt/tools/dashupdater/tcl8.5.15/library C:/Users/h100718/AppData/Local/Arduino15/packages/konekt/tools/tcl8.5.15/library

This probably means that Tcl wasn’t installed properly.

Failed to execute script dashupdater
the selected serial port Failed to execute script dashupdater
does not exist or your board is not connected

So I’m left wit the following problems:
Windows:

  1. I can’t upload sketches using the Arduino IDE, but I can use the serial monitor
    Linux:
  2. Can’t get the updater executable to connect to the board
  3. Can’t connect using the Serial Monitor in the Arduino IDE
  4. Can’t upload sketches from the IDE (obvious if 1&2 are true:( )

Any ideas appreciated.

So there’s a problem with the updater on Windows 7. We’re working on fixing it, thought it seems like a bug in pyinstaller which we use for bundling the application and so we may need to switch to a different utility there. If you have anything with Windows 8 or 10, it looks like it works fine on those versions.

On Linux, it could possibly be fixed by the hub. It sounds like your laptop isn’t powering up the device enough to enumerate it. You could also try a y-cable or plugging in a battery.

Update:
Oddly, using a usb hub solved some of the Linux problems, but not all. Didn’t seem to matter if it was powered or not. When I connect the DashPro to the usb hub, the usb port registers properly as /dev/ttyACM0. I’m then able to bring up the Arduino IDE and use the serial monitor to show the output from the Hello World sketch.

The upload problem remains. When I put the DashPro into upload mode, the usb port unregisters and is no longer visible (this is the same behavior in Windows).

When I attempt to upload using the Dash Updater, I get a popup that says:

Error: Error updating over USB.
Is the correct Dash connected and did you push the program button?
Contact us or visit the forum at community.konekt.io if you need help

When I attempt to upload using the Arduino IDE, I get the same popup and thenI then see the following in the IDE status:

Arduino: 1.6.8 (Linux), Board: “DashPro, 120MHz, Check”

Sketch uses 12,756 bytes (1%) of program storage space. Maximum is 1,014,764 bytes.
processing.app.SerialException: Error opening serial port ‘/dev/ttyACM0’.
at processing.app.Serial.(Serial.java:125)
at processing.app.Serial.(Serial.java:66)
at processing.app.SerialMonitor$3.(SerialMonitor.java:93)
at processing.app.SerialMonitor.open(SerialMonitor.java:93)
at processing.app.AbstractMonitor.resume(AbstractMonitor.java:110)
at processing.app.Editor.resumeOrCloseSerialMonitor(Editor.java:2430)
at processing.app.Editor.access$2900(Editor.java:89)
at processing.app.Editor$DefaultExportHandler.run(Editor.java:2408)
at java.lang.Thread.run(Thread.java:745)
Caused by: jssc.SerialPortException: Port name - /dev/ttyACM0; Method name - openPort(); Exception type - Port not found.
at jssc.SerialPort.openPort(SerialPort.java:167)
at processing.app.Serial.(Serial.java:114)
… 8 more
Error opening serial port ‘/dev/ttyACM0’.

It seems to me that when the DashPro goes into update mode, it is not visible as a usb device or the updater/loader doesn’t see it.

Any thoughts or direction appreciated as I can’t really engage in any programming until I get the load problem sorted out.

Unregistering the COM/Serial port when you hit the program button is expected behavior. It’s basically switching from serial mode into HID mode.

That stack trace you posted tends to pop up if you have the serial monitor open when you hit the program button as the Arduino IDE realizes that the serial port is gone.

So all that being said, you should still be able to program with the updater. So you hit the program button and you see the heartbeat LED flash (blink, blink, off) and then you run the updater with a user firmware image and it doesn’t work?

After a period of working on other projects, I’m back to this again. I’m not having full success with either the Windows 7 or the Linux environment. While my preference is the Linux environment, I’m not able to get either the Arduino integrated environment or the independent Dash Updater (0.7.1) loading at all. At least in the Windows environment, while the Arduino IDE doesn’t load properly, the independent Dash Updater does work and I’m able to compile binaries and load that way. I’ve loaded both the Dash firmware as well as a programmed sketch.

Windows:
stack trace when loading a sketch using Arduino IDE -

Arduino: 1.6.9 (Windows 7), Board: “DashPro, 120MHz, Check”

Sketch uses 12,740 bytes (1%) of program storage space. Maximum is 1,014,764 bytes.
C:\Users\h100718\AppData\Local\Arduino15\packages\konekt\tools\dashupdater\0.7.0/bin/dashupdater.exe --imagetype user --imagefile C:\Users\h100718\AppData\Local\Temp\build6427977d47af9513f6e1ae594571e7c8.tmp/Dash-HelloWorld.ino.bin --method usb
Traceback (most recent call last):
File “dashupdater.py”, line 369, in
File “dashupdater.py”, line 354, in main
File “dashupdater.py”, line 308, in update
File “libs\updatergui.py”, line 119, in show_message
File “site-packages\easygui\boxes\derived_boxes.py”, line 216, in msgbox
File “site-packages\easygui\boxes\base_boxes.py”, line 66, in buttonbox
File “lib-tk\Tkinter.py”, line 1814, in init
_tkinter.TclError: Can’t find a usable init.tcl in the following directories:
C:/Users/h100718/AppData/Local/Temp/lib/tcl8.5 C:/Users/h100718/AppData/Local/Arduino15/packages/konekt/tools/dashupdater/0.7.0/lib/tcl8.5 C:/Users/h100718/AppData/Local/Arduino15/packages/konekt/tools/dashupdater/lib/tcl8.5 C:/Users/h100718/AppData/Local/Arduino15/packages/konekt/tools/dashupdater/0.7.0/library C:/Users/h100718/AppData/Local/Arduino15/packages/konekt/tools/dashupdater/library C:/Users/h100718/AppData/Local/Arduino15/packages/konekt/tools/dashupdater/tcl8.5.15/library C:/Users/h100718/AppData/Local/Arduino15/packages/konekt/tools/tcl8.5.15/library

This probably means that Tcl wasn’t installed properly.

Failed to execute script dashupdater
the selected serial port Failed to execute script dashupdater
does not exist or your board is not connected

This report would have more information with
“Show verbose output during compilation”
option enabled in File → Preferences.

There’s an issue with version 0.7 of the updater and Windows 7. We’re going to push out a new version of the Arduino IDE Integration soon that fixes this, but in the meantime we have a new version of the updater already out that you can insert into the IDE files to fix this issue.
You can download the latest version (0.7.1) from this page: https://hologram.io/docs/guides-tutorials/using-our-platform/tutorials/upgrade-dash-user-program-and-firmware/#hologram-dash-updater-utility

To use this newer version in the IDE, go to File->Preferences and you’ll see a link at the bottom that says “More Preferences Can Be Edited Directly In”
Click on that filename and it’ll pop up a file explorer window into your arduino preferences directory.
You should see a packages directory. Click into that and then go into konekt->tools->dashupdater->0.7.0->bin and copy the file you downloaded into there. Tell it to overwrite the one that’s in there.

Restart the IDE and things should work.

Ok, that has resolved building and loading a sketch to the DashPro using the Arduino IDE. Many thanks for that! Makes things much more straight forward. I still want to get this working with Ubuntu (16). I’m not seeing any error messages from Dash Updater in Ubuntu other than the pop up message. Does Dash Updater generate a log file with more info?

There isn’t really much more information logged at this point.
You might be hitting a permissions issue. Try downloading this file and copying it into /etc/udev/rules.d
https://raw.githubusercontent.com/hologram-io/hologram-dash-arduino-integration/master/85-hologram.rules
Then plug in your dash and try to program.

2 Likes

The new rule set solved the problem with working on Ubuntu. I’m now able to use the Linux Arduino IDE to upload sketches and the Updater Utility to load the firmware. Many thanks for your perseverance in working with me on this problem.

1 Like

@reuben your udev rule sorted my updater, I can now push firmware to the device from Linux Mint. :grin::

Sadly I’ve now lost the serial usb port, so I can’t communicate with the dash by that route. :unamused:

dmesg shows it being repeatedly polled

[ 80.994901] usb 1-1.5: new full-speed USB device number 68 using ehci-pci
[ 82.250861] usb 1-1.5: new full-speed USB device number 69 using ehci-pci
[ 83.506819] usb 1-1.5: new full-speed USB device number 70 using ehci-pci
[ 84.762781] usb 1-1.5: new full-speed USB device number 71 using ehci-pci
[ 86.018739] usb 1-1.5: new full-speed USB device number 72 using ehci-pci
[ 87.278709] usb 1-1.5: new full-speed USB device number 73 using ehci-pci
[ 88.534619] usb 1-1.5: new full-speed USB device number 74 using ehci-pci
[ 89.790616] usb 1-1.5: new full-speed USB device number 75 using ehci-pci
[ 91.046577] usb 1-1.5: new full-speed USB device number 76 using ehci-pci
[ 92.302557] usb 1-1.5: new full-speed USB device number 77 using ehci-pci
[ 93.562495] usb 1-1.5: new full-speed USB device number 78 using ehci-pci
[ 94.818406] usb 1-1.5: new full-speed USB device number 79 using ehci-pci
[ 96.074425] usb 1-1.5: new full-speed USB device number 80 using ehci-pci

Not sure if this relates to the udev rule or the firmware upgrade that resulted from finally making it work.

Dash has been sat idle in a drawer for 9 months, hope it’s not headed back there…

Ignore the above - seems to have been finger trouble on my part. :blush:

Loaded a previously working sketch and bingo, all is well again.

Great - glad you were able to get it working.

Was the dash just accidentally in program mode? We’re working on trying to make that a bit more obvious.

Basically, I went code-blind.

I experimented replacing a Dash.snooze() with a Dash.deepSleepSec() (which kills the usb serial) then got distracted moving from (windows) laptop to (Mint) desktop and forgot I’d done it.

Ah gotcha, thanks - been there :slightly_smiling_face:

Working on Ubuntu 16.04, Arduino IDE 1.8.3.
Adding the the rules fixed USB problems for me.

Am curious, what do the rules do?

Ran into something else:

I press the program button, a light flashes, then I successfully upload the program.
But when I try to open the serial console it gets an error saying the port is unavailable.

Anything I am doing wrong?

This occurred while running the dash_cloud example.

Am successfully communicating through serial using the repl_basic example.

Is there something in the dash_cloud that disables the USB?

Sorry for the basic questions. Am wanting to learn (:

The dash_cloud example is more of a code-walkthrough than anything. The Serial USB is not used in that sketch, so that’s why you don’t see it. The main message send functions are demonstrated in that sketch, along with sleep states. In deep sleep, the USB connection is terminated, so the serial port would be closed most of the time anyway.

When the Dash(Pro) is put into program mode, the Serial USB port is closed, so the port ‘goes away’. To get the Serial USB port to open in your sketch, call Serial.begin(); in the setup() function. The OS is in charge of assigning the actual port designation, so it may change when the Dash(Pro) is reset or re-programmed.

The rules file in Ubuntu designates the Dash(Pro) Serial USB port as a ‘normal’ serial port. Without the rules file, Ubuntu would treat the Dash(Pro) like a modem and try to send it AT commands, which doesn’t work for the normal Dash(Pro) setup.

If you want to try out the Dash(Pro) features, program the dash_repl_basic sketch from the Examples in the included DashReadEvalPrint library. It is also available on our Github repo dash_repl_basic.ino. This gives you a command prompt that allows you to control the Dash(Pro) via shell style commands over USB Serial. Press enter after loading to get a prompt. Type help to see a list of commands. For example:

cloud send "Hello, World!"

sends the message Hello, World! to the cloud.

Those are all great questions. Post more if you have them.

1 Like