MM board not detected on one machine.

Post Reply
powerslave12r
Posts: 4
Joined: Wed May 31, 2017 11:03 am

MM board not detected on one machine.

Post by powerslave12r » Sun Jun 18, 2017 4:30 am

TLDR: One board works with one laptop but not another. Another board works with both the laptops. Not sure what the problem is.

Hi there,

I have two Maple mini boards (non baites I believe). I have two laptops, both running *buntu (14.04 and 16.04). I have followed instructions from the wiki for installation.

Let's call the two boards: B1 and B2.
Let's call the laptops: L1 and L2.

B2 + L2 is what is giving me issues.

B1 works fine with both laptops L1 and L2.
B2 can have sketches uploaded using L1 but not with L2.

When I connect B2 to L2, it doesn't even show up in /dev/tty*. The Arduino IDE "Ports" option is greyed out. When I connect B2 to L1, it doesn't show ttyACM0 but a 'native' serial port (/dev/ttyS4) and uploading a sketch to it works.

For B2 on L2, lsusb gives me the id for the connected board (1eaf:0003). Using that, I tried the following command successfully for B2 on both laptops.

Code: Select all

sudo dfu-util -d [1eaf:0003] -a 1 -v -D maple_mini_boot.bin
And it completes successfully on both machines. But I can only upload sketches from L1.

I also tried different cables to no effect.

Both boards supposedly came with maple bootloaders(I presume), B1 just works but B2 never worked on L2.

I tried setting up the environment in Windows on L2 and it behaves the same way - Port option is greyed out. The Device Manager does show 'Maple Mini 003' (or something to that effect, but not 'DFU').

Please pardon my ignorance if I'm overlooking something dead simple/covered in some topic.

Any help appreciated! Thank you!

EDIT: Add TLDR.

User avatar
RogerClark
Posts: 6117
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: MM board not detected on one machine.

Post by RogerClark » Sun Jun 18, 2017 5:14 am

Not that I think this is the issue

But the latest bootloader is here

https://github.com/rogerclarkmelbourne/ ... 1/binaries

maple_mini_boot20.bin

Secondly.

Try uploading a sketch that prints something to Serial

Code: Select all

void setup() {
  pinMode(PB1, OUTPUT);
}

int c=0;

// the loop function runs over and over again forever
void loop() {
  Serial.println(c++);
  digitalWrite(PB1, HIGH);   
  delay(500);                    
  digitalWrite(PB1, LOW);  
  delay(100);                    
}
Also, check you have the correct board set (I presume you set Maple Mini)

Also make sure you selected the correct bootloader version (but it should be OK as it defaults to the old bootloader)


One GotYa that comes up over and over again, is that the Serial device is NOT part of the bootloader, its part of the sketch

So if you didnt manage to upload a sketch, you won't get the serial device

zmemw16
Posts: 1262
Joined: Wed Jul 08, 2015 2:09 pm
Location: St Annes, Lancs,UK

Re: MM board not detected on one machine.

Post by zmemw16 » Sun Jun 18, 2017 6:32 am

you may want to check the /dev/ directory for ttyACM* and ttyUSB entries.
mine appear correctly from a cold boot on Debian Jessie 8.x 64 bit, but I quite
regularly have to unplug all (STLink, 2 FTDI usb, Openbench Logic sniffer, UUT) and slowly re-insert them into the hub, whilst 'watch comms' is running.
Where i plug them into the hub is also significant.
stephen
comms.sh.txt
(72 Bytes) Downloaded 3 times

powerslave12r
Posts: 4
Joined: Wed May 31, 2017 11:03 am

Re: MM board not detected on one machine.

Post by powerslave12r » Sun Jun 18, 2017 2:09 pm

Thank you to all for your help.

It works, and I suspect, has been working all along.

The Arduino IDE (1.8.3) 'Tools > Port' options stays greyed no matter what, but I'm still able to upload sketches to the board. Weird that the other laptop with the same IDE version does not grey out the option.

There is something different between the two MM boards though, which I would like to understand. One board ("the good one") - B1, shows up as ttyACM0 and Arduino IDE shows that under Tools > Ports. The other board, B2, does not show up as /dev/ttyACM0 and does not show up under Arduino IDE's Tools > Ports menu (greyed out). I'm able to upload sketches to both. What am I missing?

I'll go ahead and update the bootloader to the latest one in any case.

Thank you for your help and thank you Roger for all your work.

As an aside, I'll dump this from my attempts, perhaps it might be of some relevance.
Set up two terminals with:
- watch -n 1 lsusb
- watch -n 1 ls /dev/ttyACM*

When I plug the board that "does NOT work" - B2:
- lsusb shows the following momentarily and then it goes away:
"Bus 002 Device 061: ID 1eaf:0003"
- I can get this same behavior by pressing the reset button.
- ls /dev/ttyACM* shows nothing

When I plug in the board that works - B1:
- lsusb show momentarily: "Bus 002 Device 067: ID 1eaf:0003", then it goes away,
- and comes back as "Bus 002 Device 068: ID 1eaf:0004"
- Note the incremented device ID number
- ls /dev/ttyACM* shows the ttyACM0 port.

powerslave12r
Posts: 4
Joined: Wed May 31, 2017 11:03 am

Re: MM board not detected on one machine.

Post by powerslave12r » Sun Jun 18, 2017 6:52 pm

Just looked and B2 has the "STM32F103RCBT6" a.k.a "STM32F103CBT6" and the other one - B1 - is STM32F103C8T6.

Not sure if those should behave differently, and whether they need different settings in the Arduino IDE, but there it is.

Mystery solved, I guess. :x

ag123
Posts: 663
Joined: Thu Jul 21, 2016 4:24 pm

Re: MM board not detected on one machine.

Post by ag123 » Tue Jun 27, 2017 7:09 pm

install a sketch on B2 (i'm assuming that your platform.txt and boards.txt is stock and has -DSERIAL_USB defined). it may be a sketch that simply just turn on the led. if the led did not light up the sketch is possibly not installed correctly or not working.

if it is the stock maple boot loader
dfu-util -l
would show you 2 entries alt=0, alt=1 install to flash is at address 0x8005000
if it is the stm32duino boot loader there are 3 entries, alt=0, alt=1, alt=2 install to flash is at address 0x8002000
post the results of

Code: Select all

dfu-util -l
when the device 1eaf:0003 shows up (that's the boot loader), indicate clearly which is B1 and which is B2

on linux /dev/ttyACM0 is a usb-serial device, this would normally show up if 1eaf:0004 is there in lsusb
on MM the sketch which bundles the libmaple usb driver initialise usb port as 1eaf:0004 as a usb-serial (cdc-acm) device. this is what makes /dev/ttyACM0 appears on linux. if your sketch is not installed correctly, i.e. it did not run or crashed, 1eaf:0004 won't show up in lsusb.

if B2 gives you /dev/ttyACM0 on your first laptop, but not the second, check your /etc/udev/rules.d/45-maple.rules (the number may be different)
it should have entries such as

Code: Select all

ATTRS{idProduct}=="0003", ATTRS{idVendor}=="1eaf", MODE="664", GROUP="plugdev" SYMLINK+="maple", ENV{ID_MM_DEVICE_IGNORE}="1"
ATTRS{idProduct}=="0004", ATTRS{idVendor}=="1eaf", MODE="664", GROUP="plugdev" SYMLINK+="maple", ENV{ID_MM_DEVICE_IGNORE}="1"

powerslave12r
Posts: 4
Joined: Wed May 31, 2017 11:03 am

Re: MM board not detected on one machine.

Post by powerslave12r » Sat Jul 15, 2017 1:39 pm

ag123 wrote:
Tue Jun 27, 2017 7:09 pm
install a sketch on B2 (i'm assuming that your platform.txt and boards.txt is stock and has -DSERIAL_USB defined). it may be a sketch that simply just turn on the led. if the led did not light up the sketch is possibly not installed correctly or not working.

if it is the stock maple boot loader
dfu-util -l
would show you 2 entries alt=0, alt=1 install to flash is at address 0x8005000
if it is the stm32duino boot loader there are 3 entries, alt=0, alt=1, alt=2 install to flash is at address 0x8002000
post the results of

Code: Select all

dfu-util -l
when the device 1eaf:0003 shows up (that's the boot loader), indicate clearly which is B1 and which is B2

on linux /dev/ttyACM0 is a usb-serial device, this would normally show up if 1eaf:0004 is there in lsusb
on MM the sketch which bundles the libmaple usb driver initialise usb port as 1eaf:0004 as a usb-serial (cdc-acm) device. this is what makes /dev/ttyACM0 appears on linux. if your sketch is not installed correctly, i.e. it did not run or crashed, 1eaf:0004 won't show up in lsusb.

if B2 gives you /dev/ttyACM0 on your first laptop, but not the second, check your /etc/udev/rules.d/45-maple.rules (the number may be different)
it should have entries such as

Code: Select all

ATTRS{idProduct}=="0003", ATTRS{idVendor}=="1eaf", MODE="664", GROUP="plugdev" SYMLINK+="maple", ENV{ID_MM_DEVICE_IGNORE}="1"
ATTRS{idProduct}=="0004", ATTRS{idVendor}=="1eaf", MODE="664", GROUP="plugdev" SYMLINK+="maple", ENV{ID_MM_DEVICE_IGNORE}="1"
Thanks for taking the time to help me out. Sorry I hadn't checked this topic for a while.

I just plugged in both the boards in to L2 and both work the same now.

The only thing (that I recall) that has changed between then and now on L2 (the 'problematic' laptop) is that it has been rebooted. Initially, I had reloaded udev rules AND restarted udev, but perhaps a reboot changed something?

I suppose, anyone who comes looking at this thread with a similar problem, should perhaps try rebooting once?

Thanks for all the help.

Post Reply

Who is online

Users browsing this forum: Google [Bot] and 1 guest