<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://wiki.webos-internals.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Wrea</id>
	<title>WebOS Internals - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="http://wiki.webos-internals.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Wrea"/>
	<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/wiki/Special:Contributions/Wrea"/>
	<updated>2026-04-20T10:04:18Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.35.1</generator>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=User_talk:Wrea&amp;diff=21085</id>
		<title>User talk:Wrea</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=User_talk:Wrea&amp;diff=21085"/>
		<updated>2011-12-28T01:17:54Z</updated>

		<summary type="html">&lt;p&gt;Wrea: Blanked the page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Wrea</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=Avahi&amp;diff=21083</id>
		<title>Avahi</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=Avahi&amp;diff=21083"/>
		<updated>2011-12-28T01:07:02Z</updated>

		<summary type="html">&lt;p&gt;Wrea: Minor edits, referencing avahi being in repo&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Avahi=&lt;br /&gt;
[http://avahi.org Avahi] is a Linux service for providing multicast-DNS/DNS-SD (also known as [http://en.wikipedia.org/wiki/Bonjour_%28software%29 Bonjour] or mDNS/DNS-SD). Avahi allows for simple service discovery and advertisement on a local network and provides name resolution for all hosts running a mDNS/DNS-SD service.&lt;br /&gt;
&lt;br /&gt;
Using Avahi allows for easy SSH access, among other things, over a local wireless network. Once installed and started, users can ssh to their device using their mDNS assigned hostname.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Avahi Installation==&lt;br /&gt;
&lt;br /&gt;
For 2.x and 3.x devices, avahi can be found in the alpha repo, any other devices install via ipkg as follows:&lt;br /&gt;
&lt;br /&gt;
First, use novacom to access the Pre and install the Avahi ipkg.&lt;br /&gt;
&lt;br /&gt;
 $&amp;gt; sudo /opt/bin/ipkg-opt install avahi&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Avahi seems to want to run as a user named &amp;quot;avahi&amp;quot;.  To create the user, run the following command:&lt;br /&gt;
&lt;br /&gt;
 $&amp;gt; adduser -h /opt/var/run/avahi avahi&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Avahi currently attempts to access a different dbus system socket than the one provided by the Pre's dbus, it is possible to start Avahi with dbus support by creating a symbolic link from palm dbus directory to the /opt dbus directory and starting avahi daemon with root privileges. According to the Avahi website, however running avahi-daemon with root privileges is not recommended.&lt;br /&gt;
&lt;br /&gt;
The following command will create a symbolic link to /opt dbus directory to palm dbus directory:&lt;br /&gt;
&lt;br /&gt;
 ln -s /var/run/dbus /opt/var/run/dbus&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
if preferred avahi can be be ran without dbus support by editing &amp;lt;tt&amp;gt;/opt/etc/avahi/avahi-daemon.conf&amp;lt;/tt&amp;gt; and make the following change:&lt;br /&gt;
&lt;br /&gt;
 Replace this line:&lt;br /&gt;
 #enable-dbus=yes&lt;br /&gt;
 &lt;br /&gt;
 With this line:&lt;br /&gt;
 enable-dbus=no&lt;br /&gt;
&lt;br /&gt;
However, this does not allow the use of avahi commands such as avahi-browse, avahi-publish etc...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At this point, the Avahi daemon can be started with root privileges and dbus support with the following command:&lt;br /&gt;
&lt;br /&gt;
 $&amp;gt; /opt/sbin/avahi-daemon --no-drop-root&lt;br /&gt;
&lt;br /&gt;
If you disabled dbus support however it is recommended to run Avahi daemon without root privileges using the following command:&lt;br /&gt;
&lt;br /&gt;
 $&amp;gt; /opt/sbin/avahi-daemon&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you would like Avahi to start up at boot, create the following two files: &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''/opt/etc/init.d/S60avahi'''&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 &lt;br /&gt;
 [ -e /opt/etc/default/avahi ] &amp;amp;&amp;amp; . /opt/etc/default/avahi&lt;br /&gt;
 &lt;br /&gt;
 if [ &amp;quot;$AVAHI_ENABLE&amp;quot; = &amp;quot;no&amp;quot; ]; then&lt;br /&gt;
     exit&lt;br /&gt;
 fi&lt;br /&gt;
 &lt;br /&gt;
 if [ -n &amp;quot;`pidof /opt/sbin/avahi-daemon`&amp;quot; ]; then &lt;br /&gt;
     killall /opt/sbin/avahi 2&amp;gt;/dev/null&lt;br /&gt;
 fi&lt;br /&gt;
 &lt;br /&gt;
 /opt/sbin/avahi-daemon -D&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''/opt/etc/default/avahi'''&lt;br /&gt;
 AVAHI_ENABLE=yes&lt;br /&gt;
&lt;br /&gt;
Make sure you set the startup script to executable:&lt;br /&gt;
&lt;br /&gt;
 $&amp;gt; chmod 755 /opt/etc/init.d/S60avahi&lt;br /&gt;
&lt;br /&gt;
Alternatively, you can create an upstart script at '''/etc/event.d/avahi''':&lt;br /&gt;
&lt;br /&gt;
 start on started PmConnectionManager                                            &lt;br /&gt;
                                                                                &lt;br /&gt;
 console output                                                                  &lt;br /&gt;
                                                                                &lt;br /&gt;
 exec /opt/sbin/avahi-daemon -D                                                  &lt;br /&gt;
 respawn &lt;br /&gt;
&lt;br /&gt;
NOTE: This script is not being stored in the /opt directory. You may have to replace it after an update, and it may cause problems with your Pre.&lt;br /&gt;
&lt;br /&gt;
==Connecting via SSH using mDNS==&lt;br /&gt;
&lt;br /&gt;
mDNS uses the system's hostname and appends it to the &amp;lt;tt&amp;gt;local.&amp;lt;/tt&amp;gt; domain. Using the Pre's default &amp;lt;tt&amp;gt;palm-webos-device&amp;lt;/tt&amp;gt; hostname, the following command would be used to SSH to your Pre on port 222:&lt;br /&gt;
&lt;br /&gt;
 $&amp;gt; ssh -P 222 palm-webos-device.local.&lt;br /&gt;
&lt;br /&gt;
If you are using an OpenSSH key to connect:&lt;br /&gt;
&lt;br /&gt;
 $&amp;gt; ssh -i /path/to/ssh/key palm-webos-device.local. &lt;br /&gt;
&lt;br /&gt;
'''Note: The system that you are connecting from MUST have a mDNS service also running, else the hostname will not resolve'''&lt;br /&gt;
&lt;br /&gt;
==Current Issues on the Pre==&lt;br /&gt;
&lt;br /&gt;
* The ipkg binary of Avahi attempts to find the dbus socket at &amp;lt;tt&amp;gt;/opt/var/run/dbus/system_bus_socket&amp;lt;/tt&amp;gt;, but the Pre's dbus socket is at &amp;lt;tt&amp;gt;/var/run/dbus/system_bus_socket&amp;lt;/tt&amp;gt;. I have detailed a solution by running Avahi with root privileges however an approach which allow it to run after dropping root privileges is preferred.&lt;br /&gt;
* The avahi-daemon seems to have issues keeping the mDNS name resolution running for more than a few minutes. I don't know if this is a power management issue or something else at this point.&lt;/div&gt;</summary>
		<author><name>Wrea</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=User_talk:Wrea&amp;diff=21033</id>
		<title>User talk:Wrea</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=User_talk:Wrea&amp;diff=21033"/>
		<updated>2011-12-26T21:30:00Z</updated>

		<summary type="html">&lt;p&gt;Wrea: Reworking of avahi page for when avahi is in the wosi feed&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Avahi=&lt;br /&gt;
[http://avahi.org Avahi] is a Linux service for providing multicast-DNS/DNS-SD (also known as [http://en.wikipedia.org/wiki/Bonjour_%28software%29 Bonjour] or mDNS/DNS-SD). Avahi allows for simple service discovery and advertisement on a local network and provides name resolution for all hosts running a mDNS/DNS-SD service.&lt;br /&gt;
&lt;br /&gt;
Using Avahi allows for easy SSH access, among other things, over a local wireless network. Once installed and started, users can ssh to their device using their mDNS assigned hostname.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Avahi Installation==&lt;br /&gt;
For 2.x and 3.x devices, avahi can be found in the alpha repo, any other devices install via ipkg as follows:&lt;br /&gt;
&lt;br /&gt;
First, use novacom to access the Pre and install the Avahi ipkg.&lt;br /&gt;
&lt;br /&gt;
 $&amp;gt; sudo /opt/bin/ipkg-opt install avahi&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Avahi seems to want to run as a user named &amp;quot;avahi&amp;quot;.  To create the user, run the following command:&lt;br /&gt;
&lt;br /&gt;
 $&amp;gt; adduser -h /opt/var/run/avahi avahi&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Avahi currently attempts to access a different dbus system socket than the one provided by the Pre's dbus, it is possible to start Avahi with dbus support by creating a symbolic link from palm dbus directory to the /opt dbus directory and starting avahi daemon with root privileges. According to the Avahi website, however running avahi-daemon with root privileges is not recommended.&lt;br /&gt;
&lt;br /&gt;
The following command will create a symbolic link to /opt dbus directory to palm dbus directory:&lt;br /&gt;
&lt;br /&gt;
 ln -s /var/run/dbus /opt/var/run/dbus&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
if preferred avahi can be be ran without dbus support by editing &amp;lt;tt&amp;gt;/opt/etc/avahi/avahi-daemon.conf&amp;lt;/tt&amp;gt; and make the following change:&lt;br /&gt;
&lt;br /&gt;
 Replace this line:&lt;br /&gt;
 #enable-dbus=yes&lt;br /&gt;
 &lt;br /&gt;
 With this line:&lt;br /&gt;
 enable-dbus=no&lt;br /&gt;
&lt;br /&gt;
However, this does not allow the use of avahi commands such as avahi-browse, avahi-publish etc...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At this point, the Avahi daemon can be started with root privileges and dbus support with the following command:&lt;br /&gt;
&lt;br /&gt;
 $&amp;gt; /opt/sbin/avahi-daemon --no-drop-root&lt;br /&gt;
&lt;br /&gt;
If you disabled dbus support however it is recommended to run Avahi daemon without root privileges using the following command:&lt;br /&gt;
&lt;br /&gt;
 $&amp;gt; /opt/sbin/avahi-daemon&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you would like Avahi to start up at boot, create the following two files: &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''/opt/etc/init.d/S60avahi'''&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 &lt;br /&gt;
 [ -e /opt/etc/default/avahi ] &amp;amp;&amp;amp; . /opt/etc/default/avahi&lt;br /&gt;
 &lt;br /&gt;
 if [ &amp;quot;$AVAHI_ENABLE&amp;quot; = &amp;quot;no&amp;quot; ]; then&lt;br /&gt;
     exit&lt;br /&gt;
 fi&lt;br /&gt;
 &lt;br /&gt;
 if [ -n &amp;quot;`pidof /opt/sbin/avahi-daemon`&amp;quot; ]; then &lt;br /&gt;
     killall /opt/sbin/avahi 2&amp;gt;/dev/null&lt;br /&gt;
 fi&lt;br /&gt;
 &lt;br /&gt;
 /opt/sbin/avahi-daemon -D&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''/opt/etc/default/avahi'''&lt;br /&gt;
 AVAHI_ENABLE=yes&lt;br /&gt;
&lt;br /&gt;
Make sure you set the startup script to executable:&lt;br /&gt;
&lt;br /&gt;
 $&amp;gt; chmod 755 /opt/etc/init.d/S60avahi&lt;br /&gt;
&lt;br /&gt;
Alternatively, you can create an upstart script at '''/etc/event.d/avahi''':&lt;br /&gt;
&lt;br /&gt;
 start on started PmConnectionManager                                            &lt;br /&gt;
                                                                                &lt;br /&gt;
 console output                                                                  &lt;br /&gt;
                                                                                &lt;br /&gt;
 exec /opt/sbin/avahi-daemon -D                                                  &lt;br /&gt;
 respawn &lt;br /&gt;
&lt;br /&gt;
NOTE: This script is not being stored in the /opt directory. You may have to replace it after an update, and it may cause problems with your Pre.&lt;br /&gt;
&lt;br /&gt;
==Connecting via SSH using mDNS==&lt;br /&gt;
&lt;br /&gt;
mDNS uses the system's hostname and appends it to the &amp;lt;tt&amp;gt;local.&amp;lt;/tt&amp;gt; domain. Using the Pre's default &amp;lt;tt&amp;gt;palm-webos-device&amp;lt;/tt&amp;gt; hostname, the following command would be used to SSH to your Pre on port 222:&lt;br /&gt;
&lt;br /&gt;
 $&amp;gt; ssh -P 222 palm-webos-device.local.&lt;br /&gt;
&lt;br /&gt;
If you are using an OpenSSH key to connect:&lt;br /&gt;
&lt;br /&gt;
 $&amp;gt; ssh -i /path/to/ssh/key palm-webos-device.local. &lt;br /&gt;
&lt;br /&gt;
'''Note: The system that you are connecting from MUST have a mDNS service also running, else the hostname will not resolve'''&lt;br /&gt;
&lt;br /&gt;
==Current Issues on the Pre==&lt;br /&gt;
&lt;br /&gt;
* The ipkg binary of Avahi attempts to find the dbus socket at &amp;lt;tt&amp;gt;/opt/var/run/dbus/system_bus_socket&amp;lt;/tt&amp;gt;, but the Pre's dbus socket is at &amp;lt;tt&amp;gt;/var/run/dbus/system_bus_socket&amp;lt;/tt&amp;gt;. I have detailed a solution by running Avahi with root privileges however an approach which allow it to run after dropping root privileges is preferred.&lt;br /&gt;
* The avahi-daemon seems to have issues keeping the mDNS name resolution running for more than a few minutes. I don't know if this is a power management issue or something else at this point.&lt;/div&gt;</summary>
		<author><name>Wrea</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=USB_Host_Mode&amp;diff=19331</id>
		<title>USB Host Mode</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=USB_Host_Mode&amp;diff=19331"/>
		<updated>2011-10-01T02:43:48Z</updated>

		<summary type="html">&lt;p&gt;Wrea: Detail of an error and a workaround&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;External vbus power is easy:&lt;br /&gt;
&lt;br /&gt;
Connect your type A (with ID-pin shorted) microUSB to USB cable into webOS. Plug the data leg of USB-Y cable (usually found with 2.5&amp;quot; external HDD enclosures and such) into this cable. Plug the root of the Y cable into a hub or whatever device you plan to use.&lt;br /&gt;
Plug the &amp;quot;power&amp;quot; leg of the Y cable into some powered usb socket be it a powered hub, a PC or whatever.&lt;br /&gt;
Enjoy your usb device.&lt;br /&gt;
&lt;br /&gt;
Example of cable that will work: http://www.ebay.com/itm/High-Quality-micro-USB-USB-Female-Cable-USB-OTG-N900-/170687828639?pt=PDA_Accessories&amp;amp;hash=item27bdc9929f&lt;br /&gt;
Search for OTG cable on eBay and thee are plenty.&lt;br /&gt;
&lt;br /&gt;
The USB-ID should be 1-1&lt;br /&gt;
&lt;br /&gt;
Internal VBUS:&lt;br /&gt;
&lt;br /&gt;
TBD.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you get a error like this in dmesg:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
usb 1-1: rejected 1 configuration due to insufficient available bus power&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
This command got me past this error:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
echo 1 &amp;gt; /sys/bus/usb/devices/1-1/bConfigurationValue&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
This worked for me and hopefully it can be of use to someone&lt;/div&gt;</summary>
		<author><name>Wrea</name></author>
	</entry>
</feed>