Support for LISA-N101
Fork of C027_Support by
This is a variant of the C027 driver code for the C027N version, i.e. the one with the Neul/Huawei/u-blox Cellular Internet of Things module on board. The AT command interface for this module is entirely different to the AT interface for the other u-blox modules, hence this fork of the driver. Work is underway to rearchitect the original C027 driver so that a merge can be done.
Diff: MDM.h
- Revision:
- 63:42cb563a25bc
- Parent:
- 59:382695f1ce85
- Child:
- 66:69072b3c5bca
--- a/MDM.h Tue May 13 07:13:27 2014 +0000 +++ b/MDM.h Tue May 13 12:31:33 2014 +0000 @@ -146,11 +146,12 @@ //! Socket error return codes #define SOCKET_ERROR -1 - /** Create a socket for a ip protocol + /** Create a socket for a ip protocol (and optionaly bind) \param ipproto the protocol (UDP or TCP) + \param port in case of UDP, this optional port where it is bind \return the socket handle if successful or SOCKET_ERROR on failure */ - int socketSocket(IpProtocol ipproto); + int socketSocket(IpProtocol ipproto, int port = -1); /** make a socket connection \param socket the socket handle @@ -207,12 +208,13 @@ /** Read from this socket \param socket the socket handle + \param ip the ip of host where the data originates from + \param port the port where the data originates from \param buf the buffer to read into \param len the size of the buffer to read into - \param ip the ip of host where the data originates from \return the number of bytes read or SOCKET_ERROR on failure */ - int socketRecvFrom(int socket, char* buf, int len, IP* ip); + int socketRecvFrom(int socket, IP* ip, int* port, char* buf, int len); /** Close a connectied socket (that was connected with #socketConnect) \param socket the socket handle