Skip to contentSkip to conversation

DUN client for oFono and BlueZ

DISCUSSION Gustavo F. Padovan 6 participants 13 messages Apr 27, 2010 Bluetooth drivers

lore
Share & tools
lore
#0 lore raw

Hi all,

I'm starting the DUN Client implementation for the Linux Stack. DUN is the Bluetooth dial-up network profile. It makes possible share internet connection between two Bluetooth devices. That is my Google Summer of Code project for this year.

Here follows a simple, and possible not complete, roadmap:

1. Put send_method_call() and send_method_call_with_reply() on gdbus: those functions are very useful for DBus operations. You can send a DBus message just calling them with the right parameters. Patch for that work already on the mailing list.

2. Create a bluetooth.c file with the bluetooth helpers. oFono plugins for HFP, DUN and SAP will be able to share the same bluetooth code to access BlueZ stuff. This is a ongoing work.

3. plugin/dun.c prototype. A simple prototype for the DUN client.

4. Agent server on BlueZ. This one is very similar to the HFP Agent server. At the end of the DUN agent project I plan to merge the both agent servers. SAP will take advantage of that merge too.

5. oFono DUN agent. Implement the agent handling for DUN.

6. AT command parser and PPP stack integration with DUN. The biggest task, where the core of the project is.

7. ConnMan integration. Setup of the NAT and Internet Connections.

Comments are welcome. :)

Signature · 2 lines
Gustavo F. Padovan
http://padovan.org
maintainer
#1 lore raw

Hi Gustavo,

Quoted 18 lines

I'm starting the DUN Client implementation for the Linux Stack. DUN is the Bluetooth dial-up network profile. It makes possible share internet connection between two Bluetooth devices. That is my Google Summer of Code project for this year.

Here follows a simple, and possible not complete, roadmap:

1. Put send_method_call() and send_method_call_with_reply() on gdbus: those functions are very useful for DBus operations. You can send a DBus message just calling them with the right parameters. Patch for that work already on the mailing list.

2. Create a bluetooth.c file with the bluetooth helpers. oFono plugins for HFP, DUN and SAP will be able to share the same bluetooth code to access BlueZ stuff. This is a ongoing work.

3. plugin/dun.c prototype. A simple prototype for the DUN client.

Quoted 8 lines

4. Agent server on BlueZ. This one is very similar to the HFP Agent server. At the end of the DUN agent project I plan to merge the both agent servers. SAP will take advantage of that merge too.

5. oFono DUN agent. Implement the agent handling for DUN.

6. AT command parser and PPP stack integration with DUN. The biggest task, where the core of the project is.

this is pretty clear. oFono carries the GAtChat library that comes with AT command and PPP support. So oFono should carry the DUN client.

Regards

Marcel

#2 lore raw

Hi Marcel,

Quoted 24 lines · Marcel Holtmann

Hi Gustavo,

Quoted 22 lines

I'm starting the DUN Client implementation for the Linux Stack. DUN is the Bluetooth dial-up network profile. It makes possible share internet connection between two Bluetooth devices. That is my Google Summer of Code project for this year.

Here follows a simple, and possible not complete, roadmap:

1. Put send_method_call() and send_method_call_with_reply() on gdbus: those functions are very useful for DBus operations. You can send a DBus message just calling them with the right parameters. Patch for that work already on the mailing list.

2. Create a bluetooth.c file with the bluetooth helpers. oFono plugins for HFP, DUN and SAP will be able to share the same bluetooth code to access BlueZ stuff. This is a ongoing work.

3. plugin/dun.c prototype. A simple prototype for the DUN client.

4. Agent server on BlueZ. This one is very similar to the HFP Agent server. At the end of the DUN agent project I plan to merge the both agent servers. SAP will take advantage of that merge too.

Quoted 7 lines
Quoted 4 lines

5. oFono DUN agent. Implement the agent handling for DUN.

6. AT command parser and PPP stack integration with DUN. The biggest task, where the core of the project is.

this is pretty clear. oFono carries the GAtChat library that comes with AT command and PPP support. So oFono should carry the DUN client.

Absolutely, I forgot to mention that oFono should carry the DUN client. I'm starting some working on it. I'll send patches soon. :)

Regards,

Signature · 2 lines
Gustavo F. Padovan
http://padovan.org
#3 lore raw
In reply to Gustavo F. Padovan

Hi Padovan,

Quoted 9 lines · Gustavo F. Padovan

Hi all,

I'm starting the DUN Client implementation for the Linux Stack. DUN is the Bluetooth dial-up network profile. It makes possible share internet connection between two Bluetooth devices. That is my Google Summer of Code project for this year.

Here follows a simple, and possible not complete, roadmap:

Quoted 8 lines

1. Put send_method_call() and send_method_call_with_reply() on
gdbus: those functions are very useful for DBus operations. You can send a DBus message just calling them with the right parameters. Patch for that work already on the mailing list.

2. Create a bluetooth.c file with the bluetooth helpers. oFono plugins for HFP, DUN and SAP will be able to share the same bluetooth code to access BlueZ stuff. This is a ongoing work.

Is this bluetooth.c like a utility to watch BlueZ status, watch adapter change and signals? If I understand correctly, every plugin like HFP, DUN, SAP will add status callback for different event.

Quoted 1 line

3. plugin/dun.c prototype. A simple prototype for the DUN client.

Not quite sure whether we need this. Denis suggests to create an Emulator atom in the ofono core. I am now making a prototype to create this atom in oFono.
The structure is similar to voicecall.c. An emulator manager could create HFP AG, DUN or SPP type emulators. When one is created, other atom get notified and register their interested AT command handers to GAtServer. So in this way, agent server on BlueZ may call oFono CreateEmulator method and pass file descriptor directly to oFono.

Quoted 6 lines

4. Agent server on BlueZ. This one is very similar to the HFP Agent server. At the end of the DUN agent project I plan to merge the both agent servers. SAP will take advantage of that merge too.

5. oFono DUN agent. Implement the agent handling for DUN.

Actually, my original prototype is quite simliar with yours. DUN, HFP and SPP are implemented as plugins. See my previous patches in the mailing list for details.

Quoted 2 lines

6. AT command parser and PPP stack integration with DUN. The biggest task, where the core of the project is.

GAtServer and PPP are already there. We still need to add DUN specific command and callbacks.

Quoted 5 lines

7. ConnMan integration. Setup of the NAT and Internet Connections.

Comments are welcome. :)

Quoted 7 lines

--
Gustavo F. Padovan
http://padovan.org
_______________________________________________
ofono mailing list
[email protected]
http://lists.ofono.org/listinfo/ofono

Regards,
Zhenhua

#4 lore raw

Hi Zhenhua,

Quoted 17 lines · Zhang, Zhenhua

Hi Padovan,

Quoted 14 lines · Gustavo F. Padovan

Hi all,

I'm starting the DUN Client implementation for the Linux Stack. DUN is the Bluetooth dial-up network profile. It makes possible share internet connection between two Bluetooth devices. That is my Google Summer of Code project for this year.

Here follows a simple, and possible not complete, roadmap:

1. Put send_method_call() and send_method_call_with_reply() on
gdbus: those functions are very useful for DBus operations. You can send a DBus message just calling them with the right parameters. Patch for that work already on the mailing list.

Quoted 5 lines
Quoted 3 lines

2. Create a bluetooth.c file with the bluetooth helpers. oFono plugins for HFP, DUN and SAP will be able to share the same bluetooth code to access BlueZ stuff. This is a ongoing work.

Is this bluetooth.c like a utility to watch BlueZ status, watch adapter change and signals? If I understand correctly, every plugin like HFP, DUN, SAP will add status callback for different event.

Exactly, that's the idea.

Quoted 5 lines
Quoted 2 lines

3. plugin/dun.c prototype. A simple prototype for the DUN client.

Not quite sure whether we need this. Denis suggests to create an Emulator atom in the ofono core. I am now making a prototype to create this atom in oFono.
The structure is similar to voicecall.c. An emulator manager could create HFP AG, DUN or SPP type emulators. When one is created, other atom get notified and register their interested AT command handers to GAtServer. So in this way, agent server on BlueZ may call oFono CreateEmulator method and pass file descriptor directly to oFono.

If I understood correctly the Emulator will be useful for the DUN Gateway side. Right?
Right now I'm going to work on the DUN Client.

Quoted 9 lines
Quoted 7 lines

4. Agent server on BlueZ. This one is very similar to the HFP Agent server. At the end of the DUN agent project I plan to merge the both agent servers. SAP will take advantage of that merge too.

5. oFono DUN agent. Implement the agent handling for DUN.

Actually, my original prototype is quite simliar with yours. DUN, HFP and SPP are implemented as plugins. See my previous patches in the mailing list for details.

In my mind that will be similar to the HFP agent implementation I did inside oFono.

Quoted 8 lines
Quoted 3 lines

6. AT command parser and PPP stack integration with DUN. The biggest task, where the core of the project is.

GAtServer and PPP are already there. We still need to add DUN specific command and callbacks.

Quoted 2 lines

7. ConnMan integration. Setup of the NAT and Internet Connections.

Regards,

Signature · 2 lines
Gustavo F. Padovan
http://padovan.org
#5 lore raw

Hi Padovan,

Quoted 40 lines · Gustavo F. Padovan

Hi Zhenhua,

* Zhang, Zhenhua <[email protected]> [2010-04-27 10:14:38 +0800]:

Quoted 17 lines

Hi Padovan,

Quoted 14 lines · Gustavo F. Padovan

Hi all,

I'm starting the DUN Client implementation for the Linux Stack. DUN is the Bluetooth dial-up network profile. It makes possible share internet connection between two Bluetooth devices. That is my Google Summer of Code project for this year.

Here follows a simple, and possible not complete, roadmap:

1. Put send_method_call() and send_method_call_with_reply() on
gdbus: those functions are very useful for DBus operations. You can send a DBus message just calling them with the right parameters. Patch for that work already on the mailing list.

Quoted 5 lines
Quoted 3 lines

2. Create a bluetooth.c file with the bluetooth helpers. oFono plugins for HFP, DUN and SAP will be able to share the same bluetooth code to access BlueZ stuff. This is a ongoing work.

Is this bluetooth.c like a utility to watch BlueZ status,

watch adapter change and signals? If I understand correctly, every plugin like HFP, DUN, SAP will add status callback for different event.

Exactly, that's the idea.

Quoted 4 lines
Quoted 2 lines

3. plugin/dun.c prototype. A simple prototype for the DUN client.

Not quite sure whether we need this. Denis suggests to

create an Emulator atom in the ofono core. I am now making a prototype to create this atom in oFono.

Quoted 1 line

The structure is similar to voicecall.c. An emulator manager

Quoted 8 lines

could create HFP AG, DUN or SPP type emulators. When one is created, other atom get notified and register their interested AT command handers to GAtServer. So in this way, agent server on BlueZ may call oFono CreateEmulator method and pass file descriptor directly to oFono.

If I understood correctly the Emulator will be useful for the DUN Gateway side. Right?

Yes. This is DUN gateway side. So I think we need to define a PPP command forwarding so that PPP command could be sent and received throught DUN properly.

Quoted 23 lines

Right now I'm going to work on the DUN Client.

Quoted 8 lines
Quoted 6 lines

4. Agent server on BlueZ. This one is very similar to the HFP Agent server. At the end of the DUN agent project I plan to merge the both agent servers. SAP will take advantage of that merge too.

5. oFono DUN agent. Implement the agent handling for DUN.

Actually, my original prototype is quite simliar with yours.

DUN, HFP and SPP are implemented as plugins. See my previous patches in the mailing list for details.

In my mind that will be similar to the HFP agent
implementation I did inside oFono.

Quoted 5 lines
Quoted 3 lines

6. AT command parser and PPP stack integration with DUN. The biggest task, where the core of the project is.

GAtServer and PPP are already there. We still need to add

DUN specific command and callbacks.

Quoted 1 line
Quoted 8 lines
Quoted 2 lines
Quoted 2 lines

7. ConnMan integration. Setup of the NAT and Internet Connections.

Regards,

--
Gustavo F. Padovan
http://padovan.org

Regards,
Zhenhua

#6 lore raw
In reply to Zhang, Zhenhua

Hi Zhenhua,

Quoted 10 lines
Quoted 2 lines

3. plugin/dun.c prototype. A simple prototype for the DUN client.

Not quite sure whether we need this. Denis suggests to create an Emulator
atom in the ofono core. I am now making a prototype to create this atom in oFono. The structure is similar to voicecall.c. An emulator manager could create HFP AG, DUN or SPP type emulators. When one is created, other atom get notified and register their interested AT command handers to GAtServer. So in this way, agent server on BlueZ may call oFono CreateEmulator method and pass file descriptor directly to oFono.

Gustavo is working on DUN _client_, the ModemEmulator work is on the DUN _server_ roles. There is a difference ;)

Regards,
-Denis

#7 lore raw
In reply to Gustavo F. Padovan
Quoted 1 line · Gustavo F. Padovan

Hi all,

Hello Gustavo,

Quoted 4 lines

I'm starting the DUN Client implementation for the Linux Stack. DUN is the Bluetooth dial-up network profile. It makes possible share internet connection between two Bluetooth devices. That is my Google Summer of Code project for this year.

Excellent, I'm eagerly waiting for this. I hate cables =)

As soon as you have something working, please do send patches so that people can test it.

Quoted 5 lines

4. Agent server on BlueZ. This one is very similar to the HFP Agent server. At the end of the DUN agent project I plan to merge the both agent servers. SAP will take advantage of that merge too.

5. oFono DUN agent. Implement the agent handling for DUN.

Sorry, I'm not familiar with HFP Agent, but what will this agent actually do on a DUN connection?

Quoted 4 lines

6. AT command parser and PPP stack integration with DUN. The biggest task, where the core of the project is.

7. ConnMan integration. Setup of the NAT and Internet Connections.

Why NAT is needed? I guess only for connection sharing.

Signature · 1 line
Kalle Valo
#8 lore raw

Hi Kalle,

Quoted 16 lines · Kalle Valo
Quoted 1 line · Gustavo F. Padovan

Hi all,

Hello Gustavo,

Quoted 4 lines

I'm starting the DUN Client implementation for the Linux Stack. DUN is the Bluetooth dial-up network profile. It makes possible share internet connection between two Bluetooth devices. That is my Google Summer of Code project for this year.

Excellent, I'm eagerly waiting for this. I hate cables =)

As soon as you have something working, please do send patches so that people can test it.

Quoted 8 lines
Quoted 5 lines

4. Agent server on BlueZ. This one is very similar to the HFP Agent server. At the end of the DUN agent project I plan to merge the both agent servers. SAP will take advantage of that merge too.

5. oFono DUN agent. Implement the agent handling for DUN.

Sorry, I'm not familiar with HFP Agent, but what will this agent actually do on a DUN connection

The agent can request a RFCOMM connection and receive the RFCOMM channel via DBus fd-passing. The the DUN plugin can do the handshake.

Quoted 7 lines
Quoted 5 lines

6. AT command parser and PPP stack integration with DUN. The biggest task, where the core of the project is.

7. ConnMan integration. Setup of the NAT and Internet Connections.

Why NAT is needed? I guess only for connection sharing.

No idea yet, I guess Denis told me about the NAT, but that will be the last part of the project, so I'm not caring about it now. I have to check on my irc logs.

Signature · 2 lines
Gustavo F. Padovan
http://padovan.org
#9 lore raw
Quoted 1 line · Gustavo F. Padovan

Hi Kalle,

Hi Gustavo,

Quoted 11 lines
Quoted 8 lines
Quoted 5 lines

4. Agent server on BlueZ. This one is very similar to the HFP Agent server. At the end of the DUN agent project I plan to merge the both agent servers. SAP will take advantage of that merge too.

5. oFono DUN agent. Implement the agent handling for DUN.

Sorry, I'm not familiar with HFP Agent, but what will this agent actually do on a DUN connection

The agent can request a RFCOMM connection and receive the RFCOMM channel via DBus fd-passing. The the DUN plugin can do the handshake.

Ah, that makes perfect sense. Thanks for explaining it.

Quoted 10 lines
Quoted 6 lines
Quoted 4 lines

6. AT command parser and PPP stack integration with DUN. The biggest task, where the core of the project is.

7. ConnMan integration. Setup of the NAT and Internet Connections.

Why NAT is needed? I guess only for connection sharing.

No idea yet, I guess Denis told me about the NAT, but that will be the last part of the project, so I'm not caring about it now. I have to check on my irc logs.

When I was using bt dun on my laptop (just manually running pppd with debian's pon script) I didn't need nat at all.

Signature · 1 line
Kalle Valo
#10 lore raw
In reply to Gustavo F. Padovan
Quoted 6 lines · Gustavo F. Padovan

Hi all,

I'm starting the DUN Client implementation for the Linux Stack. DUN is the Bluetooth dial-up network profile. It makes possible share internet connection between two Bluetooth devices. That is my Google Summer of Code project for this year.

Does this project include anything that will be reusable by non-oFono based projects? Native BT PPP line discipline would have been nice.

Cheers

#11 lore raw

Hi Bastien,

Quoted 11 lines · Bastien Nocera
Quoted 6 lines · Gustavo F. Padovan

Hi all,

I'm starting the DUN Client implementation for the Linux Stack. DUN is the Bluetooth dial-up network profile. It makes possible share internet connection between two Bluetooth devices. That is my Google Summer of Code project for this year.

Does this project include anything that will be reusable by non-oFono based projects? Native BT PPP line discipline would have been nice.

Yes, oFono will be only the Agent, you can implement a new one if you want. Also oFono already does the PPP line discipline, so we don't need to duplicate such feature in BlueZ.

Signature · 2 lines
Gustavo F. Padovan
http://padovan.org
#12 lore raw
Quoted 13 lines · Gustavo F. Padovan

Hi Bastien,

Quoted 8 lines · Bastien Nocera
Quoted 6 lines · Gustavo F. Padovan

Hi all,

I'm starting the DUN Client implementation for the Linux Stack. DUN is the Bluetooth dial-up network profile. It makes possible share internet connection between two Bluetooth devices. That is my Google Summer of Code project for this year.

Quoted 6 lines
Quoted 3 lines

Does this project include anything that will be reusable by non-oFono based projects? Native BT PPP line discipline would have been nice.

Yes, oFono will be only the Agent, you can implement a new one if you want.

The ppp implementation in NetworkManager already works for me.

Quoted 2 lines

Also oFono already does the PPP line discipline, so we don't need
to duplicate such feature in BlueZ.

I thought BT PPP line discipline was a kernel feature.