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....)
 
Line 1: Line 1:
    org.freesmartphone.Usage
+
* org.freesmartphone.Usage - method - ListResources ( ) → as - description: List available resources.
  
Method:
+
*cli-framework
ListResources ( ) → as
+
Removed several:
 +
Using **pending_return in dbus_connection_send_with_reply_setup() without pending_setup is deprecated and strongly discouraged
  
Description: List available resources.
+
<pre>
Returns
+
as: resources
+
 
+
An array of resource names.
+
 
+
    cli-framework
+
 
>>> 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.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')
 
>>> 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 25:
 
     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>

Revision as of 00:26, 26 July 2009

  • org.freesmartphone.Usage - method - ListResources ( ) → as - description: List available resources.
  • cli-framework

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.
  • cli-framework

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"