Menu

Using Obex Send byte[]

Help
2007-08-15
2013-04-25
  • Addo Del Grossi

    Addo Del Grossi - 2007-08-15

    Hi,

    It would be possible to use the library lightblue obex to send  Byte Array for a device, or it is only possible to send to file ?

    Thanks
    Addo

     
    • blam

      blam - 2007-08-17

      If you're on linux or mac, you could use os.tmpfile() to get a file object, write your bytes to that file object, and then pass the file object to lightblue.obex.sendfile().  This way you don't have to save your data to file before passing it to sendfile().

      Currently the file object passed to sendfile() has to be a proper file object with a real file descriptor, but this is pretty annoying, and will be changed in a future release.

       
      • Addo Del Grossi

        Addo Del Grossi - 2007-08-17

        Hi,

        Thanks your reply:D
        I go to use tip on os.tmpfile ()!

        Att,
        Addo

         

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.