Bluetooth Serial Module
Jamesx
Posts: 132
I am working with a Parallax RoboTech Bluetooth Serial Module, and I am having trouble figuring the interface out. In fact, I am completely stumped.
Using a propeller going to the Tx,Rx lines, I've been able to reliably establish a serial link to a pc. This 'transparent mode' seems to work quite nicely. However, I cannot figure out how to get out of the transparent serial port mode into "command mode". This command mode is needed to change eeprom parameters, query details about the connection, etc.
I've tried everything I can think of: turning it on without connecting via bluetooth; turning off bluetooth; sending a UART break from the propeller. But I cannot seem to get it into command mode. It's either unresponsive or in serial port mode. According to the manual on the Parallax site, it looks like the main part on the unit is a LMX9830 by National Semiconductor. According to documentation for the LMX9830, the part should be in command mode when it's turned on, before bluetooth connects. But I get no response back to the propeller when sending commands.
Anyone out there with some experience with this one?
Thanks
Jim
Using a propeller going to the Tx,Rx lines, I've been able to reliably establish a serial link to a pc. This 'transparent mode' seems to work quite nicely. However, I cannot figure out how to get out of the transparent serial port mode into "command mode". This command mode is needed to change eeprom parameters, query details about the connection, etc.
I've tried everything I can think of: turning it on without connecting via bluetooth; turning off bluetooth; sending a UART break from the propeller. But I cannot seem to get it into command mode. It's either unresponsive or in serial port mode. According to the manual on the Parallax site, it looks like the main part on the unit is a LMX9830 by National Semiconductor. According to documentation for the LMX9830, the part should be in command mode when it's turned on, before bluetooth connects. But I get no response back to the propeller when sending commands.
Anyone out there with some experience with this one?
Thanks
Jim
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Will work for Propeller parts!
I think the UART break comes from the RoboTech, and is sent to the 'host' (in my case a propeller). As I understand the datasheets, this UART break is to be sent when a bluetooth link is lost/broken. However, as far as I can tell, this break doesn't happen (I scoped the parts during a bluetooth disconnect). It may be because of a filter setting on the RoboTech.
I can understand not seeing a UART break, if a filter is set up that way, but what I don't understand is why the RoboTech won't respond when it's supposed to be in 'command mode'.
Jim
It appears to me that the host processor has to send the UART Break to tell the RBT-001 to go into command mode. This is also mentioned on page 52.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Will work for Propeller parts!
Parameter 18: EventFilter: Configures the level of events reported to the host.
0x00: No filter, all events reported
0x01: ACL events filtered, only API events reported
0x02: All events filtered, only UART breaks indicated
0x03: All events filtered, including UART break
To me, that looks like these events, including the UART break, are reported to the host, or propeller in the case. If the host were creating the UART break, why would the RBT need to send the host notification of a break?
Also, a little additional digging into the datasheet for the Nat. Semi. LMX9838 revealed the following:
(the RBT has a Nat. Semi part on it, a LMX9830, which has the same command set as the LMX9838)
If the link is dropped, the LMX9838 will empty its buffers and
• send a UART break to the host
• send “Transparent Mode” Indicator (Section 7.2.4.1 Transparent Mode Command) — Indicates on protocol level to the host that transparent mode has been left.
• send “SPP Release Link” Indicator (Section 7.2.3.5 SPP Release Link) — Indicates that link has been released.
Maybe both the host and dropping the link can put the RBT into command mode?
In any case, it looks like dropping the link should cause a UART break. But as far as I can determine, the RBT does not send a UART break when a bluetooth link is dropped. So, maybe it's because all event notifications are filtered out.
But I still cannot get it into command mode, after a link is dropped....
Jim
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Will work for Propeller parts!
void sendBreak(void)
{
//set to low
USARTWriteChar(0x00);
//pause 5 ms
delay_ms(5);
}
Well... it's not...
Mike Green said,
I'm not sure that transmitting a 0x00 byte does that. That will transmit a start bit, 8 bits of zero and a stop bit or two. Perhaps the line is never low long enough.
Better to just arrange that the IO pin is set to zero directly.
So, do I need to do this every time? For example, if I want to change the local name and set rbt001 not to use any pin, I'd have to do it like this:
sendBreak();
setName(); //a function given in my last post at: http://forums.parallax.com/showthread.php?t=125139&highlight=connecting
sendBreak();
setSecurityMode(); //a function that sets rbt001 into security mode 1, where there is no authentication (that is the right way to lose the pin, right?)
Also, SET_EVENT_FILTER must be set to 0x00, right? Or no?
Thank you.