SiMessagePort Won't Compile In Sketch

Support for Arduino in combination with Air Manager and Air Player

Moderators: russ, Ralph

Message
Author
jet46
Posts: 20
Joined: Fri May 21, 2021 12:24 am

Re: SiMessagePort Won't Compile In Sketch

#21 Post by jet46 »

The library installed on my system in C:\Users\jtest\Documents\Arduino\libraries\SiMessagePort and I see the files in there.

Here is the info fromt he library.properties:

Code: Select all

name=SI Message Port
version=3.7.0
author=Sim Innovations
maintainer=Sim Innovations <corjan@siminnovations.com>
sentence=Allows to couple Arduino projects to Air Manager or Air Player
paragraph=
category=Device Control
url=https://www.siminnovations.com
architectures=*
As mentioned by marcel_felde, the tutorial video mentioned a couple of other files in the wiki, something about a platform file if I recall. The new wiki doesn't have those. Not sure if that has something to do with it.

I am in the US and set to English on both Windows and in Arduino.

I have also tried uninstalling and reinstalling the libraries. I accessed the example using the file menu.



One thing I would point out is that all the error messages thrown relate to SiMessagePortDevice types that were added in AM 4.0 (according to the wiki "From AM 4.0:"). None of the ones prior to 4.0 are throwing an error.

User avatar
jph
Posts: 2846
Joined: Fri Apr 10, 2020 12:50 pm
Location: Somewhere over the rainbow..

Re: SiMessagePort Won't Compile In Sketch

#22 Post by jph »

marcel_felde wrote: Sat May 22, 2021 9:21 am @jph Joe! Your file worked! :o
Well bugger me :D , I am utterly baffled ... but really happy you got it sorted. I only checked the VERSION on the latest download from the website which shoed exactly the same - this one I have used for quite some time.
I will do some more digging of file comparisons.

@Ralph @Corjan please can you look into this also ?

A productive morning :lol: .. just getting ready For Monaco F1 P3......... but, thats an aside haha . ;)
Joe. CISSP, MSc.

jet46
Posts: 20
Joined: Fri May 21, 2021 12:24 am

Re: SiMessagePort Won't Compile In Sketch

#23 Post by jet46 »

One thing I just noticed, in the library file sim_extern_shared.h this appears:

Code: Select all

enum SimExternDeviceType {
	SIM_EXTERN_DEVICE_TYPE_UNKNOWN = 0,
	SIM_EXTERN_DEVICE_TYPE_HW_PORT = 1,
	SIM_EXTERN_DEVICE_TYPE_ARDUINO_2560 = 2,
	SIM_EXTERN_DEVICE_TYPE_ARDUINO_UNO = 3,
	SIM_EXTERN_DEVICE_TYPE_ARDUINO_LEONARDO = 4,
	SIM_EXTERN_DEVICE_TYPE_ARDUINO_MICRO = 5,
	SIM_EXTERN_DEVICE_TYPE_ARDUINO_NANO = 6,
	SIM_EXTERN_DEVICE_TYPE_KNOBSTER_V2 = 7,
	SIM_EXTERN_DEVICE_TYPE_MAX = 8
};
But notice how the enum doesn't list any of the ones throwing an error?

jet46
Posts: 20
Joined: Fri May 21, 2021 12:24 am

Re: SiMessagePort Won't Compile In Sketch

#24 Post by jet46 »

I just tried the rar file you uploaded and it works. I think there may be something wrong with the one uploaded on the wiki.

jet46
Posts: 20
Joined: Fri May 21, 2021 12:24 am

Re: SiMessagePort Won't Compile In Sketch

#25 Post by jet46 »

It looks like he file si_message_port.c in the rar you uploaded differs from what is downloaded on the website.

Rar file:

Code: Select all

switch(device) {
	case SI_MESSAGE_PORT_DEVICE_ARDUINO_MEGA_2560:
		lib.device = SIM_EXTERN_DEVICE_TYPE_ARDUINO_2560;
		break;
	case SI_MESSAGE_PORT_DEVICE_ARDUINO_UNO:
		lib.device = SIM_EXTERN_DEVICE_TYPE_ARDUINO_UNO;
		break;
	case SI_MESSAGE_PORT_DEVICE_ARDUINO_NANO:
		lib.device = SIM_EXTERN_DEVICE_TYPE_ARDUINO_NANO;
		break;
	case SI_MESSAGE_PORT_DEVICE_ARDUINO_LEONARDO:
		lib.device = SIM_EXTERN_DEVICE_TYPE_ARDUINO_LEONARDO;
		break;
	case SI_MESSAGE_PORT_DEVICE_ARDUINO_MICRO:
		lib.device = SIM_EXTERN_DEVICE_TYPE_ARDUINO_MICRO;
		break;
	case SI_MESSAGE_PORT_DEVICE_HW_PORT:
		lib.device = SIM_EXTERN_DEVICE_TYPE_HW_PORT;
		break;

	default:
		// Illegal device type
		lib.device = SIM_EXTERN_DEVICE_TYPE_UNKNOWN;
		return SI_MESSAGE_PORT_RESULT_ILLEGAL_DEVICE;
	}

	return SI_MESSAGE_PORT_RESULT_OK;
}
Website file:

Code: Select all

	switch(device) {
	case SI_MESSAGE_PORT_DEVICE_ARDUINO_MEGA_2560:
		lib.device = SIM_EXTERN_DEVICE_TYPE_ARDUINO_2560;
		break;
	case SI_MESSAGE_PORT_DEVICE_ARDUINO_UNO:
		lib.device = SIM_EXTERN_DEVICE_TYPE_ARDUINO_UNO;
		break;
	case SI_MESSAGE_PORT_DEVICE_ARDUINO_NANO:
		lib.device = SIM_EXTERN_DEVICE_TYPE_ARDUINO_NANO;
		break;
	case SI_MESSAGE_PORT_DEVICE_ARDUINO_LEONARDO:
		lib.device = SIM_EXTERN_DEVICE_TYPE_ARDUINO_LEONARDO;
		break;
	case SI_MESSAGE_PORT_DEVICE_ARDUINO_MICRO:
		lib.device = SIM_EXTERN_DEVICE_TYPE_ARDUINO_MICRO;
		break;
	case SI_MESSAGE_PORT_DEVICE_ARDUINO_NANO_EVERY:
		lib.device = SIM_EXTERN_DEVICE_TYPE_ARDUINO_NANO_EVERY;
		break;
	case SI_MESSAGE_PORT_DEVICE_ARDUINO_DUE:
		lib.device = SIM_EXTERN_DEVICE_TYPE_ARDUINO_DUE;
		break;
    case SI_MESSAGE_PORT_DEVICE_ESP32:
        lib.device = SIM_EXTERN_DEVICE_TYPE_ESP32;
        break;
    case SI_MESSAGE_PORT_DEVICE_NODE_MCU:
        lib.device = SIM_EXTERN_DEVICE_TYPE_NODE_MCU;
        break;
	case SI_MESSAGE_PORT_DEVICE_ESP8266:
		lib.device = SIM_EXTERN_DEVICE_TYPE_ESP8266;
		break;
	case SI_MESSAGE_PORT_DEVICE_TEENSY_2_0:
		lib.device = SIM_EXTERN_DEVICE_TYPE_TEENSY_2_0;
		break;
	case SI_MESSAGE_PORT_DEVICE_TEENSY_PP_2_0:
		lib.device = SIM_EXTERN_DEVICE_TYPE_TEENSY_PP_2_0;
		break;
	case SI_MESSAGE_PORT_DEVICE_TEENSY_LC:
		lib.device = SIM_EXTERN_DEVICE_TYPE_TEENSY_LC;
		break;
	case SI_MESSAGE_PORT_DEVICE_TEENSY_3_2:
		lib.device = SIM_EXTERN_DEVICE_TYPE_TEENSY_3_2;
		break;
	case SI_MESSAGE_PORT_DEVICE_TEENSY_3_5:
		lib.device = SIM_EXTERN_DEVICE_TYPE_TEENSY_3_5;
		break;
	case SI_MESSAGE_PORT_DEVICE_TEENSY_3_6:
		lib.device = SIM_EXTERN_DEVICE_TYPE_TEENSY_3_6;
		break;
	case SI_MESSAGE_PORT_DEVICE_TEENSY_4_0:
		lib.device = SIM_EXTERN_DEVICE_TYPE_TEENSY_4_0;
		break;
	case SI_MESSAGE_PORT_DEVICE_TEENSY_4_1:
		lib.device = SIM_EXTERN_DEVICE_TYPE_TEENSY_4_1;
		break;
		
	case SI_MESSAGE_PORT_DEVICE_HW_PORT:
		lib.device = SIM_EXTERN_DEVICE_TYPE_HW_PORT;
		break;

	default:
		// Illegal device type
		lib.device = SIM_EXTERN_DEVICE_TYPE_UNKNOWN;
		return SI_MESSAGE_PORT_RESULT_ILLEGAL_DEVICE;
	}

	return SI_MESSAGE_PORT_RESULT_OK;
}


User avatar
jph
Posts: 2846
Joined: Fri Apr 10, 2020 12:50 pm
Location: Somewhere over the rainbow..

Re: SiMessagePort Won't Compile In Sketch

#26 Post by jph »

Yes, the later file has all the newer boards added. I think the issue may be in another file apart from the .c (one it associates with) - but @Corjan is the man to sort it.

Can I also please ask Corjan that you update the VER number in library.porperties when the files change ?
Regards to all, at least you have it working with the original boards.

Joe.
Joe. CISSP, MSc.

jet46
Posts: 20
Joined: Fri May 21, 2021 12:24 am

Re: SiMessagePort Won't Compile In Sketch

#27 Post by jet46 »

Thank you! @Corjan and @jph I plan on using a teensy so hope this gets fixed.

User avatar
jph
Posts: 2846
Joined: Fri Apr 10, 2020 12:50 pm
Location: Somewhere over the rainbow..

Re: SiMessagePort Won't Compile In Sketch

#28 Post by jph »

jet46 wrote: Sat May 22, 2021 10:03 am Thank you! @Corjan and @jph I plan on using a teensy so hope this gets fixed.
Hey, no worries, I am sure it will be sorted very soon. oh, and a belated welcome to the forum . ;)

Joe
Joe. CISSP, MSc.

marcel_felde
Posts: 159
Joined: Wed May 09, 2018 12:19 am

Re: SiMessagePort Won't Compile In Sketch

#29 Post by marcel_felde »

This all makes sence because in the error log it is complained about unknown boards.

Beside fixing that issue, @Corjan and @Ralph please think about offering the download of archived versions. ;)

User avatar
jph
Posts: 2846
Joined: Fri Apr 10, 2020 12:50 pm
Location: Somewhere over the rainbow..

Re: SiMessagePort Won't Compile In Sketch

#30 Post by jph »

Hi Gus,
I have submitted a support ticket for this.
Joe
Joe. CISSP, MSc.

Post Reply