PLEASE HELP, ANYONE!
I am fairly new to SNAPConnect though I have had my license for over a y ear now. Am just now getting to SNAP-Connect related part of the project and need some help with one final hang-up on the application (I hope):
1) User enters basic remote note data for each remote note (i.e. name, index id, MAC, etc.) in windows dialog.
2) User Data goes to table in app as well as exterior .MDB database linked with the table
3) App pulls MAC(String) from DB to call on node. App Uses following code to convert string to Byte :
Public Function UnicodeStringToBytes(ByVal str As String) As Byte()
Return System.Text.Encoding.Unicode.GetBytes(str)
(This function called elsewhere similar to x = UNICODESTRINGTOBYTE (MACString variable)
4) Resultant Byte (x) used in subsequent RPC to remote node. I.E... proxy.rpc(clientaddress, x, New object{})
where x = the result of the unicode conversion function shown in item 3 above
5) SNAPConnect Console displays MAC as a 24 digits (4 per character in MAC) such as 3500610036003700320034004100. I believe this is UNICODE if I am not mistaken but the function in ITEM 3 is supposed to change that in the receiving variable.
6) Error received after issuing RPC to poll remote node with MAC Extracted from DB. I use the MAC in string from user input and DB for ease of handling and wait to convert before using the data to issue RPC to remote.
There is limited example and documentation on using SNAPConnect with Visual Basic in my humble opinion so I am unsure where to look for an answer. I believe the problem is in the encoding or my choice of conversion formatting for the MAC address before using it in the subsequent RPC command. I keep getting errors after issuing the RPC and I am near certain that it is at least in part due to an incorrect data format for the remote Node's MAC Address used in the RPC arguments.
I am fairly new to SNAPConnect though I have had my license for over a y ear now. Am just now getting to SNAP-Connect related part of the project and need some help with one final hang-up on the application (I hope):
1) User enters basic remote note data for each remote note (i.e. name, index id, MAC, etc.) in windows dialog.
2) User Data goes to table in app as well as exterior .MDB database linked with the table
3) App pulls MAC(String) from DB to call on node. App Uses following code to convert string to Byte :
Public Function UnicodeStringToBytes(ByVal str As String) As Byte()
Return System.Text.Encoding.Unicode.GetBytes(str)
(This function called elsewhere similar to x = UNICODESTRINGTOBYTE (MACString variable)
4) Resultant Byte (x) used in subsequent RPC to remote node. I.E... proxy.rpc(clientaddress, x, New object{})
where x = the result of the unicode conversion function shown in item 3 above
5) SNAPConnect Console displays MAC as a 24 digits (4 per character in MAC) such as 3500610036003700320034004100. I believe this is UNICODE if I am not mistaken but the function in ITEM 3 is supposed to change that in the receiving variable.
6) Error received after issuing RPC to poll remote node with MAC Extracted from DB. I use the MAC in string from user input and DB for ease of handling and wait to convert before using the data to issue RPC to remote.
There is limited example and documentation on using SNAPConnect with Visual Basic in my humble opinion so I am unsure where to look for an answer. I believe the problem is in the encoding or my choice of conversion formatting for the MAC address before using it in the subsequent RPC command. I keep getting errors after issuing the RPC and I am near certain that it is at least in part due to an incorrect data format for the remote Node's MAC Address used in the RPC arguments.
Comment