Home→Forums→MonoBrick EV3 Firmware→TCP/IP USB connection
- This topic has 6 replies, 3 voices, and was last updated 8 years, 11 months ago by Maurice Calvert.
-
AuthorPosts
-
November 9, 2015 at 22:04 #5541
Maurice CalvertParticipantHi,
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 192.168.1.13 refused”.
Is it possible to connect like this with TCP/IP over USB?November 11, 2015 at 12:51 #5542
doom_laurParticipantHello Maurice,
If you connect the EV3 to your computer with an USB cable you need to be able to ping the address 10.0.1.1, and in order to connect the EV3 with WinSCP over USB you need to use the following settings:
File protocol: SCP
Host name: 10.0.1.1
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.
November 14, 2015 at 20:27 #5545
Maurice CalvertParticipantThanks for the follow-up.
My local network is 192.168.1.* so even if I set the EV3 IP address to 10.0.1.1 I can’t ping it because 10.*.*.* isn’t my local network.
When I set the Ev3 to 192.168.1.13 (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 192.168.1.13 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 10.0.1.1 be any different to 192.168.1.13?
November 15, 2015 at 17:38 #5547
doom_laurParticipantHmm, 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 10.0.1.1, as specified in the official guide for setting up a USB connection: http://www.monobrick.dk/guides/firmware-guides/setting-up-a-usb-connection-for-use-with-monobrick-firmware/
November 26, 2015 at 23:01 #5549
Maurice CalvertParticipantI have a WiFi stick now and things are better.
I boot up the monobrick firmware off the SD card, wifi works on 192.168.1.115 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
wpa_state=DISCONNECTED
Searching for AP…
wpa_state=ASSOCIATING
Searching for AP…
wpa_state=COMPLETED
bssid=84:26:15:5c:b1:49
ssid=CalvertWireless
Request IP address…
udhcpc (v1.13.2) started
Sending discover…
Sending select for 192.168.1.115…
Lease of 192.168.1.115 obtained, lease time 86400
adding dns 192.168.1.1
Starting process: ip with arguments: link show wlan0When I try and connect from VS2015
_EV3 = New Brick(Of Sensor, Sensor, Sensor, Sensor)("wifi") _EV3.Connection.Open()
I get a ConnectionException with innerexception of “Failed to find EV3”
If you have any ideas I’d be most grateful 🙂
December 27, 2015 at 20:54 #5562
Anders SøborgKeymasterI 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.
/Anders
January 18, 2016 at 22:13 #5576
Maurice CalvertParticipantHi 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.
Maurice -
AuthorPosts
You must be logged in to reply to this topic.
Follow