I'm not an expert when it comes to Bluetooth, or protocols, or streams, so please, correct me whereever I went wrongt. Here's what I'm trying to do:
I'm trying to send data from a python script to my NXT brick (which is using lejos, of course). The basic BT setup works, I can send data to my NXT with the BTSend prog from the pcsamples.
The problems begin when python comes into play. from what I gathered so far, I can only send RFCOMM protocol messages or (via a special NXT python package) Lego Bluetooth protocol messages with python (using pybluez).
Looking at the NXTConnection and NXTInputStream classes, I see plenty of low-level stuff involving headers, bit shifting operations and what not. My guess is that whatever it is the lejos developers are doing there needs to be done on the sender as well, which it is when you use the lejos classes for sending data, but not when you use python.
So, my question basically is: do you guys think I need to reimplement this stuff from NXTConnection in python to send data (like Integers, for instance) from a python script to my NXT brick? Or is there any other way for me to send a message lejos will understand?
It looks like no one even mentions pybluez in this forum... doesn't seem to be a common usecase
Thanks in advance,