Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 19 Feb 2005 11:10:31 -0800
From:      Maksim Yevmenkin <e.max@adelphia.net>
To:        albert@coderhythms.net
Cc:        freebsd-bluetooth@freebsd.org
Subject:   Re: Bluetooth on FreeBSD with Nokia 6600
Message-ID:  <42178F27.8020100@adelphia.net>
In-Reply-To: <51170.222.126.13.210.1108748861.squirrel@222.126.13.210>
References:  <61055.222.126.13.210.1108409216.squirrel@222.126.13.210> <4214BDC7.9090602@adelphia.net> <50109.222.126.13.210.1108668296.squirrel@222.126.13.210> <4215E955.3030503@adelphia.net> <51170.222.126.13.210.1108748861.squirrel@222.126.13.210>

next in thread | previous in thread | raw e-mail | index | archive | help
Albert,

[cc'ing to freebsd-bluetooth]

>>1) have freebsd act as a bluetooth lan access point, i.e. LAN profile
>>(see rfcomm_pppd(8) and ppp(8) man pages for more details).
> 
>  my FBSD will be a headless stealth firewall.. is it ok to use a LAN
> profile? can it connect to FBSD box? i got a little understanding about
> this. can it connect because my FBSD will serve as Stealth as in NAT..

so what? you are going to use lan profile on bluetooth link only. your 
bluetooth controlled firewall deals with ip, right? that is your 
firewall has separate network interface(s) on which it will filter the 
traffic, right?

its like you have a serial connection going to your firewall (i.e. 
serial console). btw, why are you not using serial console to control 
your firewall?

>>2) have your phone act as a LAN client, i.e. use bluetooth connection to
>>create ppp connection between your phone and freebsd.
> 
> if im going to use a ppp connection.. from phone.. what will be the flow?
> 1. Device Discovery

yes, the phone discovers the pc

> 2. Service Disovery

yes, the phone looks for the LAN service on the pc

> 3. Use L2Cap and perform rfcomm?

yes, the phone opens rfcomm connection to the pc, which in its turn 
requires l2cap connection. after this step is complete the phone and the 
pc are connected with virtual null-modem cable over virtual serial ports.

> 4. then use a ppp connection...

yes, the phone and the pc start ppp on each side and start talking over 
virtual serial ports.

> so what will happen is my phone will act as a PC workstation and i can
> perform any existing networking protocol?

correct, after you run ppp on both side you will have point-to-point ip 
connection between the phone and pc. at this point you can use any 
network application on the phone (such as internet browser, telnet, ssh 
etc).

thanks,
max


>>3) run ssh on your phone and login into freebsd box (using existing
>>connection)
> 
> 
>>4) do whatever you want on freebsd side
> 
> 
>>thanks,
>>max
> 
> 
> Thank you for your support sir.. thank you so much..
> 
> 
> =========================================
> Albert S. Causing
> Coderhythms IT Services, Inc.
> IT Head
> www . coderhythms . com
> 
> 
> 
> 
>>Albert,
>>
>>
>>>Thanks for the reply,
>>>
>>>  yes its #hsecd -d -f /etc/bluetooth/hosts
>>>  sorry for the missing directory..
>>
>>still wrong. the /etc/bluetooth/hosts file contains mapping between
>>bd_addr and its human readable name. see bluetooth.hosts(5) and
>>bthost(1) man pages for more details.
>>
>>hcsecd(8) uses *different* configuration file
>>/etc/bluetooth/hcsecd.conf. this configuration file contains link keys
>>and/or pin codes for the bluetooth devices.
>>
>>
>>>  ive post already at the mailing list so far.. no response.
>>>
>>>  in FBSD example mo nokia fone would like to send data? example my data
>>>is a string. like a real string? or a file? coz i have found that NOKIA
>>>6600 dont have a obex support client but has only SJR82 but no obex.
>>
>>nokia 6600 *has* obex support, and i hope you mean JSR82 - Java APIs for
>>Bluetooth. also, please note that according to Sun JSR82 *has* OBEX API
>>(http://java.sun.com/j2me/docs/wtk2.2/docs/UserGuide-html/demonstrations.html)
>>
>>bottom line: i'm sorry, but i'm having a hard time understanding what
>>are you talking about.
>>
>>
>>>  i want to create a streaming connection from Phone-to-PC .. so what
>>>will
>>>i need? coz i really dont know what will i use. rfcomm or sdp...
>>
>>you *dont* want to use sdp. please read the bluetooth specification. if
>>you want to create *your own* "profile" or "service" (not described in
>>the bluetooth specification) then you probably want to use l2cap or
>>rfcomm. note that in this case you have to write your application for
>>both nokia 6600 (using java) and freebsd.
>>
>>
>>>actually my project is this...
>>>
>>>Bluetooth controlled firewall..
>>>so my FBSD is a headless setup.
>>>so therefore i want to control it via bluetooth..
>>>can u give me scenario what to do with this?
>>
>>1) have freebsd act as a bluetooth lan access point, i.e. LAN profile
>>(see rfcomm_pppd(8) and ppp(8) man pages for more details).
>>
>>2) have your phone act as a LAN client, i.e. use bluetooth connection to
>>create ppp connection between your phone and freebsd.
>>
>>3) run ssh on your phone and login into freebsd box (using existing
>>connection)
>>
>>4) do whatever you want on freebsd side
>>
>>thanks,
>>max
>>
>>
>>>
>>>>Hi Albert,
>>>>
>>>>sorry for the late reply. i was on vacation.
>>>>
>>>>
>>>>
>>>>> With my eagerness to learn bluetooth programming on FreeBSD, would
>>>>>you
>>>>>be my advicer for this subject?
>>>>
>>>>sure :) you also might want to ask your questions in
>>>>freebsd-bluetooth@freebsd.org mailing list.
>>>>
>>>>
>>>>
>>>>> I have tried using FBSD as my bluetooth server and have tried pushing
>>>>>file from FBSD to NOKIA 6600 using OBEX. So far thats all i can.
>>>>>
>>>>> this is what i did.
>>>>> 1. # /etc/rc.bluetooth start ubt0
>>>>> 2. # sdpd
>>>>> 3. # hsecd -d -f /etc/hosts
>>>>
>>>>hmmm... did you mean 'hcsecd -d -f ...'? also /etc/hosts is wrong
>>>>configuration file. hcsecd(8) uses its own configuration file (default
>>>>/etc/bluetooth/hcsecd.conf). please read hcsecd(8) man page.
>>>>
>>>>
>>>>
>>>>> 4. and obexapps to push file..
>>>>>
>>>>>so far i can send file...
>>>>
>>>>good.
>>>>
>>>>
>>>>
>>>>>my question is:
>>>>>1. what will i need to perform streaming of data into the nokia fone?
>>>>>example i want to send a "string" to nokia 6600?
>>>>
>>>>what do you mean by "send a "string"? do you want access to the phone's
>>>>serial port? do you want to send a picture, address book, calendar or
>>>>task item to the phone?
>>>>
>>>>
>>>>
>>>>>2. As FBSD as my bluetooth server. how can i make connection from my
>>>>>nokia? coz i have tried. it only detects the server but it does not get
>>>>>the profile. so, with that im quite confuse if what will i need on FBSD
>>>>>to
>>>>>execute as server on FBSD.
>>>>
>>>>again what are you trying to do? specifically what profile are you
>>>>trying to use? LAN, OPUSH, FTRN etc?
>>>>
>>>>
>>>>
>>>>>3. Is there anything i need to aside from SDPD? coz i want to connect
>>>>>my
>>>>>NOKIA 6600 as client and send data which probably a string or a file.
>>>>>do
>>>>>i
>>>>>need to run a server software to get the data from the fone?
>>>>
>>>>you most definitely need to run application that implements specific
>>>>profile on FreeBSD side. sdpd(8) implements Service Discovery Protocol.
>>>>it is juts like central database where all other applications register
>>>>services (profiles) available on the host. for example if you run
>>>>sdpd(8) and obexapp(1) in *server* mode then your phone should see OPUSH
>>>>service (profile) on your pc.
>>>>
>>>>
>>>>
>>>>>I have tried reading the handbook of fbsd and other forums but still im
>>>>>confuse and everything is blured...
>>>>
>>>>if you think that documentation is lacking them please feel free to send
>>>>me updates and i will include them into the handbook. i will also make
>>>>sure your name is mentioned in the list of contributors.
>>>>
>>>>thanks,
>>>>max
>>>>
>>>>
>>>
>>>
>>>
>>>=========================================
>>>Albert S. Causing
>>>Coderhythms IT Services, Inc.
>>>IT Head
>>>www . coderhythms . com
>>>
>>>
>>>
>>>
>>
>>
> 
> 
> 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?42178F27.8020100>