marcus905 / libnfc

Automatically exported from code.google.com/p/libnfc
GNU Lesser General Public License v3.0
0 stars 0 forks source link

Adding support for changing default PN532 UART baud rate. #270

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Use pn532 in UART mode.
2. Attempt to set UART baud rate to anything other than 115200 baud via the 
devicestring baudrate suffix.

What is the expected output? What do you see instead?
I expect to see a change in the baud rate :-)
Instead the baud rate remains fixed at 115200 baud.

What version of the product are you using? On what operating system?
LibNFC 1.7.0, on Arch linux on ARM (raspberry Pi)

Please provide any additional information below.

I have cloned the repository and added some code that does the job for me, but 
probably not for all cases. The code will allow changing the UART baud rate to 
any rate supported by the PN532 via the standard(?) baud rate option in the 
devicestring.
See : http://code.google.com/r/angrydeity-pn532-uart-changes

Note that the repo also contains a small patch to add a 100ms UART timeout to 
allow the library to return semi-gracefully if data is lost instead of hanging 
on the select() forever.

Original issue reported on code.google.com by angry.de...@gmail.com on 2 Mar 2014 at 11:31