6 years, 10 months ago.

Serial not working with NucleoL152RE on a Mac

Hello guys, I am having trouble with printing messages to my Mac through usb serial. I followed the mbed os handbook and a bunch of other tutorials, but none of them worked. I am testing this on a Macbook Air 2015 with macOS Sierra 10.12.4 installed on it. This is the program that I tried:

#include "mbed.h"
 
Serial pc(USBTX, USBRX);
 
int main()
{
    while(1) 
    {
        pc.printf("Hello, world!");
        wait(0.5f);
    }
}

I can see the device named "usbmodem1421" but when I connect to it using CoolTerm, no messages shows up. Strangely, it worked perfectly on my friend's computer, which is a Macbook Pro 2014 with OS X Yosemite 10.10.5 installed on it. Is it a problem with the new macOS or something else? I have the exact same board and CoolTerm settings compared to my friend.

Any help would be appreciated. Thanks!

Hi Richard,

have you tried a different usb cable?

Wht baud settings are you using, should default to 9600. Have you tried another terminal application? Have you tried the board on another machine?

Regards,

Andrea, team mbed

posted by Andrea Corrado 20 Jun 2017

Hey Andrea, Yes I have tried several USB cables and none of them worked. I used the default 9600 baud settings and I tried both the Arduino Serial Monitor and CoolTerm. I tried the same terminal applications on my friends computer and all of them worked with no problem. What is causing this problem? Thanks!

posted by Richard Hu 21 Jun 2017
Be the first to answer this question.