Device debugging with screen

Mac and Linux users can quickly and easily connect to the NodeMCU WiFi module running Konnected for interactive debugging using the screen command line tool.

The advantage of this is that you don't have to download any additional software aside from the device driver.

  1. Mac users: download and install the CH340 device driver. This allows your computer to communicate with the NodeMCU module via a USB connection. Linux users do not need a driver.

      CH340 driver for Mac

  2. Plug in the wifi module to your computer using a data quality USB cable.



  3. Identify the name of the serial port assigned to the device by opening a terminal and listing devices. On Mac, the port name will use the pattern /dev/cu.wchusbserial*. On Linux, it's /dev/ttyUSB*

    # Mac 
    ls /dev/cu.wchusb* 
    
    # Linux 
    ls /dev/ttyUSB*
  4. For this example, the serial port is /dev/cu.wchusbserial1410. Now connect to it using screen at 115200 baud using this command

     screen /dev/cu.wchusbserial1410 115200 
  5. Press the small RST button on the WiFi module to reboot it and you should begin to see the initialization logs.

  6. Press ENTER on your keyboard to get a command prompt where you can interact with the device using the lua console.
  7. Exit screen by pressing CTRL-A then CTRL-\ and answer y to the prompt asking if you want to quit.

Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.