[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bluetooth-dev] Problem when receiving files from Bluetooth Serial Port Emulation



Hi!
I'm working on Bluetooth, with which I use Ericsson
hardware and Axis protocol stack. What I'm doing now
is to send/receive files between two bluetooth
devices.

But in the file transfer of images, there are problems
involving with the "ctrl-J"(10) & "ctrl-M"(13), all of
the "ctrl-M" in the send side will be automatically
changed to "ctrl-J". Though I can receive the files
from the sender, but the image will be distorted.

With detailed information, I use several C functions:
-fopen(); <- open file for read
-fread(); <- read the whole file to char array until
EOF
-write(); <- write to the dev, i.e. ttyBT*

-read();  <- read the ttyBT*, which receives 127 bytes
per read and put them to a char array
-fwrite();<- write the array to the file

Would you kindly tell me what's the mistake here??
Thanks a lot!
DICK


_________________________________________________________
Do you Yahoo!?
至Hit手機鈴聲 全城火熱下載
Download the HOTTEST ringtones from Yahoo!
http://ringtone.yahoo.com.hk
-
To unsubscribe from this list: send the line "unsubscribe bluetooth-dev" in
the body of a message to majordomo@xxxxxxx.com