Support Forum for Mirano Systems Inc.

Green Receipt Development => Application Programming Interface (API) => Topic started by: JFultz on November 05, 2012, 04:39:59 PM

Post by: JFultz on November 05, 2012, 04:39:59 PM

I did up some sample code to send SNEP UDP packets. The following message is sent:

string message = "text/vcard\n" +
                "BEGIN:VCARD\n" +
                "VERSION:4.0\n" +
                "TEL;TYPE=home,voice;VALUE=uri:tel:+1-404-555-1212\n" +
                "CELL;TYPE=home,voice;VALUE=uri:tel:+1-404-555-1212\n" +
                "\n" +


1) Is this the correct format for SNEP message that sets the telephone, cell phone, and email address for a receipt?

2) What port on local host should this message be sent to?

Title: Re: SNEP API
Post by: Green Support on November 05, 2012, 11:56:43 PM
1) Almost. As per the API guide we support the TEL;CELL:

However, the most important part is that this message has to be encoded as an NDEF message and wrapped with SNEP transport. Refer to NFC specs. on how to encode the v-card message as NDEF.

Instead of encoding as v-card, it would be easier to use the well-known NDEF messages. The example in the Appendix shows encoding on either e-mail or mobile numbers using well-known NDEF messages.

We know this is quite a bit to send a mobile number but we are trying to use stardard message and transport instead of creating our own proprietary.

2) The port is defined in the "Reader" configuration page. Please note the SNEP over UDP is our proprietary transport since the NFC standard does not define a transport other than LLCP.

Again, please refer to the Appendix for sample SNEP client code.
Title: Re: SNEP API
Post by: JFultz on November 08, 2012, 08:48:38 PM
I have compiled the sample code and configured SNEP on the Reader configuration page. SNEP is configured to use the default port 3516. The computer is configured to use The email works but the phone fails.

Usage: snep_udp_client server_address port type data
         type - 5 (mobile) or 6 (email)
         data - mobile number or email address

C:\Development>snep_udp_client.exe 3516 5 1-404-555-1212
SNEP PUT error (ff) !

C:\Development>snep_udp_client.exe 3516 6
SNEP PUT Success!

Any ideas?
Title: Re: SNEP API
Post by: Green Support on November 24, 2012, 12:45:51 AM
Sorry for the delayed response.

It is working as expected. The mobile number will not be accepted since the system is configured to accept one or the other but not the both.

Switch to mobile as following:

General Configuration -> Customer Type -> Switch to mobile.