Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

USB Modem stuck while submitting data  RSS feed

 
robin singal
Ranch Hand
Posts: 102
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

I am using phone as Usb modem for doing I/0 but i am stuck while submitting data to the modem.



The output is stuck at, "before submit" and the program is not executed further but waiting or hang i dont know.
Also dataEventOccurred() is not invoked.

Thanks!
 
Joe Ess
Bartender
Posts: 9406
12
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you using a Windows computer?
 
robin singal
Ranch Hand
Posts: 102
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No i am using linux
 
robin singal
Ranch Hand
Posts: 102
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Now i am able to submit data and now data event does occur.
What i did :

I used two pipes one for input and one for output and used asynchronous communication two talk with the modem.

Now the problem is when i am sending the String "AT"+(char)13 i am not getting proper response.
What i am getting is square boxes.

Below is the code snippet:



What i get printed in the name of cb is 5 square boxes which is equal to length of b1. As Jsr80 api only act as a data carrier so i need to make sure the data travels in the form of 8 - bit ascii charset and then i again decode it to see what is the response received but rather i get 5 square boxes.

Does anybody have a solution???

Thanks
 
robin singal
Ranch Hand
Posts: 102
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Continuing with my previous most. I am giving some detailed info supporting the above post:

i used command:



to know what activity was going on while i plug in the usb device(phone modem)
This is what i get:



Then i used command:



And i got the following description about my device on which i did'nt have much clue


Then i used the command:


which gave following message on log/messages



Then i executed :



which went on waiting state for any activity.


Then i executed my java program which on completion gives the following output on the shell prompt of udevmonitor:



So where am i what is that i am missing??

Still searching for the answers ....

Would post soon if any progress is made......
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!