"Object reference not set to an instance of and object."

15 posts / 0 new
Last post
balavelocity
"Object reference not set to an instance of and object."

Sending sms is not working. From my Laptop RJ-11 port, I am trying to send the sms. At the end "Object reference not set to an instance of and object." error thrown at the end.

How to solve the issue.

Kurumi
Kurumi's picture

Hi,

This is first time when I heard from this.
Can you tell anything more? Are you using own code or sample code?

Happy Coding,

Mikko

________________________________________
Mikko Kurunsaari
Gurux Ltd
http://www.gurux.fi

jeke117

Sir, We want to develop a Bulk Voice call software in VB6 to call Mobile nos & Land line nos one by one and play a pre recorded message whenever opposite side person lift the phone.Is it possible with your components, if yes please tell us how it is possible. We are already using your GuruxSMS.dll for sending bulk SMS, but some times ( after 20 to 30 messages send successfully)port initializing failed. please check below code, if any suggestions pl send us.

Dim msg As GXSMSMessage
dim i
i = 0
adoactive.Recordset.MoveFirst
for i = 0 to adoactive.Recordset.Recordcount - 1

GXSMS1.Port = "COM9"
GXSMS1.BitRate = 115200
GXSMS1.DataBits = GX_8
GXSMS1.ReceiverNumber = adoActive.Recordset("mobileno").Value 'txtTestNo.Text
GXSMS1.Parity = GX_NO_PARITY
GXSMS1.StopBits = GX_ONEBIT
GXSMS1.FlowControl = GX_FLOW_DISABLE
GXSMS1.CodeType = GX_SMS_MSG_CODE_TYPE_7BIT

GXSMS1.Open

'for waiting
PauseTime = 4 ' Set duration.
Start = Timer ' Set start time.
Do While Timer DoEvents ' Yield to other processes.
Loop

Set msg = CreateObject("GuruxSMS.GXSMSMessage")

msg,data=txtmessage.Text

GXSMS1.Send msg
'"Success"
adoActive.Recordset("Status") = "Success"
adoActive.Recordset("SendDt") = Format(Now, "dd/MM/yyyy hh:mm AM/PM")
adoActive.Recordset.Update

PauseTime = 4 ' Set duration.
Start = Timer ' Set start time.
Do While Timer DoEvents ' Yield to other processes.
Loop
GXSMS1.Close

adoactive.Recordset.MoveNext
next i

'
Thank you
Jagan Mohan.K

Kurumi
Kurumi's picture

Hello Jagan,

I have never thought about this, but I believe that this kind of solution should be possible using our components.

Modem is sometimes causing Port initialize failed message when you try to open
connection too fast, after closing one.

There are two different ways to handle this.

1. Open port only once, then send all SMS messages, and close the port after you have send all messages.

2. If you want to open serial port each time, wait a few seconds before opening. This usually helps for most modems.

Happy Coding,

Mikko

________________________________________
Mikko Kurunsaari
Gurux Ltd
http://www.gurux.fi

marosomarco

Hi, i was reading your post and have the exact question.
How can i send voice over modem using a voice modem or anything else after phone is picked up?
Have you managed to figure out what component is usefull for this and do you have a piece of code in VB?

Thanks alot.

Maroso Marco.

jeke117

Sir,
pl guide me in the following

1. Which component is useful for Bulk Voice call
2. How to change Receiver's mobile no when port open, if have any code pl send it

thank you

Kurumi
Kurumi's picture

Hello,

1. You can use GXTerminal to start call.

2. Set SMSMessage's Number like below.

Dim sms
Set msg = CreateObject("GuruxSMS.GXSMSMessage")
msg.Number = "Phone number"
sms.Send msg

Happy Coding,

Mikko

________________________________________
Mikko Kurunsaari
Gurux Ltd
http://www.gurux.fi

jeke117

Sir,

Thank you for help, our second problem successfully solved

but first problem when using GXTerminal for calling a number the following error occurring(Selected com port as well as entered the Receiver number) every time after click on open button

Open Failed: Connect failed, Modem is not in the network

Our modem is Huawei E1550 3G Model

Pl suggest me in this regard

Kurumi
Kurumi's picture

Hello,

Usually you are receiving this error when there is no SIM card or SIM card is not active. Move your SIM card to the GSM phone and try to make a call.

Let us know if you succeeded.

Hope this helps.

BR,

Mikko

________________________________________
Mikko Kurunsaari
Gurux Ltd
http://www.gurux.fi

jeke117

Sir,
I am unable to solve the problem. Open Failed: Connect failed, Modem is not in the network. using GXTerminal for calling a number, i am using Huawei E1550 3G Model.
i changed my SIM also.

I think there may be problem in Huawei modem
please suggest best modems for Voice call.

Thank you

Administrator
Administrator's picture

Hello, jeke117

You might want to try Siemens modem, we have had good experiences with them.

Can other memebers here suggest / recommend other modem manufacturers for jeke117? Please, post!

Regards,
Gurux developers

Gurux Administrator

jeke117

Sir,

Which model of Siemens modem is suitable for voice , pl tell me Model.

How to send long message.

thank you

Gurux Ltd

Hello jeke117,

basically any model of Siemens modem is suitable for voice call.

We have today released a new version with improvements, with which you get to select whether to use data call or voice call.

Kindly notice that the default is data call, so you'll have to change it to voice call.

About sending long message, kindly specify, what you mean by the term "long message"?

BR,

Gurux developers

jeke117

Sir,
In my view 'Long message' meant that greater than 160 characters. If i want to send greater than 160 characters messages, how to concatenate messages.

Thank you
Jagan Mohan.K

Gurux Ltd

Hello, jeke117

unfortunately messages over 160 characters are not supported in GXSMS, because the component is designed for short messaging.

I think most users of our GXSMS component send short messages just to transfer information, and have not needed messages longer than 160 char.

If we get more feedback on this issue, we may consider adding this to the future features request list, but for now it is not possible.

BR,
Gurux developers