problem receiving OSC (Oscuino + UIP ethernet )

Hi everybody

I'am currently working on a project using arduino and OSC.
I bought the shield ENC28J60 and installed the library UIP ethernet, on my arduino mega.
I used the library OSCuino, and changed the header file in order to work with UIP library, and the "simple send example" works !

I want now to receive an osc message send from max, and ... it doesn't work.

Using the serial for debbuging my code, a packet is received, sizeB = 20, Bundle has no error, but bundleIN.size()=0. And I am unable to read anything from the bundle. This means that the osc message is not interpreted as it should ? Is there any probleme of compatibility between Oscuino and UIP )

void loop(){ 
    OSCBundle bundleIN;
   int sizeB;
   
   if( (sizeB = Udp.parsePacket())>0)
   {     
      
      while(sizeB--)
       bundleIN.fill(Udp.read());

      if(!bundleIN.hasError() ){
        Serial.println("size of the bundle: ");
        Serial.print(bundleIN.size());
        
     ...

thanks

No problem I have done it.
However that code is bad. First off you only have one equals sign in the if statement.
Then you create a new variable and immediately use it in an if statement without assigning it any value.

Good news you have done it.

However there is no mistake in the if statement. The code is the example of "simple receive". SizeB is assigned with udp.parsePacket (), then compared with the sign ">"

Hi
Can anybody exeperiencied with enc28j60 and osc give me the name of library used or/and source code used ?

Thanks

Hi,

what are the messages you are sending like? I've no experience with the OSCuino lib, but unless you're sending some very complex stuff it can be done using UDP.

Tell more about what your trying to achieve and include your full code.

cheers

Hi

I finally solved out the problem, the problem was from max, that gave to the arduino unprintable character. From another application ( openframeworks, etc) the message is completely received and interpreted.
So the 2 libraries are compatible!

Happy to hear it worked out and good news that the ENC28J60 and OSCuino play well together :slight_smile: