Connecting Vodafone Dongle Through Arduino Mega to Vodafone Network

Im using a Vodafone K3772 Dongle to send and receive texts through an arduino mega.
im starting off by simply sending a text, ive the code written already.

ive seen this has been done already for the mbed:

ive discovered that my dongle is flashing green which means there is a connection available, but its not connected.
when its connected it should be a solid green.

i want to know what code i need to get the dongle to connect to the network.

also i see in the mbed code they have a #include <VodafoneUSBModem.h> i think its something to do with this.

any help welcome

How are you connecting the dongle to the mega?


i use this device:

ive a made a lead go from a usb socket to a mini, i plug the dongle into the usb socket side of the lead and the other side of the lead goes into the mini usb connection on the device above. then its wired to the rx and tx of the mega.