Programmer needed to write AT Command based library
Hello,
I recently purchased a bluetooth 4.0 LE (low energy) module from BlueRadios, to use in a project of mine.
I am able to write a "driver" in SPIN for this module however it will take me some time and I most likely will never be 100% happy that I have written efficient code.
My preference would be for the driver to be written in PASM for efficiency.
Is there anybody that would be interested in writing a basic driver for this module (advertise, accept connection, pair, send data).
The module being BT 4.0 LE means that it can be used to communicate with an iPhone 4S, which could be fun for the parallax community.
I am happy to pay the programmer $100 upon completion.
I will supply you with the documentation, but the interface is 4 pin UART (RX, TX, RTS, CTS) from VSS to VDD (0 - 3.3v).
And the commands are all custom AT style commands. e.g.
I recently purchased a bluetooth 4.0 LE (low energy) module from BlueRadios, to use in a project of mine.
I am able to write a "driver" in SPIN for this module however it will take me some time and I most likely will never be 100% happy that I have written efficient code.
My preference would be for the driver to be written in PASM for efficiency.
Is there anybody that would be interested in writing a basic driver for this module (advertise, accept connection, pair, send data).
The module being BT 4.0 LE means that it can be used to communicate with an iPhone 4S, which could be fun for the parallax community.
I am happy to pay the programmer $100 upon completion.
I will supply you with the documentation, but the interface is 4 pin UART (RX, TX, RTS, CTS) from VSS to VDD (0 - 3.3v).
And the commands are all custom AT style commands. e.g.
ATRXT,0,1000,3000,1<cr>
Comments
You're not asking much of the Propeller to talk to this module, most of the work is done by the module and FDS. FDS will use a dedicated COG to talk to the module, but a SPIN object to interface will be fairly lightweight.
I have decided to push forward and try to program the object myself in SPIN using FDS to do the communication.
I have printed out the relevant parts of the documentation and started to put post-it notes on the pages to make finding particular functions easier.
I will share the object once I have finished, as I believe the possibilities are endless with the BT4.0 LE module, propeller and an iPhone.
I need to send commands, then receive the reply. i.e. OK/ERROR
But I also need to listen for events (these are messages from the module NOT in response to commands, but from outside events i.e. a device connecting to it).
How should I go about implementing this?
So far I have something like this:
1. I'm not sure this will work (I have a vague recollection that SPIN functions can only return bytes or that local variables can only be bytes) Is this true?
2. It doesn't allow for events
Thanks
Sure it does assuming the event is data arriving on the serial port. The RxCheck method can be used to poll the serial buffer for data.
Sounds to me like you have two modes. Listen mode (server) and send receive mode (client).
Not quite. I need both modes to work at the same time.
I might send data using the "client" mode. But need to know that the device I'm talking too has disconnected by getting the disconnect event in "server" mode.
My question is, how do I listen for events without having the listening code pull my command responses from the buffer and my command code pull events from the buffer?
Does the device set a pin when an event occurs?
Unfortunately not.
One last question. As the listener will no doubt be in an endless repeat while loop, should I use a separate cog? If I didn't wouldn't it lock up the main cog once I started the listener?