tag:blogger.com,1999:blog-51831278859773134912024-03-08T03:26:32.894-08:00My World Raspberry PI fmunozsehttp://www.blogger.com/profile/05538083752890007850noreply@blogger.comBlogger3125tag:blogger.com,1999:blog-5183127885977313491.post-43929476050373381042013-02-17T13:33:00.000-08:002013-02-17T13:33:01.446-08:00Watching in my raspberry stream by Sopcast<div dir="ltr" style="text-align: left;" trbidi="on">
First answer: No, Raspberry Pi doesnt have the enougth powerful to can run sopcast in the raspberry<br />
But, you can run sopcast in another computer and do streaming to raspberry Pi.<br />
<br />
The applications and SSOO that i have used<br />
- In my raspberry pi XBIAN (1.0 alpha 4) http://xbian.org/<br />
- In my server computer. Windows 7.<br />
- Sopcast http://www.sopcast.com/ . I have changed the settings of sopcast to can use VLC (look like i net if you want to do the same).<br />
<br />
Create file in the raspberry pi<br />
<span style="font-family: Courier New, Courier, monospace;">nano sopcast.STRM</span><br />
<br />
And include the following url (change the ip to set your windows computer)<br />
<br />
<span style="font-family: Courier New, Courier, monospace;">http:\\192.168.1.24:8902/tv.ts</span><br />
<br />
Now, from xbmc, go to "Video" > "Archives" > and search in your local drive the file created ... open and enjoy !!!!<br />
<br />
<br /></div>
fmunozsehttp://www.blogger.com/profile/05538083752890007850noreply@blogger.com0tag:blogger.com,1999:blog-5183127885977313491.post-36795847106873134792013-02-17T12:42:00.001-08:002013-02-17T12:54:34.551-08:00My raspberry Pi sending whatsapps<div dir="ltr" style="text-align: left;" trbidi="on">
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;">1/ Create a phone number using http://www.fonyou.com/ (not included in this tutorial)</span><br />
<div>
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;">2/ Register a fonyou number to can send a whatsapp (here is where i found with more problems), so, i will explain in detail.</span></div>
<div>
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"><br /></span></div>
<div>
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;">I have used : https://github.com/tgalal/yowsup (the common line help is describe in https://github.com/tgalal/yowsup/wiki/yowsup-cli#wiki-config)</span></div>
<div>
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"><br /></span>
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;">Download</span></div>
<div>
<span style="font-family: Courier New, Courier, monospace;">wget https://github.com/tgalal/yowsup/archive/master.zip</span><br />
<span style="font-family: Courier New, Courier, monospace;">unzip master.zip</span><br />
<span style="font-family: Courier New, Courier, monospace;">cd yowsup-master/src/</span><br />
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"><br /></span>
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;">In the webpage of yowsup, you can see that is required python-dateutil (in my case, i had to install)</span><br />
<span style="font-family: Courier New, Courier, monospace;">apt-get install python-dateutil</span><br />
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"><br /></span>
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;">Edit the the configutation file:</span><br />
<span style="font-family: Courier New, Courier, monospace;">nano config.example</span><br />
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"><br /></span>
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;">Change the attributes "cc" and "phone" with your data.</span><br />
<span style="font-family: 'Courier New', Courier, monospace;">cc=34</span><br />
<span style="font-family: Courier New, Courier, monospace;">phone=346XXXXXXX</span><br />
<span style="font-family: Courier New, Courier, monospace;">id=</span><br />
<span style="font-family: Courier New, Courier, monospace;">password=</span><br />
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"><br /></span>
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;">The whatsapp register phase is in 2 steps: </span><br />
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;">1/Register phase. It could be do by sms or by voice. </span><br />
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;">1.1. sms: I tried with the sms but never arrived to the fonyou phone. (reading by inet, looks like they dont support whatsapp)</span><br />
<span style="background-color: white; color: #444444; line-height: 18px; text-align: justify;"><span style="font-family: Courier New, Courier, monospace;">python yowsup-cli -c config.example --requestcode sms</span></span><br />
<span style="background-color: white; color: #444444; line-height: 18px; text-align: justify;"><span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"><br /></span></span>
<br />
<div style="text-align: justify;">
<span style="color: #444444; font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"><span style="line-height: 18px;">1.2. voice: Finally, i use this option. After did the request, you will receive a call in your phone associate to fonyou phone, and a record will repeat the activation code </span></span></div>
<div style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><span style="background-color: white; color: #444444; line-height: 18px;">python yowsup-cli -c config.example --requestcode </span><span style="color: #333333; line-height: 19px; text-align: start;">voice</span><span style="color: #444444; line-height: 18px;"> </span></span></div>
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"><br /></span>
<span style="background-color: white; color: #444444; line-height: 18px; text-align: justify;"><span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;">2/ Activation phase. In this phase, whatsapp should return your password </span></span><br />
<span style="background-color: white; line-height: 18px; text-align: justify;"><span style="color: #444444; font-family: Courier New, Courier, monospace;">python yowsup-cli -c config.example --register [CODE] </span></span><br />
<span style="background-color: white; line-height: 18px; text-align: justify;"><span style="color: #444444; font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"><br /></span></span>
<span style="background-color: white; line-height: 18px; text-align: justify;"><span style="color: #444444; font-family: Helvetica Neue, Arial, Helvetica, sans-serif;">Doing this, i have found this issue:</span></span><br />
<span style="background-color: white; text-align: justify;"><span style="color: #444444;"></span></span><br />
<span style="color: #444444;"><span style="line-height: 18px;"><span style="font-family: Courier New, Courier, monospace;">Traceback (most recent call last):</span></span></span><br />
<span style="color: #444444;"><span style="line-height: 18px;"><span style="font-family: Courier New, Courier, monospace;"> File "yowsup-cli", line 283, in <module></span></span></span><br />
<span style="color: #444444;"><span style="line-height: 18px;"><span style="font-family: Courier New, Courier, monospace;"> print resultToString(result)</span></span></span><br />
<span style="color: #444444;"><span style="line-height: 18px;"><span style="font-family: Courier New, Courier, monospace;">UnicodeEncodeError: 'ascii' codec can't encode character u'\u20ac' in position 67: ordinal not in range(128)</span></span></span><br />
<div style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;">
<span style="color: #444444;"><br /></span></div>
<div style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;">
<span style="color: #444444;"><br />Doing some investigation by inet, looks like the EURO can not print to screen and could be fixed if you set in the encoding file of phyton .. really, it's not necesary to do anything, becouse, it could be use some workaround to see the password. Just retry the same line, but, adding -d to show the request/respond<br /><span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"> </span></span></div>
<span style="background-color: white; line-height: 18px; text-align: justify;"><span style="color: #444444; font-family: Courier New, Courier, monospace;"></span></span><br />
<span style="color: #444444; font-family: Courier New, Courier, monospace;">xbian@xbian:~/yowsup/yowsup-master/src# python yowsup-cli -c config.example --register [CODE] -d</span><br />
<span style="color: #444444; font-family: Courier New, Courier, monospace;">GET</span><br />
<span style="color: #444444; font-family: Courier New, Courier, monospace;">{'Accept': 'text/json', 'User-Agent': 'WhatsApp/2.3.53 S40Version/14.26 Device/Nokia302'}</span><br />
<span style="color: #444444; font-family: Courier New, Courier, monospace;">cc=34&in=6XXXXXXXX&id=XXXXXX&code=[CODE]</span><br />
<span style="color: #444444; font-family: Courier New, Courier, monospace;">Opening connection to v.whatsapp.net</span><br />
<span style="color: #444444; font-family: Courier New, Courier, monospace;">Requesting /v2/register?cc=34&in=6XXXXX&id=XXXXXXX&code=XXXXXX</span><br />
<span style="color: #444444; font-family: Courier New, Courier, monospace;">WARegRequest:<span class="Apple-tab-span" style="white-space: pre;"> </span>{"status":"ok","login":"346XXXXXXX","pw":"aadsdasadasdaasdaadasd=","type":"existing","expiration":XXXXXXXX,"kind":"free","price":"0,89 \u20ac","cost":"0.89","currency":"EUR","price_expiration":XXXXX}</span><br />
<span style="color: #444444; font-family: Courier New, Courier, monospace;"><br /></span>
<span style="color: #444444; font-family: Courier New, Courier, monospace;">Traceback (most recent call last):</span><br />
<span style="color: #444444; font-family: Courier New, Courier, monospace;"> File "yowsup-cli", line 283, in <module></span><br />
<span style="color: #444444; font-family: Courier New, Courier, monospace;"> print resultToString(result)</span><br />
<span style="color: #444444; font-family: Courier New, Courier, monospace;">UnicodeEncodeError: 'ascii' codec can't encode character u'\u20ac' in position 67: ordinal not in range(128)</span><br />
<span style="color: #444444; font-family: Courier New, Courier, monospace;"><br /></span>
<br />
<span style="background-color: white; text-align: justify;"><span style="color: #444444;"></span></span><br />
<div style="line-height: 18px;">
<div style="color: black; line-height: normal; text-align: left;">
<span style="background-color: white; text-align: justify;"><span style="color: #444444;"><span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"><br /></span></span></span></div>
<div style="color: black; line-height: normal; text-align: left;">
<span style="background-color: white; text-align: justify;"><span style="color: #444444;"><span style="color: #444444; font-family: Helvetica Neue, Arial, Helvetica, sans-serif; text-align: justify;">So, here, the import is the value for the key "pw" (in the example, correspond with </span></span></span><br />
<span style="background-color: white; text-align: justify;"><span style="color: #444444;"><span style="color: #444444; font-family: Helvetica Neue, Arial, Helvetica, sans-serif; text-align: justify;">aadsdasadasdaasdaadasd=)</span></span></span></div>
<div style="color: black; line-height: normal; text-align: left;">
<span style="background-color: white; text-align: justify;"><span style="color: #444444;"><br /></span></span></div>
<div style="color: black; line-height: normal; text-align: left;">
<span style="background-color: white; text-align: justify;"><span style="color: #444444;"><span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;">Edit the the configutation file:</span></span></span></div>
<div style="color: black; line-height: normal; text-align: left;">
<span style="background-color: white; text-align: justify;"><span style="color: #444444;"><span style="font-family: Courier New, Courier, monospace;">nano config.example</span></span></span></div>
<div style="color: black; line-height: normal; text-align: left;">
<span style="background-color: white; text-align: justify;"><span style="color: #444444;"><br /></span></span></div>
<div style="color: black; line-height: normal; text-align: left;">
<span style="background-color: white; text-align: justify;"><span style="color: #444444;"><span style="color: #444444; font-family: Helvetica Neue, Arial, Helvetica, sans-serif; text-align: justify;">Include your pwd in the config.example</span></span></span></div>
</div>
<span style="background-color: white; text-align: justify;"><span style="color: #444444;">
<div>
<div style="color: black; line-height: normal; text-align: left;">
<span style="font-family: Courier New, Courier, monospace;">cc=34</span></div>
<div style="color: black; line-height: normal; text-align: left;">
<span style="font-family: Courier New, Courier, monospace;">phone=346XXXXXXX</span></div>
<div style="color: black; line-height: normal; text-align: left;">
<span style="font-family: Courier New, Courier, monospace;">id=</span></div>
<div style="color: black; line-height: normal; text-align: left;">
<span style="font-family: Courier New, Courier, monospace;">password=<span style="color: #444444; line-height: 18px; text-align: justify;">aadsdasadasdaasdaadasd=</span></span></div>
<div style="color: black; line-height: normal; text-align: left;">
<span style="color: #444444; line-height: 18px; text-align: justify;"><span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"><br /></span></span></div>
<div style="color: black; line-height: normal; text-align: left;">
<span style="color: #444444; line-height: 18px; text-align: justify;"><span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;">And send the message to the phone that you want (remenber the country code)</span></span></div>
<div style="text-align: left;">
<span style="text-align: justify;"><span style="font-family: Courier New, Courier, monospace;"></span></span></div>
<div style="text-align: justify;">
<span style="font-family: Courier New, Courier, monospace;"><span style="line-height: 18px;">python yowsup-cli -c config.example -s 346000000 "hello world"</span></span></div>
<br />
<div style="color: black; font-family: Times; font-size: medium; line-height: normal; text-align: left;">
<span style="color: #444444; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: x-small; line-height: 18px; text-align: justify;"><br /></span></div>
</div>
</span></span></div>
</div>
fmunozsehttp://www.blogger.com/profile/05538083752890007850noreply@blogger.com2tag:blogger.com,1999:blog-5183127885977313491.post-38780495745880569902013-02-16T13:40:00.001-08:002013-02-16T13:41:09.752-08:00hello<div dir="ltr" style="text-align: left;" trbidi="on">
hello world !!!!<br />
<div>
<br /></div>
<div>
In this case, is hello world from my raspberry pi. I will use this blog to keep my notes about raspberry pi</div>
<div>
<br /></div>
<div>
<br /></div>
</div>
fmunozsehttp://www.blogger.com/profile/05538083752890007850noreply@blogger.com0