Author Topic: DigiX - Eclipse on Ubuntu "No device found on /dev/ttyACM0" [Solved]  (Read 15669 times)

armband

  • Newbie
  • *
  • Posts: 12
I am sharing this nugget so that others won't have to go through the trials of discovering a solution for themselves.  Enjoy! (.. and comments welcome if there is an easier fix).
-Graham

Environment
   Board: DigiX
   OS:      Ubuntu 12.04 LTS
   Arduino IDE:  1.5.5r2
   Eclipse IDE:    Kepler
   Arduino Eclipse Plugin: v2.2 (http://www.baeyens.it/eclipse/)
   DigiXAddons: v07

Eclipse Arduino Project properties:
   Board.txt: digistump
   Board: Digistump DigiX (Standard)
   Port:   /dev/ttyACM0

Eclipse Arduino preferences
   Disable RxTx unselected (i.e. RXTX enabled).

Problem
Image upload works as expected when using the 1.5.5r2 Arduino IDE, but the same image upload fails when using the Eclipse IDE, generating an error in the Eclipse console as follows:

Launching /home/graham/arduino-1.5.5/hardware/tools/bossac --port=ttyACM0 -U true -e -w -v -b /home/graham/arduino_workspace/Test3/Release/Test3.bin -R
Output:
No device found on ttyACM0
bossac finished
upload done


Investigation Summary
The USB device is referenced by /dev/ttyACM0, with the following permissions:
0 crw-rw---- 1 root dialout 166, 0 Jan 25 14:00 /dev/ttyACM0

Running the bossac command from a terminal as root, or as a restricted user, generates the same error:
/home/graham/arduino-1.5.5/hardware/tools/bossac --port=ttyACM0 -U true --info
No device found on /dev/ttyACM0


After changing the port speed to 1200 baud, the bossac command completes without error:
$ stty -F /dev/ttyACM0 speed 1200 cs8 -cstopb -parenb
$ /home/graham/arduino-1.5.5/hardware/tools/bossac --port=ttyACM0 -U true --info
Device       : ATSAM3X8
Chip ID      : 285e0a60
Version      : v1.1 Dec 15 2010 19:25:04
Address      : 524288
Pages        : 2048
Page Size    : 256 bytes
Total Size   : 512KB
Planes       : 2
Lock Regions : 32
Locked       : none
Security     : false
Boot Flash   : false


Conclusion: This is not a permissions problem.  The bossac program can access the port but is not recognizing the DigiX device. This is a communications issue resulting from an incorrect port speed.
Update 1/28/14 - Please refer to gogol's explanation in follow-up posts.

Resolution
In order to recognize the DigiX board, bossac needs /dev/ttyACM0 to be manually set to a speed of 1200 prior to its execution.  After bossac has executed and completed the upload, the port speed must be manually set to a new value of 115200.

Prerequisites - Eclipse and sketch/project configured as per DigiX tutorial. http://digistump.com/wiki/digix/tutorials/eclipse (The difference being that port /dev/ttyACM0 is used, not COM31)

  • Close the Arduino IDE if it is running. (To avoid port contention)
  • Start Eclipse and open a DigiX project
  • Remove the /dev/ttyACM0 port from the Eclipse serial monitor view if it is active. (Click on the little grey x in the tabbed menu bar of the Serial monitor view).
  • Run the following command from a terminal window, prior to uploading via Eclipse:
    stty -F /dev/ttyACM0 speed 1200 cs8 -cstopb -parenb
  • Build the project and upload. The following text will be displayed in the Console pane:
    ...snip...
    Verify successful.
    Set boot flash true
    CPU reset.
    bossac finished
    upload done

    Note: During the Eclipse image upload, the bossac program will communicate with the DigiX board and negotiate a higher baud rate. (This is evidenced by the stty -F /dev/ttyACM0 command output, which [were you to run it] indicates a post-upload speed of 921600 baud)
  • Once the upload has completed, run the following command from a terminal window to reset the port speed:
    stty -F /dev/ttyACM0 speed 115200 cs8 -cstopb -parenb
  • Finally, to use the Serial monitor, add the port /dev/ttyACM0 with a speed of 115200.  (Click on the little green + in the tabbed menu bar of the Serial Monitor view).

There you have it, sketch uploaded and running!

--------
I expect this can be automated [** Yes it can! See update 02/03/14 below] ... but I have not found a good way to do it within the confines of Eclipse.  (e.g. by modifying the bossac tool properties in platform.txt).  Of course, a standalone shell script to change the speed, and even kick off the upload would be another alternative.

----------------------------------
Updated on 01/28/14.  Added text strikeouts to scrub incorrect and/or superfluous content.  Added a reference to gogol's explanation in the Conclusion section.

Updated 02/03/14.  [**] Added strikeout to "automation" comment above.  For more information about Eclipse-side updates, please refer to post titled 'Closing the loop - Digix/Eclipse and "No device found on /dev/ttyACM0"' (/board/index.php/topic,1297.msg5901.html#msg5901).
« Last Edit: February 03, 2014, 06:18:13 pm by armband »

gogol

  • Sr. Member
  • ****
  • Posts: 398
Re: DigiX - Eclipse on Ubuntu "No device found on /dev/ttyACM0" [Solved]
« Reply #1 on: January 26, 2014, 01:56:28 am »
Hello,

Quote
This is a communications issue resulting from an incorrect port speed.

No it's not!  It is an issue, that you try to communicate with the wrong device!

As soon, as the DigiX is running with an Arduino-Sketch, there is not SAM-BA daemon running, which is needed for bossac to talk with. 


That is the standard behavior of the DigiX, DUE and all other ATMEL ARM based devices, when connecting the RAW port.

As soon, as an Arduino sketch is running, the device is known with VID/PID 2341/003E as an Arduino DUE connected to the native port.
In that state, there is no SAM-BA running, so the bossac can't talk with it.
Do an "lsusb" on the command-line and you will see.

So you have to force the digiX to switch to the SAM-BA bootloader. That can be done by pressing ERASE, which will delete the GPNVM-bit 1 (besides the whole flash), and than RESET. Because GPNVM bit 1 is now "0", SAM-BA is booting up and bossac can talk with the chip!

Opening and closing the virtual-USB-COM-port with 1200 baud will do the same by deleting the flash and resetting the CPU. That happens in
./hardware/arduino/sam/cores/arduino/USB/CDC.cpp:
Code: [Select]
if (CDC_SET_CONTROL_LINE_STATE == r)
{
_usbLineInfo.lineState = setup.wValueL;
// auto-reset into the bootloader is triggered when the port, already
// open at 1200 bps, is closed.
if (1200 == _usbLineInfo.dwDTERate)
{
// We check DTR state to determine if host port is open (bit 0 of lineState).
if ((_usbLineInfo.lineState & 0x01) == 0)
initiateReset(250);
else
cancelReset();
}
return true;
}
}
return false;
}

However it happens only, when your program has not crashed.  When the device is back with running SAM-BA you see in lsusb the VID/PID: 03EB/6124, which shows the CORE Atmel device.

So each IDE has to make sure, that the triggering-event (opeing/closing with 1200 baud) takes place.  If that cannot take place, because the program on the DigiX stucks, you have to do that manually!

I have added a description into the WIKI: http://digistump.com/wiki/digix/tutorials/programming

The key in investigating communication problems with the DigiX is, to figure out, if it is currently an Atmel SAM-BA device, or if it is an Arduino!

As it changes the VID/PID it appears for the operating system, like unplugging device A and plugging DEVICE B to the same port!

So there is also no need, to set the tty back to higher speed after uploading.  After uploading the bossac tool triggers an reset, which will bring back the device in Arduino-Mode as an new device for linux.
The serial monitor (or any other terminal program) will configure the device usually themself.

You can watch this happen, when you start a "udevadm monitor" as root in another terminal, while programming the DigiX!
« Last Edit: January 26, 2014, 03:31:54 am by gogol »

gogol

  • Sr. Member
  • ****
  • Posts: 398
Re: DigiX - Eclipse on Ubuntu "No device found on /dev/ttyACM0" [Solved]
« Reply #2 on: January 26, 2014, 03:24:23 am »
And one more addition: If you have more than one device connected (or some udev-rules), it might happen, that the DigiX shows up with another devicename like /dev/ttyACM1 (As it is a disconnect/reconnect with new assignment of devicenames)

See for example:

There are two devices connected to the Host: 
One Native DUE with programming port on /dev/ttyACM0
One DigiX with native port on /dev/ttyACM1

Before continuing the work with the DigiX, the DUE gets unplugged.

udevadm monitor shows the following events:
Code: [Select]
KERNEL[792.688795] remove   /devices/pci0000:00/0000:00:06.0/usb2/2-2/2-2:1.0/tty/ttyACM0 (tty)
KERNEL[792.688835] remove   /devices/pci0000:00/0000:00:06.0/usb2/2-2/2-2:1.0 (usb)
KERNEL[792.688854] remove   /devices/pci0000:00/0000:00:06.0/usb2/2-2/2-2:1.1 (usb)
KERNEL[792.688873] remove   /devices/pci0000:00/0000:00:06.0/usb2/2-2 (usb)
UDEV  [792.690916] remove   /devices/pci0000:00/0000:00:06.0/usb2/2-2/2-2:1.1 (usb)
UDEV  [792.690960] remove   /devices/pci0000:00/0000:00:06.0/usb2/2-2/2-2:1.0/tty/ttyACM0 (tty)
UDEV  [792.690981] remove   /devices/pci0000:00/0000:00:06.0/usb2/2-2/2-2:1.0 (usb)
UDEV  [792.691007] remove   /devices/pci0000:00/0000:00:06.0/usb2/2-2 (usb)

after some time (hours, days, ..)  I enter
stty -F /dev/ttyACM1 speed 1200 cs8 -cstopb -parenb
to bring the DUE in SAM-BA mode

udevadm monitor shows the following events:
Code: [Select]
KERNEL[871.802424] add      /devices/pci0000:00/0000:00:0b.0/usb1/1-3 (usb)
KERNEL[871.805728] add      /devices/pci0000:00/0000:00:0b.0/usb1/1-3/1-3:1.0 (usb)
KERNEL[871.810936] add      /devices/pci0000:00/0000:00:0b.0/usb1/1-3/1-3:1.0/tty/ttyACM0 (tty)
KERNEL[871.810984] add      /devices/pci0000:00/0000:00:0b.0/usb1/1-3/1-3:1.1 (usb)
KERNEL[871.812439] remove   /devices/pci0000:00/0000:00:0b.0/usb1/1-2/1-2:1.0/tty/ttyACM1 (tty)
UDEV  [871.812475] remove   /devices/pci0000:00/0000:00:0b.0/usb1/1-2/1-2:1.0/tty/ttyACM1 (tty)
KERNEL[871.812496] remove   /devices/pci0000:00/0000:00:0b.0/usb1/1-2/1-2:1.0 (usb)
KERNEL[871.812514] remove   /devices/pci0000:00/0000:00:0b.0/usb1/1-2/1-2:1.1 (usb)
UDEV  [871.815549] add      /devices/pci0000:00/0000:00:0b.0/usb1/1-3 (usb)
UDEV  [871.816129] remove   /devices/pci0000:00/0000:00:0b.0/usb1/1-2/1-2:1.0 (usb)
UDEV  [871.817061] add      /devices/pci0000:00/0000:00:0b.0/usb1/1-3/1-3:1.0 (usb)
UDEV  [871.819232] add      /devices/pci0000:00/0000:00:0b.0/usb1/1-3/1-3:1.1 (usb)
UDEV  [871.819281] remove   /devices/pci0000:00/0000:00:0b.0/usb1/1-2/1-2:1.1 (usb)
UDEV  [871.823072] add      /devices/pci0000:00/0000:00:0b.0/usb1/1-3/1-3:1.0/tty/ttyACM0 (tty)
KERNEL[871.828502] remove   /devices/pci0000:00/0000:00:0b.0/usb1/1-2/1-2:1.2/input/input6/mouse2 (input)
UDEV  [871.829218] remove   /devices/pci0000:00/0000:00:0b.0/usb1/1-2/1-2:1.2/input/input6/mouse2 (input)
KERNEL[871.844416] remove   /devices/pci0000:00/0000:00:0b.0/usb1/1-2/1-2:1.2/input/input6/event6 (input)
UDEV  [871.845575] remove   /devices/pci0000:00/0000:00:0b.0/usb1/1-2/1-2:1.2/input/input6/event6 (input)
KERNEL[871.861179] remove   /devices/pci0000:00/0000:00:0b.0/usb1/1-2/1-2:1.2/input/input6 (input)
KERNEL[871.861210] remove   /devices/pci0000:00/0000:00:0b.0/usb1/1-2/1-2:1.2/0003:2341:003E.0002/hidraw/hidraw1 (hidraw)
KERNEL[871.861229] remove   /devices/pci0000:00/0000:00:0b.0/usb1/1-2/1-2:1.2/0003:2341:003E.0002 (hid)
KERNEL[871.861247] remove   /devices/pci0000:00/0000:00:0b.0/usb1/1-2/1-2:1.2 (usb)
KERNEL[871.861265] remove   /devices/pci0000:00/0000:00:0b.0/usb1/1-2 (usb)
UDEV  [871.862304] remove   /devices/pci0000:00/0000:00:0b.0/usb1/1-2/1-2:1.2/0003:2341:003E.0002/hidraw/hidraw1 (hidraw)
UDEV  [871.862345] remove   /devices/pci0000:00/0000:00:0b.0/usb1/1-2/1-2:1.2/input/input6 (input)
UDEV  [871.862366] remove   /devices/pci0000:00/0000:00:0b.0/usb1/1-2/1-2:1.2/0003:2341:003E.0002 (hid)
UDEV  [871.863039] remove   /devices/pci0000:00/0000:00:0b.0/usb1/1-2/1-2:1.2 (usb)
UDEV  [871.863741] remove   /devices/pci0000:00/0000:00:0b.0/usb1/1-2 (usb)

And now the DigiX is connected to /dev/ttyACM0, as that device was free at time of reset.

Windows-Users will have that behaviour all the time, as Windows assigns the COM-port-name (e.g. COM8, COM11) to each unique combination of VID/PID and used COM-Port.  So the same DigiX has all the time TWO different COM-port-names depending of its state!

That knowledge is crucial to understand connectivity.

That is the reason, why Arduino came up with the programming port, where the VID/PID and the corresponding USB connection stays stable.
« Last Edit: January 26, 2014, 03:33:46 am by gogol »

armband

  • Newbie
  • *
  • Posts: 12
Re: DigiX - Eclipse on Ubuntu "No device found on /dev/ttyACM0" [Solved]
« Reply #3 on: January 26, 2014, 07:50:41 am »
@gogol

Thank you for your detailed explanation, I stand corrected!  I had no idea that the port speed change has the desired effect, but only because it forces the target to switch to the SAM-BA boot loader.

Quote
As soon, as an Arduino sketch is running, the device is known with VID/PID 2341/003E as an Arduino DUE connected to the native port.
In that state, there is no SAM-BA running, so the bossac can't talk with it.
Do an "lsusb" on the command-line and you will see.

I have observed that after switching (by resetting the port speed to 1200 baud), I see the Atmel entry listed in the lsusb output as you predicted:

Code: [Select]
Bus 002 Device 022: ID 03eb:6124 Atmel Corp. at91sam SAMBA bootloader

After running the bossac upload, the above entry disappears from the lsusb output as expected ... however, it is not replaced with an Arduino mode entry (You stated 2341/003E for the DUE, but I think that I should be expecting to see the 16D0:078A for the Digistump DigiX VID/PID). Clearly I am able to communicate with the program via the /dev/ttyACM0 serial monitor.  I admit, I don't fully understand what is going on here, but will dig into the Arduino USB code to see if I can figure it out.  :)

Quote
So there is also no need, to set the tty back to higher speed after uploading.  After uploading the bossac tool triggers an reset, which will bring back the device in Arduino-Mode as an new device for linux.
The serial monitor (or any other terminal program) will configure the device usually themself.

I have confirmed the above.  Step 6. in my original post is superfluous.

Thanks again.
-G
« Last Edit: January 26, 2014, 07:52:32 am by armband »

gogol

  • Sr. Member
  • ****
  • Posts: 398
Re: DigiX - Eclipse on Ubuntu "No device found on /dev/ttyACM0" [Solved]
« Reply #4 on: January 26, 2014, 07:53:49 am »
If you are working with the DigiX variant, you will see of course the DigiX VID/PID!

I tried first to stay in the DUE compatible world with all those explanations, but that needs to be added as well!

What happens, is that while a program is running on the ATSAM3X8E, that program is initialzing the USB and setting a VID/PID according to the program and its manufacturer.
When the CPU is in SAM-BA mode, it runs with the Atmle SAM-BA VID/PID. And only in that mode tools like bossac and sam-ba can talk to.

« Last Edit: January 26, 2014, 07:57:39 am by gogol »

armband

  • Newbie
  • *
  • Posts: 12
Re: DigiX - Eclipse on Ubuntu "No device found on /dev/ttyACM0" [Solved]
« Reply #5 on: January 26, 2014, 09:04:30 am »
Quote
If you are working with the DigiX variant, you will see of course the DigiX VID/PID!
... snip ...
What happens, is that while a program is running on the ATSAM3X8E, that program is initialzing the USB and setting a VID/PID according to the program and its manufacturer.

Thanks, based on your explanation that is what I expected ... The dmesg output contains the Digistump VID/PID [16D0:078A] USB entry -> /dev/ttyACM0, logged when the Arduino mode is entered.   It is worth noting that on my setup, the lsusb command does not list any DigiX VID/PID at this point ... as far as lsusb is concerned the board is invisible.

Cheers!

gogol

  • Sr. Member
  • ****
  • Posts: 398
Re: DigiX - Eclipse on Ubuntu "No device found on /dev/ttyACM0" [Solved]
« Reply #6 on: January 26, 2014, 09:39:58 am »
and what is udevadm monitor telling?

armband

  • Newbie
  • *
  • Posts: 12
Re: DigiX - Eclipse on Ubuntu "No device found on /dev/ttyACM0" [Solved]
« Reply #7 on: January 26, 2014, 11:06:52 am »
Quote
and what is udevadm monitor telling?

I must be a bit of a bozo because I have just noticed that the DigiX does appear in the lsusb output ... just not listed as DigiX ... it is listed as a Grautec device.

Here are the captures of during the upload sequence.  To keep this  standard, I used the regular Arduino IDE to perform this test (Not Eclipse).

uadmdev (Monitored during upload)
Code: [Select]
monitor will print the received events for:
UDEV - the event which udev sends out after rule processing
KERNEL - the kernel uevent

KERNEL[5011.252149] remove   /devices/pci0000:00/0000:00:1a.7/usb1/1-4/1-4:1.0/tty/ttyACM0 (tty)
KERNEL[5011.252231] remove   /devices/pci0000:00/0000:00:1a.7/usb1/1-4/1-4:1.0 (usb)
KERNEL[5011.252280] remove   /devices/pci0000:00/0000:00:1a.7/usb1/1-4/1-4:1.1 (usb)
UDEV  [5011.254799] remove   /devices/pci0000:00/0000:00:1a.7/usb1/1-4/1-4:1.1 (usb)
UDEV  [5011.259655] remove   /devices/pci0000:00/0000:00:1a.7/usb1/1-4/1-4:1.0/tty/ttyACM0 (tty)
UDEV  [5011.263298] remove   /devices/pci0000:00/0000:00:1a.7/usb1/1-4/1-4:1.0 (usb)
KERNEL[5011.272290] remove   /devices/pci0000:00/0000:00:1a.7/usb1/1-4/1-4:1.2/input/input16/mouse1 (input)
UDEV  [5011.274787] remove   /devices/pci0000:00/0000:00:1a.7/usb1/1-4/1-4:1.2/input/input16/mouse1 (input)
KERNEL[5011.288211] remove   /devices/pci0000:00/0000:00:1a.7/usb1/1-4/1-4:1.2/input/input16/event11 (input)
UDEV  [5011.290881] remove   /devices/pci0000:00/0000:00:1a.7/usb1/1-4/1-4:1.2/input/input16/event11 (input)
KERNEL[5011.312319] remove   /devices/pci0000:00/0000:00:1a.7/usb1/1-4/1-4:1.2/input/input16 (input)
KERNEL[5011.312662] remove   /devices/pci0000:00/0000:00:1a.7/usb1/1-4/1-4:1.2/0003:16D0:078A.0006/hidraw/hidraw0 (hidraw)
KERNEL[5011.312718] remove   /devices/pci0000:00/0000:00:1a.7/usb1/1-4/1-4:1.2/0003:16D0:078A.0006 (hid)
KERNEL[5011.312764] remove   /devices/pci0000:00/0000:00:1a.7/usb1/1-4/1-4:1.2 (usb)
KERNEL[5011.312929] remove   /devices/pci0000:00/0000:00:1a.7/usb1/1-4 (usb)
UDEV  [5011.323458] remove   /devices/pci0000:00/0000:00:1a.7/usb1/1-4/1-4:1.2/0003:16D0:078A.0006/hidraw/hidraw0 (hidraw)
UDEV  [5011.324743] remove   /devices/pci0000:00/0000:00:1a.7/usb1/1-4/1-4:1.2/input/input16 (input)
UDEV  [5011.330062] remove   /devices/pci0000:00/0000:00:1a.7/usb1/1-4/1-4:1.2/0003:16D0:078A.0006 (hid)
UDEV  [5011.333607] remove   /devices/pci0000:00/0000:00:1a.7/usb1/1-4/1-4:1.2 (usb)
UDEV  [5011.337338] remove   /devices/pci0000:00/0000:00:1a.7/usb1/1-4 (usb)
KERNEL[5011.716765] add      /devices/pci0000:00/0000:00:1a.7/usb1/1-4 (usb)
KERNEL[5011.717270] add      /devices/pci0000:00/0000:00:1a.7/usb1/1-4/1-4:1.0 (usb)
KERNEL[5011.718013] add      /devices/pci0000:00/0000:00:1a.7/usb1/1-4/1-4:1.0/tty/ttyACM0 (tty)
KERNEL[5011.718070] add      /devices/pci0000:00/0000:00:1a.7/usb1/1-4/1-4:1.1 (usb)
UDEV  [5011.728437] add      /devices/pci0000:00/0000:00:1a.7/usb1/1-4 (usb)
UDEV  [5011.734372] add      /devices/pci0000:00/0000:00:1a.7/usb1/1-4/1-4:1.1 (usb)
UDEV  [5011.739116] add      /devices/pci0000:00/0000:00:1a.7/usb1/1-4/1-4:1.0 (usb)
UDEV  [5011.743530] add      /devices/pci0000:00/0000:00:1a.7/usb1/1-4/1-4:1.0/tty/ttyACM0 (tty)
KERNEL[5014.292575] remove   /devices/pci0000:00/0000:00:1a.7/usb1/1-4/1-4:1.0 (usb)
KERNEL[5014.292634] remove   /devices/pci0000:00/0000:00:1a.7/usb1/1-4/1-4:1.1 (usb)
KERNEL[5014.295714] remove   /devices/pci0000:00/0000:00:1a.7/usb1/1-4 (usb)
UDEV  [5014.295793] remove   /devices/pci0000:00/0000:00:1a.7/usb1/1-4/1-4:1.1 (usb)
UDEV  [5014.296723] remove   /devices/pci0000:00/0000:00:1a.7/usb1/1-4/1-4:1.0 (usb)
UDEV  [5014.299823] remove   /devices/pci0000:00/0000:00:1a.7/usb1/1-4 (usb)
KERNEL[5014.390708] remove   /1-4:1.0/tty/ttyACM0 (tty)
UDEV  [5014.395376] remove   /1-4:1.0/tty/ttyACM0 (tty)
KERNEL[5014.701115] add      /devices/pci0000:00/0000:00:1a.7/usb1/1-4 (usb)
KERNEL[5014.704095] add      /devices/pci0000:00/0000:00:1a.7/usb1/1-4/1-4:1.0 (usb)
KERNEL[5014.704168] add      /devices/pci0000:00/0000:00:1a.7/usb1/1-4/1-4:1.0/tty/ttyACM0 (tty)
KERNEL[5014.704218] add      /devices/pci0000:00/0000:00:1a.7/usb1/1-4/1-4:1.1 (usb)
KERNEL[5014.704263] add      /devices/pci0000:00/0000:00:1a.7/usb1/1-4/1-4:1.2 (usb)
KERNEL[5014.704308] add      /devices/pci0000:00/0000:00:1a.7/usb1/1-4/1-4:1.2/0003:16D0:078A.0007 (hid)
KERNEL[5014.704594] add      /devices/pci0000:00/0000:00:1a.7/usb1/1-4/1-4:1.2/input/input17 (input)
KERNEL[5014.704981] add      /devices/pci0000:00/0000:00:1a.7/usb1/1-4/1-4:1.2/input/input17/mouse1 (input)
KERNEL[5014.705205] add      /devices/pci0000:00/0000:00:1a.7/usb1/1-4/1-4:1.2/input/input17/event11 (input)
KERNEL[5014.705486] add      /devices/pci0000:00/0000:00:1a.7/usb1/1-4/1-4:1.2/0003:16D0:078A.0007/hidraw/hidraw0 (hidraw)
UDEV  [5014.721380] add      /devices/pci0000:00/0000:00:1a.7/usb1/1-4 (usb)
UDEV  [5014.732242] add      /devices/pci0000:00/0000:00:1a.7/usb1/1-4/1-4:1.0 (usb)
UDEV  [5014.736546] add      /devices/pci0000:00/0000:00:1a.7/usb1/1-4/1-4:1.1 (usb)
UDEV  [5014.740809] add      /devices/pci0000:00/0000:00:1a.7/usb1/1-4/1-4:1.2 (usb)
UDEV  [5014.744376] add      /devices/pci0000:00/0000:00:1a.7/usb1/1-4/1-4:1.2/0003:16D0:078A.0007 (hid)
UDEV  [5014.745650] add      /devices/pci0000:00/0000:00:1a.7/usb1/1-4/1-4:1.2/0003:16D0:078A.0007/hidraw/hidraw0 (hidraw)
UDEV  [5014.746198] add      /devices/pci0000:00/0000:00:1a.7/usb1/1-4/1-4:1.0/tty/ttyACM0 (tty)
UDEV  [5014.748753] add      /devices/pci0000:00/0000:00:1a.7/usb1/1-4/1-4:1.2/input/input17 (input)
UDEV  [5014.750741] add      /devices/pci0000:00/0000:00:1a.7/usb1/1-4/1-4:1.2/input/input17/mouse1 (input)
UDEV  [5014.751036] add      /devices/pci0000:00/0000:00:1a.7/usb1/1-4/1-4:1.2/input/input17/event11 (input)

dmesg (Messages dumped during upload)
Note that the DigiX is recognized as "USB HID v1.01 Mouse" ... this looks odd
Code: [Select]
[ 5011.244339] usb 1-4: USB disconnect, device number 10
[ 5011.255140] tty_port_close_start: tty->count = 1 port count = 0.
[ 5011.584077] usb 1-4: new high-speed USB device number 11 using ehci_hcd
[ 5011.717078] cdc_acm 1-4:1.0: This device cannot do calls on its own. It is not a modem.
[ 5011.717213] cdc_acm 1-4:1.0: ttyACM0: USB ACM device
[ 5014.289486] usb 1-4: USB disconnect, device number 11
[ 5014.568066] usb 1-4: new high-speed USB device number 12 using ehci_hcd
[ 5014.701309] cdc_acm 1-4:1.0: This device cannot do calls on its own. It is not a modem.
[ 5014.701460] cdc_acm 1-4:1.0: ttyACM0: USB ACM device
[ 5014.704634] input: Digistump Digistump DigiX as /devices/pci0000:00/0000:00:1a.7/usb1/1-4/1-4:1.2/input/input17
[ 5014.705329] generic-usb 0003:16D0:078A.0007: input,hidraw0: USB HID v1.01 Mouse [Digistump Digistump DigiX] on usb-0000:00:1a.7-4/input2

lsusb (Run after upload completed)

Code: [Select]
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 002: ID 0408:030c Quanta Computer, Inc. HP Webcam
Bus 001 Device 012: ID 16d0:078a GrauTec

To be complete, here are the logs captured when I ran stty -F /dev/ttyACM0 speed 1200 cs8 -cstopb -parenb`

uadmdev (Monitored during stty exec)
Code: [Select]
monitor will print the received events for:
UDEV - the event which udev sends out after rule processing
KERNEL - the kernel uevent

KERNEL[5646.153079] remove   /devices/pci0000:00/0000:00:1a.7/usb1/1-4/1-4:1.0/tty/ttyACM0 (tty)
KERNEL[5646.153132] remove   /devices/pci0000:00/0000:00:1a.7/usb1/1-4/1-4:1.0 (usb)
KERNEL[5646.153161] remove   /devices/pci0000:00/0000:00:1a.7/usb1/1-4/1-4:1.1 (usb)
UDEV  [5646.155829] remove   /devices/pci0000:00/0000:00:1a.7/usb1/1-4/1-4:1.1 (usb)
UDEV  [5646.155938] remove   /devices/pci0000:00/0000:00:1a.7/usb1/1-4/1-4:1.0/tty/ttyACM0 (tty)
UDEV  [5646.161733] remove   /devices/pci0000:00/0000:00:1a.7/usb1/1-4/1-4:1.0 (usb)
KERNEL[5646.188260] remove   /devices/pci0000:00/0000:00:1a.7/usb1/1-4/1-4:1.2/input/input17/mouse1 (input)
UDEV  [5646.192228] remove   /devices/pci0000:00/0000:00:1a.7/usb1/1-4/1-4:1.2/input/input17/mouse1 (input)
KERNEL[5646.200220] remove   /devices/pci0000:00/0000:00:1a.7/usb1/1-4/1-4:1.2/input/input17/event11 (input)
UDEV  [5646.202950] remove   /devices/pci0000:00/0000:00:1a.7/usb1/1-4/1-4:1.2/input/input17/event11 (input)
KERNEL[5646.220240] remove   /devices/pci0000:00/0000:00:1a.7/usb1/1-4/1-4:1.2/input/input17 (input)
KERNEL[5646.220482] remove   /devices/pci0000:00/0000:00:1a.7/usb1/1-4/1-4:1.2/0003:16D0:078A.0007/hidraw/hidraw0 (hidraw)
KERNEL[5646.220538] remove   /devices/pci0000:00/0000:00:1a.7/usb1/1-4/1-4:1.2/0003:16D0:078A.0007 (hid)
KERNEL[5646.220582] remove   /devices/pci0000:00/0000:00:1a.7/usb1/1-4/1-4:1.2 (usb)
KERNEL[5646.220632] remove   /devices/pci0000:00/0000:00:1a.7/usb1/1-4 (usb)
UDEV  [5646.230055] remove   /devices/pci0000:00/0000:00:1a.7/usb1/1-4/1-4:1.2/0003:16D0:078A.0007/hidraw/hidraw0 (hidraw)
UDEV  [5646.231250] remove   /devices/pci0000:00/0000:00:1a.7/usb1/1-4/1-4:1.2/input/input17 (input)
UDEV  [5646.234000] remove   /devices/pci0000:00/0000:00:1a.7/usb1/1-4/1-4:1.2/0003:16D0:078A.0007 (hid)
UDEV  [5646.236850] remove   /devices/pci0000:00/0000:00:1a.7/usb1/1-4/1-4:1.2 (usb)
UDEV  [5646.240358] remove   /devices/pci0000:00/0000:00:1a.7/usb1/1-4 (usb)
KERNEL[5646.624819] add      /devices/pci0000:00/0000:00:1a.7/usb1/1-4 (usb)
KERNEL[5646.625181] add      /devices/pci0000:00/0000:00:1a.7/usb1/1-4/1-4:1.0 (usb)
KERNEL[5646.625899] add      /devices/pci0000:00/0000:00:1a.7/usb1/1-4/1-4:1.0/tty/ttyACM0 (tty)
KERNEL[5646.625955] add      /devices/pci0000:00/0000:00:1a.7/usb1/1-4/1-4:1.1 (usb)
UDEV  [5646.636758] add      /devices/pci0000:00/0000:00:1a.7/usb1/1-4 (usb)
UDEV  [5646.643251] add      /devices/pci0000:00/0000:00:1a.7/usb1/1-4/1-4:1.0 (usb)
UDEV  [5646.643560] add      /devices/pci0000:00/0000:00:1a.7/usb1/1-4/1-4:1.1 (usb)
UDEV  [5646.647363] add      /devices/pci0000:00/0000:00:1a.7/usb1/1-4/1-4:1.0/tty/ttyACM0 (tty)

dmesg (Messages dumped during stty exec)
Code: [Select]
[ 5646.152764] usb 1-4: USB disconnect, device number 12
[ 5646.492091] usb 1-4: new high-speed USB device number 13 using ehci_hcd
[ 5646.624976] cdc_acm 1-4:1.0: This device cannot do calls on its own. It is not a modem.
[ 5646.625128] cdc_acm 1-4:1.0: ttyACM0: USB ACM device

lsusb (Run after stty completed)
Code: [Select]
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 002: ID 0408:030c Quanta Computer, Inc. HP Webcam
Bus 001 Device 013: ID 03eb:6124 Atmel Corp. at91sam SAMBA bootloader

gogol

  • Sr. Member
  • ****
  • Posts: 398
Re: DigiX - Eclipse on Ubuntu "No device found on /dev/ttyACM0" [Solved]
« Reply #8 on: January 27, 2014, 12:46:39 am »
Quote
Note that the DigiX is recognized as "USB HID v1.01 Mouse" ... this looks odd
That is because teh DigiX can emulate HID devices. So the USB stack is already prepared. Same with the DUE.

Quote
I have just noticed that the DigiX does appear in the lsusb output ... just not listed as DigiX ... it is listed as a Grautec device.
That is one odd thing in Linux with the Vendor-ID "16d0"
A company MSC is selling individual PIDs for that VID (http://www.mcselec.com/index.php?page=shop.product_details&product_id=92&option=com_phpshop)
Apparently the company Grautec, which bought some of them, was one of the first, bringing them into the linux-kernel VID-library.  So their name is registered as the owner of the VID, which is wrong, as they are just one of the users. https://usb-ids.gowdy.us/read/UD/16d0



armband

  • Newbie
  • *
  • Posts: 12
Re: DigiX - Eclipse on Ubuntu "No device found on /dev/ttyACM0" [Solved]
« Reply #9 on: January 28, 2014, 01:49:55 pm »
@gogol

Thank you for your help and assistance.  I have Eclipse up and running, and have learned a fair amount in the process.  I have made a few minor edits to my original posting, striking out the bad information, in an effort to avoid confusing those who visit this topic in the future.

Cheers, and much appreciated!

-Graham

armband

  • Newbie
  • *
  • Posts: 12
Closing the loop - Digix/Eclipse and "No device found on /dev/ttyACM0"
« Reply #10 on: February 03, 2014, 05:52:45 pm »
I just wanted to close the loop on this issue.  I have made a few changes to my v2.2 arduino-eclipse-plugin installation so that 'set terminal speed' does now trigger automatically prior to an image upload from Eclipse.  The key changes have been merged by jantje into the master repository.  (jantje has done a great job with this Eclipse plugin and should be commended).

BTW: The corrected behavior harks back to gogol's comment:
Quote
So each IDE has to make sure, that the triggering-event (opeing/closing with 1200 baud) takes place.  ...
With the fix, this triggering-event now happens in sequence.

An updated version of the v2.2 arduino-eclipse-plugin (which contains the necessary fixes) is available from the jantje / arduino-eclipse-plugin nightly build download site http://www.baeyens.it/eclipse/download.php.  See comments for issue #124 on the Githib site. https://github.com/jantje/arduino-eclipse-plugin
« Last Edit: February 03, 2014, 07:07:36 pm by armband »