Cannot connect to pyboard via serial (Linux/Ubuntu)

General discussions and questions abound development of code with MicroPython that is not hardware specific.
Target audience: MicroPython Users.
Post Reply
salimfadhley
Posts: 22
Joined: Thu Jun 19, 2014 10:18 pm

Cannot connect to pyboard via serial (Linux/Ubuntu)

Post by salimfadhley » Thu Jun 19, 2014 10:21 pm

I've not yet been able to get all the tutorial working.

When I try to connect to the device with the command screen /dev/ttyACM0

I get:

[screen is terminating]

I expect it's because something is going wrong at Plug & Play time. Could somebody suggest how I might get this working?

Code: Select all

Jun 19 23:14:19 halob ModemManager[801]: <info>  Creating modem with plugin 'Generic' and '1' ports
Jun 19 23:14:19 halob ModemManager[801]: <warn>  Could not grab port (tty/ttyACM0): 'Cannot add port 'tty/ttyACM0', unhandled serial type'
Jun 19 23:14:19 halob ModemManager[801]: <warn>  Couldn't create modem for device at '/sys/devices/pci0000:00/0000:00:1c.3/0000:04:00.0/usb3/3-2': Failed to find primary AT port

User avatar
dhylands
Posts: 3821
Joined: Mon Jan 06, 2014 6:08 pm
Location: Peachland, BC, Canada
Contact:

Re: Cannot connect to pyboard via serial

Post by dhylands » Sat Jun 21, 2014 5:38 am

I replied on the google group, but I'll add my reply here as well, since I suspect more people read this.

I create a file called 49-micropython.rules and put it in /etc/udev/rules.d (you'll need to use sudo to copy it in).

49-micropython.rules contains:

Code: Select all

I created a file called 49-micropython.rules and placed it in /etc/udev/rules.d

The 49-micropython.rules file contains:
# f055:9800 - MicroPython board
ATTRS{idVendor}=="f055", ATTRS{idProduct}=="9800", ENV{ID_MM_DEVICE_IGNORE}="1"
ATTRS{idVendor}=="f055", ATTRS{idProduct}=="9800", ENV{MTP_NO_PROBE}="1"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="f055", ATTRS{idProduct}=="9800", MODE:="0666"
KERNEL=="ttyACM*", ATTRS{idVendor}=="f055", ATTRS{idProduct}=="9800", MODE:="0666"
After copying the file you need to run:

Code: Select all

sudo udevadm control --reload-rules
and then unplug and replug the USB cable.

Mr.Nordheim
Posts: 14
Joined: Wed May 07, 2014 7:32 pm
Location: Norway

Re: Cannot connect to pyboard via serial

Post by Mr.Nordheim » Sat Jun 21, 2014 9:33 am

salimfadhley wrote:I've not yet been able to get all the tutorial working.

When I try to connect to the device with the command screen /dev/ttyACM0

I get:

[screen is terminating]

I expect it's because something is going wrong at Plug & Play time. Could somebody suggest how I might get this working?

Code: Select all

Jun 19 23:14:19 halob ModemManager[801]: <info>  Creating modem with plugin 'Generic' and '1' ports
Jun 19 23:14:19 halob ModemManager[801]: <warn>  Could not grab port (tty/ttyACM0): 'Cannot add port 'tty/ttyACM0', unhandled serial type'
Jun 19 23:14:19 halob ModemManager[801]: <warn>  Couldn't create modem for device at '/sys/devices/pci0000:00/0000:00:1c.3/0000:04:00.0/usb3/3-2': Failed to find primary AT port
I do not mean to be picky, but I think that this post would have some more value if os was stated in the header.

salimfadhley
Posts: 22
Joined: Thu Jun 19, 2014 10:18 pm

Re: Cannot connect to pyboard via serial

Post by salimfadhley » Sat Jun 21, 2014 10:21 pm

Sorry! Ubuntu 14.4 64bit

I've found the solution - I needed to add some udev configuration:

/etc/udev/rules.d/49-micropython.rules file with the following contents:

# f055:9800 - MicroPython board
ATTRS{idVendor}=="f055", ATTRS{idProduct}=="9800", ENV{ID_MM_DEVICE_IGNORE}="1"
ATTRS{idVendor}=="f055", ATTRS{idProduct}=="9800", ENV{MTP_NO_PROBE}="1"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="f055", ATTRS{idProduct}=="9800", MODE:="0666"
KERNEL=="ttyACM*", ATTRS{idVendor}=="f055", ATTRS{idProduct}=="9800", MODE:="0666"

salimfadhley
Posts: 22
Joined: Thu Jun 19, 2014 10:18 pm

Re: Cannot connect to pyboard via serial

Post by salimfadhley » Sun Jun 22, 2014 10:40 pm

I added this information to the micropython wiki.

Awesome work - thanks for helping me fix this.

User avatar
dhylands
Posts: 3821
Joined: Mon Jan 06, 2014 6:08 pm
Location: Peachland, BC, Canada
Contact:

Re: Cannot connect to pyboard via serial

Post by dhylands » Mon Jun 23, 2014 12:59 am

Mr.Nordheim wrote: I do not mean to be picky, but I think that this post would have some more value if os was stated in the header.
I went ahead and edited the title to include the OS.

Post Reply