Author Topic: Hi, Trying use daemon monitoring  (Read 1603 times)

blitzh

  • Newbie
  • *
  • Posts: 2
    • View Profile
Hi, Trying use daemon monitoring
« on: June 29, 2010, 02:54:42 am »
hi roman,

firstly, thanks to nrCOmm

i create daemon apps (monitor) where after list of sms (nrGsm1SmsListItem) , i created routine to save the database. then delete the sms. but i get error, sometime sms deleted... and not.
the routine like this :
Code: [Select]
    MyQuery1.Close;
    MyQuery1.SQL.Clear;
    MyQuery1.SQL.Add('INSERT INTO listsms (tgl,pengirim,isi)VALUES('+QuotedStr(DateTimeToStr(aSMS.DateTime))+','+QuotedSTR(aSMS.Phone)+','+QuotedSTR(aSMS.Text)+');');
    MyQuery1.Execute;
  nrGsm1.SmsDelete(idSMS);

and im already try to create function where delete sms not inside getsmslist
and still have same problem.

second, i need load balancing for read the smslist.
if i set nrgsm1.timeout to < 75, sms not listed..
my modem support 100sms /second (Huawei Modem E156G - 3G).
in this situation, i plan to create daemon monitor, where i received sms, the sms will save to my Local Database and then i scheduled every 30 minute update to webserver.
for chek sms receive, i create scheduled with timer every 30s.

thanks and sorry for my bad language

Roman Novgorodov

  • Engineer
  • Administrator
  • Hero Member
  • *****
  • Posts: 994
  • we will win
    • View Profile
    • Forums.nrCommLib.Com
Re: Hi, Trying use daemon monitoring
« Reply #1 on: June 29, 2010, 09:05:31 am »
Hello

It is not good idea to delete sms message during getting sms list.
When you call nrGsm1.SmsDelete(idSMS); in nrGsm1SmsListItem handler you break current AT command execution that gets SMS List.
Best solution if you will accumulate needed sms ids in local list (e.g. TStringList) and when sms list finished enumerate list and call  delete sms method.

The sms list finished when you got nrGsm1SmsListItem with 0 id.

About timeout. Please note that GSM device can't guarantee stable speed of sms transfer. This process depends on many factor like GSM/3G mobile provider loading, distance to base station and others.
We can't recommend you an exact timeout. You should use events of GSM for monitor changing state.

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.

blitzh

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: Hi, Trying use daemon monitoring
« Reply #2 on: June 29, 2010, 01:50:11 pm »
OK,
now, the my daemon monitor can run
but still need for load balancing and making stable. any idea? tips ?

my quest again
what exactly use auto select driver ? what different use auto select and user driver in nrcom list ?
if i use autoselect, the result failed and auto select first driver index (Nokia 6230).

i think, my modem hardware can't get max perform and not stable because driver.
how to use/add custom driver for my modem ??

and yes, i know for add new driver is in protected func. there is another way to use custom driver or use original driver carry with modem hw?
My plan software will support many new modem without add manual
« Last Edit: June 29, 2010, 01:52:30 pm by blitzh »

Roman Novgorodov

  • Engineer
  • Administrator
  • Hero Member
  • *****
  • Posts: 994
  • we will win
    • View Profile
    • Forums.nrCommLib.Com
Re: Hi, Trying use daemon monitoring
« Reply #3 on: June 29, 2010, 06:15:59 pm »
Hello

nrComm Lib GSM solution contains several drivers for various popular mobile gsm devices.
Our gsm driver is text file with description of AT commands for control device.
This drivers are compiled into binary resources of library and TnrGsm component loads them during initialization.

After serial port connection is established, component chooses most suitable driver for connected gsm device.

You can disable the autodetect mode and select exact gsm driver index for reduce runtime of initialization.

Unfortunately, current version of library does not support public methods for include additional custom gsm drivers.
You can edit content of nrgsmdrv.RES if you want to make changes in existing drivers.

But i recommend you to give us the diagnostic file for your device and we will implement new gsm driver (or correct existing).
Please read this:
http://forums.nrcommlib.com/index.php?topic=6.0

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.