Hi Peoples, I am sure someone is doing this already ..
I have totally worked out how to send images using kannel Mostly thanks to Andreas Fink and is well documented email on UDH's @ http://www.mail-archive.com/devel@kannel.3glab.org/msg01080.html My question: My images (and ringtones) are coming in slightly wrong. (corrupt) the image gets shifted down one pixel and the bottom rows gets chopped off, in it's place is a corrupted line at the top of the image (random pixel row) See the images attached for a better -pictures are worth a thousand words- ramon-on-phone.gif is a scan of what i get on my phone.... ramon.gif is the original image (converted from BMP) I am using http://nakentone.naken.cc/download.php rintone and image tools to convert my BMP image to a HEX string.. *thanks Mike for great tools* via ::: bmp2nokia_icon -x -l 505 02 ramon.bmp It's output then looks like ------------------------------------------------------ # message 1 3005F5200A00480E01445D11001555010000FFFFFFFFFFFFFFFFFF800000000000000001 8000000000000036019F00F00000000036019181998F03C0183601908309EDC66018 # message 2 3601930209BC642F1836019607F99C6C2F9880819384098C282FD8C18190C409842F2DF8 7F019044018021ECF83E0190000000200C380001800000000000100001FFFFFFFFFF # message 3 FFFFFFFF00 ------------------------------------------------------ I cut n paste these into my PHP below and whammo .. i get the image but wrong. (ringtones sometmes have a note out of place different to the original I heard as a MIDI file. If anybody has any ideas .. i'd much appreciate it. I am assuming the corruption is coming from the converter (slightly different format perhaps than required ?) I have tried using different programs to create my BMP and all same results (I use the same Naken converter as I have as yet found no other). ------------------ PHP Code that does my work ------------------ <SNIP of some variable declarations regarding kannel host/port/username/passowrd etc $sms_array[0] = array( 'udh' => '0B0504158200000003AF0301', 'data' => '3005F5200A00480E01445D11001555010000FFFFFFFFFFFFFFFFFF80000000000000000 18000000000000036019F00F00000000036019181998F03C0183601908309EDC66018'); $sms_array[1] = array( 'udh' => '0B0504158200000003AF0302', 'data' => '3601930209BC642F1836019607F99C6C2F9880819384098C282FD8C18190C409842F2DF 87F019044018021ECF83E0190000000200C380001800000000000100001FFFFFFFFFF'); $sms_array[2] = array( 'udh' => '0B0504158200000003AF0303', 'data' => 'FFFFFFFF00'); foreach($sms_array as $sms_part) { print $sms_part['udh'] . " --> " . $sms_part['data'] . "<br>\n"; preg_match_all("/(..)/", $sms_part['data'], $data_array, PREG_PATTERN_ORDER); preg_match_all("/(..)/", $sms_part['udh'], $udh_array, PREG_PATTERN_ORDER); $data_first_set = $data_array[0]; $udh_first_set = $udh_array[0]; $data = '%' . join('%', $data_first_set); $udh = '%' . join('%', $udh_first_set); $url = "http://$host:$port/cgi-bin/sendsms?" . "username=" . $username . "&password=" . $password . "&to=" . $msisdn . "&udh=" . $udh . "&from=123" . "&text=" . $data; file($url); } ------------------------------------------------------------------------ ------ This email was sent to you by Ramon Buckland, Software Engineer at f5. You can reach Ramon directly on (07) 3257 7900 or 0421 3 79 69 4
ramon-on-phone.gif
Description: ramon-on-phone.gif
ramon.gif
Description: ramon.gif