Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
bluetooth, obexftp и utf8
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Russian
View previous topic :: View next topic  
Author Message
bobdva
Apprentice
Apprentice


Joined: 25 Nov 2003
Posts: 207
Location: Moscow

PostPosted: Fri Nov 04, 2005 7:05 am    Post subject: bluetooth, obexftp и utf8 Reply with quote

Настраиваю bt для связи с телефоном.
Делал согласно HOWTO mobile phone, Bluetooth and GNOME

Но ставить gnome'овские или kde'шние приблуды не хочется.
Решил обычным obexftp, но возникает проблема: у меня локаль ru_RU.KOI8-R, а каталоги на телефоне на русском языке - и ещё в utf-8, поэтому при просмотре
$ obexftp -l /dev/rfcomm0
пишет на албанском (utf8 в koi8r)

не решило проблему и export LANG=ru_RU.utf8
Back to top
View user's profile Send private message
serg_sk
Guru
Guru


Joined: 10 Jul 2004
Posts: 315
Location: Ukraine

PostPosted: Fri Nov 04, 2005 8:36 pm    Post subject: Re: bluetooth, obexftp и utf8 Reply with quote

bobdva wrote:
Настраиваю bt для связи с телефоном.
Делал согласно HOWTO mobile phone, Bluetooth and GNOME

Но ставить gnome'овские или kde'шние приблуды не хочется.
Решил обычным obexftp, но возникает проблема: у меня локаль ru_RU.KOI8-R, а каталоги на телефоне на русском языке - и ещё в utf-8, поэтому при просмотре
$ obexftp -l /dev/rfcomm0
пишет на албанском (utf8 в koi8r)

не решило проблему и export LANG=ru_RU.utf8

Попробуй заюзать gnome-obex-server, просто с мобилы тыкаешь отправить и он принимает.
Или попробуй export LANG=ru_RU.KOI8-R
Вообще-то в гноме не красиво сделала работа с блутус, в через kdeblueetooth красивше, но я qt вообще не держу :)
_________________
Sorry for my bad englilsh. :)
irc.freenode.net #fluxbox-ru - Fluxbox russian speaking channel.
Back to top
View user's profile Send private message
bobdva
Apprentice
Apprentice


Joined: 25 Nov 2003
Posts: 207
Location: Moscow

PostPosted: Sat Nov 05, 2005 4:13 pm    Post subject: Re: bluetooth, obexftp и utf8 Reply with quote

serg_sk wrote:
bobdva wrote:
Настраиваю bt для связи с телефоном.
Делал согласно HOWTO mobile phone, Bluetooth and GNOME

Но ставить gnome'овские или kde'шние приблуды не хочется.
Решил обычным obexftp, но возникает проблема: у меня локаль ru_RU.KOI8-R, а каталоги на телефоне на русском языке - и ещё в utf-8, поэтому при просмотре
$ obexftp -l /dev/rfcomm0
пишет на албанском (utf8 в koi8r)

не решило проблему и export LANG=ru_RU.utf8

Попробуй заюзать gnome-obex-server, просто с мобилы тыкаешь отправить и он принимает.
Или попробуй export LANG=ru_RU.KOI8-R
Вообще-то в гноме не красиво сделала работа с блутус, в через kdeblueetooth красивше, но я qt вообще не держу :)


Но ставить gnome'овские или kde'шние приблуды не хочется.

сейчас как временное решение - именно kblueetoothd, а LANG у меня и так ru_RU.KOI8-R
Back to top
View user's profile Send private message
Rikz
Tux's lil' helper
Tux's lil' helper


Joined: 06 Oct 2003
Posts: 103

PostPosted: Sun Nov 06, 2005 9:58 am    Post subject: Reply with quote

Если тебе станет легче, то в юникодной локали всё тоже не очень весело:
Code:
$ obexftp -b 00:0A:D9:BE:2E:BA -c Pictures -l
Browsing 00:0A:D9:BE:2E:BA ...
Channel: 7
No custom transport
Connecting...bt: 1
done
Sending Pictures... Sending Pictures... done
Receiving (null)...|<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE folder-listing SYSTEM "obex-folder-listing.dtd">
<!--
Generated by XML Coder.
xml_coder.c (Apr  7 2004 18:04:21)
(C) 2001 Sony Ericsson Mobile Communications AB, Lund, Sweden
-->
<folder-listing version="1.0"><parent-folder/>
<file name="Картинка(15).jpg" size="9936"/>
<file name="Картинка(14).jpg" size="9380"/>
<file name="Картинка(13).jpg" size="8597"/>
<file name="Картинка(12).jpg" size="6612"/>
<file name="Картинка(11).jpg" size="16086"/>
<file name="Картинка(10).jpg" size="12534"/>
<file name="Картинка(9).jpg" size="10222"/>
<file name="Картинка(8).jpg" size="9509"/>
<file name="Картинка(6).jpg" size="9513"/>
<file name="Картинка(5).jpg" size="13240"/>
<file name="Картинка(4).jpg" size="13527"/>
<file name="Картинка(3).jpg" size="4945"/>
<file name="Картинка(2).jpg" size="16177"/>
<file name="Картинка(1).jpg" size="17616"/>
<file name="Картинка(7).jpg" size="14467"/>
</folder-listing>
done
Disconnecting...done

Ну, вроде бы листинг нормальный, вуаля, пытаемся скачать хотя бы одну картинку (в идеале мне хотелось бы слить все сразу, но куда уж там):
Code:
$ obexftp -b 00:0A:D9:BE:2E:BA -c Pictures -g "Картинка(1).jpg"
Browsing 00:0A:D9:BE:2E:BA ...
Channel: 7
No custom transport
Connecting...bt: 1
done
Sending Pictures... Sending Pictures... done
Receiving Картинка(1).jpg... failed: Картинка(1).jpg
Disconnecting...done
Back to top
View user's profile Send private message
M0rf
n00b
n00b


Joined: 28 Oct 2004
Posts: 27
Location: Russia, Moscow

PostPosted: Tue Nov 08, 2005 1:26 am    Post subject: Reply with quote

Что за модель bt устройства?

зы просто собрался сам покупать (и как раз для связки с телефоном)
Back to top
View user's profile Send private message
bobdva
Apprentice
Apprentice


Joined: 25 Nov 2003
Posts: 207
Location: Moscow

PostPosted: Tue Nov 08, 2005 9:35 am    Post subject: Reply with quote

M0rf wrote:
Что за модель bt устройства?


хрен знает - какой-то bluetake за $20 (типо BlueTake BT007X/Si) , поднялся с полпинка, вот с обменом не через kde/gnome небольшие заморочки (из под kde фенек - вообще без проблем)
Back to top
View user's profile Send private message
cha-chaynik
Tux's lil' helper
Tux's lil' helper


Joined: 18 Feb 2005
Posts: 115
Location: Russia, St.Petersburg

PostPosted: Tue Nov 08, 2005 10:36 am    Post subject: Re: bluetooth, obexftp и utf8 Reply with quote

bobdva wrote:
Но ставить gnome'овские или kde'шние приблуды не хочется.
Решил обычным obexftp, но возникает проблема: у меня локаль ru_RU.KOI8-R, а каталоги на телефоне на русском языке - и ещё в utf-8, поэтому при просмотре
$ obexftp -l /dev/rfcomm0
пишет на албанском (utf8 в koi8r)

Взгляните на ObexFTP VFS for Midnight Commander ( http://phd.pp.ru/Software/cellphones/ ). Возможно, это как раз то, что Вам надо.
Back to top
View user's profile Send private message
bobdva
Apprentice
Apprentice


Joined: 25 Nov 2003
Posts: 207
Location: Moscow

PostPosted: Wed Nov 09, 2005 7:51 am    Post subject: Re: bluetooth, obexftp и utf8 Reply with quote

cha-chaynik wrote:
bobdva wrote:
Но ставить gnome'овские или kde'шние приблуды не хочется.
Решил обычным obexftp, но возникает проблема: у меня локаль ru_RU.KOI8-R, а каталоги на телефоне на русском языке - и ещё в utf-8, поэтому при просмотре
$ obexftp -l /dev/rfcomm0
пишет на албанском (utf8 в koi8r)

Взгляните на ObexFTP VFS for Midnight Commander ( http://phd.pp.ru/Software/cellphones/ ). Возможно, это как раз то, что Вам надо.


классно конечно, а как этот скрипт подцепить в mc ? что-то покопался, да не нашёл... (понимаю, что видать плохо искал - задайте вектор)
Back to top
View user's profile Send private message
serg_sk
Guru
Guru


Joined: 10 Jul 2004
Posts: 315
Location: Ukraine

PostPosted: Wed Nov 09, 2005 10:48 am    Post subject: Re: bluetooth, obexftp и utf8 Reply with quote

bobdva wrote:
cha-chaynik wrote:
bobdva wrote:
Но ставить gnome'овские или kde'шние приблуды не хочется.
Решил обычным obexftp, но возникает проблема: у меня локаль ru_RU.KOI8-R, а каталоги на телефоне на русском языке - и ещё в utf-8, поэтому при просмотре
$ obexftp -l /dev/rfcomm0
пишет на албанском (utf8 в koi8r)

Взгляните на ObexFTP VFS for Midnight Commander ( http://phd.pp.ru/Software/cellphones/ ). Возможно, это как раз то, что Вам надо.


классно конечно, а как этот скрипт подцепить в mc ? что-то покопался, да не нашёл... (понимаю, что видать плохо искал - задайте вектор)

[code]Edit the script, and correct the shebang path, if your python is not in the
/usr/local. Edit the full path to the obexftp binary (see below). Put the file
in the /usr/[local/]lib/mc/extfs, and add a line "obexftp" to the
/usr/[local/]lib/mc/extfs/extfs.ini.

Create somewhere a transport file. The transport file may have any name, and
is expected to be a text file with at least one line defining the transport to
your device. Other lines in the file are ignored.

First word in the line is a transport name - Bluetooth, TTY or IrDA. The name
is case-insensitive.

For the Bluetooth transport put there a line "Bluetooth CP:AD:RE:SS channel",
where CP:AD:RE:SS is the hardware address of the device you want to connect
to, and "channel" is the OBEX File Transfer channel; you can discover the
address and the channel for your device by using commands like "hcitool scan"
and "sdptool browse".

For the TTY put the device name: "tty /dev/ttyUSB0".

For the IrDA: just put "IrDA" in the file.

Now run this "cd" command in the Midnight Commander (in the "bindings" file
the command is "%cd"): cd transport#obexftp, where "transport" is the name of
your transport file. The script uses obexftp to connect to the device and list
files and directories. Please be warned that opening the VFS for the first
time is VERY slow, because the script needs to scan the entire cell phone's
filesystem. And there must be timeouts between connections, which don't make
the scanning faster. Midnight Commander caches the result so you can browse

and manipulate files and directories quickly.

Please note that manipulating the filesystem using your phone's internal
filemanager in parallel with the VFS leads to disagreement between the VFS
cache and the phone. It is not very dangerous but inconvenient. There is no
way to clear the VFS cache in Midnight Commander and reread the filesystem.
You have to exit the VFS (cd /, for example) and re[code]turn back using cd
transport#obexftp command. Sometimes even this doesn't help - Midnight
Commander shows the same cached VFS image. Exit Midnight Commander and
restart it.

If something goes wrong set the logging level (see setLevel() below) to INFO
or DEBUG and look in the obexftp-mcextfs.log file. The file is put in the same
directory as the transport file, if it possible; if not the file will be put
into a temporary directory, usually /tmp, or /var/tmp, or whatever directory
is named in $TMP environment variable.[/code]
Кажется все написано в самом файле, тобишь вектор единичный ;)

P.S. Заюзал у себя, все работает, файлы могу передавать, но только одни грабли: не показывает список файлов на телефоне. Папки показал, а файлов нет. :)

Выдал вот такую интересную ошибку:
[code]Error during run
Traceback (most recent call last):
File "/usr/share/mc/extfs/obexftp", line 373, in ?
g[procname]()
File "/usr/share/mc/extfs/obexftp", line 258, in mcobex_list
recursive_list()
File "/usr/share/mc/extfs/obexftp", line 252, in recursive_list
recursive_list(fullpath)
File "/usr/share/mc/extfs/obexftp", line 232, in recursive_list
listing, errors = _run("-l '%s'" % directory)
File "/usr/share/mc/extfs/obexftp", line 217, in _run
os.system(command)
UnicodeEncodeError: 'ascii' codec can't encode characters in position 48-55: ordinal not in range(128)
[/code]
_________________
Sorry for my bad englilsh. :)
irc.freenode.net #fluxbox-ru - Fluxbox russian speaking channel.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Russian All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum