element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Raspberry Pi
  • Products
  • More
Raspberry Pi
Raspberry Pi Forum Working with Raspberry and Whatsapp
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Raspberry Pi to participate - click to join for free!
Featured Articles
Announcing Pi
Technical Specifications
Raspberry Pi FAQs
Win a Pi
Raspberry Pi Wishlist
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • Replies 5 replies
  • Subscribers 666 subscribers
  • Views 540 views
  • Users 0 members are here
  • rasberry
  • whatsapp
Related

Working with Raspberry and Whatsapp

Former Member
Former Member over 11 years ago

So far I could try sending messages from Whatsapp to raspberry, raspberry sending messages from a cell phone and I need to do two tasks at once.

 

Someone has information, as well to keep the conversation closes after 3 min

  • Sign in to reply
  • Cancel
  • packetgeek
    packetgeek over 11 years ago

    Not sure what you're looking for but I think the connection loss (after 3 minutes) might be related to your cell phone carrier rather than WhatsApp.  That or (since WhatsApp appears to be customized XMPP service), there could be an automatic activity timeout.  I'm just guessing though.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Former Member
    Former Member over 11 years ago in reply to packetgeek

    I'm controlling devices from Whatsapp and there comes a time that I get a message on the console terminal is closed the conversation, since there no longer receives more messages

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Former Member
    Former Member over 11 years ago in reply to Former Member

    use python , import socket,time

    every 2 minutes  connect to the whatsapp port, send foo and close. That should keep it alive indefinitely.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • iagorubio
    iagorubio over 11 years ago in reply to Former Member

    Hi Alejandro,

     

    Looks like your problem - correct me if I am wrong - it's somewhat your console is being closed.

     

    If you are connected to that console through ssh you may end up with a message saying something like "connection closed by peer" after some time.

     

    If that is your problem, it happens because ssh closes the connection after some time of inactivity.

     

    You can order your client to "ping" the ssh server once in a while to avoid it to close the connection for inactivity.

     

    It's a setting in your ~/.ssh/config file called ServerAliveInterval and it's a number of seconds.

     

    ServerAliveInterval 60

     

    Will ping the server each 60 seconds. That will maintain the ssh console open and working.

     

    From the ssh_config manual page:

     

         ServerAliveInterval

                 Sets a timeout interval in seconds after which if no data has

                 been received from the server, ssh(1) will send a message through

                 the encrypted channel to request a response from the server.  The

                 default is 0, indicating that these messages will not be sent to

                 the server.  This option applies to protocol version 2 only.

     

    If you don't have that file and have to create it, remember to make it only readable by yourself, because ssh complains if the file is world readable.

     

    echo ServerAliveInterval 60 >>  ~/.ssh/config

    chmod 600 ~/.sshd/config

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Former Member
    Former Member over 10 years ago

    I added my Whatsapp account powered by Raspberry to a group. The result I got a Trace back problem. The group was deleted the. Can someone help me resolve it ?

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube