BlueUSB - Bluetooth and USB Host controller for mbed

How many things can you plug into an mbed? Lots if you have a USB host that supports hubs and Bluetooth dongles.

This demo setup has 9 devices plugged into an mbed running BlueUSB. The devices are:

1. 7 Port USB Hub

2. 4 Port USB Hub

3. MicroSD card in reader

4. Prolific serial cable

5. CSR Bluetooth dongle ($1-$2 on ebay)

6. USB keyboard

7. Bluetooth Wiimote

8. Apple Bluetooth mouse

9. USB mouse

10. The mbed itself.

All the devices are up and running simultaneously and can be hotplugged. The only additional hardware required for the mbed was 2 15k resistors and a USB connector.

The LCP1768 has pretty capable USB host hardware that supports DMA and the BlueUSB stack does not stress the CPU when the bits are flying. The API is designed to work without threads or a heap and is pretty portable.


73 comments

10 Apr 2010

Dude,

You are insane! This is really great work!!

Magnificent! :D

/ Lerche

10 Apr 2010

Awesome! How would I go about adding support for serial (CDC-ACM) devices?

10 Apr 2010

Igor Skochinsky wrote:

Awesome! How would I go about adding support for serial (CDC-ACM) devices?

+1

11 Apr 2010

Jason Engelman wrote:

 

Igor Skochinsky wrote:

Awesome! How would I go about adding support for serial (CDC-ACM) devices?

+1

 

Have at it!. I have tried to make the host api as simple as possible, I was going to add virtual serial ports and rndis when I get back from vacation but if you guys wanna take a crack I am all for it.

23 Apr 2010

I brought a CP210x usb -> serial device from spark fun. Ive started port bits of linux driver into your code, and things seems to work. As I have the 4 gpio pins working. But have no idea what the the usb urb structure is all about? Anyone been here before as looks like I will need to implement something like this

30 Apr 2010

The CP210X uses 2 bulk endpoints for read/write. You shouldn't need much more than a USBBulkTransfer write on interface 0x01 and a async USBBulkTransfer on the in 0x81 endpoint. I have a few other serial cables lying about but won't have time to get to it until next week.

11 May 2010

Hi Peter,

I am planning to have fun with BlueUSB and a wiimote. I have had a look to the documentation and LCP1768 mbed can be connected directly to the USB connector. I cannot figure out why you had to use 2x15k resistors ?

One question regarding the USB Bluetooth stick : you are using a CSR dongle, is this a limitation ?

I would be delighted if you could share more details on how to make the communication with the wiimote, that would help a lot.

Thanks

 

 

14 May 2010 . Edited: 14 May 2010

 

FACON Melaine wrote:

Hi Peter,

I am planning to have fun with BlueUSB and a wiimote. I have had a look to the documentation and LCP1768 mbed can be connected directly to the USB connector. I cannot figure out why you had to use 2x15k resistors ?

One question regarding the USB Bluetooth stick : you are using a CSR dongle, is this a limitation ?

I would be delighted if you could share more details on how to make the communication with the wiimote, that would help a lot.

Thanks

 

 

2 x 15k resistors are needed to pull the USB D+ and D- to ground when you configure the mbed USB controller as a host.

 

See Fig 35, page 274 of the NXP ref manual for the LPC1768.

(The 2 x 33R series resistors are already present on the mbed module.)

17 May 2010

nice work,

anyone planning to use the BT stack from an Andriod powered phone ?

some work is progressing using it with an Arduino... http://code.google.com/p/android-bluetooth/  but im a Java noob, some it might be an uphill climb... :-/
Would be cool to control stuff using an mBed and an android phone though...

 

/Morten

31 May 2010

Peter Barrett wrote:

The CP210X uses 2 bulk endpoints for read/write. You shouldn't need much more than a USBBulkTransfer write on interface 0x01 and a async USBBulkTransfer on the in 0x81 endpoint. I have a few other serial cables lying about but won't have time to get to it until next week.

Pete or any other USB expert?

Ive got the baudrate settings working, and function to enable the uart. I would of thought the below would let me at least see an incoming stream. Stuck? it doesn't really error or give me any output.

for (;;)
{
         r = USBBulkTransfer(device,0x81,(u8*)data2,64);
    if (r > 0)
    {
        nBytes += r;
        printf("--> %d",data);
    }
    if (nBytes >= 1048575) break; // Break at 1MByte 
}


04 Aug 2010

I am trying this out for the first time. It seems to be getting usb data ok judging from the normal hid stream from a usb keyboard (through a hub) but it is constantly printing the message " ProcessDoneQueue status".  Is this some kind of verbose message? When I plug in a bluetooth dongle, it does the same thing. At the start it sends "ProcessDoneQueue status  82 5  Inquiry Complete 1: 01  CALLBACK_INQUIRY_DONE then an infinite ProcessDoneQueue status  82 5 messages. Anybody got anything off the top of their heads?

regards

17 Aug 2010

I did find the routine sending the message and commented it out and it does seem to work quite nicely. I am not a bluetooth expert. I would like to figure out how to make the mbed use what ever device it last paired with but I haven't figured that out yet. Following something with very limited debug features is kinda tough. Any suggestion would be appreciated.

27 Sep 2010

Hi,

 

Great work ;-)  Got a wiMote connected, but im having problems using the Blueusb, when the mbed is powered 'normally' (w.o. the usb cable).

 

I thought it might be due to blocking getchar/putchar functions, but have em all commented out (rather timeconsuming using the mBed copile/editorr ;-/ ), and still i can only connect the wiiMote, when the mbed is plugged into mc PC's USBport.

Any ides, what causes it to hang ?

The plan is to use it as standalone, on a robot.....

27 Sep 2010

How are you powering the USB socket? If you're using the VU pin, note that it's powered from the USB cable. If you use independent power, you'll have to power the USB socket separately.

27 Sep 2010

user Igor Skochinsky wrote:

How are you powering the USB socket? If you're using the VU pin, note that it's powered from the USB cable. If you use independent power, you'll have to power the USB socket separately.

That did the trick, thanx ;-)

10 Oct 2010

I am new to Bluetooth. I have connected a Bluetooth USB onto mbed andI have the following msg (after commenting out the "ProcessDoneQueue status  82 5", otherwise, this msg loops forever). After the msg, I power on my WiiRemote and a Bluetooth headset, nothing happen. I tried to enter commands like list, scan and enquiry. Nothing happen. What is the normal behaviour when I power up a Wii Remote?

many thanks

Derek

======================================================

Now get a bunch of usb or bluetooth things and plug them in

USB INIT (Controller is 1396 bytes)

HubStatusChange Hub:0 Port:1 00010101

ResetPort Hub:0 Port:1

HubStatusChange Hub:0 Port:1 00100103

Connect Hub:0 Port:1 full

 

Class E0 found 0A12:0001

 

AddEndpoint D:01 A:00 T:00 P:0040 I:00

AddEndpoint D:01 A:81 T:03 P:0010 I:01

AddEndpoint D:01 A:82 T:02 P:0040 I:00

AddEndpoint D:01 A:02 T:02 P:0040 I:00

LoadDevice 1 E0:01:01

Bluetooth inserted of 1

Inquiry..

scan

eh? scan

10 Oct 2010

Press the 'connect' button, under the battery cover on your WiiMote, reset the Mbed, and it ought to connect...

10 Oct 2010

I tried to press the red button inside the WiiMote but still, nothing happen. All the wirings look good. It just says:

 

LoadDevice 1 E0:01:01

Bluetooth inserted of 1

Inquiry..

 

Do I need to do anything such as pressing any key beside trying to pair a bluetooth device such as WiiMote to the mbed board?

 

10 Oct 2010

I connected a USB mouse to it and it works fine. Only the Bluetooth USB thing doesn't work. I have confirmed the Bluetooth USB adaptor is working on a Windows XP. Do I need any specific Bluetooth USB adaptor. Mine is generic one with a half circle shape.

10 Oct 2010

I had the same problem when I originally tried to use it with a keyboard and after looking around using printf statements it just suddenly started working. After I took out the printf statements it still worked. It has run for a few months now and worked great just so long as I re-pair it when I hit the reset button. I have never figured out how to get it to accept the last device used.

Wow! Amazing!

I'm new to USB. Could it be possible to access an USB camera, too? If so - how?

Thanks and regards.

Hi there!

I'm asking for an integration of an camera because I've rewritten the RPC stuff for .NET. Maybe the stream could be redirected over RPC from mbed to a microsoft device (phone7, micro framework, CE or something like this)? If you know something about how to handle a camera - let me know, please. Or is a cam no HID? Thanks.

Cheers!

Stanislaus

22 Oct 2010

@Stanislaus Some usb cameras are high speed only and wont work on the lcp17xx. Others would work; did you have a specific device in mind?

http://read.pudn.com/downloads77/ebook/293318/USB%20Video%20Class%201_1/USB_Video_FAQ_1.1.pdf

 

Hi Peter,

no specific camera in mind. I want to use a serial camera - like Mr. Nakamura described in his article (http://mbed.org/users/shintamainjp/notebook/camera_c328_en/). But all (not to expensive) serial cameras are sold out. So I had the idea to use a USB camera and to redirect the data stream (320x200 pixel@8or15 if possible 20 FPS) to a Phone 7 app or to a PC - or only one picture. Don't know what's possible in general and with mbed? Thanks for the link you posted. I'll try to get more informations there. This is a starting point. Thank you for helping.

10 Nov 2010

I am trying out connecting a mass storage device to the hub and am constantly getting the message

ProcessDoneQueue 00 5E040000
ProcessDoneQueue status 00 5

FAILED TO LOAD DESCRIPTOR FOR DEVICE 0
========RETR
Y ADD DEVICE========
Disconnect Hub:0 Port:1
ResetPort Hub:0 Port:1

 

In fact I am getting the same message If I connect anything else as well to the hub or directly... I have used 2 15K resistors as documented above and am taking the USB power from MBED via pin 39. The MBED is powered via USB connection to PC.

 

THe USB error code says

DeviceNotEnoughPower       = 5,

Am I supposed to power the USB from some other source? Is this the main issue here
12 Nov 2010

user C Company wrote:

I am trying out connecting a mass storage device to the hub and am constantly getting the message

ProcessDoneQueue 00 5E040000
ProcessDoneQueue status 00 5

FAILED TO LOAD DESCRIPTOR FOR DEVICE 0
========RETR
Y ADD DEVICE========
Disconnect Hub:0 Port:1
ResetPort Hub:0 Port:1

 

In fact I am getting the same message If I connect anything else as well to the hub or directly... I have used 2 15K resistors as documented above and am taking the USB power from MBED via pin 39. The MBED is powered via USB connection to PC.

 

THe USB error code says

DeviceNotEnoughPower       = 5,

Am I supposed to power the USB from some other source? Is this the main issue here
I got ti working now, I realised I had connected the resistors wrongly

30 Nov 2010

Hi Peter,

I have downloaded the USB COM port device deriver (mbedWinSerial_16466.exe) and tried to install.

The system “Windows XP 2002 SP3” says the following:

 

What should I do?

03 Dec 2010

Hello all. I´m new on this type of host connection. Your BlueUSB it´s great . I test wiimote connection and move a servo with. I test usb hardisk and make a big datalogger and other programs. The only that  can´t is connect with a PC with a serial profile or other Bluetooth serial module  . Do you can do this with your library?

I have a circuit of quadcopter and mbed is perfect for this, now i use the standard radios i would use the bluetooth transport.

Have a nice day

Thanks

11 Dec 2010 . Edited: 11 Dec 2010

Hello all, Your library works well. Big thanks !!!

I'm trying to connect mbet to IMac with bluetooth on ubuntu with bluez and python.

I make a server listening for L2CAP connection  on channel 4097

Now i'm trying to modiffy your code.

I think the best place to insert mycode is in ConnectionComplete of testshell

But i'm new to c++.

I woult like something like

bt.open(server_addr, 4097);

bt.write("hello");

bt.close();

Please, could you give me some guidelines to achieve this ?

Should i make a  new class "Simple Bluetooth" like hidBluetooth ?

Or should i wait for RFcomm protocol ?

Thanks

 

 

11 Dec 2010 . Edited: 11 Dec 2010
Hi Peter, Your BlueUSB library is very good!! I controlled a m3pi with a Bluetooth keyboard. Thanks
15 Dec 2010
user Peter Barrett wrote:
I was going to add virtual serial ports and rndis

Hi Peter

Can you give some ideas how virtual serial ports would be added? Would it be feasible to make a bluetooth serial connection to a mobile phone (to make use of GPRS/GSM modem)? How does one go about pairing in this situation?

Thanks
Daniel

26 Dec 2010

I'm new to mbed and I would like to use this library. Can somebody  give me some advice on how to start using it?

31 Dec 2010

Hallo,

where can I find how you to connect the mbed with the usb connector .

Fig 35.shows the USB OTG port configuration whithout pullup resistors.

Fig 36. shows the  USB host port configuration with 15K pull-up  but also with a LM3526-L for the VBus.

Did you connect VBus direct to 5 Volt ?

Thanks

Bernhard

07 Jan 2011 . Edited: 07 Jan 2011

Has anyone managed to write/integrate simple FTDI or similar drivers for serial comms yet?

I would like to use the USB pins for telemetry rather than wasting the second I2C port for my sensors in a port of some multicopter code (UAVX).

Thanks

Greg

18 Jan 2011

Hi Peter,

 

I have got new mbed board. I want  to test blueUSB. How Can I power mbed board when I am using USB host. and how to load compiled bin file when using as USB host.

 

Thanks in advance

Kiran Jammula

28 Jan 2011

Has anyone managed to get Isochronous  transfers to work on top of blueusb?

Andrew Clark

 

10 Feb 2011

Hi,

i want to know that can i use mbed as host device for usb modem stick (3G connection) it will be so amazing. But i dont know anything about usb modem sticks. I think Peter Barrett can figure it out.

??
03 Mar 2011

Hi Peter,

Would it be possible to change the Bluetooth MAC address through your software?
I see that your software reads the MAC, but could it be written too? And the softreset the device to enable the new addr?

Regards,
Lerche

08 Mar 2011 . Edited: 15 Mar 2011

Hi Peter,

I'm using your stack to interface to a CDC device. This type of device exposes two interfaces: a communication class with an interrupt endpoint and a data class with two bulk endpoints. Your stack only looks for interface zero and hence misses the two important bulk endpoints. I could easily fix it in your code but I was wondering why the restriction to interface 0 was there and if there is a way to use the second interface with API calls instead of meddling with your code.

regards,

Ad

 

15 Mar 2011

Hi Peter,

I tried to connect the mBed running BlueUSB with my Nokia E71 but it seems not succesful.

The board got the respond from E71, got Bluetooth Address, created connection but then it returns 'Unknown Event' and disconnect.

The communication as below, can you take a look and give me an advice. Thank you in advance!

HCI_EV_CMD_COMPLETE 6: 0E 04 01 03 0C 00
HCI_EV_CMD_STATUS 6: 0F 04 00 01 01 04
HCI_EV_CMD_COMPLETE 13: 0E 0B 01 05 10 00 53 01 80 08 00 02 00
HCI_EV_CMD_COMPLETE 12: 0E 0A 01 09 10 00 10 A3 15 83 15 00
SEND HCI_OP_INQUIRY: 33 8B 9E A 5 
HCI_EV_CMD_STATUS 6: 0F 04 00 01 01 04
HCI_EV_INQUIRY_RESULT 16: 02 0F 01 BE 8A D9 66 22 00 01 02 00 0C 02 5A D9
CALLBACK_INQUIRY_RESULT 00:22:66:D9:8A:BE

HCI_EV_INQUIRY_COMPLETE 3: 01 01 00
CALLBACK_INQUIRY_DONE
DEVICE CLASS 3: 0C 02 5A
Connecting to 00:22:66:D9:8A:BE
HCI_EV_CMD_STATUS 6: 0F 04 00 01 05 04
Status HCI_OP_CREATE_CONN OK
HCI_EV_CONN_COMPLETE 13: 03 0B 00 01 00 BE 8A D9 66 22 00 01 00
BT and HID: 10000358 10000290

SEND CMD: 13 40 0 0 1ADF 0 110 1000 
SEND CMD: 11 41 0 0 1ADF 0 124 1000 

OPEN DEVICE CLASS 3: 0C 02 5A
Unknown Event 5: 1B 03 01 00 05
L2CAP_CONN_RSP

Result 2
/* Print data buffer */ 
Data len: 32
1 20 1C 0 18 0 1 0 3 0 8 0 0 0 40 0 2 0 0 0 3 1 8 0 0 0 41 0 2 0 0 0 
Connect failed?
HCI_EV_NUM_COMP_PKTS 7: 13 05 01 01 00 01 00
HCI_EV_NUM_COMP_PKTS 7: 13 05 01 01 00 01 00
HCI_EV_DISCONN_COMPLETE 6: 05 04 00 01 00 13

 

27 Mar 2011 . Edited: 27 Mar 2011

Hello Peter,

I'm having a little bit of trouble getting your library to work. All I have plugged in is a USB bluetooth adapter. When I begin the program the output begins:

BlueUSB
Now get a bunch of usb or bluetooth things and plug them in
USB INIT (Controller is 1396 bytes)
HubStatusChange Hub:0 Port:1 00010101
ResetPort Hub:0 Port:1
HubStatusChange Hub:0 Port:1 00100103
Connect Hub:0 Port:1 full
ProcessDoneQueue status 00 5
FAILED TO LOAD DESCRIPTOR FOR DEVICE 0

Then it repeats this over and over again.

 

========RETRY ADD DEVICE========
Disconnect Hub:0 Port:1
ResetPort Hub:0 Port:1
HubStatusChange Hub:0 Port:1 00100103
Connect Hub:0 Port:1 full
ProcessDoneQueue status 00 5
FAILED TO LOAD DESCRIPTOR FOR DEVICE 0

I haven't figured out how to fix the problem and I was hoping that you could help.

28 Mar 2011

Hi Paul,

It looks like you don't use the Bluetooth USB with CSR chip. I tried 2 USB Bluetooth, 1 can connect, other can't.  The working USB bluetooth is with CSR chip. I don't know the other one.

Hope that it helps!

Hieu

26 Apr 2011

An attempt to add PS3 Sixaxis support: http://mbed.org/users/BartJanssens/programs/PS3_BlueUSB/lq9h2h

27 Jun 2011

Does it work with a particular USB hub? I've Gear Head 4-port USB 2.0 hub, and I don't see anything on serial terminal. I even tried without the hub, and nothing either. However, when I tried MSCUsbHost sample program, it works without the hub, but gave error message (I think) saying "In Host_Init Initializing Host Stack Host Initialized Connect a Mass Storage device".

Also, I tried with 15K pulldown resistors and without and MSCUsbHost program works either way. So do I need it? I'm using Cool Components workshop board, but my soldering for the two jumpers was a blob mess. :)

27 Jun 2011

I use BlueUSB with hub and without and that works. The 15k resistors are to reliably detect plugging and unplugging. The example BlueUSB code of Peter Barrett is supposed to work with USB Mass Storage Devices. There are posts in the forum that this doesn't work. The code "as is" didn't work for me either. I haven't tried MSUsbHost but I think it is based on the same source (FatFileSystem).

27 Jun 2011 . Edited: 27 Jun 2011
@ Alex Chen // I even did not manage to get the Bluetooth System to run with a USB Stick. My system (myBLUEUSB from Ad van der Weiden) is also running on a Cool Components Workshop board with and without pullups. But the USB Mass Storage is not working at all. I am collecting Data from a Bluetooth GPS transmitter and a Wii Remote. Both work perfect. I also tried the BlueUSB code of Peter Barrett which also did not work. The only software is really the MSCUsbHost which works with several USB Sticks. So in lack of help i installed a second system system on the base of a normal second serial port, installed some new encoders and gyros, installed a 4Gb USB Stick and everything works perfect. It is really a pity but I am seriously thinking of forgetting the Bluetooth stuff but i am still not giving up.
28 Jun 2011 . Edited: 28 Jun 2011

Hey,

just simple question to make sure: Will this work on LPC2368 mbed board?  As I understand it wouldnt right?

Because I just wanted to use usb bluetooth dongle on it but cant get it working, and recently read some things that there is less functionality on USB on LPC2368. Is there any other way to use bluetooth dongle on LPC2368 to have conectivity via bluetooth?

Cheers,

28 Jun 2011

Not 100% sure but it appears that the 2368 has no USB host interface so a standard USB BT dongle cannot be used. If you need BT, look for a serial to BT interface.

28 Jun 2011

Yep, no host on the 2368 :/

29 Jun 2011

I had a look into the MassStorage.cpp that comes with BlueUSB and apparently is not working right (File system borked error). The system was built for bulk-only transfers and some transfers return -102 (ENDPOINT_NOT_FOUND). My USB stick uses endpoints 0x02 and 0x81, the program from Barrett uses 0x01 and 0x81. Unfortunately these addresses are hardcoded and in one case even computed (flags|1). Nevertheless with a proper define of the endpoints and 3 little changes to DoSCSI, I got the listing of the root directory of my stick. It would of course be much nicer if the program would figure out the endpoints by itself. The functions SetConfigurationAndInterface and AddEndpoint in USBHost.cpp actually read the endpoint descriptors and even store the addresses in internal data structures, they are however not easily accessible to user programs.

29 Jun 2011 . Edited: 29 Jun 2011

I have it automatic now. The interface descriptor is parsed again in 'OnLoadDevice', the ep addresses are extracted and passed as extra parameters to 'OnDiskInsert'. USBFileSystem now also derives from USBSCSI which wraps all the non-OOP stuff in MassStorage.cpp. USBSCSI has the endpoints and the device as members, so the device parameter is removed from all members except 'SetDevice'.

'main' looks now like this:

<<code>>


class USBFileSystem : public FATFileSystem, public USBSCSI
{
    //int _device;
    u32 _blockSize;
    u32 _blockCount;
   
public:
    USBFileSystem() : FATFileSystem("usb")/*,_device(0)*/,_blockSize(0),_blockCount(0)
    {
    }
/*   
    void SetDevice(int device, unsigned char in, unsigned char out)
    {
        _device = device;
    }
*/   
    virtual int disk_initialize()
    {
        return SCSIReadCapacity(&_blockCount,&_blockSize);
        //return MassStorage_ReadCapacity(_device,&_blockCount,&_blockSize);
    }
   
    virtual int disk_write(const char *buffer, int block_number)
    {
        return SCSITransfer(block_number, 1,(u8*)buffer,_blockSize,HOST_TO_DEVICE);
        //return MassStorage_Write(_device,block_number,1,(u8*)buffer,_blockSize);
    }
   
    virtual int disk_read(char *buffer, int block_number)
    {
        return SCSITransfer(block_number, 1, (u8*)buffer, _blockSize, DEVICE_TO_HOST);
        //return MassStorage_Read(_device,block_number,1,(u8*)buffer,_blockSize);
    }
       
    virtual int disk_sectors()
    {
        return _blockCount;
    }
};

void DumpFS(int depth, int count)
{
    DIR *d = opendir("/usb");
    if (!d)
    {
        printf("USB file system borked\n");
        return;
    }

    printf("\nDumping root dir\n");
    struct dirent *p;
    for(;;)
    {
        p = readdir(d);
        if (!p)
            break;
        int len = sizeof( dirent);
        printf("%s %d\n", p->d_name, len);
    }
    closedir(d);
}

int OnDiskInsert(int device, unsigned char in, unsigned char out)
{
    USBFileSystem fs;
    fs.SetDevice(device, in, out);
    DumpFS(0,0);
    return 0;
}
<</code>>

01 Jul 2011
After changing the 'main' module to your suggestions i cannot compile my source anymore. As i am C++ newbie it is difficult for me to understand what is wrong and what is right. These are the errors: "not a class or struct name" in file "main.cpp" pointing to USBSCI" "argument of type "u32 *" is incompatible with parameter of type "int" pointing to SCSIReadCapacity(&_blockCount,&_blockSize); and so on. Must the lib myUSBHost be changed completely ?
01 Jul 2011

Yes, this is not the complete program but just an indication of how I solved it. As I said the underlying problem is the addresses of the endpoints. The endpoints are shown right after reset (something like A:81). These endpoints appear in DoSCSI in three places, the easiest solution is to fix it manually (for your stick). The automatic solution involves changes to MassStorage and AutoEvents as well.

01 Jul 2011

@voy ager

I republished the program and libraries, I hope you can piece everything together.

01 Jul 2011
@ Ad Thanks Ad, could put everything together. Works perfect.
01 Jul 2011
After 11 Hours the mbed Bluetooth System stopped working. The BT GPS is still sending data. I can follow that on a second computer. But the mbed is just hanging. What a success. I really think the whole system is not very reliable.
01 Jul 2011

Hm, sorry to hear that. Maybe there is a small memory leak. How about printing the available memory every 15 minutes. There can be a real leak or possibly huge fragmentation. The first one we have to find, the latter we may be able to solve with fixed buffers. On the other hand it may have a totally different cause.

01 Jul 2011

BTW I think you are right about the reliability, the myBlueUSB is pieced together from different sources plus some of my own. If someone would pay me the right price I would invest some months to do it properly. But I guess a commercial stack would be a lot cheaper then. But hey, it's open source, I extended and improved the work of Barrett (who probably didn't start from scratch either), anybody should feel free to improve it further.

06 Oct 2011 . Edited: 06 Oct 2011

 

Hi

I connected the mbed in host mode to a keyboard. It works, but I have the callback function continuously called (AutoEventCallback) with the

u8 auto_keyboard[8]

 

structure updated, is there a way of decoding in ASCII and getting the sentence until a Key Enter press ?

my iinterest is to use a RFID USB reader (which works as a HID) but I have only this when I connect and the standard programm do not have an AutoEvent or so...

USBShell
Now get a bunch of usb things and plug them in
USB INIT (Controller is 1396 bytes)

HubStatusChange Hub:0 Port:1 00010301
ResetPort Hub:0 Port:1
HubStatusChange Hub:0 Port:1 00100303
Connect Hub:0 Port:1 slow

Class 00 found 0419:0912

AddEndpoint D:01 A:00 T:00 P:0008 I:00
Skipping descriptor 21 (9 bytes)
AddEndpoint D:01 A:81 T:03 P:0008 I:0A
LoadDevice 1 03:01:01
1: NewRoad Sem.
2: NewRoad System PS2 Interface
Auto Event for 81 00030101
Do I have to write a particular piece of code, thanks for your kind help.

Best regards

Lotfi


02 Nov 2011

Hello Peter,

Is it possible to emulate a bluetooth HID keyboard? It would be really interesting to create bluetooth remotes for telephones.

Thanks, Raisin

18 Nov 2011
Hello Peter, I think I want to send the state of the switch on the pc from mbed Blutooth. What should I do? Is it OK if you change the Testshell?
27 Dec 2011
man, is it possible connect (using this program)a cellphone(through bluetooh) and the mbed which uses usb-bluetooth dongle?
28 Dec 2011
is (1) connected to miniUSB mbed port?
14 Jan 2012

Hi Hieu Bui,

The problem with the Nokia E71 and blue-tooth connections is well known, it's kind of general issue in the Nokia firmware of the E71,

i've got this problem too, sometimes it even works for a while. It drives you nuts. I've had this connection problem with my headset, with my Garmin-GPS and also with my CAR-kit. All the same; so start looking with google i've found the problem is the Nokia E71 (on their own forum), they only connect to stuff from Nokia, only the original frimwareversion wouldn't have this problem. So, when you'll have another phone you can start again ;-)

Nokia has even an free update for BMW to fix the connection problem with the GPS. Unbelievable.

Good day! I'm from Argentina and wanted to know if there is any explanation of BlueUSB code or a tutorial, because I find it very difficult to code and way too enteder especially complicated to me the translation into Castilian. From already thank you very much! Lucas E. Blanco
05 Aug 2012 . Edited: 05 Aug 2012

Hello, I'm having some problems that can not solve. I can't connect in other device and I don't know why. Does anyone have an idea? And soon, how can I accept a transfer of other device(Ex: A photo)?


Connecting to 00:1F:81:00:02:DD
Status HCI_OP_CREATE_CONN OK
Status HCI_OP_CREATE_CONN OK
Connected on 0001
ConnectionComplete D4:CB:AF:58:BC:B91000035c 100002e4
L2CAPAddr size 8
Socket_Open size 8
OPEN DEVICE CLASS 3: 0C 02 5A
L2CAP_CONN_RSP Result 2
Connect failed?
14 Aug 2012

Does the latest BlueUSB support read and write to a mass storage device through a hub?

Does somebody have a working program to share?

Also, I want to connect a USB GPS device that normally presents itself to a PC as a USB virtual serial port, at 4800 baud, as I recall, to the hub to read lat, lon, etc.

Does BlueUSB support virtual comm type connections in some manner?

If so, does anybody have a working program to share?

Thanks a bunch.

11 Sep 2012
Because it is not suitable for the new version of the compiler this program, please update
30 Dec 2012

Greetings Guys:

I am interested in looking at and studying up on the class blueUSB.  Is it a cless that is already in the compiler?

I will try and keep a look for an answer on here but if you dow have the answer please send it to me at triad@wowway.com.

 

Thanks

 

triad

 

 

 

30 Dec 2012

There is a link directly under the picture with the code.

14 Jan 2013

Hiya,

Apparently, CSR dongles will work and Toshiba chipsets won't. I accidentally bought a Toshiba one and it didn't work. I'll get my hands on a CSR one and give that a go instead!

Cheers,

Liz

04 Feb 2013

Hi...

I got the WiiMote to work fine, but now I want the Nunchuck to work also. I tried to se if the data was on d[?] but it seems as there is only data from the Wiimote.

Anyone got an idea on how I access the data from the Wii Nunchuck?

Best regards

Jesper Jakobsen - Denmark

10 Mar 2013

Hello,

Is Blue USB compatible with a newly added mbed board i.e. the FRDM-KL25Z ?

I am looking to connect a Thumbdrive to it to log analog measured data.

Thanks !

You need to log in to post a comment