User:Kagee

From Openmoko

(Difference between revisions)
Jump to: navigation, search
Line 1: Line 1:
 
* org.freesmartphone.Usage - method - ListResources ( ) → as - description: List available resources.
 
* org.freesmartphone.Usage - method - ListResources ( ) → as - description: List available resources.
  
*cli-framework
+
*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:
 
Removed several:
 
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

Revision as of 00:08, 26 July 2009

  • 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.
  • 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"