Notices


Reply
Thread Tools
zoner's Avatar
Posts: 74 | Thanked: 38 times | Joined on Feb 2010
#71
Originally Posted by 白い熊 View Post
OK, backup your .emacs, and start .emacs with a completely empty one, except for stuff that'll let you start bbdb and bbdb-nokia-n900.

Cut everything else out, and see if you get the same error, that way we can debug it.
Thanks for your help

I tried the clean .emacs earlier with no luck, but I'm starting over

current .emacs file
Code:
(menu-bar-mode 0)
(tool-bar-mode -1)

(add-to-list 'load-path "~/MyDocs/elisp")
(add-to-list 'load-path "~/MyDocs/bbdb-2.35/lisp")

(require 'maxframe)
(add-hook 'window-setup-hook 'maximize-frame t)
(maximize-frame)
(setq dired-use-ls-dired nil)
(setq list-directory-brief-switches "-C")

(require 'bbdb)
(bbdb-initialize)
(setq bbdb-file "~/MyDocs/.bbdb")

(require 'bbdb-nokia-n900)

(custom-set-variables
 '(bbdb-north-american-phone-numbers-p nil))
The north american variable was actually a typo before, it was correct (but posted incorrectly). The N American variable here was set through the customize-group dialog.

With the above, no luck.

An attempt to SMS to the number +1704-254-1111

sends same error to a new buffer
Code:
Pipe endpoint allocation: Operation not permitted
Process n900-sms-dispatch exited abnormally with code 1
now also sends this message to the minibuffer
Code:
Sending SMS to: +1704-254-1111 (Mobile)
while: Process n900-sms-dispatch does not exist
calls to this number via bbdb-nokia-n900.el work perfectly, including timestamps

How did you setup your bbdb? In an attempt to keep things light on the handheld, I simply copied the bbdb-2.35 directory to ~/MyDocs/ I deleted everything but the lisp directory. Could my problem be related to this?

fwiw i still cannot edit an existing from number from (xxx) xxx-xxxx to +1xxx-xxx-xxxx
 
Posts: 451 | Thanked: 334 times | Joined on Sep 2009
#72
Code:
(custom-set-variables
 '(bbdb-north-american-phone-numbers-p nil))
The north american variable was actually a typo before, it was correct (but posted incorrectly). The N American variable here was set through the customize-group dialog.
Throw this out, just realized I put it together so that it'll dial even american style numbers. So you can dial even the americanized numbers - try that. You're just not gonna be able to call from abroad, since they're not in an international format, but since you've got them in your phonebook that way, it prob'ly doesn't matter to you.

Code:
Sending SMS to: +1704-254-1111 (Mobile)
while: Process n900-sms-dispatch does not exist
OK, it doesn't create the process, something wrong with pnatd on your side or communication from Emacs with it.

Which Emacs version, and from where, are you using?

Then, with the following code:
Code:
(start-process "n900-sms-dispatch" "*n900-sms-dispatch*" "pnatd")
(display-buffer "*n900-sms-dispatch*")
(process-send-string "n900-sms-dispatch" "at\r")
(process-send-string "n900-sms-dispatch" "AT+CSCS=\"HEX\"\r")
(process-send-string "n900-sms-dispatch" "AT+CSMP=17,167,0,8\r")
(process-send-string "n900-sms-dispatch" "at+cmgf=1\r")
(process-send-string "n900-sms-dispatch" (concat "at+cmgs=\"" "7042541111" "\"\r"))
(process-send-string "n900-sms-dispatch" (concat "This is a sample SMS message." "\C-z"))
Copy it to your *scratch* buffer, and eval line by line - if you're not familiar with Emacs, move to the end of each line: C-e and eval the line: C-x C-e

This should send the sample SMS. Report what you see here and we can get it fixed.
 
zoner's Avatar
Posts: 74 | Thanked: 38 times | Joined on Feb 2010
#73
Throw this out
done

I put it together so that it'll dial even american style numbers. So you can dial even the americanized numbers - try that
trying (704) 254-1111
Code:
replace-regexp-in-string: Wrong type argument: sequencep, 704
+1704-254-1111 continues to work perfectly
Which Emacs version, and from where, are you using?
http://sumoudou.org/%E7%9B%B8%E6%92%...ia%20N900.html - followed your basic instructions

Report what you see here and we can get it fixed.
(start-process "n900-sms-dispatch" "*n900-sms-dispatch*" "pnatd")

#<process n900-sms-dispatch>


(display-buffer "*n900-sms-dispatch*")

#<window 6 on *n900-sms-dispatch*>


(process-send-string "n900-sms-dispatch" "at\r")

nil

(process-send-string "n900-sms-dispatch" "AT+CSCS=\"HEX\"\r")

Debugger entered--Lisp error: (error "Process n900-sms-dispatch does not exist")
process-send-string("n900-sms-dispatch" "AT+CSCS=\"HEX\"
")
eval((process-send-string "n900-sms-dispatch" "AT+CSCS=\"HEX\"
"))
eval-last-sexp-1(nil)
eval-last-sexp(nil)
call-interactively(eval-last-sexp nil nil)


(process-send-string "n900-sms-dispatch" "AT+CSMP=17,167,0,8\r")

Debugger entered--Lisp error: (error "Process n900-sms-dispatch does not exist")
process-send-string("n900-sms-dispatch" "AT+CSMP=17,167,0,8
")
eval((process-send-string "n900-sms-dispatch" "AT+CSMP=17,167,0,8
"))
eval-last-sexp-1(nil)
eval-last-sexp(nil)
call-interactively(eval-last-sexp nil nil)
recursive-edit()
byte-code(" @=!

(process-send-string "n900-sms-dispatch" "at+cmgf=1\r")...

the remaining evals continue to throw errors to the backtrace buffer, which I can't paste into these text boxes.
 
Posts: 7 | Thanked: 2 times | Joined on Mar 2010
#74
Hi KiberGus

"Hi. I'm currently working on SMS listener in ussd-widget. And I need to decode PDU.........."

I read your post about having already solved this, but I thought you might be interested in seeing Kannel, as it contains PDU encoders and decoders: http://www.kannel.org/

Last edited by birdwes; 2010-03-19 at 00:15.
 

The Following User Says Thank You to birdwes For This Useful Post:
Posts: 451 | Thanked: 334 times | Joined on Sep 2009
#75
Code:
replace-regexp-in-string: Wrong type argument: sequencep, 704
+1704-254-1111 continues to work perfectly
This is very strange. What do you get when evaluating:
Code:
(replace-regexp-in-string "-" "" (replace-regexp-in-string " " "" (replace-regexp-in-string "(" "" (replace-regexp-in-string ")" "" "(704) 254-1111"))))
http://sumoudou.org/%E7%9B%B8%E6%92%...ia%20N900.html - followed your basic instructions
OK, I tested with this version, it works, so it's not Emacs' fault.

(process-send-string "n900-sms-dispatch" "at\r")

nil

(process-send-string "n900-sms-dispatch" "AT+CSCS=\"HEX\"\r")

Debugger entered--Lisp error: (error "Process n900-sms-dispatch does not exist")
OK, something is killing the pnatd process between the first and second send. "AT" gets sent, then the process is killed.

Post the contents of *Messages* buffer, maybe it gives some clues as to what is happening.

Also, can you start pnatd from the terminal and enter this sequence of commands, or does it also die?:
Code:
at
AT+CSCS="HEX"
AT+CSMP=17,167,0,8
at+cmgf=1
at+cmgs="7042541111"
This is a sample SMS message.
C-z
 
zoner's Avatar
Posts: 74 | Thanked: 38 times | Joined on Feb 2010
#76
Originally Posted by 白い熊 View Post
this is very strange. What do you get when evaluating:
Code:
(replace-regexp-in-string "-" "" (replace-regexp-in-string " " "" (replace-regexp-in-string "(" "" (replace-regexp-in-string ")" "" "(704) 254-1111"))))
Code:
"7042541111"
Post the contents of *Messages* buffer, maybe it gives some clues as to what is happenin
I collected all the messages I could find

Also, can you start pnatd from the terminal and enter this sequence of commands, or does it also die?:
As user it throws the pipe error - could that be part of it?

As root:
at
OK
AT+CSCS="HEX"
OK
AT+CSMP=17,167,0,8
OK
at+cmgf=1
OK
at+cmgs="7042541111"
>T
ERROR

704 254 1111 is not a real number if that helps, but it doesn't look like it get that far
 
Posts: 451 | Thanked: 334 times | Joined on Sep 2009
#77
Originally Posted by zoner View Post
Code:
"7042541111"
OK, evaluates fine, so should send fine. So maybe it's connected with the following.

As user it throws the pipe error - could that be part of it?
Yeah, that's the reason, pnatd must be run as user.

Code:
which pnatd
should give you
Code:
/usr/bin/pnatd
Code:
ls -l /usr/bin/pnatd
should start with
Code:
-rwsr-sr-x
What do you get for
Code:
ls -l /usr/bin/pnatd
.
Try purging pnatd and reinstalling clean.

You must be able to start it as user and then send one or two commands without crash.

The problem lay with pnatd on your system, not the Emacs coding...
 
zoner's Avatar
Posts: 74 | Thanked: 38 times | Joined on Feb 2010
#78
Originally Posted by 白い熊 View Post
Code:
which pnatd
should give you
Code:
/usr/bin/pnatd
yes

Code:
ls -l /usr/bin/pnatd
should start with
Code:
-rwsr-sr-x
no

What do you get for
Code:
ls -l /usr/bin/pnatd
Code:
-rwxr-xr-x    1 root   root   12676 Aug 27   2009 /usr/bin/pnatd
Try purging pnatd and reinstalling clean.
can you point me to some instructions on that?
I thought it should be
Code:
apt-get remove --purge pnatd
but I get a "couldn't find package pnatd"

You must be able to start it as user and then send one or two commands without crash.

The problem lay with pnatd on your system, not the Emacs coding...
thanks again, I appreciate your help - this will be great once these issues are corrected

Last edited by zoner; 2010-03-19 at 18:13.
 
Posts: 451 | Thanked: 334 times | Joined on Sep 2009
#79
Code:
apt-get purge pnatd
apt-get install pnatd
 
zoner's Avatar
Posts: 74 | Thanked: 38 times | Joined on Feb 2010
#80
man, I'm feeling like a big lump of fail
Code:
# apt-get purge pnatd
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Couldn't find package pnatd

# which pnatd
/usr/bin/pnatd
 
Reply


 
Forum Jump


All times are GMT. The time now is 12:47.