Fake driver
From GnokiiWiki
(Difference between revisions)
Current revision as of 10:37, 25 February 2010
The fake driver is a tool used for testing. It duplicates some functionality of the AT driver but prints commands to stdout instead of sending them to a phone.
Only a subset of libgnokii commands is currently implemented in the fake driver.
Configuration
- config: fake driver, used for testing
[global] model = fake port = ignored connection = serial # any valid connection type will work
Basic usage
$ echo "This is a test" | gnokii --sendsms 1234 AT+CMGS=23 001100048121430000000E54747A0E4ACF416110BD3CA703^Z
Advanced usage
Since gnokii 0.6.29 the fake driver on non-Windows systems handles the sms_inbox parameter to test reading SMS.
Add this to you configuration:
[fake_driver] sms_inbox = /tmp/sms
Then create the /tmp/sms directory with some files containing valid PDUs in HEX format, as printed by --sendsms or by --getsms when using the AT driver; file names are ignored, only the order as seen by readdir() is important.
For more examples see the tests in the testsuite directory which are done using the fake driver.

