JM K
Forum Replies Created
-
AuthorPosts
-
JM KParticipant
Hi Sebastian,
what model of the radio are you using?
Regards,
JM
JM KParticipantHi Neil,
Thank you very much. I fixed the problem. The problem was the space before /dev/ttyUSB0. Thanks a lot.
Regards,
JM
JM KParticipantHi Neil,
thank you very much for your reply. I removed the O_NDELAY flag and also removed the space after /dev/ttyUSB0 in the open command and am still getting the file description as -1. Is it because the port is already open? Is that a possibility? Is there any way to check that? Thanks again.
Best Regards,
JM
JM KParticipantHi,
I modified my program yet still not able to open the /dev/ttyUSB0 file. Here is a copy of the program:
# include <stdio.h>
# incluse <stdlib.h>
# include <unistd.h>
# include <getopt.h>
# include <errno.h>
# include <sys/types.h>
# include <sys/stat.h>
# include <fcntl.h>
# include <termios.h>
# include <string.h>
int main()
{
int fileptr;
fileptr = open (“/dev/ttyUSB0 “, O_RDWR | O_NOCTTY | O_NDELAY);
fnctl(fileptr, F_SETFL, 0);
printf(“Port has been successfully opened and the file description is %d “, fileptr);
close(fileptr);
return 0
}
The output I get when I run this program is:
Port has been successfully opened and the file description is -1.
If the file description is -1, the event of opening the file has failed. Is this correct?
I would very much appreciate it if someone could let me know the error in my program.
Best Regards,
JM
JM KParticipantHi Jesse,
thank you very much for the reply. I wrote a small C program that would just open the ‘file’, ttyUSB0 and send out an SMS to a phone number using the AT commands. I am however getting a Segmentation fault when I try to open the file ttyUSB0 and write an AT command to it. Here is my program:
void main()
{
FILE *fileptr;
fileptr = fopen(” /dev/ttyUSB0 :,”a”);
puts(“AT!SSMS=0,xxxxxxxx,0,yyyyyyyyyy”); /* xxxxxxxxx is the phone number and yyyyyyyyy is the message */
fclose(fileptr);
}
I would appreciate it if you could let me know where my program went wrong. Thank you very much and have a great day.
Best Regards,
JM
JM KParticipantHi Jesse,
I have tried sending out and receiving sms by logging into minicom and using the AT prefix commands and the unit is working fine. I am trying to write a small application that accepts a message in the form of a text file (gedit) and sends an sms to a custom phone number also entered by the user. Since the sms-utils does not support the EV2 radio, can you suggest where to start looking, code/references, that I go through to get a basic idea how I could write my application? Thank you very much and have a great day.
Best Regards,
JM
JM KParticipantHi Jesse,
I copied the .smsconfig file using the scp to the device. I made sure it is in the /home/root directory on the device. I was still getting the same error so I connected to minicom and issued the AT command to make sure communication was present and I got an OK response. I could even voice call a phone number. Then I logged back in to the device and when I issued this command: sms send xxxxxxxx (where xxxxxxxxx was the phone number) I got this error: [ERROR] utils.c:device_lock:265: failed to create /var/lock/LCK..tty USB0: File exists, then I looked up the file LCK..tty USB0 using nano and it contained one line: 1578. I deleted this file and then from /var/temp again issued the command: sms send xxxxxxxx (where xxxxxxxxx was the phone number), I got the same error: [NOTICE] atcmd.c:atcmd_read:284: read timeout. I have copied the .smsconfig file for reference.
user:
name: User name
email: user@gmail.com
core:
verbose: false
interactive: true
sms-init: true
baud-rate: 230400
read-timeout: 5000
device: /dev/ttyUSB0
#device: /dev/ttyUSB3
#device: /dev/rfcomm0
msg-store-read: ME
msg-store-send: ME
pb-store: ME
editor: nano
edit-file: “{HOME}/.smsmsg”
smtp:
server: smtp.gmail.com
port: 587
user: user@gmail.com
passwd: pwsswd
encryption: tls
send-email:
domain: txt.att.net
Any suggestions would be very much appreciated. Thank you very much.
Best Regards,
JM
JM KParticipantHi Jesse,
Thank you for the quick reply. I changed the device in the ${HOME}/.smsconfig to USB0, as the device I am working with is an MTCDP-EV2 model. I changed the revision number and then once again bitbaked the sms-utils. I am still getting the same error after having installed the package on the unit. Do I need to change anything else in the ${HOME}/.smsconfig file?
Thank you for your help. Have a great day.
Best Regards,
JM
JM KParticipantHi,
I have installed both packages, libesmtp and libyaml successfully and also managed to solve the errors I have been facing while installing the sms-utils package. I have now successfully installed the sms-utils package on the CDP unit. When I issue the command:
# sms-send xxxxxxxxxx
I am getting this error:
[NOTICE] atcmd.c:atcmd_read:284: read timeout
Any suggestions on how to solve this would be very much appreciated.
Best Regards,
JM
JM KParticipantThank you very much, Jesse. I have installed both packages ‘libesmtp’ and ‘libyaml’. I am manually installing the package by copying the ipk file to the unit and running opkg. After having bitbaked both libesmtp and libyaml from the terminal, I changed the revision number in the sms-utils.inc file and tried rebuilding the sms-utils package and yet I am getting the same error message. Does providing the ‘need dependency’ mean that I have to provide copies of libesmtp and libyaml in the same directory as ‘sms-utils’? Here is the sms-utils.inc file:
DESCRIPTION = “SMS Utilities”
HOMEPAGE = “http://www.multitech.net/”
SECTION = “console/utils”
PRIORITY = “optional”
LICENSE = “GPL”
DEPENDS = “libsmtp libyaml”
SRC_URI = “git://git.multitech.net/sms-utils.git;protocol=git;tag=${PV}”
S = “${WORKDIR}/git”
inherit autotools
PARLELL_MAKE = “”
Thank you very much and have a great day.
Best Regards,
JM
JM KParticipantThank you very much.
JM KParticipant@Jesse Gilles, thank you very much for the quick reply. I shall indeed start a new topic for new questions in the future.
Thanks,
JM
JM KParticipantHi,
I am trying to build a package using bitbake. In the file local.conf, what values do these three variables:
BBFILES = “” ; DISTRO = “” ;MACHINE = “” ; Need to contain? I would very much appreciate it if someone could answer my question. Thank you very much and have a great day.
Regards,
JM
JM KParticipantI have recently purchased a Cellular Development Platform. I am using Ubuntu 10.0.04 for my OS. I am looking around for a good compatible USB to Serial port adapter. I would very much appreciate it if someone could let me know this information. Thank you very much.
-
AuthorPosts