473,409 Members | 1,945 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,409 software developers and data experts.

22, invalid agument error

I am trying to get an echoserver running on my N80 Nokia cell phone,
that uses "python for s60".
What worked:
I ran echoclient on the phone and echoserver on my Powerbook and it
worked.

What doesnt work:
When I try running the same scripts, so that I run echoclient on the
laptop and echoserver on the cellphone, the echoserver doesnt work(Yes,
I have changed the IP address correctly).

The error I get is:

File "e:/python/echoserver.py". line
15 in ?
sockobj.bind(('',40007))
# bind it to server port number
File "<string>", line 1, in bind
error: (22, 'Invalid argument')

Why is this program showing an error on the cellphone when it is
running fine on the Mac?

Thanks, any help will be appreciated.

Dave

Sep 6 '06 #1
5 1647
sockobj.bind(('',40007))

tried on my N6600 with same error

try using your phone's IP instead of the empty string ''

tried sockobj.bind(('127.0.0.1',40007)) and did not get an error

Sep 7 '06 #2
sockobj.bind(('',40007))
>
tried on my N6600 with same error

try using your phone's IP instead of the empty string ''

tried sockobj.bind(('127.0.0.1',40007)) and did not get an error
In general sockets layer bind with null host makes it pick the address
from arp resolution and null in port makes it pick a random number as a
source port. This is reason bind call is not required for client
connections.

I think Python for S60 has some problem in sockets layer for the bind
function. Best is to remove the bind call in the client program as
people will test with this senario in general.

Sep 7 '06 #3

Justin Ezequiel wrote:
sockobj.bind(('',40007))

tried on my N6600 with same error

try using your phone's IP instead of the empty string ''

tried sockobj.bind(('127.0.0.1',40007)) and did not get an error
I didn't get an error either, but the whole thing hangs up, and I am
forced to abort the program. This has happend quite a few times
already.
Did it work for you normally?

Thanks

Sep 7 '06 #4

kondal wrote:
sockobj.bind(('',40007))
tried on my N6600 with same error

try using your phone's IP instead of the empty string ''

tried sockobj.bind(('127.0.0.1',40007)) and did not get an error

In general sockets layer bind with null host makes it pick the address
from arp resolution and null in port makes it pick a random number as a
source port. This is reason bind call is not required for client
connections.

I think Python for S60 has some problem in sockets layer for the bind
function. Best is to remove the bind call in the client program as
people will test with this senario in general.
Well the bind call is in the server program, not the client. I want to
run the server program on the cellphone.
Any idea how to fix it?

Thanks!

Sep 7 '06 #5
Infinite Corridor wrote:
Justin Ezequiel wrote:

tried sockobj.bind(('127.0.0.1',40007)) and did not get an error

I didn't get an error either, but the whole thing hangs up, and I am
forced to abort the program. This has happend quite a few times
already.
Did it work for you normally?
am unable to test as my current PCs do not have bluetooth (yet)
sorry

Sep 7 '06 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Glenn A. Harlan | last post by:
Why am I receiving the below error when calling - Path.GetTempFileName() The directory name is invalid. Description: An unhandled exception occurred during the execution of the current web...
30
by: Tim Johansson | last post by:
I'm new to C++, and tried to start making a script that will shuffle an array. Can someone please tell me what's wrong? #include <iostream.h> #include <string.h> int main () {...
5
by: Nick Flandry | last post by:
I'm running into an Invalid Cast Exception on an ASP.NET application that runs fine in my development environment (Win2K server running IIS 5) and a test environment (also Win2K server running IIS...
2
by: Brad | last post by:
I have an intranet app that has just started sporadically getting the following error "The viewstate is invalid for this page and might be corrupted." By sproadic I mean 3-4 times during the past...
1
by: Hifni Shahzard | last post by:
Hi, I got a stored procedure, where it returns a value. But if I execute it. It gives an error as "Invalid cast from System.Int32 to System.Byte.". To make clear how do I execute this, below I'm...
11
by: Nad | last post by:
Hello, I have a page with two link buttons. When I click on the first one I call server.execute("target.aspx") to view target.aspx on the original page. Then I click on the second link button...
2
by: none | last post by:
Hi, I'm opening a popup window with JavaScript. It has a command button. This is from the primary source (opener) window: ###################################################################...
3
by: fazulu deen | last post by:
Hi all, For the following code : file_ptr = fopen("pass_fail.txt", "a"); // error line 393 fdisplay(file_ptr, "Test Passed"); fclose(file_ptr);
25
by: dennijr | last post by:
ok, shell always used to be easy for me, now its starting to get annoying cause i dont know wats wrong heres the simplist code possible: Private Sub IExplorer_Click() a = Shell("C:\Program...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.