New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 800523 link

Starred by 1 user

Issue metadata

Status: Assigned
Owner:
Last visit > 30 days ago
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug



Sign in to add a comment

[chameleon] POR-1007BT audio board

Project Member Reported by rjahagir@chromium.org, Jan 9 2018

Issue description

Following the instructions from 'Setup Chamelium Info' to enable the audio board on chameleon. However, the following step:

Use the interactive script ~/trunk/src/platform/chameleon/client/test_server to connect to chameleond server.
~/trunk/src/platform/chameleon/client/test_server --chameleon_host=<chameleon ip>

resulted in 'No route to host' error, even though I can easily ssh and start python on the chameleon board itself. 

Is there a way to enable/disable audio board via ssh'ing into chameleon board itself? If not, what's going wrong in the test_server script? 
 
Summary: [chameleon] test_server.py "no route to host" error (was: test_server.py "no route to host" error)
I think it is because the network environment does not allow port 9992.
You will need to create a ssh tunnel first to access port 9992 on chameleon_host.
e.g.

ssh -L 12345:localhost:9992 chameleon_host

Then, test_server --chameleon_host=127.0.0.1 --port 12345
should connect to 9992 port on chameleon.


ref: https://blog.trackets.com/2014/05/17/ssh-tunnel-local-and-remote-port-forwarding-explained-with-examples.html

There is similar ssh tunneling in autotest repo.
https://cs.corp.google.com/chromeos_public/src/third_party/autotest/files/server/hosts/abstract_ssh.py?type=cs&q=autotest+ssh+tunnel+package:%5Echromeos_public$&l=920
Thanks Jimmy, will give it a try. 
My chameleon host ip is 192.168.100.1

On my workstation, in one console:

ssh -L 12345:localhost:9992 192.168.100.1

In another console:
./client/test_server.py --chameleon_host=127.0.0.1 --port 12345 

It works :)
If error message is like

socket.error: [Errno 111] Connection refused


Then that must be chameleon server error.

On chameleon you can check

tail -f /var/log/chameleond

if there is any error message, or does server start up successfully waiting for request
The message should look like this when server start up fine:

2018-01-11 10:17:44,534 INFO Listening on 0.0.0.0 port 9992...
2018-01-11 10:17:44,538 INFO Caching server serves forever...

If server looks bad, restart it and try again:

/etc/init.d/chameleond restart

to restart the server.
Thanks Jimmy, I was able to use SSH tunneling to get the MAC addresses for four boards. However, I ran into some issues:

1. chromeos15-row1-rack5-host3-chameleon
I was able to get the MAC address for this but the associated name was "POR-1007BT", and not the expected "SX3868-3Y". These chameleons are in wifi-cells so the only BT devices discovered should be chameleon boards. 

2. chromeos15-row1-rack5-host4-chameleon
I was unable to find the MAC address for this audio board. The only signal I could find was the RN42 kit signal (RNBT) despite repeated attempts. The p.AudioBoardResetBluetooth and p.AudioBoardDisableBluetooth commands were executed without complaint. Could this be due to a weak audio board connection? 

3. chromeos15-row1-rack5-host2-chameleon and chromeos15-row1-rack4-host1-chameleon
I was unable to SSH into these boards despite being able to ping them. My hunch is that these boards do not have chameleond running and need to be reimaged.
I was able to ssh into the two chameleons in #3 and got an error that they were missing audio boards. I'll have to look into replacing these chameleons with ones that have audio boards. 

Traceback (most recent call last):
  File "<console>", line 1, in <module>
  File "/usr/lib/python2.7/xmlrpclib.py", line 1243, in __call__
    return self.__send(self.__name, args)
  File "/usr/lib/python2.7/xmlrpclib.py", line 1602, in __request
    verbose=self.__verbose
  File "/usr/lib/python2.7/xmlrpclib.py", line 1283, in request
    return self.single_request(host, handler, request_body, verbose)
  File "/usr/lib/python2.7/xmlrpclib.py", line 1316, in single_request
    return self.parse_response(response)
  File "/usr/lib/python2.7/xmlrpclib.py", line 1493, in parse_response
    return u.close()
  File "/usr/lib/python2.7/xmlrpclib.py", line 800, in close
    raise Fault(**self._stack[0])
Fault: <Fault 1: "<class 'chameleond.drivers.fpga_tio.DriverError'>:There is no audio_board">

Owner: rjahagir@chromium.org
- chromeos15-row1-rack5-host3-chameleon:

I have not seen chameleon board reported itself as POR-1007BT
I found that it is of XS3868 module:

http://www.instructables.com/id/BluFi-Portable-Bluetooth-Audio-Adapter/

"The XS3868 module, by default, shows up as POR1007BT when searched-for by any device."

So, I think that audio board has installed a incorrect BT module on it during manufacturing.
We should replace that.

- chromeos15-row1-rack5-host4-chameleon:
In such case you will need to check whether the led for BT power is on.
Reboot chameleon and replug audio board might help.

- chromeos15-row1-rack5-host2-chameleon and chromeos15-row1-rack4-host1-chameleon:

Their chameleond are up and running.

There are three levels of access:

1. Able to ping a chameleon: Chameleon has got IP and replies to ping (usually it does).
2. Able to ssh into a chameleon: Network allows port 22 (usually it does), and sshd is running on chameleon.
3. Able to connect to chameleond: Network allows port 9992 (inside lab network, it allows 9992; outside of lab network, need ssh tunnel). chameleond needs to be running (check tail -f /var/log/chameleond)

In your testing, you were unable to SSH into these boards despite being able to ping them. That might be ssh is not running (ps | grep sshd)
We can check ps and netstat. Or, lab network has some issue for port 22 to the board.

root@socfpga:~# ps  | grep sshd                                                                                       
  727 root      3592 S    /usr/sbin/sshd              ----> running
20572 root      3640 S    {sshd} sshd: root@pts/0
20589 root      1552 S    grep sshd



root@socfpga:~# netstat -tuln 
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       
tcp        0      0 0.0.0.0:111             0.0.0.0:*               LISTEN      
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      -----> listening to port 22.
tcp        0      0 0.0.0.0:9992            0.0.0.0:*               LISTEN      
tcp        0      0 0.0.0.0:9993            0.0.0.0:*               LISTEN      
tcp        0      0 0.0.0.0:9994            0.0.0.0:*               LISTEN      
tcp        0      0 :::22                   :::*                    LISTEN      
udp        0      0 0.0.0.0:111             0.0.0.0:* 



- There is no audio_board:

You might need to replug the connection between chameleon board and audio board.
After replug, reboot chameleon to let it detect audio board and see if that works.

Thanks!
1. chromeos15-row1-rack5-host3-chameleon
Does the entire audio board need to be replaced in this case? Would a reflashing of the chameleon board work?

2. chromeos15-row1-rack5-host4-chameleon
I rebooted the chameleon remotely but was still unable to find the audio board. I'll file a bug for a manual replug for the audio board and a manual reset of the chameleon board. 

3. chromeos15-row1-rack5-host2-chameleon and chromeos15-row1-rack4-host1-chameleon
I was able to SSH into these chameleons after a reset and confirm that chameleond was running. I'll file a bug for a manual replug for the audio board for these two as well. 
Owner: cychiang@chromium.org
Jimmy, can you comment on #1? 

I was unable to get the audio boards to be recognized after a reboot and manual replug. I'm checking to make sure the chameleons even have an audio board and will update this bug. 

Comment 11 by waihong@google.com, Jan 19 2018

Re c#10,

For the chromeos15-row1-rack5-host3-chameleon, replacing the audio board (probably having a wrong BT module) with a new one should be enough. Don't need to reflash the image or the main board.
Right, for wrong BT module one we need to replace a new audio board.
Be sure to reboot chameleon after replacing audio board.
Thanks Tom and Ruchi!
I was able to replace two audio boards that showed up as POR1007BT in 15-1-5-3 and 15-1-4-1.

After rebooting the chameleons, I saw that these two new boards still showed POR-1007BT but with a different MAC address. 

This seems like it's an audio board specific issue. Is it okay to change the BT MAC address to the found POR-1007BT MAC address in chameleon_info.py?
It seems that a batch of audio boards come with wrong part on it!

I have not tried with that model  POR-1007BT  before.
If you fill in the BT MAC address, and can pass the basic BT test like
audio_AudioBluetoothPlayback (testing A2DP),
audio_AudioBluetoothPlaybackRecord (testing HSP),
 then I think so!
But I am worried that the pair passcode might be different, or any other
unexpected issues.
Cc: tonycwlin@chromium.org
Hi Tony,
It seems that we have some audio boards having the wrong BT chips 
(see #8 and #13).

Could you inform the manufacturer and ask them to add this into the verification steps ?

Thanks!
Owner: rjahagir@chromium.org
Alright I'll change the BT mac addresses and see if the audio tests pass. 

Owner: cychiang@chromium.org
Unfortunately I'm getting similar errors:
FAIL: Unhandled ChameleonBluetoothAudioError: Can not find bluetooth module with MAC address 00:1F:81:88:88:8D
for both audio boards I've replaced, in spite of these being the correct MAC addresses. 

Since these are the same audio boards I got in a recent shipment from Chromestop I don't think the new Chameleon boards would have the correct BT chips. 

Jimmy, do you have any thoughts on where to go from here? Is there a way to distinguish between POR-1007BT and SX3868-3Y on the board itself? 
Thanks for the information.
Could you please ship one Audio board with POR-1007BT to me or Jimmy?
We'll check if we can make it work or need to replace with original BT module.
 
Sure, I'll contact Chromestop today. 
I've sent two chameleon boards that have POR-1007BT audio board to Tony and Jimmy. Please let me know once you've received them!
Summary: [chameleon] POR-1007BT audio board (was: [chameleon] test_server.py "no route to host" error)
Hi Jimmy, 

Have you received the boards yet? Were you able to look into the POR-1007BT issue? 

Thanks,
Ruchi
Hi Ruchi, do you have the tracking number ?
I am trying to locate it. I can't remember whether I have received it.
But it is not received at TPE chromestop.
Thanks!
Oh! Tony just told me he got it.
Thanks!
Owner: tonycwlin@chromium.org
I have compared two BT modules with different BT name (POR-1007BT and SX3868-3Y), they are with same BT chip which is OVC3860. So technically, there're identical from H/W perspective and should be fine for our application. Can we tweak the test program to be capable of modules with different BT name?
I believe the test only takes into account the MAC address, so as long as we change the address to match in the chameleon_info file, it should be okay. 

I'll go ahead and change the address and see if the tests can pass. 

Thanks for looking into this Tony!
Owner: rjahagir@chromium.org
rjahagir@, do you want me to send back those Chamelium systems? i got 2 sets from MTV.
Hi Tony! Please go ahead and send back the sets. Thanks.
Project Member

Comment 30 by bugdroid1@chromium.org, Mar 13 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/autotest/+/73dbdaeeb00bf4ca5904544be53cd96296a03662

commit 73dbdaeeb00bf4ca5904544be53cd96296a03662
Author: Ruchi Jahagirdar <rjahagir@google.com>
Date: Tue Mar 13 22:36:57 2018

[Chameleon] Editing chameleon bluetooth MAC

Editing chameleon_info to reflect change in chameleon bluetooth mac
address on audio board. These boards have the POR-1007BT module.

BUG=chromium:800523
TEST=None

Change-Id: If8249f0a703e4334fef721235b34a8ad5ac7b2be
Reviewed-on: https://chromium-review.googlesource.com/957794
Commit-Ready: Ruchi Jahagirdar <rjahagir@chromium.org>
Tested-by: Ruchi Jahagirdar <rjahagir@chromium.org>
Reviewed-by: Harpreet Grewal <harpreet@chromium.org>

[modify] https://crrev.com/73dbdaeeb00bf4ca5904544be53cd96296a03662/client/cros/chameleon/chameleon_info.py

Sign in to add a comment