Hot!Bm78 basics!

Page: < 12 Showing page 2 of 2
Author
geoffers
Junior Member
  • Total Posts : 48
  • Reward points : 0
  • Joined: 2008/07/18 11:34:58
  • Location: 0
  • Status: offline
Re: Bm78 basics! 2017/07/16 14:13:00 (permalink)
0
Thanks for the reply,
I have minimum connection's to try and get things going!

I'm happy to report the rn4678 will search and find my printer, connect to it and send characters that print to it :-)

I've done that through real term at the moment, however when I do a GQ command it return's 1000, which according to the bitmap table means flow control enabled. I haven't changed any of those settings so that should be as new?

I've been too preoccupied with getting it working to do a schematic to post. Is it likely that duff connection could change that setting on two modules though??

Cheers Geoff
#21
RISC
Super Member
  • Total Posts : 4477
  • Reward points : 0
  • Status: offline
Re: Bm78 basics! 2017/07/16 14:49:34 (permalink)
3 (1)
Hi,
Schematic should be first ;=) It is easy to miss something
You are right regarding flow control. As far as I remember it is enabled by default.
It seems Mikroelektronika click board use CTS & RTS on their click board https://download.mikroe.c...8-click-schematic.pdf. I suggest you also connect them to start with
Did you install the RN4678 Firmware and Software tools package which can be found on the RN4678 webpage ?
It seems a firmware update was released.
I suggest you follow the examples of the RN-4678-PICTAIL user guide : http://ww1.microchip.com/...eviceDoc/50002566A.pdf
Regards
 
post edited by RISC - 2017/07/16 15:31:34
#22
geoffers
Junior Member
  • Total Posts : 48
  • Reward points : 0
  • Joined: 2008/07/18 11:34:58
  • Location: 0
  • Status: offline
Re: Bm78 basics! 2017/07/17 02:41:06 (permalink)
0
Thanks,
I will try and upload a photo when I figure out how, it seems to be working as it should though so I think I have it connected right.

The data sheets are interesting though, I have one on my phone so I can check things easy if I think of something, that one says the default bitmap is 0000 which would be flow control disabled, the one I downloaded to the computer and printed says default is 1000 which is flow control enabled :-) ?

Both state at the start that flow control is disabled as default, so far all the modules I've tried have flow control enabled.

Is the best policy to connect CTS and RTS on my PCB when I design it? I don't want to use flow control as apart from configuring the rn4678 all the data will be pic>Bluetooth?

Cheers Geoff
#23
RISC
Super Member
  • Total Posts : 4477
  • Reward points : 0
  • Status: offline
Re: Bm78 basics! 2017/07/17 07:34:25 (permalink)
0
Hi,
My experience will all the RN bluetooth parts is that they expect / need flow control to operate smoothly...
I know it cost 2 pins on the microconroller but you can get yourself in real trouble by not implementing flow control (that is my own experience with several bluetooth modules...).
As far as I remember all Microchip evaluation boards I used for bluetooth modules do have flow control (you can check users manuals which show the schematic used)
Regards
post edited by RISC - 2017/07/17 07:36:05
#24
geoffers
Junior Member
  • Total Posts : 48
  • Reward points : 0
  • Joined: 2008/07/18 11:34:58
  • Location: 0
  • Status: offline
Re: Bm78 basics! 2017/07/17 14:16:26 (permalink)
0
Thanks,
Always best to learn by someone else's experience! For once I have quite a few spare pins, hopefully I've learnt you always seem to need twice as many I/o as you expect!
As its already enabled it would seem daft not to use it I suppose.
Would it be good policy to not assume they will all have flow control enabled and make the the first configuration setting after entering command mode?
The last module I used was 9600 baud so there was plenty of time :-)!

I'm trying to get it to talk to a 3rd party android app, the printer now works fine as does the Bluetooth serial app, however the 3rd party app connects opens rfcomm the disconnects straight away! Any ideas? It worked fine with a rn42, like a fool I didn't write down the settings I used though!

Cheers Geoff
#25
RISC
Super Member
  • Total Posts : 4477
  • Reward points : 0
  • Status: offline
Re: Bm78 basics! 2017/07/17 15:08:16 (permalink)
3 (1)
Hi,
Many users use 115200 bauds and some RN modules are set by default at this speed hence the flow control.
With 9600 bauds, flow control is probably not necessary...
I have no expertise from Android app side ...
Are you using RN4678 in bluetooth classic mode only ? or in BLE mode ? or both ?
Regards
 
#26
geoffers
Junior Member
  • Total Posts : 48
  • Reward points : 0
  • Joined: 2008/07/18 11:34:58
  • Location: 0
  • Status: offline
Re: Bm78 basics! 2017/07/18 03:01:14 (permalink)
3 (1)
Thanks,
Yes I've set the module to classic only instead of dual mode, I think I will use 115200 baud and flow control, my pic is running fast enough for that for other reasons anyway.

I'm going to have another look at both data sheets rn42/rn4678 to see if I can find out which settings I need to change?

I can see flow control is going to be very helpful writing the code to receive instructions from the rn4678, would be easy to miss a character :-(
Cheers Geoff
#27
geoffers
Junior Member
  • Total Posts : 48
  • Reward points : 0
  • Joined: 2008/07/18 11:34:58
  • Location: 0
  • Status: offline
Re: Bm78 basics! 2017/07/20 03:10:48 (permalink)
0
Hi all,
Any hints or advice on this....?
I have tried all the different settings relevant to Bluetooth classic on the rn4678, my printer which I suppose was priority works nearly no matter what once its saved in the device list.

The app on my phone however.... For testing I have used 'serial Bluetooth terminal' , bt chat, which both work fine with the rn4678. blue term and the 3rd party app I'd like to use however don't work with the rn4678, they do both work with one of those cheap serial Bluetooth adaptors from ebay, the 3rd party app also worked with the rn 42.
These are Bluetooth 2, I would hope the rn4678 would be backwards compatible enough to work so I must have missed something!

The output at the UART is= %CONNECT,000046658201%%RFCOMM_OPEN%%RFCOMM_CLOSE%%DISSCON%

Its like the rn4678 is closing RFCOMM as soon as its opened, or the app is seeing something it doesn't like and closing RFCOMM
Thanks for looking!
Cheers Geoff
#28
geoffers
Junior Member
  • Total Posts : 48
  • Reward points : 0
  • Joined: 2008/07/18 11:34:58
  • Location: 0
  • Status: offline
Re: Bm78 basics! 2017/07/21 02:21:12 (permalink)
5 (1)
I'm not sure anybody will be interested?!

But I have it working :-) :-), I thought messing around with the bm78 was a waste of time, maybe not, you can use the S: command on the rn4678 to alter eeprom, I remember from the bm78 you can change RFCOMM channel on the bm78.

I changed the channel (default 0) to one by using S: , 038A, 01 now my app connects and keeps RFCOMM open!

There is no mention of RFCOMM channels in the command ref or data sheet for the rn4678, its by the is1678 ui tool and comparing default map to the altered map I have been able to do this.

If anyone from microchip reads this, please just publish a map of the registers in the eeprom, its like banging your head against a wall getting this to work, it should and could be easier!! Moan over!

At least I didn't give up this has saved £5 a unit over a rn42 with possible upgrade to ble if I need too!
Cheers Geoff
#29
JJay
New Member
  • Total Posts : 21
  • Reward points : 0
  • Joined: 2012/09/07 07:41:08
  • Location: 0
  • Status: offline
Re: Bm78 basics! 2017/08/14 13:09:37 (permalink)
0
@geoffers:  Check out:
http://ww1.microchip.com/downloads/en/DeviceDoc/50002506B.pdf
Search for 'flow control'.  A couple places indicate flow control enabled is the default.
 
Dump the config settings of your module by sending it the 'D' while in command mode.  This should tell you the current config of the UART among other things.
 
The 'SQ' command should be able to change this, however, you'd need flow control enabled until after the reboot that changes this setting.
 
Hope this helps,
J
#30
geoffers
Junior Member
  • Total Posts : 48
  • Reward points : 0
  • Joined: 2008/07/18 11:34:58
  • Location: 0
  • Status: offline
Re: Bm78 basics! 2017/08/18 03:10:40 (permalink)
0
Well yes and no!
I've got it all working and while the latest copy of the command reference that you linked to does indeed indicate flow control is enabled the previous version states the opposite so at least that's been changed.
Also be aware that nothing comes out of the UART before you do something to the CTS pin, you can bodge it low to get things working, so by the time you get the D command to work you are already aware that flow control is enabled ;-)
#31
cpu
New Member
  • Total Posts : 29
  • Reward points : 0
  • Joined: 2011/12/14 09:58:17
  • Location: USA
  • Status: offline
Re: Bm78 basics! 2017/08/21 12:49:55 (permalink)
0
Often there are documentation errors in the first revision of the documents.
 
I prefer to turn off the output strings. Using the "SO" command in CMD mode these can be changed or turned off.
However in the case of your output:
  %CONNECT,000046658201%%RFCOMM_OPEN%%RFCOMM_CLOSE%%DISSCON%
there is no traffic (apparently) other than the connect/open/close/disconnect output strings, so those would be helpful to see for debug.
#32
Page: < 12 Showing page 2 of 2
Jump to:
© 2017 APG vNext Commercial Version 4.5