User:Kagee

From Openmoko

(Difference between revisions)
Jump to: navigation, search
(New page: org.freesmartphone.Usage Method: ListResources ( ) → as Description: List available resources. Returns as: resources An array of resource names. cli-framework >>> usageiface....)
 
(nobody knows)
 
(2 intermediate revisions by one user not shown)
Line 1: Line 1:
    org.freesmartphone.Usage
+
==Bluetooth Networking==
 +
This really says it all:
 +
<pre>
 +
http://sources.gentoo.org/viewcvs.py/gentoo/xml/htdocs/doc/en/bluetooth-guide.xml
 +
Thu Jul 16 23:02:01 2009 UTC (9 days ago) by nightmorph
 +
Branch: MAIN
 +
CVS Tags: HEAD
 +
Changes since 1.15: +12 -125 lines
 +
Diff to previous 1.15
  
Method:
+
updated bluetooth guide, emergency fixes, bug 266690.
ListResources ( ) → as
+
we now no longer have a chapter on setting up a PAN,
 +
since nobody knows how the hell to do this.
 +
</pre>
  
Description: List available resources.
+
* org.freesmartphone.Usage - method - ListResources ( ) → as - description: List available resources.
Returns
+
as: resources
+
  
An array of resource names.
+
*cli-framework will report that that it could not coeenct to bluez - you have to usageiface.RequestResource('Bluetooth') in another cli-framwork session for it to work
  
    cli-framework
+
Removed several:
>>> usageiface.ListResources()
+
 
Using **pending_return in dbus_connection_send_with_reply_setup() without pending_setup is deprecated and strongly discouraged
 
Using **pending_return in dbus_connection_send_with_reply_setup() without pending_setup is deprecated and strongly discouraged
['WiFi', 'Display', 'Bluetooth', 'TEST', 'GSM', 'CPU', 'GPS']
 
  
 +
<pre>
 
>>> usageiface.ListResources()
 
>>> usageiface.ListResources()
Using **pending_return in dbus_connection_send_with_reply_setup() without pending_setup is deprecated and strongly discouraged
 
 
['WiFi', 'Display', 'Bluetooth', 'TEST', 'GSM', 'CPU', 'GPS']
 
['WiFi', 'Display', 'Bluetooth', 'TEST', 'GSM', 'CPU', 'GPS']
 +
 
>>> usageiface.GetResourcePolicy('Bluetooth')
 
>>> usageiface.GetResourcePolicy('Bluetooth')
Using **pending_return in dbus_connection_send_with_reply_setup() without pending_setup is deprecated and strongly discouraged
 
 
'auto'
 
'auto'
 +
 
>>> usageiface.GetResourceState('Bluetooth')
 
>>> usageiface.GetResourceState('Bluetooth')
Using **pending_return in dbus_connection_send_with_reply_setup() without pending_setup is deprecated and strongly discouraged
 
 
False
 
False
 +
 
>>> usageiface.RequestResource('Bluetooth')
 
>>> usageiface.RequestResource('Bluetooth')
Using **pending_return in dbus_connection_send_with_reply_setup() without pending_setup is deprecated and strongly discouraged
+
 
 
>>> a = usageiface.RequestResource('Bluetooth')
 
>>> a = usageiface.RequestResource('Bluetooth')
Using **pending_return in dbus_connection_send_with_reply_setup() without pending_setup is deprecated and strongly discouraged
 
 
Traceback (most recent call last):
 
Traceback (most recent call last):
 
   File "<console>", line 1, in <module>
 
   File "<console>", line 1, in <module>
Line 35: Line 41:
 
     message, timeout)
 
     message, timeout)
 
DBusException: org.freesmartphone.Usage.UserExists: User :1.25 already requested Bluetooth
 
DBusException: org.freesmartphone.Usage.UserExists: User :1.25 already requested Bluetooth
 +
 
>>> usageiface.GetResourceState('Bluetooth')
 
>>> usageiface.GetResourceState('Bluetooth')
Using **pending_return in dbus_connection_send_with_reply_setup() without pending_setup is deprecated and strongly discouraged
 
 
True
 
True
 +
 
>>> a = usageiface.ReleaseResource('Bluetooth')
 
>>> a = usageiface.ReleaseResource('Bluetooth')
Using **pending_return in dbus_connection_send_with_reply_setup() without pending_setup is deprecated and strongly discouraged
+
 
 
>>> a = usageiface.RequestResource('Bluetooth')
 
>>> a = usageiface.RequestResource('Bluetooth')
Using **pending_return in dbus_connection_send_with_reply_setup() without pending_setup is deprecated and strongly discouraged
+
 
 
>>> usageiface.GetResourceState('Bluetooth')
 
>>> usageiface.GetResourceState('Bluetooth')
 +
 
>>> a = usageiface.ReleaseResource('Bluetooth')
 
>>> a = usageiface.ReleaseResource('Bluetooth')
Using **pending_return in dbus_connection_send_with_reply_setup() without pending_setup is deprecated and strongly discouraged
+
 
 
>>> usageiface.GetResourceState('Bluetooth')
 
>>> usageiface.GetResourceState('Bluetooth')
Using **pending_return in dbus_connection_send_with_reply_setup() without pending_setup is deprecated and strongly discouraged
 
 
False
 
False
 +
 
>>> a = usageiface.RequestResource('Bluetooth')
 
>>> a = usageiface.RequestResource('Bluetooth')
Using **pending_return in dbus_connection_send_with_reply_setup() without pending_setup is deprecated and strongly discouraged
+
</pre>
>>>
+
 
 +
*cli
 +
<pre>
 +
root@om-gta02:~# hcitool dev
 +
Devices:
 +
hci0 00:06:6E:17:84:32
 +
root@om-gta02:~# hciconfig
 +
hci0: Type: USB
 +
BD Address: 00:06:6E:17:84:32 ACL MTU: 384:8 SCO MTU: 64:8
 +
UP RUNNING PSCAN
 +
RX bytes:1111 acl:0 sco:0 events:47 errors:0
 +
TX bytes:449 acl:0 sco:0 commands:47 errors:0
 +
 
 +
cd ~
 +
cp /etc/default/dropbear .
 +
nano /etc/default/dropbear  # DROPBEAR_PORT=22
 +
/etc/init.d/dropbear restart
 +
 
 +
/etc/bluetooth/main.conf # aaded pass="1234"
 +
</pre>
 +
* http://bluez.sourceforge.net/contrib/HOWTO-PAN (old)

Latest revision as of 01:37, 26 July 2009

[edit] Bluetooth Networking

This really says it all:

http://sources.gentoo.org/viewcvs.py/gentoo/xml/htdocs/doc/en/bluetooth-guide.xml
Thu Jul 16 23:02:01 2009 UTC (9 days ago) by nightmorph
Branch: MAIN
CVS Tags: HEAD
Changes since 1.15: +12 -125 lines
Diff to previous 1.15

updated bluetooth guide, emergency fixes, bug 266690. 
we now no longer have a chapter on setting up a PAN, 
since nobody knows how the hell to do this.
  • org.freesmartphone.Usage - method - ListResources ( ) → as - description: List available resources.
  • cli-framework will report that that it could not coeenct to bluez - you have to usageiface.RequestResource('Bluetooth') in another cli-framwork session for it to work

Removed several: Using **pending_return in dbus_connection_send_with_reply_setup() without pending_setup is deprecated and strongly discouraged

>>> usageiface.ListResources()
['WiFi', 'Display', 'Bluetooth', 'TEST', 'GSM', 'CPU', 'GPS']

>>> usageiface.GetResourcePolicy('Bluetooth')
'auto'

>>> usageiface.GetResourceState('Bluetooth')
False

>>> usageiface.RequestResource('Bluetooth')

>>> a = usageiface.RequestResource('Bluetooth')
Traceback (most recent call last):
  File "<console>", line 1, in <module>
  File "/usr/lib/python2.6/site-packages/dbus/proxies.py", line 140, in __call__
    **keywords)
  File "/usr/lib/python2.6/site-packages/dbus/connection.py", line 622, in call_blocking
    message, timeout)
DBusException: org.freesmartphone.Usage.UserExists: User :1.25 already requested Bluetooth

>>> usageiface.GetResourceState('Bluetooth')
True

>>> a = usageiface.ReleaseResource('Bluetooth')

>>> a = usageiface.RequestResource('Bluetooth')

>>> usageiface.GetResourceState('Bluetooth')

>>> a = usageiface.ReleaseResource('Bluetooth')

>>> usageiface.GetResourceState('Bluetooth')
False

>>> a = usageiface.RequestResource('Bluetooth')
  • cli
root@om-gta02:~# hcitool dev
Devices:
	hci0	00:06:6E:17:84:32
root@om-gta02:~# hciconfig
hci0:	Type: USB
	BD Address: 00:06:6E:17:84:32 ACL MTU: 384:8 SCO MTU: 64:8
	UP RUNNING PSCAN 
	RX bytes:1111 acl:0 sco:0 events:47 errors:0
	TX bytes:449 acl:0 sco:0 commands:47 errors:0

cd ~
cp /etc/default/dropbear .
nano /etc/default/dropbear  # DROPBEAR_PORT=22
/etc/init.d/dropbear restart

/etc/bluetooth/main.conf # aaded pass="1234"
Personal tools
   org.freesmartphone.Usage

Method: ListResources ( ) → as

Description: List available resources. Returns as: resources

An array of resource names.

   cli-framework

>>> usageiface.ListResources() Using **pending_return in dbus_connection_send_with_reply_setup() without pending_setup is deprecated and strongly discouraged ['WiFi', 'Display', 'Bluetooth', 'TEST', 'GSM', 'CPU', 'GPS']

>>> usageiface.ListResources() Using **pending_return in dbus_connection_send_with_reply_setup() without pending_setup is deprecated and strongly discouraged ['WiFi', 'Display', 'Bluetooth', 'TEST', 'GSM', 'CPU', 'GPS'] >>> usageiface.GetResourcePolicy('Bluetooth') Using **pending_return in dbus_connection_send_with_reply_setup() without pending_setup is deprecated and strongly discouraged 'auto' >>> usageiface.GetResourceState('Bluetooth') Using **pending_return in dbus_connection_send_with_reply_setup() without pending_setup is deprecated and strongly discouraged False >>> usageiface.RequestResource('Bluetooth') Using **pending_return in dbus_connection_send_with_reply_setup() without pending_setup is deprecated and strongly discouraged >>> a = usageiface.RequestResource('Bluetooth') Using **pending_return in dbus_connection_send_with_reply_setup() without pending_setup is deprecated and strongly discouraged Traceback (most recent call last):

 File "<console>", line 1, in <module>
 File "/usr/lib/python2.6/site-packages/dbus/proxies.py", line 140, in __call__
   **keywords)
 File "/usr/lib/python2.6/site-packages/dbus/connection.py", line 622, in call_blocking
   message, timeout)

DBusException: org.freesmartphone.Usage.UserExists: User :1.25 already requested Bluetooth >>> usageiface.GetResourceState('Bluetooth') Using **pending_return in dbus_connection_send_with_reply_setup() without pending_setup is deprecated and strongly discouraged True >>> a = usageiface.ReleaseResource('Bluetooth') Using **pending_return in dbus_connection_send_with_reply_setup() without pending_setup is deprecated and strongly discouraged >>> a = usageiface.RequestResource('Bluetooth') Using **pending_return in dbus_connection_send_with_reply_setup() without pending_setup is deprecated and strongly discouraged >>> usageiface.GetResourceState('Bluetooth') >>> a = usageiface.ReleaseResource('Bluetooth') Using **pending_return in dbus_connection_send_with_reply_setup() without pending_setup is deprecated and strongly discouraged >>> usageiface.GetResourceState('Bluetooth') Using **pending_return in dbus_connection_send_with_reply_setup() without pending_setup is deprecated and strongly discouraged False >>> a = usageiface.RequestResource('Bluetooth') Using **pending_return in dbus_connection_send_with_reply_setup() without pending_setup is deprecated and strongly discouraged >>>