Germany
Asked — Edited

Mono Ezb.Connect Not Working

Hello, i tried to program my EZ Robot with C# under Ubuntu 15.04.

using System; using EZ_B;

public class HelloWorld { public static void Main() { Console.WriteLine("Enter IP of EZ-Robot"); string ip = Console.ReadLine(); Console.WriteLine("IP: "+ip ); Console.WriteLine("trying "+ ip); Console.WriteLine("trying to connect with " +ip);

    //connecting
    EZB _ezb = new EZB();
    _ezb.Connect(ip);
    Console.WriteLine("connecting...");
    if (_ezb.IsConnected)
            {
            Console.WriteLine("[+] EZB connected at ip: " + ip);
            }
            else
            {
            Console.WriteLine("[-] EZB NOT connected at ip: " + ip);
            }

}

}

Thats my code, but if i execute it...

patrick@patrick-X781X-X782X:~/ezrobot$ mono bsp.exe Unknown heap type: #GUlD

Unknown heap type: #Blop

Enter IP of EZ-Robot 192.168.1.1 IP: 192.168.1.1 trying 192.168.1.1 trying to connect with 192.168.1.1 Missing method .ctor in assembly /home/patrick/ezrobot/EZ_B.dll, type System.Runtime.CompilerServices.ExtensionAttribute Can't find custom attr constructor image: /home/patrick/ezrobot/EZ_B.dll mtoken: 0x0a00000a

Unhandled Exception: System.TypeLoadException: Could not load type 'System.Runtime.CompilerServices.ExtensionAttribute' from assembly 'EZ_B'. at HelloWorld.Main () [0x00000] in :0 [ERROR] FATAL UNHANDLED EXCEPTION: System.TypeLoadException: Could not load type 'System.Runtime.CompilerServices.ExtensionAttribute' from assembly 'EZ_B'. at HelloWorld.Main () [0x00000] in :0

There must be a mistake with the "ez.Connect" command....

Thanks for help, Patrick.


ARC Pro

Upgrade to ARC Pro

Experience early access to the latest features and updates. You'll have everything that is needed to unleash your robot's potential.

#26  

Hi

i googled and found that somebody installed Mono 4.0 and it worked. On the Mono homepage i found "Mono develop". A very useful program.

Could be "Visual Studio Lite" for Linux:D

But there are still the same errors. With the newest Mono version....

I´ll try something else tomorrow, by me it´s 11:48 PM

Good night, and thanks for your time;)

#27  

Hi,

I am using Ubuntu 15.04. With german keyboard layout.

I am woundering about, that if i delete this line

_ezb.­Servo.­Set­Servo­Fine­Tune(­Servo.­Servo­Port­Enum.D0, ­5);

it compiles without no warnings.

using System;
using EZ_B;
   
public class HelloWorld {
 
    static EZB _ezb;
 
    public static void Main() {
 
        _ezb = new EZB();

        _ezb.­Servo.­Set­Servo­Fine­Tune(­Servo.­Servo­Port­Enum.D0, ­5);
 
        Console.WriteLine("Connecting to EZ-B v4...");
 
        _ezb.Connect("192.168.1.1");
 
        if (!_ezb.IsConnected) {
 
            Console.WriteLine("Unable to connect to EZ-B v4");
 
            return;
        }
 
        Console.WriteLine("Hello World, I am moving servo d0 to position 90!");
  
        _ezb.Servo.SetServoPosition(Servo.ServoPortEnum.D0, 90);
 
        _ezb.Disconnect();
    }
}

if i use this code, there are the errors i posted....

PRO
Synthiam
#28  

I think it's because the line was typed vs copy and pasted. It's going to be difficult for me to diagnose this one because I don't have a German keyboard or am I on the mono development team. They sadly do not have a great forum for assistance. Can you change the character set of your Linux installation to USA keyboard? That seems to be mono's solution to this.

PRO
Synthiam
#29  

There's an update to the mono library, which includes a more efficient camera thread, audio thread, and Auto Position thread.

#30  

Hi,

I have also no English keyboard... :/ But I found an old (very old) Panasonic Toughbook CF29 with Englisch keyboard. I´ll try later with an englisch installed Kali Linux. Thanks for your time!:D

PRO
Synthiam
#31  

Anytime:)

It might also be the selected character set in the operating system - not just the keyboard.

#32  

lol, if I set the keyboard layout to "EN" and write the

_ezb.Servo.SetServoFineTune(Servo.ServoPortEnum.D0, 5);

with EN settings, it compiles. So I have to set only the keyboard layout.

Difficult to find the right keys :D;)

Thanks for your great time and help:D

Lol, I want to work at ezrobot:D