• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Jeanne Boyarsky
  • Liutauras Vilda
Sheriffs:
  • Rob Spoor
  • Bear Bibeault
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:
  • Frits Walraven
  • Himai Minh

USB Modem stuck while submitting data

 
Ranch Hand
Posts: 102
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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!
 
Bartender
Posts: 9625
16
Mac OS X Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Are you using a Windows computer?
 
robin singal
Ranch Hand
Posts: 102
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
No i am using linux
 
robin singal
Ranch Hand
Posts: 102
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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......
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic