mBot / MacBook Pro / mblock-problems


#1

Dear forum,
at first: greetings from Germany to the makeblock-community. The mBot works just fine, and my students (ground- and middle school) like the course very much.
BUT: it only works windoses completely without problems. I can’t get it working properly!

Anamnesis:

  • System: I have a MacBook Pro (Retina, middle 2014), OS X 10…3.3.
  • First moves: I connect the mBot to the MacBook via USB and I start mBlock. Then I can connect the mBot and reset the “Default Programm”.
  • Problems: I loose connection to the mBot, can’t upload programs, no USB- nor blue-tooth-connection to the board. The program running on the mBot is repeated over and over again.
  • To get it working again, I at least have to quit mBlock, then a little prayer, and maybe it works then for a couple of minutes …

My troubleshooting:

  • I searched the internet, installed drivers, also third-party-drives (mac-usb-serial) without any visible solution.

I hope to get help from you: Or is there also a solution in the forum I haven’t found,
thanks,
Dieter


#2

May I assume that you’ve upgrade the firmware?

I’m running OS X 10.11.3 with the driver from this link and it’s working reliably for me. You may want to check that you don’t have a driver conflict (see link).


#3

Hi,
thanks for the answer.

At first: There something missing in my first part:
OS: OS X 10.11.6 (15G31)
mBlock 3.3.3

I did exactly what you and the other forum-guys proposed (driver-conflicts and troubleshooting on the mac-usb-serial-HP). I also bought the mac-usb-serial-USB-serial drivers.

What I did since my last login with a little more detail:

1. Kextunloading and removing all USB-serial-drivers
I unloaded and removed all USB-serial-drivers using the terminal app and the mac-usb-serial-HP-protocol. After the reboot I had no USB selectable, off course. I have three possible connections: tty.bluetooth-incoming-port, Makeblock-ELETSPP and iPhone-WirelessiApp.

2. USB-serial driver proposed by mBlock
I installed only the USB-serial driver proposed by mBlock. I find /Library/Extensions/usbserial.kext. After installation I restarted the macbook. Now …

  • mbot: When I physically connect the mBot via USB I find in the menu /Connect/Serial Port/tty.wchusbserial1420 as a possible USB-connection. When I run the connection I can upgrade firmware or reset the default program and after that the connection is lost - no way of re-getting it without quitting mBlock.
  • Arduino Uno: When I try to run a simple blinking program after successful connection it works perfectly on an Arduino-Uno.
    But when I connect the mBot and run the same program (after successful connection) I get the following message: avrdude: ser_open(): can’t open device “/dev/tty.wchusbserial1420”: Resource busy
    ioctl(“TIOCMGET”): Inappropriate ioctl for device
    Maybe this is because on the mBot the last installed program is running over and over again (on the Arduino only once!)?! Is there a possibility to stop a program on the mBot by pushing some buttons?

2. mac-usb-serial-third party drivers
Now I remove /Library/Extensions/usbserial.kext with the following steps:

  • kextunload-order with message: sudo kextunload ./usbserial.kext
    (kernel) Can’t unload kext com.wch.usbserial; classes have instances:
    (kernel) Kext com.wch.usbserial class wch_usb has 2 instances.
    Failed to unload com.wch.usbserial - (libkern/kext) kext is in use or retained (cannot unload).
    Here it says having two instances?!? Can this be the source of the problem

  • rm-order: After this I "sudo rm -rf above and restarted the computer

Now I installed the mac-usb-serial-third party drivers. I find /Library/Extensions/osx-ch341.kext and …osx-pl2303.kext (no usbserial.kext) after restarting the computer.
Following troubleshooting-steps

  • Testing with the Arduino-Uno with mBlock: when I physically connect the Uno I can select in the menu /Connect/Serial Port/tty.usbmodem1421 and the blinking program runs perfectly, no problems with the connection! The app Systeminformation also recognizes the Arduino as a communication tool.

  • Testing with the Arduino-Uno with the Arduino-Software: it works as fine as above.

  • Connecting the mBot: when I physically connect the mBot I can select in the menu /Connect/Serial Port/tty.Replea-CH341-00002014 (no tty.usbmodem1421) and nothing works anymore. I cannot connect mBlock and mBot!

These are the results of three hours of troubleshooting. I have no more ideas!!!

HELP and thanks for your forum-support!
Best wishes from Germany!
Dieter


#4

You may try upload a blink program to the mBot with Arduino, and try to see whether it is the problem of CH340 driver or mBlock itself. This will also provide useful logs and other information pointing to the problem.

The mBot uses the same chip as the Arduino. And the Serial port chip is CH340. So you can treat it as a regular Arduino.


#5

Hi,
I tried this. It failed with the following message:
avrdude: ser_open(): can’t open device “/dev/cu.wchusbserial1410”: Resource busy
ioctl(“TIOCMGET”): Inappropriate ioctl for device

I tested the same program on an Uno, and it worked as expected.

Does this mean anything to you?


#6

Hi
@bigeyex: the message is “avrdude: ser_open(): can’t open device “/dev/cu.wchusbserial1410”: Resource busy
ioctl(“TIOCMGET”): Inappropriate ioctl for device”

Some additional information: while I do the upload, the last program is running over and over again. Maybe this is the reason “the resource is busy?!”

Is there any way to stop a program running on the mbot? Powering off does not help because powering on will start the program again.

Thanks for your help!

@all 1: I followed thirdlions protocol in this link: http://forum.makeblock.cc/t/getting-started-with-mbot-and-a-mac/2804/9
Now I can run programs on the mBot, but only if I’m logged in as admin. As soon as I change into my user-account nothing works anymore!

@all 2: I found a “solution” - running mBlock with Parallels and Windows 7! But is this a solution?


#7

I Have MacBook Pro (Retina, 15-inch), And the problem which I faced mBot not working, I connect my mBot to the MacBook via USB, but not properly connected, also I reset mBot 5-times, to solve this error, I do not assure whats the issue because it might be MacBook USB issue, but I repair my USB port from macbook repair al barsha location, and they are solved the USB issue but only 1-USB port changed, and others are working and still connection issue while connecting mBot.