You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Casio-Android_communication_protocol.txt 2.8KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. To exchange the information, the addin and the application must respect the current format.
  2. ######### Addin -> Application #########
  3. All the commands are in the form xx; with x being a character.
  4. This is because of a weird bug within the addin that, for some reason, messes up the bits
  5. after the first 3-4 characters. Therefore 3 characters long commands must be the maximum.
  6. Here are the different commands. The first character represents the command,
  7. the second character 'X' represents the argument.
  8. Subreddit:
  9. To connect to a specific subreddit, the command is sX;
  10. Since only one character is allowed the different subs are hardcoded into the addin.
  11. 't' = /r/TalesFromTechSupport
  12. 'r' = /r/TalesFromRetail
  13. 'n' = /r/NoSleep
  14. 'c' = /r/Caddit
  15. 'a' = /r/AskReddit
  16. 'v' = viedemerde.fr (to be implemented)
  17. Post:
  18. Once the user has selected a post, the addin sends the rank of the post, which is interpreted
  19. by the application as its ID.
  20. The command is pX; and the rank of the post is in the range A-Y (25 posts is the maximum).
  21. More characters:
  22. Due to the reception buffer limit of 1 ko, if the application sends that the transmission is not yet finished,
  23. the addin sends ak; once it has finished storing the characters sent.
  24. Next page:
  25. If the application sends that there is more, the user can press a button to send np; which will prompt the
  26. application to send the next 5000 o. The 5000 o limit is because of the RAM limit; there are long posts and the
  27. addin may not be able to stock all the data, so it is transferred with a 5000 o max.
  28. ######### Application -> Addin #########
  29. The data read by the addin must be in some kind of weird custom xml format.
  30. ################
  31. NOTE: ALL communications MUST be ended with a quote ("), to inform the addin that the transmission is finished.
  32. Therefore you must replace all quotes (whether backslashed or not) with the 0x81 character.
  33. If you still have data to send (reached buffer limit) end your communication with a '<' and then a quote.
  34. If you have reached the 5000 o limit but still have data to send, end it with a ';' then a quote.
  35. ################
  36. Since < and > are special characters, replace them with 0x7F and 0x80 respectively.
  37. Don't replace them with &gt; and &lt;, they will be displayed as "&gt;" and "&lt;".
  38. Data for posts:
  39. <r subreddit> <p content of post> <p content of second post> ...
  40. You can customise the subreddit attribute and the contents, you can put whatever you want as long as it's not
  41. a quote or a '>'. Example:
  42. <r /r/AskReddit> <p People of Reddit, where are you banned from and why?\n/u/ArtyStickyGuy 3525 upvotes /r/askreddit>
  43. Data for comments:
  44. <t Text+title of post> <1 first level comment> <2 second level comment> <3 third level comment> <1 another first lvl comment>
  45. Basically the post data must be in the <t> tag, and the comments must be in a numbered tag from 1 to 9.