Author Topic: TnrGsm component and GSM drivers  (Read 3138 times)

Roman Novgorodov

  • Engineer
  • Administrator
  • Hero Member
  • *****
  • Posts: 994
  • we will win
    • View Profile
    • Forums.nrCommLib.Com
TnrGsm component and GSM drivers
« on: May 30, 2008, 07:13:49 am »
Hello

Let me explain some internal TnrGsm component logic.

TnrGsm has several GSM drivers.
Our GSM drivers are built in (into binary resources) INF files.
This inf files have structure and syntax similar the windows INF files for modems.

If TnrGsm.Autodetect is True, component tries all this drivers for current connection.
If driver is not correct it shows ERROR in the LOG file.
If all GSM drivers return a error during autodetection process, component selects the default GSM driver for further work with device. The defualt GSM driver is first driver.

You can access to drivers of TnrGsm class from following public properties:
  • TnrGsm.Drivers[Index:integer]
  • TnrGsm.DriverCount:integer
  • TnrGsm.DriverIndex:integer
  • TnrGsm.Driver

You can turn off Autodetection mode and choose needed driver for work with your device:

nrGsm.Autodetect := False; // turn off autodetect mode
nrGsm.DriverIndex := 2;      // select driver

Roman
DeepSoftware llc - The professional components for Delphi/CBuilder/.NET. The high quality custom software development.
Forums.nrCommLib.Com - DeepSoftware Tech Support Forum.

avatar

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: TnrGsm component and GSM drivers
« Reply #1 on: January 28, 2009, 06:58:03 am »
is the TnrGsm thread-safe?

Roman Novgorodov

  • Engineer
  • Administrator
  • Hero Member
  • *****
  • Posts: 994
  • we will win
    • View Profile
    • Forums.nrCommLib.Com
Re: TnrGsm component and GSM drivers
« Reply #2 on: January 28, 2009, 07:14:30 am »
Hello

What do you mean?

TnrGsm works with a real GSM device.
Do you want to use GSM in several modes from separated threads at same time?
For example: one thread sens sms, other thread simultaneously reads sms and so on.
It is impossible of course :-) !

Roman Novgorodov
DeepSoftware.Com
DeepSoftware llc - The professional components for Delphi/CBuilder/.NET. The high quality custom software development.
Forums.nrCommLib.Com - DeepSoftware Tech Support Forum.

avatar

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: TnrGsm component and GSM drivers
« Reply #3 on: January 28, 2009, 08:27:41 am »
I mean can I spawn an instance of TnrGsm on a separate thread so that I can read sms messages asynchronously and give the control back to the main program while its being read?

Roman Novgorodov

  • Engineer
  • Administrator
  • Hero Member
  • *****
  • Posts: 994
  • we will win
    • View Profile
    • Forums.nrCommLib.Com
Re: TnrGsm component and GSM drivers
« Reply #4 on: January 28, 2009, 08:59:24 am »
Hello

Yes of course.
The TnrGsm is thread independent class.
Please note that you can handle TnrGsm events for handle the various GSM occurrencies asynchronously.

Roman Novgorodov
DeepSoftware.Com
DeepSoftware llc - The professional components for Delphi/CBuilder/.NET. The high quality custom software development.
Forums.nrCommLib.Com - DeepSoftware Tech Support Forum.

avatar

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: TnrGsm component and GSM drivers
« Reply #5 on: January 28, 2009, 09:43:37 am »
Thanks Roman!
I assumed that I had to use a timer to poll the component but after checking out the demo,
there are notification events available. I'm totally impressed :)