TCP/IP USB connection

HomeForumsMonoBrick EV3 FirmwareTCP/IP USB connection

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
  • #5541
    Author Image
    Maurice Calvert

    I have an EV3 and VS2015, I would like to compile and transfer a program to run on the brick.
    The brick is connected with USB, it appears as an RNDIS/Ethernet gadget in devices and printers and it replies to pings.
    When I try to connect with WINSCP, I get “Network error, connection to refused”.
    Is it possible to connect like this with TCP/IP over USB?

    Author Image

    Hello Maurice,

    If you connect the EV3 to your computer with an USB cable you need to be able to ping the address, and in order to connect the EV3 with WinSCP over USB you need to use the following settings:

    File protocol: SCP
    Host name:
    Port number: 22
    User name: root
    Password: (leave empty)

    Then you’ll be asked again to enter the password, just ignore it. Then an error will appear, just ignore it. Then it will work 🙂 You need to copy your programs in the folder ‘apps’ (/home/root/apps).

    Hope this helps.

    Author Image
    Maurice Calvert

    Thanks for the follow-up.

    My local network is 192.168.1.* so even if I set the EV3 IP address to I can’t ping it because 10.*.*.* isn’t my local network.

    When I set the Ev3 to (accessible on my local network) I can ping it.
    When I try and connect with SFTP it says “Server rejected SFTP but it listens for FTP connections”.
    When I try and connect with FTP it says “No connection could be made because the target machine actively rejected it”.
    When I try and connect with SCP it says “Connection to refused”.
    So: It’s definitely there and listening.
    It seems that the network setup is correct but the brick is refusing to talk.

    Seeing as it’s listening, why would be any different to

    Author Image

    Hmm, I’m not really sure what you mean. The 192.168.1.* is your local internet IP address, which EV3 would have if it would be connected with your Wi-Fi router. But if you’re connecting it with USB, the IP address you need to use is, as specified in the official guide for setting up a USB connection:

    Author Image
    Maurice Calvert

    I have a WiFi stick now and things are better.
    I boot up the monobrick firmware off the SD card, wifi works on and when I connect with winscp I see the wifi startup in the startuplog:

    Starting process: killall with arguments: wpa_supplicant
    killall: wpa_supplicant: no process killed
    Starting process: ip with arguments: link show wlan0
    Starting process: ip with arguments: link show wlan0
    Starting process: ip with arguments: link show wlan0
    Starting process: rm with arguments: /mnt/bootpar/wpa_supplicant.conf
    Starting process: /home/root/lejos/bin/startwlan
    Start WiFi…
    Check configuration…
    hostname is EV3
    searching for wlan
    Searching for AP…
    Searching for AP…
    Request IP address…
    udhcpc (v1.13.2) started
    Sending discover…
    Sending select for…
    Lease of obtained, lease time 86400
    adding dns
    Starting process: ip with arguments: link show wlan0

    When I try and connect from VS2015

           _EV3 = New Brick(Of Sensor, Sensor, Sensor, Sensor)("wifi")

    I get a ConnectionException with innerexception of “Failed to find EV3”

    If you have any ideas I’d be most grateful 🙂

    Author Image
    Anders Søborg

    I think that you are mixing Monobrick firmware and Monobrick communication library. Monobrick firmware is for running C# on the EV3. While the communication library is for running a C# program on a PC/Mac that sends commands to the EV3.


    Author Image
    Maurice Calvert

    Hi Anders,
    thanks for taking the time to followup, indeed I was a bit confused initially.
    In the meantime I’ve figured out how to communicate between a .Net program running on the brick with your firmware and another .Net program running on my PC, over wifi. Two-way communication is possible, initiated on either side, simply by setting up sockets to listen for the other program.

    Amazing job you’ve done here, congratulations and Thanks.

Viewing 7 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic.

Posted in

Make a donation