Dangerous Prototypes

Dangerous Prototypes => Bus Pirate Support => Topic started by: adamoutler on June 11, 2011, 10:38:36 pm

Title: UART non-standard bitrate?
Post by: adamoutler on June 11, 2011, 10:38:36 pm
I am trying to communicate with the SIM card port on my phone.  Apparently it uses 9700bps.  I would like to try to talk to it.  How would i specify this non-standard bit-rate?
Title: Re: UART non-standard bitrate?
Post by: ian on June 12, 2011, 10:45:57 am
Hi adamoutler,

With the latest firmware (included in currently shipping BP, v5.10) you can assign a custom baud rate with the BRG option in the menu.

I used this tool to calculate the BRG for a PIC24F at 9700:
http://www.micromagicsystems.com/#/pic-baud/4523812801 (http://www.micromagicsystems.com/#/pic-baud/4523812801)

It looks like you need to enter 411 at the BRG prompt.

I documented my calculation on the wiki too, we should have had an example already:
http://dangerousprototypes.com/docs/UAR ... _baud_rate (http://dangerousprototypes.com/docs/UART#Custom_baud_rate)
Title: Re: UART non-standard bitrate?
Post by: adamoutler on June 12, 2011, 03:09:00 pm
Thanks.  I don't think I understand how to use that tool.. My processor runs at like 1ghz and the baud rate is 9700bps.    Also, i run Linux.  Is there a java program I can play around with?  Java is awesome because it's cross-platform.
Title: Re: UART non-standard bitrate?
Post by: ian on June 12, 2011, 03:41:04 pm
The processor speed is the pic processor, the tool calculates the uart speed setting for the pic on the bus pirate.

There may be a java tool at there, or even a online calculator, try googling for pic baud rate calculator.

To run the bus pirate at 9700bps, choose the brg menu option in the uart srttings, then enter 411. That should do the trick.

( ! ) Fatal error: Uncaught exception 'Elk_Exception' with message 'Please try again. If you come back to this error screen, report the error to an administrator.' in /var/www/dangerousprototypes/forum/sources/database/Db-mysql.class.php on line 696
( ! ) Elk_Exception: Please try again. If you come back to this error screen, report the error to an administrator. in /var/www/dangerousprototypes/forum/sources/database/Db-mysql.class.php on line 696
Call Stack
#TimeMemoryFunctionLocation
10.00942058864session_write_close ( )...(null):0
20.00972190456ElkArte\sources\subs\SessionHandler\DatabaseHandler->write( )...(null):0
30.00972191232Database_MySQL->query( ).../DatabaseHandler.php:119
40.05342329968Database_MySQL->error( ).../Db-mysql.class.php:273