Join Today
+ Reply to Thread
Page 1 of 2 12 LastLast
Results 1 to 10 of 15
  1. #1
    Join Date
    Jun 2005
    Location
    Houston, USA
    Posts
    349

    Default Good news for J2ME development accessing BT, telnet, ...

    Hello guys,

    I played a little bit with the netbeans jdk now and there are some good news and I've also some ideas:

    1. File access is possible with java certificate from Motorola for the application. But it is not needed at all. There are recordstores available and files may stored with this technique to a directory named rms. If you like you may install Cy4th which uses recordsstores and analyze the directory. The data in there is clear readable by less, nano or even cat.

    2. Because file access is possible, there are some workarounds possible now for bluetooth, telnet, even others:

    a) For bluetooth data transceiving it would be possible to save data in recordstores, write a demon for linux and this demon sends the data via bluetooth or even receives data via bluetooth and saves it to recordstores which the java application may be read. Summary: bluetooth via j2me IS POSSIBLE with this workaround!

    b) A telnet client (or shell) for the new E680i on the phone is missed until now. But also this would be possible to write with j2me:

    As with the bluetooth workaraound, we could write a demon, which pipes the input and ouput of a shell in recordstores and the j2me application accesses the data via these recordstores and leads it to a form. Summary: it is definitely POSSIBLE to write a telnet or shell for using under j2me!

    Any guy interested in developing (I am mostly busy with Cy4th and other stuff but can give some help) such stuff? I guess it is much simpler and faster than waiting for a stable opie or anything like that. And most of the written programs in j2me would be platform neutral. Reusable to the next generation of Linux phones. For me, I just decided to go further this way, than only using apps from other native gui-builders. Also, there is much more huge java source out there, which can be modified and reused.
    % New UNIX password:
    > penis
    BAD PASSWORD: it's WAY too short
    % New UNIX password:

  2. #2

    Default Re: Good news for J2ME development accessing BT, telnet, ...

    I am definately interested; most of my application goals include both some kind of BT access as well as data processing, eg forth(?). Do you think that some interface (script or compiled code) could be prepared to bridge chars to/from /dev/pts/? (where the BT SPP connection is) and an rms record: for example, dump from /dev/pts/1 to the screen w/ a J2ME applet.

    i'm happy to do the work because i hope i will learn something along the way, but I do not know the best way to get started.

    thanks for your guidance!!!

  3. #3
    Join Date
    Jun 2005
    Location
    Houston, USA
    Posts
    349

    Default Re: Good news for J2ME development accessing BT, telnet, ...

    Yes, it could be prepared. Also, it would be very easy to use already written apps like wget, ftp or anything like that to do the work over bt and transfer the data via the rms files.

    It is not possible to jump via java outside the java environment, but the rms data is saved at the filesystem in a direct manner (even the filename is used and only appended by ".db"). So, as we already have full control via linux a demon could anything do, what is possible under linux (bt too) and use the rms storage for data or control transfer to any java application. This bridge function is definetely possible! It's only a matter of how to implement it (polling, interrupts, sleep cycles) in a demon.

    You could even write an application to control other computers via bluetooth with a java app which will write the control codes to rms storage, a linux demon which will transfer it to a computer and a demon on that computer what will execute this.
    % New UNIX password:
    > penis
    BAD PASSWORD: it's WAY too short
    % New UNIX password:

  4. #4

    Default Re: Good news for J2ME development accessing BT, telnet, ...

    HEY Cytax,
    Good Job !!! count me in !!! i think u r on the right path.. lets analyze the first step.

    accessing the filesystem API through RecordStore: i didnt quite get that.. are u saying that filesystem can be accessed by accesing a RMS that contains information about the current filesystem and that u have hacked that RMS name ? cos i know u can share the RMS b/w diff midlets... if i am assuming it wrong then pls clarify that ?

    i am able to access the filesystem from linux side not from the Java side.. it does require motorola certificate which is hard to get.

    i am waiting for your reply.
    -MAQ

  5. #5
    Join Date
    Jun 2005
    Location
    Houston, USA
    Posts
    349

    Default Re: Good news for J2ME development accessing BT, telnet, ...

    As always in life, there is an indirect way if a direct way is not possible.

    As I wrote, you may not get direct access from J2ME to the whole filesystem or even other linux tasks. This is because of security restrictions of java. But if you have a demon on the linux side (this could be a script or a binary app), which will take part of communication via the rms storage, you will have a real connection to/from java to the rest of the system.

    It would be possible for example to write a demon, that "asks" a rms file for commands, start a shell, execute the commands in there and lead the return values back to the rms storage system where the java app waits of and will display the contents in the own (java) environment. What you will have in effect is a linux shell like bash in a java application with control to the whole linux system (whole filesystem included).
    % New UNIX password:
    > penis
    BAD PASSWORD: it's WAY too short
    % New UNIX password:

  6. #6

    Default Re: Good news for J2ME development accessing BT, telnet, ...

    awesome: so in simple terms.. scan the directory from linux side, read the directory/files names and store it in RMS file. From java side open the RMS and display the filesystem...not a bad idea.. !!

    where are these RMS files stored on the device if u know about it ?
    Secondally, is it possible to intercept SMS messages from Java Wireless MEssaging API ? if u know about it....

    Also, i think from the MIDLet it is possible to communicate over sockets or does that even require motorola certificate ? if it is allowed then i guess HttpConnection() should also work ryt ?

    are u working on MIDP/J2ME ? we can share info if u r...let me know.. do u have msn or skype ?

    keep checking this thread i will post more stuff/info ...

    thanks,
    -MAQ

  7. #7

    Default Re: Good news for J2ME development accessing BT, telnet, ...

    excellent.....

    Quote Originally Posted by cytux
    It would be possible for example to write a demon, that "asks" a rms file for commands, start a shell, execute the commands in there and lead the return values back to the rms storage system where the java app waits of and will display the contents in the own (java) environment. What you will have in effect is a linux shell like bash in a java application with control to the whole linux system (whole filesystem included).
    Great, now I have something to focus on, i'll see if i can get a shell script to poll and parse an rms "command" record and dump shell outputs to a "result" record. thanks again for the help!

  8. #8
    Join Date
    Jun 2005
    Location
    Houston, USA
    Posts
    349

    Default Re: Good news for J2ME development accessing BT, telnet, ...

    @mudassar:

    no sorry, I don't have skype or even msn until now. Letz use this thread, ok? Because we are three guys now developing in java I guess this would be the best for now. I don't know what is with sms. If you like you may look at motocoder.com where are masses of documents about this stuff. Communication over sockets should be possible, anyway.

    RMS files are stored in the midlet directory under directory rms. Best idea I have to locate it in a script is via the find command, if you have a specific filename. You must only append ".db" to your filename for the find command.

    @rpconnect:

    If you get it, the whole MFC (me inclusive) will be pleased, I guess.

    @rpconnect, mudassar:

    I have included the jave file with the rms source to write/read a String in a file. May be it helps.

    I am developing under netbeans, as I have a nice graphical gui builder there.

    Let me say, I am very happy to be not more alone with this j2me stuff for the E680i.
    Attached Files Attached Files
    % New UNIX password:
    > penis
    BAD PASSWORD: it's WAY too short
    % New UNIX password:

  9. #9
    Join Date
    Jun 2005
    Location
    Houston, USA
    Posts
    349

    Default Re: Good news for J2ME development accessing BT, telnet, ...

    Well, let me explain:

    In rms.java there is a rms class with 2 methods:

    load() and save()

    load gets one string, save returns one string. The filename (source.lib) is hard coded into the methods but this may be changed. You should also use no dots in filenames when accessing from linux is requested as this leads to special codes in the rms filename.

    You may call it as follows:

    mystring = rms.load;
    rms.save(mystring);
    % New UNIX password:
    > penis
    BAD PASSWORD: it's WAY too short
    % New UNIX password:

  10. #10
    Join Date
    Jun 2005
    Location
    Houston, USA
    Posts
    349

    Default Re: Good news for J2ME development accessing BT, telnet, ...

    % New UNIX password:
    > penis
    BAD PASSWORD: it's WAY too short
    % New UNIX password:


 
+ Reply to Thread
Page 1 of 2 12 LastLast

Similar Threads

  1. good news for e6 fans
    By shantanu in forum E6 Firmware
    Replies: 132
    Last Post: 05-27-2011, 09:03 AM
  2. Good news for J2ME development:
    By cytux in forum Development
    Replies: 1
    Last Post: 11-07-2010, 12:47 AM
  3. Choosing a good phone for development
    By zbojnik83 in forum Development
    Replies: 3
    Last Post: 10-29-2006, 05:54 AM
  4. problems accessing some files via telnet
    By ohli in forum A1200 General Chat
    Replies: 3
    Last Post: 07-21-2006, 02:26 PM
  5. J2ME development for the e680(i)
    By cytux in forum Development
    Replies: 80
    Last Post: 08-11-2005, 10:51 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Single Sign On provided by vBSSO

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1