imx8mm bluez5 obex

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

imx8mm bluez5 obex

2,741 Views
li_hong
Contributor III

Hello, Team:

   How to transfer files via bluetooth. Follow is detail.

    Core:imx8mm

    OS:yocto

    Kernel:4.14.78

    Bluez:5.49

    Obexd:0.48

I used bluetoothctl and was able to pair with the device but was unable to transfer files.  Could you guide me on the steps to test file transfer via Bluetooth .

5 Replies

2,494 Views
diegoadrian
NXP Employee
NXP Employee

Hello,

Could you please pass me the steps of how you are bringing up the Bluetooth connection.

Nevertheless, I suggest you follow the below steps to bring it up:

First, you need to edit the file:

/etc/pulse/default.pa

 

Uncomment the following line by removing the #:

#load-module module-bluetooth-discover

Then edit the file:

/usr/bin/start-pulseaudio-x11

 

Add the following line (without the +):

 

 if [ x”$SESSION_MANAGER” != x ] ; then
        /usr/bin/pactl load-module module-x11-xsmp “display=$DISPLAY session_manager=$SESSION_MANAGER” > /dev/null
    fi
  +  /usr/bin/pactl load-module module-bluetooth-discover

 

After modifying those files, just write the below commands in the serial terminal of the i.MX8MQ-EVK board to bring up-up the Bluetooth connection.

# hciattach /dev/ttymxc2 qca 3000000 flow -b -t 120 # This is for the i.MX8MQ. For another i.MX device the ttymxc2 device may be different.

 

Then wait until the Bluetooth is set up and write.

# hciconfig hci0 up

 

Finally, bring up manually the Bluetooth-discover module:

pactl load-module module-bluetooth-discover

 

After that, the Bluetooth connection is ready to be used.

Hope this information could be useful for you.

Best regards,

Diego.

0 Kudos

2,494 Views
yyc1975
Contributor III

Hi Diego,

I have OBEX issue on IMX8MQ evk.

I can connect to my phone as below.

Device 40:4E:36:A5:CC:77 (public)
        Name: U11+
        Alias: U11+
        Class: 0x005a020c
        Icon: phone
        Paired: yes
        Trusted: yes
        Blocked: no
        Connected: yes
        LegacyPairing: no
        UUID: OBEX Object Push          (00001105-0000-1000-8000-00805f9b34fb)
        UUID: Audio Source              (0000110a-0000-1000-8000-00805f9b34fb)
        UUID: A/V Remote Control Target (0000110c-0000-1000-8000-00805f9b34fb)
        UUID: A/V Remote Control        (0000110e-0000-1000-8000-00805f9b34fb)
        UUID: Headset AG                (00001112-0000-1000-8000-00805f9b34fb)
        UUID: PANU                      (00001115-0000-1000-8000-00805f9b34fb)
        UUID: NAP                       (00001116-0000-1000-8000-00805f9b34fb)
        UUID: Handsfree Audio Gateway   (0000111f-0000-1000-8000-00805f9b34fb)
        UUID: SIM Access                (0000112d-0000-1000-8000-00805f9b34fb)
        UUID: Phonebook Access Server   (0000112f-0000-1000-8000-00805f9b34fb)
        UUID: Message Access Server     (00001132-0000-1000-8000-00805f9b34fb)
        UUID: PnP Information           (00001200-0000-1000-8000-00805f9b34fb)
        UUID: Generic Access Profile    (00001800-0000-1000-8000-00805f9b34fb)
        UUID: Generic Attribute Profile (00001801-0000-1000-8000-00805f9b34fb)
        Modalias: bluetooth:v000Fp1200d1436

But when I try to follow the instructions in IMX Bluetooth Obex - Variscite Wiki, it always hung when I lunch obexctl

DBUS_SESSION_BUS_ADDRESS=unix:path=/var/run/dbus/system_bus_socket obexctl

Could you help me on it?

Best Regards,

YY. Chen

0 Kudos

2,494 Views
diegoadrian
NXP Employee
NXP Employee

Hello,

Unfortunately, the problem that you have is regarding a third party board. The software that they use is different from the ones that we use on our boards. I suggest to go with them, they could help you in a better way to solve your problem.

Best regards,

Diego.

0 Kudos

2,494 Views
yyc1975
Contributor III

Hi Diego,

Did you mean my I.MX8mq EVK is a third party board?

I thought it is the same one like here.

I also follow the instructions in i.MX_Yocto_Project_User's_Guide.pdf to download the Yocto.

IMAG2038.jpg

Did I miss something?

Best Regards,

 

YY. Chen

0 Kudos

2,494 Views
diegoadrian
NXP Employee
NXP Employee

Hello,

I apologize for the misunderstanding, that was my mistake. I get confused with the web-page that you posted. Indeed the reference board is our EVK.

Could you please try the below steps and see if that solves the problem?

Perform the below steps on your Board Console to transfer file from Board to PC:

Perform the below steps on your PC terminal to tranfer file from PC to Board:
  • $ hciattach /dev/ttymxc0 qca 3000000 flow -b -t 120
  • $ hciconfig hci0 up
  • $ hciconfig hci0 piscan
  • $ hciconfig -a
  • $ hcitool dev
  • $ bluetoothctl
    • [bluetooth]# power on
    • [bluetooth]# pairable on
    • [bluetooth]# scan on
  • Now, Copy the MAC Address of your PC
  • [bluetooth]# scan off
  • [bluetooth]# pair <mac address>
  • [bluetooth]# trust <mac address>
  • [bluetooth]# quit
  • export $(dbus-launch)
  • /usr/libexec/bluetooth/obexd -r /home/root -a -d & obexctl
  • [obex]# connect <mac address of PC>
  • [obex]# send <file>
  • [obex]# quit

$ hciconfig -a

$ hciconfig hci0 up

$ hcitool scan

Now, Copy MAC Address of your Board

$ obexctl

$ connect <MAC Address of your Board>

$ send <path_to_file>

$ quit

 

Furthermore, try installing the following Yocto packages:

   bluez5 \

   bluez5-noinst-tools \

   bluez5-obex \

   openobex \

   obexftp \

   obexpushd \

Best regards,

Diego.