Nasty MicroUSB cables

The official pyboard running MicroPython.
This is the reference design and main target board for MicroPython.
You can buy one at the store.
Target audience: Users with a pyboard.
Post Reply
torwag
Posts: 220
Joined: Fri Dec 13, 2013 9:25 am

Nasty MicroUSB cables

Post by torwag » Sun May 11, 2014 9:02 am

Hi,

there were several posts of people dealing with non-working connections to the computer.
Please be aware that not all MicroUSB cables on the market are suitable for micropython boards.
Esp. those (cheapo) cables you can buy for only a few dollars/Euros/Pound/Yen stating to "charge your smartphone" might only carry out the power lines but not the data lines of the USB connection. Thus, those cables will nicely power the micropython board but there will be no data connection.
Try another cable before fiddling hours with drivers and system settings. Most likely the cable which came with your smartphone or other devices which can be connected to your computer will be ok.

There is a page on the wiki starting to deal with all kind of connection and driver issues. Please add your findings if they are not yet written (it's a wiki ;) )

http://wiki.micropython.org/Installation

mnfisher
Posts: 10
Joined: Fri Jun 20, 2014 7:30 pm

Re: Nasty MicroUSB cables

Post by mnfisher » Sun Jun 22, 2014 9:51 pm

I get a problem with the pyboard disappearing after a few minutes of not being used (ie no input - occasionally doing so while typing too).

Using Putty (on Windows7) and with the board connected to a USB3 (powered) hub, putty gives "cannot write to serial port".
I can open the card from Explorer - but putty won't reconnect (just a cursor top left) if I close and & run it again.
Resetting the board (either button or unplugging) gets things going again - frustrating though!

I'm not sure if an alternate USB cable is the answer (works well with an arduino) - and Explorer has no problem seeing / reading as a drive.

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

Re: Nasty MicroUSB cables

Post by dhylands » Mon Jun 23, 2014 2:52 am

Do you happen to have a MicroSD card plugged in?

Certain MicroSD cards cause the micropython board to reset after 30 seconds.

mnfisher
Posts: 10
Joined: Fri Jun 20, 2014 7:30 pm

Re: Nasty MicroUSB cables

Post by mnfisher » Mon Jun 23, 2014 6:58 am

dhylands wrote:Do you happen to have a MicroSD card plugged in?

Certain MicroSD cards cause the micropython board to reset after 30 seconds.
No - happens with a 'bare' board. It also happens with LCD skin attached and/or a servo.. I'll try another cable / usb port (on the pc rather than the hub) this evening.

mnfisher
Posts: 10
Joined: Fri Jun 20, 2014 7:30 pm

Re: Nasty MicroUSB cables

Post by mnfisher » Tue Jun 24, 2014 6:53 am

Tried with different cable, port and computer.

It 'appears' that the input loop of the interpreter crashes - putty giving
error writing to serial port
- restarting putty gives a fixed cursor, and Ctrl C etc have no effect.
When running a program (main.py - Life in a loop) - the board runs happily for several hours (and CtrlC etc from putty do work)

Typing

Code: Select all

import time
time.localtime()
and then repeating (using up to repeat last line) at intervals, or just leaving the board idle - crashes after a few minutes (not sure if it is a consistent time)

supercooper
Posts: 5
Joined: Sat May 31, 2014 1:40 pm

Re: Nasty MicroUSB cables

Post by supercooper » Tue Jun 24, 2014 11:35 pm

Same here, except on OSX Mountain Lion, no microSD card in the board, with and without servos attached, mine appears to reset.
mnfisher wrote:
dhylands wrote:Do you happen to have a MicroSD card plugged in?

Certain MicroSD cards cause the micropython board to reset after 30 seconds.
No - happens with a 'bare' board. It also happens with LCD skin attached and/or a servo.. I'll try another cable / usb port (on the pc rather than the hub) this evening.

mnfisher
Posts: 10
Joined: Fri Jun 20, 2014 7:30 pm

Re: Nasty MicroUSB cables

Post by mnfisher » Wed Jun 25, 2014 8:38 pm

Also happens with the board attached and no activity at all (empty main.py) and no terminal connection. Trying to connect after ~5mins doesn't work without a board reset..

mnfisher
Posts: 10
Joined: Fri Jun 20, 2014 7:30 pm

Re: Nasty MicroUSB cables

Post by mnfisher » Sun Jun 29, 2014 10:03 am

A possible fix - flashed board with latest version of dfu file from:
http://micropython.org/download/
using the Dfuse demonstration from:
http://www.st.com/web/en/catalog/tools/ ... searchtype

After a worrying few minutes where the board wouldn't come out of dfu mode - note don't use STDfu tester to upload (it crashes and leaves things in a bad way)..... Everything up and running again.

Board seems more stable (a lot more stable) - will leave it alone and see how it fares.

Update - works for ~10 minutes (doing nothing but the occasional pyb.info()) before grinding to a halt as above.

Back to the drawing board.

Using hyperterminal (trial - the full version is $60!)- crashed at 6:17mins.

Changing baud rate to 115200 - things seemed rosier but only got to 8minutes. It 'could' be a windows driver problem? Will try under Linux.

torwag
Posts: 220
Joined: Fri Dec 13, 2013 9:25 am

Re: Nasty MicroUSB cables

Post by torwag » Sat Aug 09, 2014 9:09 pm

Recently I had all kind of funny effects using el-cheapo USB hubs.
Could you test the pyboard directly on a PC and if possible make sure its is one of the direct USB lines (not just another internal USB hub)
Normally, lines on the rear end of a PC are direct lines. Sometimes lines on the front of a PC tower might be a connected to a hub internally already.

Just to give you an idea. Recently, I had a USB device which enumerates correctly and was correctly recognized but I sending or receiving data was not working (some ethernet-over-USB). Took me half a day of fiddeling before I by chance removed it from the USB hub.

Hope that helps

mnfisher
Posts: 10
Joined: Fri Jun 20, 2014 7:30 pm

Re: Nasty MicroUSB cables

Post by mnfisher » Wed Aug 13, 2014 8:46 am

Haven't had much time to work with this lately..... Although I'd tried different USB ports (and the cheapo hub wasn't very!) - I'd tried multiple ports on the PC (a modern machine - MSI motherboard, i7) without joy.
That seems to work - connected to an old laptop (a ~7 yr old Core-2) and all seems well 20 minutes trying to hear the output from the AMP skin :-) Lcd working well..
Will leave attached for a 'soak' test.

Post Reply