Skip to contentSkip to conversation

rfcomm in TTY raw mode from DBus

Bluez-devel Pierre-Yves Paulus 2 participants 5 messages Aug 28, 2006 – Aug 29, 2006 Bluetooth drivers

lore
Share & tools
lore
#0 lore raw

Hello,

How can I open an rfcomm connection into TTY raw mode from DBus? I mean, something equivalent to the command "rfcomm --raw". Is it possible at the moment?

I can get the rfcomm connected nicely from the DBus, I only miss how to have it done in "raw".

Thanks,
Best Regards

Pierre-Yves Paulus

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

maintainer
#1 lore raw

Hi Pierre-Yves,

Quoted 6 lines

How can I open an rfcomm connection into TTY raw mode from DBus? I mean, something equivalent to the command "rfcomm --raw". Is it possible at the moment?

I can get the rfcomm connected nicely from the DBus, I only miss how to have it done in "raw".

this is the job the application using that TTY. It is the same as you need to /dev/ttyS0 etc.

Regards

Marcel

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

#2 lore raw
Quoted 6 lines
Quoted 3 lines

I can get the rfcomm connected nicely from the DBus, I only miss how to have it done in "raw".

this is the job the application using that TTY. It is the same as you need to /dev/ttyS0 etc.

Thank you for your answer Marcel. After some investigation, it seems that switching a virtual TTY into raw mode is not possible in pure JAVA (a native call (eg JNI) to C code has to be used).

As the DBus interface is meant to be used from various languages which may or may not have the ability to configure TTYs, wouldn't it make sense to offer the possibility to get the TTY in one mode or the other at the time of the DBus "connect" call? Or am missing other important points? To make it short, I do not understand why it is a good idea to offer this option from the "rfcomm" utility, and not from the DBus interface.

Any light would be appreciated!

Regards

Pierre-Yves

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

maintainer
#3 lore raw

Hi Pierre-Yves,

Quoted 10 lines
Quoted 5 lines
Quoted 2 lines

I can get the rfcomm connected nicely from the DBus, I only miss how to have it done in "raw".

this is the job the application using that TTY. It is the same as you need to /dev/ttyS0 etc.

Thank you for your answer Marcel. After some investigation, it seems that switching a virtual TTY into raw mode is not possible in pure JAVA (a native call (eg JNI) to C code has to be used).

Quoted 7 lines

As the DBus interface is meant to be used from various languages which may or may not have the ability to configure TTYs, wouldn't it make sense to offer the possibility to get the TTY in one mode or the other at the time of the DBus "connect" call? Or am missing other important points? To make it short, I do not understand why it is a good idea to offer this option from the "rfcomm" utility, and not from the DBus interface.

the rfcomm utility has this capability, because I needed it for some early kernel RFCOMM demonstrations. I wrote that tool back in 2002 and in general the application should set the TTY in the needed mode. Only cat is too stupid for this.

If Java or any other language is too stupid to handle a TTY correctly then it also will have problems with serial ports and other TTY based services. This is a problem of the language you choose. So in this case you have to fix the language and not make our D-Bus API workaround these problems.

Regards

Marcel

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

#4 lore raw
Quoted 4 lines · Marcel Holtmann

the rfcomm utility has this capability, because I needed it for some early kernel RFCOMM demonstrations. I wrote that tool back in 2002 and in general the application should set the TTY in the needed mode. Only cat is too stupid for this.

Ok.

Quoted 5 lines

If Java or any other language is too stupid to handle a TTY correctly then it also will have problems with serial ports and other TTY based services. This is a problem of the language you choose. So in this case you have to fix the language and not make our D-Bus API workaround these problems.

The reason why I asked for the DBus to do so was also driven by a mistake in my understanding of the action to be performed. Your answers and further investigation made the point clearer for me.

The JAVA language does not completely lack the ability to manage it, as it allows a native call to perform the task. I think the reason it does not offer high level methods to perform this kind of task is its aim to platform independance. But anyway, I did write a small C function and call it using JNI, and it is working smoothly.

Thanks for your support,
Best Regards.

Pierre-Yves

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel