LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices

Reply
 
Search this Thread
Old 10-16-2013, 09:15 AM   #1
jimbolaya
LQ Newbie
 
Registered: Oct 2013
Posts: 1

Rep: Reputation: Disabled
stty doesn't affect rfcomm0 connection


I've been having some fun connecting my server to an embedded device that outputs some data and should also have a prompt to enter commands. This is kind of a long question/post, but there's a lot of fiddly data.

I am running Ubuntu 12.04.3 LTS 64-bit and I'm using a cheapy USB Bluetooth card to connect to a LC-06 (model HC-06, just an LC-06 attached to a board, slave mode) bluetooth serial port. After setting the baud rate for the embedded device, I was able to see data just fine from the device.

So, to connect to the device, I have to do a few things. I set up my /etc/bluetooth/rfcomm.conf file to see the device but not bind to it automatically.

Code:
bluetooth-agent <mypin> &
rfcomm bind rfcomm0
Then I try to connect using screen (screen /dev/rfcomm0) or minicom. Minicom connects more reliably, but screen allows me to connect and detach the terminal. Plus if I am successful connecting using minicom then exit I get a better chance of connecting with screen.

About 80% of the time it connects if it's physically close enough to my USB bluetooth card, if it's further away, it's more like 20-30%. Once it's connected though, it seems to be pretty solid.

Now, to get to my issues. First, the data from the embedded device only issues line-feeds not carriage-return line-feeds. Presumably, stty allows you to rewrite incoming lf to crlf using the inlcr option. If I issue an
Code:
stty -F /dev/rfcomm0 inlcr
the output should immediately start lining up instead of stair-stepping, but it doesn't. I'm not sure if this is an issue with stty not affecting rfcomm or something else.

My second issue is that I don't seem to be able to write to the device. I don't know if that's because I need to set up my rfcomm connection differently for writing or use something else than screen for the connection (I couldn't write with mincom either). I've tried turning on local echo by running
Code:
stty -F /dev/rfcomm0 echo
but that doesn't seem to have any affect either.

I hope someone can either help me directly or point me to better resources than I've been able to find on these issues. Information on interaction between stty and rfcomm seem pretty non-existant, and that usually means I'm not looking the right way. Also setting up rfcomm.conf information seems pretty scarce (what kind of options are there for this file?).

James
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
would lan file sharing affect internet connection speed? Cultist Linux - Server 5 03-05-2012 10:21 AM
[SOLVED] KDE 4.5: Revert icons from Monochrome to Oxygen doesn't affect systray gargamel Linux - Desktop 1 07-24-2011 02:33 PM
Fatal modprobe problem at boottime... doesn't affect anything derchris Linux - Newbie 4 03-23-2011 09:12 AM
iptables rules doesn't seem to affect openntpd reverse Linux - Security 14 11-25-2007 04:33 PM
Changing bash profile doesn't affect new terminal windows... SAFX Linux - Newbie 5 10-12-2004 11:51 AM


All times are GMT -5. The time now is 08:08 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration