Author Topic: Stuffing Serial Bluetooth Module Inside C1k Casing  (Read 320364 times)

albertr

  • Hero Member
  • *****
  • Posts: 535
    • View Profile
    • http://
Stuffing Serial Bluetooth Module Inside C1k Casing
« on: June 29, 2005, 01:04:10 pm »
Since I haven't yet read/seen any posts about success stories on the subj (except for someone who claimed he added a usb bt dongle, but didn't support it by any tech info/pics), I'm getting ready to perform a first surgery on my C1K. Time permitting, I hope to do it sometime next week (maybe on July 4th holiday weekend).

Here's a few thoughts I have on the subj:
- There's a ffuart wired up to a port on the back of the C1K (so-called sharp i/o port) that has all modem control lines. I'm leaving it as a last resort (if everything else fails), since I want to retain it for rs232 comm.
- There's a btuart in PXA270 that has CTS/RTS control lines, but it's unknown if Sharp traced it on PCB. I would guess that it would make sense to have it traced just in case, i.e. planning for future models with built-in BT, but with Sharp you never know...
- Well, it leaves us with stuart that is wired up to IRDA transmitter/diode, but doesn't have any control lines, so hardware flow control is not possible.

If btuart lines can't be traced, either rs232 or irda has to go. Personally, I don't use IRDA myself, so for me the choice is clear. But not having hardware flow control leaves us with a challange of fighting high interrupt latency of bloated Sharp's kernel to avoid fifo overruns. I took a look at Sharp's serial driver, and as usual with sharp it's ... well, not good. I had troubles with overruns even at modest speeds. Now, the good thing is that it;s Intel PXA270, not Sharp's proprientary hardware, so full tech specs are available. I spend a few hours on  "unsharp'ing" the serial driver, so now it seems to run ok. I tested it @ 460800 and not getting overruns anymore. I still need to test it @ 921600 and implement suspend/resume hooks, maybe add some hooks to front LED to show activity, etc.

Anyway, just thought it would be useful to have a dedicated thread where we all can share tech info and success stories. Please feel free to contribute... and I'll update you on status of my surgery.
-albertr
« Last Edit: June 29, 2005, 01:05:32 pm by albertr »

albertr

  • Hero Member
  • *****
  • Posts: 535
    • View Profile
    • http://
Stuffing Serial Bluetooth Module Inside C1k Casing
« Reply #1 on: June 29, 2005, 01:18:50 pm »
Here's an output of running a serial BT module connected to my C1K via external rs232 transceiver:

Code: [Select]
# cat /proc/tty/driver/serial
serinfo:1.0 driver:5.05c revision:Jun 28 2005
0: uart:PXA UART port:F8100000 irq:22 baud:460800 tx:5675 rx:12368 RTS|CTS|DTR|DSR|CD|RI
1: uart:PXA UART port:F8200000 irq:21 tx:0 rx:0
2: uart:PXA UART port:F8700000 irq:20 tx:0 rx:0
3: uart:16C950/954 port:F60003F8 irq:135 tx:0 rx:0
# btctl -v                  
bt0     00:10:60:a2:cb:8e
 Â       Name: "zaurus"
 Â       Class: 0xB2010C, Computer (Laptop) [Networking,Object Transfer,Audio,Information]
 Â       Scan Mode: discoverable, connectable
 Â       Security: service pair [-auth, -encrypt]
 Â       Packets: DM1 DH1 DM3 DH3 DM5 DH5 HV1 HV2 HV3
 Â       Role: allow switch, remain slave
 Â       Baseband:
 Â               Manufacture: Cambridge Silicon Radio, id: 10
 Â               Features: 1.1 compliant
 Â       Buffers:
 Â               ACL: 8 x 192 bytes
 Â               SCO: 8 x 64 bytes
 Â       Suported features:
 Â               Packet types: 3-slots, 5-slots
 Â               Radio features: RSSI, CQD data rate, paging scheme
 Â               Policy: switch, hold mode, sniff mode, park mode
 Â               Encryption: supported
 Â               Clock modes: slot offset, timing accuracy
 Â               Audio: SCO, HV2, HV3, u-Law log, a-Law log, CVSD, transparent SCO
 Â               Power Control: supported

# cat /proc/tty/driver/serial
serinfo:1.0 driver:5.05c revision:Jun 28 2005
0: uart:PXA UART port:F8100000 irq:22 baud:460800 tx:5800 rx:12752 RTS|CTS|DTR|DSR|CD|RI
1: uart:PXA UART port:F8200000 irq:21 tx:0 rx:0
2: uart:PXA UART port:F8700000 irq:20 tx:0 rx:0
3: uart:16C950/954 port:F60003F8 irq:135 tx:0 rx:0
#

Another thing comes to mind is how to control the power of BT module? Of course, bt draws much less then wi-fi, but still you won't probably want to shorten your battery life more than absolutely necessary. I'm thinking of trying to use some controlled power domain for +3.3V if I can find any inside C1K. I.e. irda diode or maybe sd/mmc slot? Any ideas?

-albertr
« Last Edit: June 30, 2005, 01:42:55 pm by albertr »

speculatrix

  • Administrator
  • Hero Member
  • *****
  • Posts: 3698
    • View Profile
Stuffing Serial Bluetooth Module Inside C1k Casing
« Reply #2 on: June 30, 2005, 08:51:12 am »
way to go, Albert, good luck!

could you use the control line from one of the LEDs with a PNP transister to control power to the module? Dunno if the C3/C1-000 has the same envelope/email icon + LED?
Gemini 4G/Wi-Fi owner, formerly zaurus C3100 and 860 owner; also owner of an HTC Doubleshot, a Zaurus-like phone.

euroclie

  • Full Member
  • ***
  • Posts: 205
    • View Profile
    • http://
Stuffing Serial Bluetooth Module Inside C1k Casing
« Reply #3 on: June 30, 2005, 09:12:48 am »
Quote
could you use the control line from one of the LEDs with a PNP transister to control power to the module? Dunno if the C3/C1-000 has the same envelope/email icon + LED?
No, the C3k has a hard disk activity LED on the bottom, and a battery charge LED on the top, in the left end of the chromed hinge.

That being said, there's a "Use HDD LED as Email LED" setting in the Light & Power applet, so that LED can probably be controled somehow by the end user...
Patrick

albertr

  • Hero Member
  • *****
  • Posts: 535
    • View Profile
    • http://
Stuffing Serial Bluetooth Module Inside C1k Casing
« Reply #4 on: June 30, 2005, 09:17:45 am »
C1K has two LEDs, both are software controlled, AFAIK. One is charging, another is email. I'm thinking of using the email LED to blink on uart activity.

As far as module's power consumption goes, I'll need to find +3.3V or +5V (both would work in my case) with peak load of approx. 50-80mA (@ 3.3V). I'm not sure how IRDA transmitter power is controlled and what's its peak load capability. If it can supply 80mA and can be software controlled (via some GPIO pin?) I can use it. Otherwise I'll need to find other source. If anyone has ideas on what it could be, please let me know...

On a side note, was not able to get it work @ 921600 baud, so I settled on 460800 for now.
-albertr
« Last Edit: June 30, 2005, 01:44:54 pm by albertr »

speculatrix

  • Administrator
  • Hero Member
  • *****
  • Posts: 3698
    • View Profile
Stuffing Serial Bluetooth Module Inside C1k Casing
« Reply #5 on: June 30, 2005, 06:05:35 pm »
Here's a discussion I started, which floundered, about doing the same thing for the Sl-C860
https://www.oesf.org/forums/index.php?showtopic=13238
Gemini 4G/Wi-Fi owner, formerly zaurus C3100 and 860 owner; also owner of an HTC Doubleshot, a Zaurus-like phone.

albertr

  • Hero Member
  • *****
  • Posts: 535
    • View Profile
    • http://
Stuffing Serial Bluetooth Module Inside C1k Casing
« Reply #6 on: June 30, 2005, 08:55:42 pm »
I think doing 860 would be even more challenging than C1K, since if I remember correctly the fifo size of PXA25X is half of that on PXA27X (32 vs 64 bytes).

It looks like there're only  two of us on this forum who are interested in the subject
-albertr
« Last Edit: June 30, 2005, 09:48:40 pm by albertr »

speculatrix

  • Administrator
  • Hero Member
  • *****
  • Posts: 3698
    • View Profile
Stuffing Serial Bluetooth Module Inside C1k Casing
« Reply #7 on: July 01, 2005, 02:23:21 am »
Quote
I think doing 860 would be even more challenging than C1K, since if I remember correctly the fifo size of PXA25X is half of that on PXA27X (32 vs 64 bytes).
true, but even a slow-ish bluetooth link is usable. I can understand why people bought the bluetooth air-cable, to make use of the serial port now. Pity they're relatively rare 2nd hand, and not cheap.

Quote
It looks like there're only  two of us on this forum who are interested in the subject
-albertr

three, if you include someone putting one inside a 6000 to turn it into a 6000W, so far he's put a module inside, but struggling with the power I think. But yes, a surprisingly low number considering how people rave about a clamshell with built-in wireless.
Gemini 4G/Wi-Fi owner, formerly zaurus C3100 and 860 owner; also owner of an HTC Doubleshot, a Zaurus-like phone.

daniel3000

  • Hero Member
  • *****
  • Posts: 1003
    • View Profile
    • http://
Stuffing Serial Bluetooth Module Inside C1k Casing
« Reply #8 on: July 01, 2005, 03:55:26 am »
Quote
As far as module's power consumption goes, I'll need to find +3.3V or +5V (both would work in my case) with peak load of approx. 50-80mA (@ 3.3V). I'm not sure how IRDA transmitter power is controlled and what's its peak load capability. If it can supply 80mA and can be software controlled (via some GPIO pin?) I can use it. Otherwise I'll need to find other source. If anyone has ideas on what it could be, please let me know...
[div align=\"right\"][{POST_SNAPBACK}][/a][/div]

As a power source, have a look at the CF ports. It should have 3.3V and maybe also 5V available.

I have developed a backlight upgrade for the HP 200LX which needed quite some current at 5V. I used the 5V source of the PCMCIA port of the 200LX and a GPIO line of the processor to control power using a software driver with hotkey (see [a href=\"http://www.daniel-hertrich.de/backlight/install]http://www.daniel-hertrich.de/backlight/install[/url] ).

The "power switch" was in that case built into the backlight driver chip, which I could directly connect the GPIO pin to.

For the Zaurus BT project, a simple trnsistor circuit or something like that could combine a GPIO line for  switching and the power source to a GPIO-controlled high-current power source.

daniel
SL-C3200 with weeXpc, based on pdaXrom 1.1.0beta3
HP 200LX with MS-DOS 5.0

daniel3000

  • Hero Member
  • *****
  • Posts: 1003
    • View Profile
    • http://
Stuffing Serial Bluetooth Module Inside C1k Casing
« Reply #9 on: July 01, 2005, 03:59:32 am »
Quote
It looks like there're only  two of us on this forum who are interested in the subject
[div align=\"right\"][a href=\"index.php?act=findpost&pid=86541\"][{POST_SNAPBACK}][/a][/div]


Oh, not at all! I'm very interested in this project.
The only problem for me is that I have only one C3000 and I use it for my daily work, so I cannot risk any damage to it. So I have to wait until I have a second (backup) unit some day to make such exprtiments.

I had and still have several HP 200LX units which I did many hardware hacks on (backlight, LED front light, ear phones output, IR port shielding against EMI, memory and speed upgrades, and recently of course the idea came up to attach a bluetooth module to the serial port :-)

daniel
SL-C3200 with weeXpc, based on pdaXrom 1.1.0beta3
HP 200LX with MS-DOS 5.0

Boris

  • Newbie
  • *
  • Posts: 29
    • View Profile
    • http://
Stuffing Serial Bluetooth Module Inside C1k Casing
« Reply #10 on: July 01, 2005, 04:54:59 am »
Quote
It looks like there're only  two of us on this forum who are interested in the subject
Nope, I'm sure there are a lot of interest in it.  I'll follow your's research to stick BT module in my C3000 (if it will fit in it).

speculatrix

  • Administrator
  • Hero Member
  • *****
  • Posts: 3698
    • View Profile
Stuffing Serial Bluetooth Module Inside C1k Casing
« Reply #11 on: July 01, 2005, 08:21:53 am »
Quote
Nope, I'm sure there are a lot of interest in it.  I'll follow your's research to stick BT module in my C3000 (if it will fit in it).

might be harder in the C3000 - the C1000 has all the space where the microdrive would be.
Gemini 4G/Wi-Fi owner, formerly zaurus C3100 and 860 owner; also owner of an HTC Doubleshot, a Zaurus-like phone.

albertr

  • Hero Member
  • *****
  • Posts: 535
    • View Profile
    • http://
Stuffing Serial Bluetooth Module Inside C1k Casing
« Reply #12 on: July 01, 2005, 08:52:43 am »
The backlight mod that you did is pretty cool. Complexity-wise, adding a serial bluetooth module shouldn't be that hard. Hardware changes are minimum, it's mostly all software to get it run reliably. As far as CF slot goes, I think it's 3.3V only in C1K (860 might have both 3.3V & 5V). Regardless, it's a dedicated power domain and it's controlled by pcmcia sybsystem, i.e. power is on on insert/resume pcmcia events, power is off on remove/suspend events, so it can't be used for other purposes which require its own power control.

I'm still not sure where to draw power from. I would like to have software control over it. If nothing suitable found, I might end up pumping it from sd/mmc slot (assuming that sharp's sdmmc driver didn't turn it off when card is removed). Any other ideas?
-albertr
« Last Edit: July 01, 2005, 08:56:19 am by albertr »

Da_Blitz

  • Hero Member
  • *****
  • Posts: 1579
    • View Profile
    • http://www.pocketnix.org
Stuffing Serial Bluetooth Module Inside C1k Casing
« Reply #13 on: July 01, 2005, 11:35:29 pm »
i am still intrested in the internal usb ports that could be used (the pxa had 3 host ports and one client that could be multiplexed with one of the host ones) however these werent balanced lines so were basically the D+ line without the D- one so some dongles may not work with it

i belive thats what the guy who did the mod connected it to. which would be great as then i could have another usb port for bluetooth, wifi or anything else i like, i do remeber him mentioning power bieng a problem but you can get that from the usb mini port
Personal Blog
Code
Twitter

Gemini Order: #95 (roughly)
Current Device: Samsung Chromebook Gen 3
Current Arm Devices Count: ~30
Looking to acquire: Cavium Thunder X2 Hardware

albertr

  • Hero Member
  • *****
  • Posts: 535
    • View Profile
    • http://
Stuffing Serial Bluetooth Module Inside C1k Casing
« Reply #14 on: July 06, 2005, 08:54:29 pm »
Sorry, was busy with other projects last weekend....
-albertr